MyBB Community Forums

Full Version: Hide Time Spent Online
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I spend a lot of time on my site... it's a little embarrassing. Is there a way to remove it?
you can change it in the database (thru phpMyAdmin) ; field is timeonline on users table (mybb_users) ; value is in seconds
If you want to remove it for every user, go to: Member Templates -> member_profile

And delete this code:

<tr>
<td class="trow2"><strong>{$lang->timeonline}</strong></td>
<td class="trow2">{$timeonline}</td>
</tr>

This will remove that line for every member.
(2012-01-08, 05:36 AM)José F. Wrote: [ -> ]If you want to remove it for every user, go to: Member Templates -> member_profile

And delete this code:

<tr>
<td class="trow2"><strong>{$lang->timeonline}</strong></td>
<td class="trow2">{$timeonline}</td>
</tr>

This will remove that line for every member.
How I can remove it only for admin? (group 4)
You will have to install this plugin: http://mybbhacks.zingaburga.com/showthread.php?tid=464

Then replace {$timeonline} in the mentioned template with:
<if $memprofile['usergroup'] != 4 then>{$timeonline}<else>hidden</if>
(2013-12-08, 12:52 AM)Destroy666 Wrote: [ -> ]You will have to install this plugin: http://mybbhacks.zingaburga.com/showthread.php?tid=464

Then replace {$timeonline} in the mentioned template with:
<if $memprofile['usergroup'] != 4 then>{$timeonline}<else>hidden</if>
Thank you ! It works !

Edit 1: So now I can change/hide everything from my profile using this method? just by changing "{$timeonline} with the right variable?
(2013-12-08, 01:09 AM)YOLOnline Wrote: [ -> ]So now I can change/hide everything from my profile using this method? just by changing "{$timeonline} with the right variable?

Exactly. You can use the plugin for any conditional and more useful stuff, for example calling a template inside a template or using functions/variables in them. Everything can be found on mybbhacks or this forum.