SimplePortal
Customization => Custom Coding => Topic started by: shade3134 on June 25, 2010, 07:10:03 PM
-
How do I make the "Who's Online" block just show the names of users online as a list? And not numbers or categorized?
-
Moved to the Custom Coding board.
echo '
<ul class="sp_list">
<li>', sp_embed_image('dot'), ' ', $txt['guests'], ': ', $stats['guests'], '</li>
<li>', sp_embed_image('dot'), ' ', $txt['hidden'], ': ', $stats['hidden'], '</li>
<li>', sp_embed_image('dot'), ' ', $txt['users'], ': ', $stats['num_users'], '</li>';
echo '
<ul class="sp_list">';
-
Moved to the Custom Coding board.
echo '
<ul class="sp_list">
<li>', sp_embed_image('dot'), ' ', $txt['guests'], ': ', $stats['guests'], '</li>
<li>', sp_embed_image('dot'), ' ', $txt['hidden'], ': ', $stats['hidden'], '</li>
<li>', sp_embed_image('dot'), ' ', $txt['users'], ': ', $stats['num_users'], '</li>';
echo '
<ul class="sp_list">';
That exact code with those lines aren't listed inside my PortalBlocks.php.
Simple Portal: 2.3.2
-
I have confirmed that that exact code is located within the "Sources/PortalBlocks.php" file for a clean SimplePortal install. Don't try searching for the entire block of code, its likely that your editor will fail at doing that (also make sure that you aren't using notepad, notepad++ is much better alternative), try searching for "<ul class="sp_list">" then check that the code around it matches the 'find' code.
-
They aren't listed together like that in mine. And they would have a different $stats like $stats_user_guest or something. When I replaced them, I just took their lines out to see if that worked and I keep getting an error on my site now. Could you upload an attachment of a copy? Because I just overwrote my backup thinking it was my original trying this....
-
I am still having trouble with this. I cannot find the exact code you listed in that exact positioning. Even so, the time I remotely thing it may be right, it might have a different tag somewhere in it.
-
Bump.
-
See, NOT exact:
(http://img6.imageshack.us/img6/8837/helpwf.jpg)
There's not even an echo' above it.
-
There must be an echo above the 'ul' tag, that is not shown in your screenshot.
If your file contains code for showing the spiders online, then you must be using SMF 2 not SMF 1.1.x (or you must have made a custom edit to that file). Apologies for the misunderstanding, although it would be good if you could update the "SMF Version" profile field in your SP.net profile area.
Finding and removing the code below should do what you want (for SMF 2):
echo '
<li>', sp_embed_image('dot'), ' ', $txt['hidden'], ': ', $stats['num_users_hidden'], '</li>
<li>', sp_embed_image('dot'), ' ', $txt['users'], ': ', $stats['num_users_online'], '</li>';
-
Thanks!! Except the list is in the center at the bottom. How do I move it to the left?
-
Normally the list should be aligned to the left, you could try adding 'text-align: left;' to the style option for the body of that block.