Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
Total Time Spent On Forums Details »»
Total Time Spent On Forums
Version: 1.00, by tnguy3n tnguy3n is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 10-06-2005 Last Update: Never Installs: 129
Uses Plugins Template Edits
Code Changes  
No support by the author.

Total Time Spent On Board
Author: tnguy3n
Live Demo: http://12.226.255.221/vb35

This hack shows total time that users spent on the board.

To show all time units including seconds, minutes, hours, etc, uncomment lines for thoese variables in "Total Spent Time On Board" plugin.

Query: 1
File modification: 1
Plugins: 2
Template mod: 2

Update: 10/12/05
Add option to show user's total spent time on forums in the profile.
If you want to run the User's Total Spent Time In Profile as an stand-alone hack, you have to run run following query:
PHP Code:
ALTER TABLE `userADD `timeonboardINT10 NOT NULL AFTER `lastactivity`; 

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #102  
Old 03-20-2006, 09:41 PM
Virtuosofriend Virtuosofriend is offline
 
Join Date: Nov 2004
Location: Greece
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did everyone else freeze after upgraded to 3.5.4?
Reply With Quote
  #103  
Old 03-21-2006, 01:56 AM
mvolking mvolking is offline
 
Join Date: Feb 2006
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Virtuosofriend
Did everyone else freeze after upgraded to 3.5.4?
I'm running 3.5.4 and no problems.
Reply With Quote
  #104  
Old 03-21-2006, 04:14 PM
Virtuosofriend Virtuosofriend is offline
 
Join Date: Nov 2004
Location: Greece
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm.Do you have to edit a php file or something?
Quote:
Query: 1
File modification: 1
Plugins: 2
Template mod: 2
Can you post here the file modification,if any,it seems it is not in the instructions.
Reply With Quote
  #105  
Old 03-24-2006, 07:48 PM
hotwheels hotwheels is offline
 
Join Date: May 2005
Location: Cheyenne, wy
Posts: 1,380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Virtuosofriend
Hmmm.Do you have to edit a php file or something?

Can you post here the file modification,if any,it seems it is not in the instructions.
here ya go:
Quote:
[Total Time Spent On Board
Author: tnguy3n
Live Demo: http://www.vbviet.org

This hack shows total time that users spent on the board.
To show all time units including seconds, minutes, hours, etc, uncomment lines for thoese variables in "Total Spent Time On Board" plugin.

Query: 1
File mod: 1
Template mod: 1

#----------------------- \?/ ----------------------#

######### QUERY #########
ALTER TABLE `user` ADD `timeonboard` INT( 10 ) NOT NULL AFTER `lastactivity` ;


######### FILE MODIFICATION ##########
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');


########## PLUGINS ###########
UPLOAD timeonboard.xml plugin

########## TEMPLATE MOD ############

In postbit(_legacy),

FIND:

<div>
$vbphrase[posts]: $post[posts]
</div>


BELOW, ADD:

<div>
<strong>Time spent on board:</strong><br /> $post[timeonboard]
</div>

<! --- all done --- >
Reply With Quote
  #106  
Old 03-25-2006, 03:56 PM
lifesourcerec's Avatar
lifesourcerec lifesourcerec is offline
 
Join Date: Jan 2002
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's still not calculating into days, hours, etc. and I've uploaded the plugin.
Reply With Quote
  #107  
Old 03-25-2006, 05:32 PM
xlegends xlegends is offline
 
Join Date: Aug 2004
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For Those Not using Postbit Legacy and using postbit only. Basically modified postbit same way

Code:
########## TEMPLATE MOD ############

In postbit,

FIND:

				<div>
					$vbphrase[posts]: $post[posts]
				</div>


BELOW, ADD:

				<div>
					<strong>Time spent on board:</strong><br /> $post[timeonboard]
				</div>

<! --- all done --- >
Reply With Quote
  #108  
Old 03-29-2006, 04:38 PM
Virtuosofriend Virtuosofriend is offline
 
Join Date: Nov 2004
Location: Greece
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hotwheels
here ya go:
thanks very much.It seems i had some problems reading the readme text ;x
Reply With Quote
  #109  
Old 03-29-2006, 04:48 PM
deeps_ar deeps_ar is offline
 
Join Date: Mar 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this working now? Can I go ahead and install it?
Reply With Quote
  #110  
Old 04-10-2006, 07:23 AM
---MAD--- ---MAD--- is offline
 
Join Date: Jun 2005
Location: Earth
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does this work on 3.5.4?
Reply With Quote
  #111  
Old 04-10-2006, 10:50 PM
speedracer68 speedracer68 is offline
 
Join Date: Jul 2004
Location: California
Posts: 148
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I too have the same question. Does it work in 3.5.4? I'm sure some of the guys on my site will be shocked. Also, is the count retroactive or only from the point I install it and on?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05236 seconds
  • Memory Usage 2,304KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete