So here's the thing, the script by elf to show on website the most powerfull guild is bugged as we all know.
Link: http://otland.net/f118/0-3-6-0-4-to...e-database-query-68893/index4.html#post727320
Where is the bug?
When none of the guild have frags, the guild names wont show up and the link to the guild will be wrong.
Fixing:
I add a condition IF, to check wether the guild have frags or not.
Well, it works perfectly, but i want a lil more. With this only condition the topic "Most powerfull guild" on latest news goes a lil ugly.
So, i added a contra-condition, elseif.
This checks the frags, and if none of the guild have frag, the site goes like this:
text means: None of the guild have frag.
So far, 100% ok.
BUT!..
When only ONE guild make a frag, then it goes like this:
As you can see, the contra-condition is still working, because there are still guild with no frags.
So, here is my request:
I need to make the contra-contidion elseif check ALL the guild, and if a single one have a frag, the condition is ignored.
Like here's an example:
Thx, if you can help but you missed some point just ask.
Note: this will help loads of people wich servers have no guilds with frag.
Link: http://otland.net/f118/0-3-6-0-4-to...e-database-query-68893/index4.html#post727320
Where is the bug?
When none of the guild have frags, the guild names wont show up and the link to the guild will be wrong.
Fixing:
I add a condition IF, to check wether the guild have frags or not.
Code:
if(($guild['frags']) != "0")
{
$main_content .= ' <td style="width: 25%; text-align: center;">
<a href="?subtopic=guilds&action=show&guild='.$guild['id'].'"><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>';
}
Well, it works perfectly, but i want a lil more. With this only condition the topic "Most powerfull guild" on latest news goes a lil ugly.
So, i added a contra-condition, elseif.
Code:
elseif(($guild['frags']) == "0")
{
$main_content .= '<td "height="104"><center>Nenhuma das guilds possui frag.</center></td>';
}
This checks the frags, and if none of the guild have frag, the site goes like this:
text means: None of the guild have frag.
So far, 100% ok.
BUT!..
When only ONE guild make a frag, then it goes like this:
As you can see, the contra-condition is still working, because there are still guild with no frags.
So, here is my request:
I need to make the contra-contidion elseif check ALL the guild, and if a single one have a frag, the condition is ignored.
Like here's an example:
Code:
if(($guild['frags']) != "0")
{
$main_content .= ' <td style="width: 25%; text-align: center;">
<a href="?subtopic=guilds&action=show&guild='.$guild['id'].'"><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>';
}
elseif([red]CONDITION THE CHECKS !!ALL!! GUILDS FRAGS[/red]) == "0")
{
$main_content .= '<td "height="104"><center>Nenhuma das guilds possui frag.</center></td>';
}
Thx, if you can help but you missed some point just ask.
Note: this will help loads of people wich servers have no guilds with frag.