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)

IrPr 01-12-2006 08:23 AM

Quote:

Originally Posted by peterska2
Let me see......

[high]* peterska2 gazes into crystal ball[/high]

You upgraded to 3.5.3
Your times stopped
You didn't re-apply the one code modification.




Don't worry, I do it every time.

one question
upgrading will lost 'timeonboard' field in 'user' table ?

another1
is it possible to make this without code modification ? a hook plugin or an extension is more stable than code modification

peterska2 01-12-2006 10:27 AM

It doesn't lose the data, just the bit in the code edit that tells it to add to it.

I believe earlier in the thread someone else asked the same thing and the reply from the author was no due to the nature of the edit.

lifesourcerec 01-12-2006 01:35 PM

Quote:

Originally Posted by Moosa
same problem here untill re-uploading plugins

make sure u uploaded total time on board.zip plugin

re-uploaded the plugins 4 times. Still same thing.

lifesourcerec 01-12-2006 02:37 PM

Here is the part I need to know... in the instructions, it says:

Quote:

UPLOAD timeonboard.xml plugin
yet, the file is named, "total_time_on_board.xml"

Would that make any difference?

Megareus Rex 01-23-2006 02:57 PM

Question.

Is there a way to edit exactly how this hack displays the time spent? Like, to change it from using abbreviations to the full words, and adding commas between the different measures of time?

Right now, for me, it displays it like this:
Time spent in the forum:
2 month 0 week 1 day

But I want to have it as:
Time spent in the forum:
2 months, 0 weeks, 1 day

Also, is there a way so it gives the plural of the word if the amount is not 1? And to skip a measure of time if its 0, so it would display like this:
Time spent in the forum:
2 months, 1 day, X hours

fridayweb 01-28-2006 04:36 PM

I have added everything and it works great, and I too am interested in Megareus Rex's suggestion. I went into the Total Spent Time On Board In Profile plug-in and added 's's and commas to the different words, but I would like there to be a way to show just 'day' instead of 'days' if it is only one, etc.

If this is too much work, then it's not that big a deal. ;)

interceptor 01-31-2006 11:41 PM

works great.

"Installed"

lifesourcerec 02-02-2006 03:30 PM

Quote:

Originally Posted by IrPr
same problem here untill re-uploading plugins

make sure u uploaded total time on board.zip plugin

uploaded the xml file over and over again and still doesn't work.

Megareus Rex 02-11-2006 09:48 PM

So, any advancement on the changes I suggested...?

ctsolutions 02-13-2006 03:02 AM

works like a charm, thanks.

Installed

mike

ctsolutions 02-16-2006 03:24 PM

Quote:

Originally Posted by exceem
is there any way to display a "top 10 list of the time spent online" ?



BUMP !!!

Luggruff 02-17-2006 10:42 AM

is this hack showing how long a user has been logged on the last time, or how long he/she has been logged on no matter if he/she logs out/in?

vietkieu_cz 02-17-2006 06:59 PM

CHo hỏi làm sao để remove
các Query vậy?

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

Cách remove thì như thế nào?

Megareus Rex 02-17-2006 07:28 PM

Quote:

Originally Posted by Luggruff
is this hack showing how long a user has been logged on the last time, or how long he/she has been logged on no matter if he/she logs out/in?

It shows the total time a user has spent logged in on the board since either the hack's installation, or their join date (if they joined after it was installed).

gtsch 02-17-2006 09:13 PM

When I attempt to run an SQL query it says I'm not authorized, WTF? Am I doing that right?

Rickie3 02-22-2006 09:43 PM

one of members has brought to my attention that his time on board has decreased,he hadnt been online for 3 days,does this hack drop time online if he hasnt been online

Rickie3 02-23-2006 08:05 AM

ok for some unknown reason the timeonline has stalled completely,and i have not upgraded my board or made any changes

Satjunkies 03-09-2006 03:58 AM

For some of you that have install it and cant see...remember you are installing it to the postbit legacy, and have to change it in vbull options to refelct that.

mvolking 03-12-2006 02:44 AM

I installed the plug in, modified the MEMBERINFO template, and ran the query; I am still not getting anything in the profile!?! Any help??

mvolking 03-12-2006 08:14 AM

Quote:

Originally Posted by gtsch
When I attempt to run an SQL query it says I'm not authorized, WTF? Am I doing that right?

You have to make sure that your userid# has permission in the config.php file.

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?

Rahuldhanpat 04-11-2006 12:30 PM

Ok frineds......help me here ....

I m sending my class_core.php plz edit it according to above said and plz give me again......i tried but some error came and my stop to function plz help me
:)

And also tell me where to write query"don't mind i m new to this"Learning:)

Rahuldhanpat 04-11-2006 04:41 PM

still no replies

Rahuldhanpat 04-11-2006 04:41 PM

Plz send me this file via link .... PM me plz...

Rahuldhanpat 04-11-2006 05:42 PM

i m not able to run the queries even i made changes in the config.php

// ****** USERS WITH QUERY RUNNING PERMISSIONS ******
// The users specified here will be allowed to run queries from the control panel.
// See the above entries for more information on the format.
// Please note that the ability to run queries is quite powerful. You may wish
// to remove all user IDs from this list for security reasons.
$config['Admin']['canrunqueries'] = '';

// ****** UNDELETABLE / UNALTERABLE USERS ******
// The users specified here will not be deletable or alterable from the control panel by any users.
// To specify more than one user, separate userids with commas.
$config['Admin']['undeletableusers'] = '';

// ****** SUPER ADMINISTRATORS ******
// The users specified below will have permission to access the administrator permissions
// page, which controls the permissions of other administrators
$config['Admin']['superadministrators'] = '1';

Even now same prob...... I m not authorized to run query....

YOimYO 04-13-2006 11:19 AM

Just installed on 3.54.

Not working.

did all template edits, data base changes, and plugin uploads.

time on board remains at 0 forever :p


any suggestions ?


thx :D



EDIT :

OK found me prob. nvm ;)

works perfect on 3.54 ;)


thanks alot for the usefull hack :)

jodycwilliams 04-24-2006 01:54 PM

What'd you do to fix it, cause I'm having the same problems? I have the sucker installed per instructions but getting jack to display on the my template.

Thankfully, it is recording the time spent on boards into the DB already, just need to get it to display now.

jodycwilliams 04-24-2006 06:33 PM

Fixed already, thanks anyhow :P

Great hack. Not the most fun install, but well worth it.

tanyeri24 05-04-2006 12:33 AM

it stopped to count immediately hmm I had no changes in templates and no changes at plugin. I checked the installation again but all fine still stopped to count, is there an answer?
thanks in advance

lifesourcerec 05-08-2006 07:37 AM

Still does it in seconds and xml file is not converting to days, hours, seconds. Guess I uninstall.

JohnBee 05-08-2006 12:08 PM

Hmm installed on 3.5.4

Only the profile version, no display.
Added the query - still nothing.
Installed the original .xml hoping it would spark a response (no go)
Remove the conditional to force display in profile template, I get the writting but no data is display'd

Very odd...

I'll uninstall it unti its sorted out. Nice idea though. I can't wait to use it :)

How can we remove the Query?
ALTER TABLE `VB_user` DROP `timeonboard` INT( 10 ) NOT NULL AFTER `lastactivity` ; (Does not work)


All times are GMT. The time now is 06:41 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.01903 seconds
  • Memory Usage 1,829KB
  • 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
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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