SimplePortal

Customization => Custom Coding => Topic started by: inter on December 17, 2009, 07:28:13 AM

Title: Who's Online Help
Post by: inter on December 17, 2009, 07:28:13 AM
SMF 2.0 RC2
SP 2.3.1

Sorry My English  :nervous-happy:

Hey children how to make that the block who online was not in the form of the list and showed names of users through a comma and that after last user of a comma was not
Title: Re: Who's Online Help
Post by: Nathaniel on December 17, 2009, 08:10:08 PM
Code: ("Find (Sources/PortalBlocks.php)") [Select]
<div class="sp_online_flow">
<ul class="sp_list">';

foreach ($stats['users_online'] as $user)
echo '
<li class="sp_list_indent">', sp_embed_image($user['name'] == 'H' ? 'tux' : 'user'), ' ', $user['hidden'] ? '<em>' . $user['link'] . '</em>' : $user['link'], '</li>';

echo '
</ul>
</div>';

Code: ("Replace") [Select]
<div class="sp_online_flow">';

$i = 0;
foreach ($stats['users_online'] as $user)
echo '
', $user['hidden'] ? '<em>' . $user['link'] . '</em>' : $user['link'], ++$i != count($stats['users_online']) ? ', ' : '';

echo '
</div>';
Title: Re: Who's Online Help
Post by: inter on December 18, 2009, 01:30:43 PM
Nathaniel,Thanks!  :nervous-happy:
SimplePortal 2.3.8 © 2008-2024, SimplePortal