Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
Forumhome Chat Bar Details »»
Forumhome Chat Bar
Version: 1.00, by FASherman FASherman is offline
Developer Last Online: May 2011 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-28-2002 Last Update: Never Installs: 21
 
No support by the author.

First, giving credit...
This hack is an extension to [vB v2.2.1] Modification to the jpilot chat hack by JJR512 which is a " modification to Trog's original hack integrating jpilot into vBulletin, as seen here: http://www.vbulletin.com/forum/show...&threadid=17866"

Enough for the intros...

There are about a million of these kind of things and I wasn't even going to release this except I was asked to via email.

Here is the demo sight: http://www.fasherman.com/forums

Its short, sweet and simple. Its a table that sits on forumhome. The main line is a link to main_chat.php

It shows how many people are in the chat room. Instead of wasting precious queries trying to list who is in the room, the entire line is link to "Who's Online" page which will show that info. Why reinvent the wheel?

If even one person is in the chat room, the "lightbulb" is on.

These instructions assume you have JJR512's hack installed. If you don't start there, then come back.

The instructions are simple: in index.php, find (near the very end):

PHP Code:
eval("dooutput(\"".gettemplate('forumhome')."\");"); 
Above it, add:

PHP Code:
//CHAT BANNER
$chatters=$DB_site->query_first("SELECT count(*) as results from session where lastactivity>$datecut AND location=concat('/forums/main_chat.php?s=',sessionhash)");
if (
$chatters[results]!=0) {
  
$chatonoff="on.gif";
} else {
  
$chatonoff="off.gif";
}
eval(
"\$chatdisplay = \"".gettemplate('chatdisplay')."\";");
//CHAT BANNER END 
Thats it for program mods.

Add a new template [b]chatdisplay[b] with the contents:
<table cellSpacing="0" cellPadding="0" width="100%" align="center" bgColor="{tableheadbgcolor}" border="0">
<tr>
<td>
<table cellSpacing="1" cellPadding="4" width="100%" border="0">
<tr id="cat">
<td bgColor="{categorybackcolor}" colSpan="2">
<normalfont color="{categoryfontcolor}"> <b>Chat</b></font></a></td>
</tr>
<tr align="middle">
<td vAlign="top" bgColor="{secondaltcolor}" width="15">
<img alt src="images/$chatonoff" border="0" width="15" height="15"></td>
<td align="left" bgColor="{firstaltcolor}">
<normalfont>
<img alt src="images/forum-icons/chat.gif" border="0" width="32" height="32"><b>
<a href="main_chat.php?s=$session[sessionhash]" style="color: #000020">
Forum Chat Room</a></b></font> <br>
<smallfont>The Forum Chat Room is a
Java-based chat room for the members of forums. You may<br> be asked to grant permissions to the chatroom software; please do so.
<br><a href="online.php?s=$session[sessionhash]">Users in chatroom: $chatters[results]</a>
</font></td>
</tr>
</table>
</td>
</tr>
</table>
<br>

Modify template forumhome

Find:

<!-- main -->

Above it add:

$chatdisplay


Thats the whole thing, folks. Remember, this is subject to the same timeout considerations as the "user's online" list. It is possible that it may show users in chat who aren't actually there, but have left with the number of seconds set by the cookie timeout.

Attached in the GIF I use for completeness. Feel free to use yor own.

Show Your Support

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

Comments
  #2  
Old 08-29-2002, 07:53 PM
DemiNeo0101's Avatar
DemiNeo0101 DemiNeo0101 is offline
 
Join Date: Feb 2002
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice job. Im gona install You hack AND JJR512's hack. What step should i stop at thoughin JJR512's hack to start installing yours?
Reply With Quote
  #3  
Old 08-29-2002, 07:55 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by DemiNeo0101
nice job. Im gona install You hack AND JJR512's hack. What step should i stop at thoughin JJR512's hack to start installing yours?
The last one

His (damned good) entire hack is a prereq.
Reply With Quote
  #4  
Old 09-15-2002, 06:02 PM
gc1 gc1 is offline
 
Join Date: Sep 2002
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have only one little problem

I have several networked computers here I log on when I log on as the administrator and go to the chat it lists me in the user count

But when I log onto another pc as just a reg user it does not count them, I do have show online activated for that usergroup.

Overall fantastic mod, and I really appreciate the efforts of all the people here for their fantastic work.

Jeff
Reply With Quote
  #5  
Old 09-15-2002, 10:04 PM
NexDog's Avatar
NexDog NexDog is offline
 
Join Date: Mar 2002
Location: Lost in the Nexus
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess this won't work with SigmaChat and wot-Mike's hack?
Reply With Quote
  #6  
Old 09-16-2002, 11:02 PM
Larry@IOG Larry@IOG is offline
 
Join Date: May 2002
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

2 things when someone is in the chat room it does not show it on Users chatting:0 when you clisk the link it shows where all of the users are. And the light bulb is always off. I also have a registered copy of IRC Chat that is registered on the same website just not inside the forums how do I get my registered copy to show up?

Thanks

Larry
Reply With Quote
  #7  
Old 01-27-2003, 01:48 AM
mackers8923 mackers8923 is offline
 
Join Date: Dec 2002
Location: Belfast, N Ireland
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to show the users in chat in the template postbit by adding a href="online.php?s=$session[sessionhash]">Users in chatroom: $chatters[results]</a>

I have tried the text and link come up but no results ever show.

Any idea's
Reply With Quote
  #8  
Old 01-27-2003, 11:23 AM
mackers8923 mackers8923 is offline
 
Join Date: Dec 2002
Location: Belfast, N Ireland
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Everything seems to be fine until this morning when I read my email and I received about 20 database error's. As soon as I get the error again I will post the code as it has went clean out of my head.

Still a damm good hack though

Invalid SQL: SELECT count(*) as results from session where lastactivity> AND location=concat('/forums/chat.php?s=',sessionhash)
mysql error:

This is the error I get! ANy Idea's
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:29 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
  • Page Generation 0.04838 seconds
  • Memory Usage 2,270KB
  • Queries Executed 21 (?)
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_php
  • (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
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete