vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   End-User Options - Time Spent On Board (https://vborg.vbsupport.ru/showthread.php?t=133059)

tnguy3n 12-01-2006 10:00 PM

Time Spent On Board
 
Total Time Spent On Board (for vB 3.6.x)
Author: tnguy3n
Live Demo: http://www.vbviet.org/forums/member.php?u=1

This hack displays total time that users spent on the board in postbit and member info page.

To show all time units including seconds, minutes, hours, etc, uncomment some line codes in "Total Spent Time On Board" plugin.

Query: 1
File mod: 1
Template mod: 1

######################################
INSTALLATION:

1. Import product-totaltime.xml in Product Manager
2. Modify file & make changes in templates as instructed in install.txt file

---------------------------
Upgrade from v.1.0 (for vB 3.5.x)?
Just simply select the overwrite option upon importing the product xml file.

projectego 12-02-2006 09:17 PM

Installed! Thanks. :)

ogameclub 12-02-2006 09:48 PM

Installed! Thanks. This time is zero time.

FleaBag 12-02-2006 10:51 PM

This may be a stupid question but does it include time prior to installing the hack?

tnguy3n 12-02-2006 11:03 PM

no, and there's no way to know how much time they spent on your forums previously. AFAIK, vBulletin does not keep record on this stuff.

MorrisMcD 12-03-2006 12:15 AM

this is a cool hack.. I would implement it, but several users leave themselves on whos online including myself when away since we are on and off all day.. It would depress me to actually say I was on for 24 hours a day pretty much.. :)

Cool hack tho

Shazz 12-03-2006 12:34 AM

/me trys the install now

Shazz 12-03-2006 01:51 AM

I just installed it, seems to be working fine.
But....
If you were to uninstall it does it leave some querys or tables behind?

Shazz 12-03-2006 05:39 AM

I swear this isen't right
My newest member has like 3 days spent time on it and he just joined =?
And Ive been on my board longer then 3 hours and thats all I have...
Im lost

MrPHD 12-03-2006 08:54 AM

Installed and running. Thanks

lifesourcerec 12-03-2006 09:48 AM

This mod never liked me. It doesn't break down the time. Only gives a long number.

LordDB 12-03-2006 10:18 AM

tnguy3n, great hack, but, your screenshot shows you as been on your forum for:

1 week, 3 days, 23 hours

why doesn't mine show such lengths of time, as I can't believe you've been connected online at your forum that duration of time.

It only shows mine as:

38 mins, 20 secs

Do enlighten us as to what I've done wrong, or how to adjust such info.

Thx n regards

:)

farukcan 12-03-2006 02:16 PM

tahanks... ;)

Installed....

Shazz 12-03-2006 03:18 PM

Quote:

Originally Posted by daPLAYBOY (Post 1130649)
tnguy3n, great hack, but, your screenshot shows you as been on your forum for:

1 week, 3 days, 23 hours

why doesn't mine show such lengths of time, as I can't believe you've been connected online at your forum that duration of time.

It only shows mine as:

38 mins, 20 secs

Do enlighten us as to what I've done wrong, or how to adjust such info.

Thx n regards

:)


I think you might have had the same problem as me :)

aveon 12-03-2006 03:35 PM

Quote:

Originally Posted by lifesourcerec (Post 1130634)
This mod never liked me. It doesn't break down the time. Only gives a long number.


same here how can we resolve this????

JuGgOlOw22 12-03-2006 04:01 PM

any one know how to fix this i cant get it back

Parse error: syntax error, unexpected '*' in /home/nexte3/public_html/includes/class_core.php on line 2892

MrPHD 12-03-2006 04:09 PM

It seens you wrong edit the file, you can see ", 'lastvisit');

