![]() |
hmm g-force, i just realised that the hack it's adding a query everywhere, in all pages. i really dont like that because i'm trying to stay with an average of max 18queries on my forums.
and you should use in your sessions.php something like: Code:
$timeactive = time() - $bbuserinfo['lastactivity']; UPDATE :) check below how to optimise the code and eliminate the extra query... wait for g-force to update his files... or do it yourself if your belt is strong enough. |
NSeXcellent:
make sure that the link is this: PHP Code:
everything is included in the zip file, other changes are just custom ones nothing necessary Da GoTTi: did you include the $post[onlinetime] variable in the postbit? Neo: how would you do it? TECK: thanks for the addition :) i will add the link to the first post ;) regards... g-force2k2 |
ok, g-force i found a way to dont load any query at all. you can update your code if you want... is your hack and it's a great tool.
now let's optimise shall we? :) here it is what i did, step by step (keep in mind i used my own terms, change them to yours): run this query: [sql]ALTER TABLE user ADD timeactivity int(10) unsigned DEFAULT '0' NOT NULL AFTER posts[/sql] in /admin/functions.php find: Code:
$post[joindate]=vbdate($registereddateformat,$post[joindate]); Code:
$post[joindate]=vbdate($registereddateformat,$post[joindate]); Code:
if ($ourtimenow - $bbuserinfo['lastactivity'] > $cookietimeout) { Code:
$timeactive = time() - $bbuserinfo['lastactivity']; Code:
Activity Online: <font color="#E4630A">$post[activity]</font> hour$pluralhour as i said before, i did it this way because all i wanted to have is the time in postbit. the results? a screenshot is here... go ahead and update your cool hack now. :) thanks for letting me aport a small contribution to it. cheers. floren. :) |
Great great HACK ! :classic:
Thank YOU very much man ! I use it on a (mutilated :) ) 2.2.2 board and works PERFECT ! Have A Cool Day ! |
TECK > your modification is NOT working for me :glasses:
Give me MySQL error :( PS: esti cumva Roman ? :D |
monitox, it doesnt work because the params and variables are not identical. this is a custom install for my forum, not the original hack. just wait for g-force to customize it, because you add an extra query on the process with his current hack...
and yes i'm romanian.. you can tell by the name. :) |
g-force =
Yes the code is in the postbit, here is what I got in there: <p align="right"><smallfont><a href="javascript:openeditsigwindow(490,320,'$session[sessionhash]','$post[userid]')">Edit Sig</a> | <a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged] | <a href='timeonline.php?s=$session[sessionhash]&action=view_leader'>Time Online:</a>$post[onlinetime]</smallfont></p> anything wrong? |
Da_GoTTi: did you make the admin/functions.php file edit? regards...
g-force2k2 |
Quote:
|
yes the modification is on the functions....
all of it is in correctly, i dunno what is causing it. |
All times are GMT. The time now is 07:43 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|