Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

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
  #22  
Old 01-24-2001, 03:03 AM
Guest
 
Posts: n/a
Default

You have the join the post.userid with the session table to see if the user is online. That is why I have made it an optional feature as it will add query time to showthread.
Reply With Quote
  #23  
Old 02-21-2001, 03:47 AM
Guest
 
Posts: n/a
Default

===== > showthread.php/php3

==== > Find
require("global.php");

====>Add below
// on line hack
if ($displayloggedin==1) {
$datecut=time()-$cookietimeout;

$numberguest=0;
$numberregistered=0;
if ($logged=$DB_site->query("SELECT userid FROM session")) {
while($thislogged=$DB_site->fetch_array($logged)) {
if ($thislogged[userid]==0) {
$numberguest++;
} else {
$numberregistered++;
}
}
}
$totalonline = $numberguest+$numberregistered;

$numbervisible=0;
$activeusers = "";
$loggedins=$DB_site->query("SELECT DISTINCT user.userid,username,session.location FROM user,session WHERE session.userid=user.userid AND session.userid<>0 AND invisible=0 ORDER BY username");
if ($loggedin=$DB_site->fetch_array($loggedins)) {
$numbervisible++;
$userid=$loggedin[userid];
$username=$loggedin[username];
$location=$loggedin[location];

eval("\$activeusers .= \"on line - ".gettemplate("loggedinuser")."\";");

while ($loggedin=$DB_site->fetch_array($loggedins)) {
$numbervisible++;
$userid=$loggedin[userid];
$username=$loggedin[username];
$location=$loggedin[location];
eval("\$activeusers .= \", ".gettemplate("loggedinuser")."\";");
}
}
$numberinvisible=$numberregistered-$numbervisible;
eval("\$loggedinusers = \"".gettemplate("loggedinusers")."\";");
}

// end on line hack

====>Save and upload this file

====> In "showthread" template:

==== > Find
$nextnewest</smallfont></TD>
</tr>
</table>

====>Add below

<tr bgcolor="{categorybackcolor}"><td colspan=6>
<smallfont>$activeusers</smallfont></td>
</tr>
Save template

----------------------

test
http://www.f0f.net/vb/showthread.php3?threadid=54
Reply With Quote
  #24  
Old 02-21-2001, 10:53 AM
Guest
 
Posts: n/a
Default

i did a similar hack for 1.x but i added the db-queries to existing queries so that there wont be an extra query(load) to the database.
Reply With Quote
  #25  
Old 02-27-2001, 04:57 PM
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

But it does not show if they are online in the message board where the person made the message?
Reply With Quote
  #26  
Old 02-28-2001, 03:37 AM
Guest
 
Posts: n/a
Default

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

1) This is already included as a feature in version 2.0 of vBulletin.
I know, who said it was for 2 it is for the version 1 series

Quote:
Originally posted by philliplewis

2) Private messaging is included as a hack now and as a standard feature in version 2.0
I know that to. instant messages is different. it allows you to click there status icon (Online or Offline) and a window pops up and you can send a message to them. When they visit the boards and have an unread instant message a popup box appears with the message. Read through this post for a demo

Quote:
Originally posted by philliplewis

But it does not show if they are online in the message board where the person made the message?
It does
Reply With Quote
Reply


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 03:27 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05636 seconds
  • Memory Usage 2,248KB
  • Queries Executed 22 (?)
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
  • (3)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
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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