$this->userinfo['lastvisit'] = $this->userinfo['lastactivity'];
}
else
{

This is the line you tell an error, you can fix that unistall the hack and edit classcore.php again. Regards

Open includes/class_core.php, (1 change)

FIND:

// on this to be updated in real time.
$this->registry->db->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET lastactivity = " . TIMENOW . "
WHERE userid = " . $this->userinfo['userid'] . "
", 'lastvisit');

REPLACE WITH:

// on this to be updated in real time.
/* $this->registry->db->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET lastactivity = " . TIMENOW . "
WHERE userid = " . $this->userinfo['userid'] . "
", 'lastvisit');
*/

if(TIMENOW - $this->userinfo['lastactivity'] > $this->registry->options['cookietimeout'])
{
$newtime = '0';
}
else
{
$newtime = TIMENOW - $this->userinfo['lastactivity'];
}
$this->registry->db->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET lastactivity = " . TIMENOW . ",
timeonboard = timeonboard + $newtime
WHERE userid = " . $this->userinfo['userid'] . "
", 'lastvisit');

if you donĀ“t know use php well, i advice backup the original file allways, and you can backup renamed like class_core.phpold and put edited file and chmod 777.

tnguy3n 12-03-2006 06:41 PM

that's the total time I've spent on my board, and my board has been open for 1 1/2 years now. Note that your total time counts only at the point your install this hack.

lifesourcerec 12-03-2006 11:12 PM

Got it working. Looks like it was conflicting with another code.

underESTIMATED 12-08-2006 07:03 AM

Fatal error: Cannot redeclare timeonboard() (previously declared in /home/ohiosci/public_html/forum/global.php(356) : eval()'d code:4) in /home/ohiosci/public_html/forum/member.php(825) : eval()'d code on line 4

Help!?
:(

Happens when I click on a members name to see their profile, otherwise it's fine.

I missed this hack when I upgraded versions, nice to see that somewhere in all my previous coding it kept my times too! I pissed alot of people off. lol

trd167 12-08-2006 07:56 AM

installed and running thanks

underESTIMATED 12-09-2006 02:41 AM

Quote:

Originally Posted by underESTIMATED (Post 1134365)
Fatal error: Cannot redeclare timeonboard() (previously declared in /home/ohiosci/public_html/forum/global.php(356) : eval()'d code:4) in /home/ohiosci/public_html/forum/member.php(825) : eval()'d code on line 4

Anyone able to help diagnose my issue?

It only occurs when you attempt to look at the profile of a member. :tired:

yingzhou 12-09-2006 07:00 PM

Thank for this hack! Cool!

underESTIMATED 12-12-2006 01:34 AM

Bump For A Fix.........
Quote:

($hook = vBulletinHook::fetch_hook('member_complete')) ? eval($hook) : false;
That's the line it's referring to in my member.php file


Quote:

($hook = vBulletinHook::fetch_hook('global_start')) ? eval($hook) : false;
That's the line it's referring to in my global.php file


I completely uninstalled this, and reinstalled it again. Still an issue.
:confused: :confused: :confused: :confused: :confused: :confused:

loonytune15 12-12-2006 04:05 AM

Great Hack, can we have a top users list?

Cybershaolin 12-24-2006 04:59 AM

Using it but it shows information in english like day, hour etc. Is there any way to show the info in french?

adonfun 12-27-2006 10:10 PM

Thank you, installed it :)

IrPr 12-29-2006 12:06 AM

Thanks tnguy3n, Upgrading now

GNDI 12-29-2006 05:26 PM

It keeps saying I have used 0 seconds on my board

Spent Time On Board: 0 sec

Shazz 12-29-2006 05:33 PM

Quote:

Originally Posted by GNDI (Post 1147042)
It keeps saying I have used 0 seconds on my board

Spent Time On Board: 0 sec

Did you just barely install it?
The time starts when you install it

Marc118 12-29-2006 07:19 PM

Hey sweet hack.

I have it installed but I have one problem. It is showing in the user profile but not in the postbit? I edited the postbit with the codes you have in the install.txt

Thanks.

GNDI 12-30-2006 11:58 AM

I installed it yesterday, and yes, i know it won't from before this was installed.

I'm thinking is it necessary to delete cookie before it start counting?

Invalid ID 12-30-2006 11:46 PM

It's working great, but in PM it says "Spent Time On Board: 4566"

In posts the same user timing says "Spent Time On Board: 1 h 16 min 6 sec"

Shazz 12-30-2006 11:48 PM

Same goes for when your click on the post number in the right hand corner

GNDI 12-30-2006 11:51 PM

i'll think I just have to uninstall this one

Raptor 01-19-2007 05:33 AM

perfect on 3.6.4 - THANKS !

Snake 01-21-2007 01:47 AM

Is this going to work just fine on 3.6.4? No problems at all?

Shazz 01-21-2007 02:24 AM

Quote:

Originally Posted by Snake (Post 1163970)
Is this going to work just fine on 3.6.4? No problems at all?

Few bugs... that are known if you view some pages back

Snake 01-21-2007 09:53 AM

Alright I'll install this but I think it should say "3 days 20 hours 37 mins" instead of "3 day 20 hour 37 min". Any fix for this?

maranello 01-21-2007 10:25 AM

simple phrase change, it'll take u 30 seconds or less to do it yourself.


All times are GMT. The time now is 06:34 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01173 seconds
  • Memory Usage 1,807KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete