News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Remove "Total time logged in:" from top of page

Started by Mark Thomas, August 03, 2006, 03:47:24 PM

Previous topic - Next topic

Mark Thomas

SMF Version: SMF 1.1 RC2
Is there a way to disable the text "Total time logged in:" from the top of the page only? I don't mind having it show-up in the stats section.

I'm using 1.1RC2 and Tiny Portal.

thanks

codenaught

Find and remove (or comment out) the following in Themes/theme_name/index.template.php

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
Dev Consultant
Former SMF Doc Coordinator

Mark Thomas


MP

Quote from: Mark Thomas on August 07, 2006, 11:49:37 AM
Thanks, my members will love you!

This just in: They already do!!

PS: Thanks akabugeyes and SMF, good stuff!!

:)
Everyone seems normal until you get to know them.

THE BRA1N

How do you remove this from the forum stats page?

codenaught

Quote from: THE BRA1N on January 15, 2007, 06:00:53 PM
How do you remove this from the forum stats page?
Sorry THE BRAIN, I never saw your post in this topic until now. (In the future you may want to start a new topic, because as this topic was marked as solved, it was overlooked)

By forum stats do you mean the top 10 users who have been logged in on the forum or where it shows the logged in time when a user clicks the "Show general statistics for this member." link in a member's profile?  
Dev Consultant
Former SMF Doc Coordinator

THE BRA1N

Quote from: akabugeyes on March 21, 2007, 05:10:06 PM
Quote from: THE BRA1N on January 15, 2007, 06:00:53 PM
How do you remove this from the forum stats page?
Sorry THE BRAIN, I never saw your post in this topic until now. (In the future you may want to start a new topic, because as this topic was marked as solved, it was overlooked)

By forum stats do you mean the top 10 users who have been logged in on the forum or where it shows the logged in time when a user clicks the "Show general statistics for this member." link in a member's profile?&nbsp;

I originally meant the TOP 10 users but may as well include the gen stats in that. Our members dont like that feature so I would like to eliminate all instances of tracking their total time online.

codenaught

Sorry that I overlooked this. Is it safe to assume you still haven't been able to get this done and still want to do this?
Dev Consultant
Former SMF Doc Coordinator

cmcmom

Quote from: akabugeyes on June 24, 2007, 05:24:25 PM
Sorry that I overlooked this. Is it safe to assume you still haven't been able to get this done and still want to do this?
I don't know about him but I might be interested in this.  My Members are voting now on the first issue.   I don't want to let them vote on this one unless I already know it can be fixed.


Advertisement: