![]() |
This is a small (very small) Hack i made today. Its like ubb's UBonline.cgi hack. so small anyone could install it
Step 1 Open showthread.php/php3 and find Code:
$userid=$post[userid]; Code:
save and upload Step 3 open your postbit template and instert $usersstatus where you want to display if the threads poster is online or offline Step 4 download or make 2 images (offline.gif and online.gif) I use the ones that ubbdev.com use Please be nice on me, this is the first hack i have made for vBulletin. If someone has already done it sorry. BTW - does anyone want to help me with a Instant Message Hack, i am crap at php but i have done the templates etc etc. If you have trouble with this hack reply or contact me |
thx for the great hack :) no problems so far.....guess i need to install it first :p
|
i can tell you it works on my vBulletin. no demo sorry
|
2 comments....
1) This is already included as a feature in version 2.0 of vBulletin. 2) Private messaging is included as a hack now and as a standard feature in version 2.0 |
And this will add a query per post. It'd be more efficient to join it with the big query.
|
I agree.
I will wait till a better optimized version of this hack comes out before adding it...or wait till 2.0. :) Thanks for the hack though surfichris. |
works great but here are some little improvments:
to make the online icon a link to the onlineusers hack change this: $usersstatus = "<img src=\"images/online.gif\" border=0 alt=\"$userinfo[username] is Online\">"; to: $usersstatus = "<a href=\"whoisonline.php?action=onlineusers\"><img src=\"images/online.gif\" border=0 alt=\"$userinfo[username] is Online\"></a>"; to see if the user is online on the memberlist: open memberlist.php. look for $posts = $user[posts]; (at the start) and After it add: // User Online Icon Hack by Chris Boulton $status = $DB_site->query_first("SELECT session.userid,user.username,user.receivepm FROM session, user WHERE session.userid=user.userid AND session.userid='".intval($userinfo[userid])."'"); if ($status) { $usersstatus = "<a href=\"whoisonline.php?action=onlineusers\"><img src=\"images/online.gif\" border=0 alt=\"$userinfo[username] is Online\"></a>"; } else { $usersstatus = "<img src=\"images/offline.gif\" border=0 alt=\"$userinfo[username] is Offline\">"; } // User Online Icon Hack by Chris Boulton then goto memberlist template: Find: <td align="center" bgcolor="{tableheadbgcolor}"><smallfont color="{tableheadtextcolor}"><b>Number Of Posts </b></smallfont></td> After, Add: <td align="center" bgcolor="{tableheadbgcolor}"><smallfont color="{tableheadtextcolor}"><b>Status</b></smallfont></td> </tr> Then Goto memberlistbit look for: <td bgcolor="{firstaltcolor}" align="center"><normalfont>$posts</normalfont></td> After Add: <td bgcolor="{secondaltcolor}" align="center"><normalfont>$usersstatus </normalfont></td> Thats all Update: Sorry im having troble with the second improvment that It shows all the users as offline. anyone can help? |
i know it will be in 2.0 but i started to miss UBB (kinda) so i made this.
I just made something simple becuase i'm pretty crap and don't know much php. Any way, thanks for your comments and thanks for the enhancments |
Quote:
http://matt2004.com/cgi-bin/ubb/post...1&topic=000001 click my status (online/offline) |
|
All times are GMT. The time now is 10:47 AM. |
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:
|