• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Most powerful guilds Gesior logo

Kristoffe

OMGWTFBBQ
Joined
Mar 10, 2012
Messages
65
Reaction score
5
Location
Sweden
Hi, got a bit of a problem.
I've searched for the problem here and on google, didn't find any solution.

Like this:
Amera - Latest News

My code:
Code:
$main_content .= '<div class="NewsHeadline">
    <div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">
        <table border="0">
            <tr>
                <td style="text-align: center; font-weight: bold;">
                    <font color="white">Most powerfull guilds</font>
                </td>
            </tr>
        </table>
    </div>
</div>
<table border="0" cellspacing="3" cellpadding="4" width="100%">
    <tr>';

foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,
    `g`.`logo_gfx_name` AS `logo`, COUNT(`g`.`name`) as `frags`
FROM `killers` k
    LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`
    LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`
    LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`
    LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`
WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1
    GROUP BY `name`
    ORDER BY `frags` DESC, `name` ASC
    LIMIT 0, 4;') as $guild)
    $main_content .= '        <td style="width: 25%; text-align: center;">
            <a href="?subtopic=guilds&action=show&guild=' .urlencode($guild['name']). '"><img src="guilds/' . ((!empty($guild['logo']) && file_exists('guilds/' . $guild['logo'])) ? $guild['logo'] : 'default_logo.gif') . '" width="64" height="64" border="0"/><br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills
        </td>';

$main_content .= '    </tr> 
</table>';

Reputation will ofcourse be added to the one that solves my problem

Thanks in advance. ^_^
 
Last edited:
Currently it's taking images from the folder guilds. All you have to do is change the path to images/guilds or where ever you have all your guild logos.
 
Back
Top