Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-15-2001 Last Update: Never Installs: 0
 
No support by the author.

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];

  if ($userid!=0) {
    $userinfo=$post;
and UNDER it add
Code:
// 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 = "<img src=\"images/online.gif\" border=0 alt=\"$userinfo[username] is Online\">";
} else {
$usersstatus = "<img src=\"images/offline.gif\" border=0 alt=\"$userinfo[username] is Offline\">";
}
// User Online Icon Hack by Chris Boulton
Step 2
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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-15-2001, 04:54 AM
Guest
 
Posts: n/a
Default

thx for the great hack no problems so far.....guess i need to install it first
Reply With Quote
  #3  
Old 01-15-2001, 05:12 AM
Guest
 
Posts: n/a
Default

i can tell you it works on my vBulletin. no demo sorry
Reply With Quote
  #4  
Old 01-15-2001, 11:12 AM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #5  
Old 01-15-2001, 03:42 PM
Guest
 
Posts: n/a
Default

And this will add a query per post. It'd be more efficient to join it with the big query.
Reply With Quote
  #6  
Old 01-15-2001, 04:50 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #7  
Old 01-15-2001, 07:18 PM
Guest
 
Posts: n/a
Default

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?
Reply With Quote
  #8  
Old 01-16-2001, 12:12 AM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #9  
Old 01-16-2001, 12:32 AM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by wluke
2 comments....


2) Private messaging is included as a hack now and as a standard feature in version 2.0
I know about private messaging instant messaging is different
http://matt2004.com/cgi-bin/ubb/post...1&topic=000001 click my status (online/offline)
Reply With Quote
  #10  
Old 01-16-2001, 08:27 AM
Guest
 
Posts: n/a
Default

on line

off line
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:22 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.04788 seconds
  • Memory Usage 2,263KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete