SimplePortal

Customization => Custom Coding => Topic started by: MissyNL on March 22, 2011, 05:41:29 AM

Title: Who is online block
Post by: MissyNL on March 22, 2011, 05:41:29 AM
Hello.... since i totally can not code anything... but i really need this code i thought.. why dont i post it here :)

For the Who is online block:

I really need the guests and the memberspart to be shown together. And the hidden part to be removed.
Just show...

Online : 74

Not all seperated...

Can someone help me with this please?  :angel:

Title: Re: Who is online block
Post by: grafitus on March 22, 2011, 02:21:14 PM
If I understand you correctly:

./Sources/PortalBlocks.php
Code: (Find) [Select]
<li>', sp_embed_image('dot'), ' ', $txt['guests'], ': ', $stats['num_guests'], '</li>';

if (!empty($modSettings['show_spider_online']) && ($modSettings['show_spider_online'] < 3 || allowedTo('admin_forum')))
echo '
<li>', sp_embed_image('dot'), ' ', $txt['spiders'], ': ', $stats['num_spiders'], '</li>';

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>';
Code: (Replace) [Select]
<li>', sp_embed_image('dot'), ' ', $txt['users'], ': ', $stats['total_users'], '</li>';
Title: Re: Who is online block
Post by: MissyNL on March 25, 2011, 10:25:00 AM
Hi!

Thank you sooo much :)

Does this also exclude the who is online list? Because i still want to save that...

And... maybe this is wrong... but is it possible to "add" more guests to the list? Like 20% more guests?
Title: Re: Who is online block
Post by: AngelinaBelle on March 25, 2011, 10:33:05 AM
You can see that the lines involved here are all about "num" of something. He just replaced a bunch of "num of" lines with the grand total.


Do I understand that you would wish to display that you have 20% more guest than the number you actually have?
Title: Re: Who is online block
Post by: MissyNL on April 05, 2011, 10:30:30 AM
if that is possible... that would be awsome :)
Title: Re: Who is online block
Post by: AngelinaBelle on April 05, 2011, 11:29:14 PM
I cannot imagine why, but all you need to do is multiply by 1.2.
So, instead of $stats['num_guests'], you would use $stats['num_guests'] * 1.2.
Title: Re: Who is online block
Post by: MissyNL on April 07, 2011, 02:38:41 PM
thank you very much...
SimplePortal 2.3.8 © 2008-2024, SimplePortal