Support Forum
I have suppressed the output in the currently online and currently browsing outputs in the footer to not include guests. This is because on our live forum we do not have guests and any output in this area results in me getting asked lots of questions like ' How come there are guests showing when we don't have guests'. So I explain that if someone views the forum pages even if they can't log in then there a statistics generated. I explain that these guests cannot view form content but quite honestly there is only so many times I can repeat myself without getting a little annoyed. So I have tried to suppress the output for guests.
However I still get the number count like this:
How can I suppress this as well?
Conrad
in your sp theme, all the stats display is via called template tags... just remove the ones you dont want...
if you want to not display for guests, just check for member first with something like
if ($spThisUser->member) { # template tag here }
and it will only call the template tag for logged in users...
Visit Cruise Talk Central and Mr Papa's World
OK Steve so taking the relevant section from my theme spFoot.php:
sp_ColumnStart('tagClass=spColumnSection spLeft spOnlineStats&width=40%&height=0'); sp_OnlineStats('tagClass=spLeft', __sp('Most Users Ever Online: '), __sp('Currently Online: '), __sp('Currently Browsing this Page: ')); if (function_exists('sp_OnlinePageLink')) sp_OnlinePageLink('', __sp('See All Online Activity')); sp_ColumnEnd();
How would I insert your code into that section?
you have not clearly stated what you want to do - at least I have not followed it... but assuming its dealing with stats and I only see one stats template tag there, perhaps:
if ($spThisUser->member) {
sp_OnlineStats('tagClass=spLeft', __sp('Most Users Ever Online: '), __sp('Currently Online: '), __sp('Currently Browsing this Page: '));
}
Visit Cruise Talk Central and Mr Papa's World
What I want to do is suppress all stats from Guests in the footer. Inserting your code does that very simply so thanks.
Can you now tell me how to suppress the numbers 2 and 1 in the stats screenshot.? These I believe are related to the number of guests. Checking with firebug doesn't really give any clue as the number appears to be generated by the same HTML as that which generates the members names. So where are these numbers generated? spOnlineStats? If I can those numbers then I am there.
ah... didnt get that from the first post... odd, that bothers some folks, but hey, to each his own...
I would have used a filter to remove rather than editing core code... each template tags contains a filter at the end that allows you to further change up the output... in this case, its not a simple filter...
I can open a ticket to see if we can add an 'suppress guests' type option to the argument list...
Visit Cruise Talk Central and Mr Papa's World
That would be great and infinitely preferable to tinkering in common-view-functions. I explained why I have to suppress the word guest from any stats, not me but the members of the forum. I want rid of the numbers because without the words guests online they make no sense and are annoying 🙂
Bit like me at times............
I have already made the changes... and will be committing a bit later when I make one other mod regarding an unread posts class on rows...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)