vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Total Time Spent On Forums (https://vborg.vbsupport.ru/showthread.php?t=97830)

Virtuosofriend 03-20-2006 09:41 PM

Did everyone else freeze after upgraded to 3.5.4?

mvolking 03-21-2006 01:56 AM

Quote:

Originally Posted by Virtuosofriend
Did everyone else freeze after upgraded to 3.5.4?

I'm running 3.5.4 and no problems.

Virtuosofriend 03-21-2006 04:14 PM

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.

hotwheels 03-24-2006 07:48 PM

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 --- >


lifesourcerec 03-25-2006 03:56 PM

It's still not calculating into days, hours, etc. and I've uploaded the plugin.

xlegends 03-25-2006 05:32 PM

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 --- >


Virtuosofriend 03-29-2006 04:38 PM

Quote:

Originally Posted by hotwheels
here ya go:

thanks very much.It seems i had some problems reading the readme text ;x

deeps_ar 03-29-2006 04:48 PM

Is this working now? Can I go ahead and install it?

---MAD--- 04-10-2006 07:23 AM

does this work on 3.5.4?

speedracer68 04-10-2006 10:50 PM

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?


All times are GMT. The time now is 06:59 PM.

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.01181 seconds
  • Memory Usage 1,744KB
  • 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
  • (1)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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