The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||
[ Click Here ] to download the latest update!
Nifty Addon by TECK: ![]() [View TECK's Modification] Yeah my first hack for vb2.2.7 ![]() ![]() What does this hack do? Just as the title states ![]() ![]() Configurable:: The time limit before a user is considered inactive is configurable and is included in the install txt file... so if you want a user to be defined as inactive after 3 minutes then there'll be a variable in the script to limit that configure that ![]() Also Configurable is the amount of users to show per page on the leader time online board ![]() Features :: Includes both viewable on the postbit and getinfo templates... Includes a leader board for the top users time online ![]() What to do? :: Queries to Run (1) File Modification (5) Template Modificatiion (2) Templates to Add (3) Files to Upload (1) :: [ timeonline.php ] (forum directory) It's an easy hack to install (took me a little time to configure) but it looks great imo... probably a hack that will use and that i can see every forum having... why not right ![]() ![]() ![]() Edit :: Viewable Demo [ Here ] Note :: If for some odd reason you get a division by zero error find: PHP Code:
PHP Code:
Show Your Support
|
Comments |
#47
|
||||
|
||||
![]()
LOL Now it doesn't show up at all in the getinfo template, even when there is some time. Do we need to check for zeros on all of it or something?
You know me, g-force2k2, it never ceases to go quite right in the beginning. ![]() |
#48
|
|||
|
|||
![]()
nah actually Boofo that was my bad... in the member.php replace the code i just gave you with this code:
PHP Code:
![]() now open index.php find: PHP Code:
PHP Code:
place where you want to show : PHP Code:
![]() g-force2k2 |
#49
|
||||
|
||||
![]()
Firefly's Code:
Code:
+-------------------------------------------------------------------------------------------------+ | Member of the day | +-------------------------------------------------------------------------------------------------+ | A hack by Chen 'FireFly' Avinadav (chen.avinadav@vbulletin.com) | +-------------------------------------------------------------------------------------------------+ + +++ + +-------------------------------------------------------------------------------------------------+ | In index.php, replace this code: | +-------------------------------------------------------------------------------------------------+ $permissions=getpermissions(); if (!$permissions['canview']) { show_nopermission(); } +-------------------------------------------------------------------------------------------------+ +-------------------------------------------------------------------------------------------------+ | With this code: | +-------------------------------------------------------------------------------------------------+ $permissions=getpermissions(); if (!$permissions['canview']) { show_nopermission(); } // start member of the day stuff $thisdate=date('Y-m-d'); $getdaytemplate=$DB_site->query_first("SELECT template FROM template WHERE title='memberoftheday' AND templatesetid=-2"); $daytemplate=$getdaytemplate['template']; $daybits=explode('||vb||',$daytemplate); if ($daybits[0]!=$thisdate or ($resetmember==1 and $bbuserinfo['usergroupid']==6)) { /* This template is either outdated or the admin wants to reset it. Either way, we need to choose a new member of the day. Aren't you excited?! */ $newmember=$DB_site->query_first("SELECT userid,username FROM user WHERE userid<>$daybits[1] AND (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=2) ORDER BY RAND() LIMIT 1"); $newtemplate=$thisdate.'||vb||'.$newmember['userid'].'||vb||'.$newmember['username']; $DB_site->query("UPDATE template SET template='".addslashes($newtemplate)."' WHERE templatesetid=-2 AND title='memberoftheday'"); $memberoftheday['userid']=$newmember['userid']; $memberoftheday['username']=$newmember['username']; } else { $memberoftheday['userid']=$daybits[1]; $memberoftheday['username']=$daybits[2]; } // end of member of the day stuff +-------------------------------------------------------------------------------------------------+ + +++ + +-------------------------------------------------------------------------------------------------+ | In the "forumhome" template, replace this code: | +-------------------------------------------------------------------------------------------------+ <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$newuserid">$newusername</a> +-------------------------------------------------------------------------------------------------+ +-------------------------------------------------------------------------------------------------+ | With this code: | +-------------------------------------------------------------------------------------------------+ <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$newuserid">$newusername</a><br> The $bbtitle member of the day is <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$memberoftheday[userid]">$memberoftheday[username]</a> +-------------------------------------------------------------------------------------------------+ + +++ + +-------------------------------------------------------------------------------------------------+ | Run this query: | +-------------------------------------------------------------------------------------------------+ INSERT INTO template (templateid,templatesetid,title,template) VALUES (NULL,-2,'memberoftheday','0||vb||0||vb||0'); +-------------------------------------------------------------------------------------------------+ Code:
// get total posts before it add: $tuser = $DB_site->query_first("SELECT username,userid,timeonline FROM user ORDER BY timeonline DESC LIMIT 1"); $ttime = dotimeonline($tuser[timeonline]); $bestonline = "<b>User Most Online:</b> <a href='member.php?s=&action=getinfo&userid=$tuser[userid]>$tuser[username]</a> - $ttime"; then in the forumhome template where you want to appear place the variable :: $bestonline |
#50
|
|||
|
|||
![]()
okay thanks Boofo i don't see how the codes contrast... but i will install this on a my forum to see what i can observe for you regards... i posted some other coding above if you want to test that..
g-force2k2 |
#51
|
||||
|
||||
![]()
No need to test it on your end. Both fixes work perfectly. Thank you very much, sir.
![]() We lucked out on this one. We usually have to go through alot more to fix it to work with my board. That must mean you are getting better and better all the time, huh? ![]() ![]() ![]() Now, all we have to do is get it not to show any members in the listing with the times at zero and we are all set. ![]() |
#52
|
|||
|
|||
![]()
Boofo try using this query then? ::
PHP Code:
![]() ![]() g-force2k2 |
#53
|
||||
|
||||
![]()
Sorry, that didn't change anything.
![]() I'm not anywhere near as good as you on this stuff. I just seem to find more bugs with my setup than anyone else. I figure, if you can fix it to work with my site, then it will work with anyone's site. At least, that's the way it seems most of the time. ![]() Quote:
|
#54
|
|||
|
|||
![]()
Boofo
open timeonline.php find: PHP Code:
PHP Code:
![]() g-force2k2 |
#55
|
||||
|
||||
![]()
You're good! that fixed it.
![]() What should this be at now? PHP Code:
|
#56
|
|||
|
|||
![]()
you can keep that as is as well
![]() ![]() g-force2k2 |
#57
|
||||
|
||||
![]()
Thanks again for all of the help. Great hack!
![]() |
#58
|
|||
|
|||
![]()
Best hack out for a long time! GREAT WORK!!!
![]() |
#59
|
|||
|
|||
![]()
I want to install this hack but I have one question, will it show the users time online when they are in invisable mode?
Thanks! |
#60
|
|||
|
|||
![]()
scottct1 yeah it should... but i don't see that as a problem...
g-force2k2 |
#61
|
||||
|
||||
![]()
Cool hack, but a problem?
Time online per day is out of whack for everyone but users who register after the hack is installed... any way to change it to start averaging from 0 rather than looking at how long the user has been registered? IMHO, that calc as it is now isn't very useful. I for example have been registered for nearly 3 years, was online 3 hours after installing the hack. Shows my online time as 3 hours, but my per day average as 8 seconds ![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|