Total Spent Time On Board
     (for vB 3.6)
Author: tnguy3n
: Serberg
Live Demo: http://bormotuhi.net

         .
       . : , , , .

Query: 1
File mod: 1
Template mod: 1

######################################
:

1.   product-totaltime.xml.
2.   .



######### FILE MODIFICATION ##########
: includes/class_core.php, (1 change)

:

					// 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');

 :

					// 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');


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

1.  postbit(_legacy),

:

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


 :

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

.

2.  MEMBERINFO,

:
				<tr>
					<td>
						$vbphrase[total_posts]: <strong>$userinfo[posts]</strong> (<phrase 1="$postsperday">$vbphrase[x_posts_per_day]</phrase>)
					</td>
				</tr>
 :

				<tr>
					<td>
						$vbphrase[timeonboard]: $userinfo[timeonboard]
					</td>
				</tr>

.

3.  navbar, (optional)

:
			<if condition="$show['pmwarning']"><br /><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></if>

 :

			<br />$vbphrase[timeonboard]: $bbuserinfo[timeonboard]


.

.