Experienced Elementalist
- Joined
- Mar 28, 2015
- Messages
- 237
- Reaction score
- 69
Eh, not sure this is even release worthy, but I'm bored so here we are.
Add <th>Fame</th> where you'd like to place the column for fame in your rankings.php
Beneath
add
Then add
In corresponding order to where you placed the fame column.
This will display the amount of fame the character has, as well as switching colors of the fame integer (negative=red, 0=black positive=green).
Preview:
Add <th>Fame</th> where you'd like to place the column for fame in your rankings.php
Beneath
Code:
while($row = $result->fetch_assoc()) {
$ranking++;
$name = $row['name'];
Code:
$fame = $row['fame'];
if ($fame > 0) $color = '#008000';
if ($fame < 0) $color = '#FF0000';
if ($fame == 0) $color = '#000';
Code:
<td><b><span style=\"color: $color;\">".$row['fame']."</span></b></td>
This will display the amount of fame the character has, as well as switching colors of the fame integer (negative=red, 0=black positive=green).
Preview:
Attachments
You must be registered for see attachments list
Last edited: