SimplePortal
Support => English Support => Topic started by: Aw06 on September 10, 2008, 01:57:47 AM
-
How can i chage the format of the numbers in the Top posters Block ..
I wanna change
1- to 1.
-
Find this code from your 'SPortal.php' file (it occurs twice, you will need to change both):
<td>' . $member['list'] . '-</td>
Replace with this code:
<td>' . $member['list'] . '</td>
-
:'( :'(
That didnt go well, change it ... then i notice my avatar gone .... and when try to replace it page goes blank ....
seeing like 8 pages in the error log all related to SPortal.php
2: Cannot modify header information - headers already sent by (output started at /home/adrianw/public_html/forum/Sources/SPortal.php:3259)
/home/adrianw/public_html/forum/Sources/Load.php
1975
Im gonna change it back to the original code :'(
Ediittttt ..........
Replaced SPortal.php with original, problem seems fixed now .. guess i will stick with 1- lol
-
Um, that is a really small edit. It shouldn't cause any of those errors that you were refering to...
If you post your 'SPortal.php' file (as an attachment) then I can make the edit for you. ;)
-
I made the edit exactly how you had it, except you left out the dot (.) ... ill live with the dash instead of the dot >:-D
-
You should exactly do what LHVWB said. That dot there is to concatenate strings in PHP.
-
I made the change once too and it works fine, no errors or something else.
Take a look at our Top Poster Block. ;)
My code in the SPortal.php is this:
echo '<table>';
foreach ($top_posters as $member)
{
if (!empty($member['avatar']['href']))
echo ' <tr>
<td>' . $member['list'] . '.</td>
<td><img src="' . $member['avatar']['href'] . '" alt="" width="35" /></td><td> </td>
<td>' . $member['link'] . '<br />' . $member['posts'] . $txt['sp-tposterpost'] . '</td>
</tr>';
else
echo ' <tr>
<td>' . $member['list'] . '.</td>
<td> </td><td> </td>
<td>' . $member['link'] . '<br />' . $member['posts'] . $txt['sp-tposterpost'] . '</td>
</tr>';
}
echo '</table>';
-
You should exactly do what LHVWB said. That dot there is to concatenate strings in PHP.
I think the dot has to be there, ;P
-
The dots have to be there '.' , but you can remove the hyphin '-' .
-
I think the dot has to be there, ;P
The original code is this: <td>' . $member['list'] . '-</td>
I changed only the - before </td> to a dot and in our Top Poster Block you see now
1. instead of 1-