Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Who's in chat on forumhome.. (No eggdrop) Details »»
Who's in chat on forumhome.. (No eggdrop)
Version: 1.00, by EvilLS1 EvilLS1 is offline
Developer Last Online: May 2021 Show Printable Version Email this Page

Version: 3.0.6 Rating:
Released: 05-13-2004 Last Update: 05-14-2004 Installs: 13
DB Changes
 
No support by the author.

I don't know if any of you will find this useful but its something that I've wanted for a while. For me, the problem with all of the other "who's in chat" hacks is that most of them require something crazy to work (I have no idea what an eggdrop is). Anyway, this one is php/mysql based and should be easy to install.

Description: This will add a new section to your "What's going on?" block which will display a list of users who are currently chatting or viewing the included chat.php page (see screenshot). The list of current chatters is updated every 60 seconds by an auto-refreshing (hidden) iframe in the chat page.

This hack should work with any embedded (web based) IRC chat.

Installation overview:
*Files to edit: (1) -index.php
*Files to upload: (2) -chat.php & icon_chat.gif
*Templates to edit: (1) -FORUMHOME
*Templates to add: (3) -chat_main, chat_chatters, & chat_chatbit
*Queries to run: (1) Adds the chatters table.

After that you simply add the html code to embed your chat applet in the chat_chatbit template. You can then view your chatroom by going to yoursite.com/forums/chat.php.

Note: The list of chatters is updated every 60 seconds, so usernames will still be listed in the "who's in chat" box for up to a minute after they leave the chat page.

Credits: The idea for refreshing the iframe to update the chattime came from John's "extend session" feature in his V3Arcade hack. So thanks John.

Show Your Support

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

Comments
  #42  
Old 05-27-2004, 03:39 AM
Fender963 Fender963 is offline
 
Join Date: May 2004
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have uploaded my index.php file.

here is the code I added:

Quote:
// Who's in chat
$chatdatecut = TIMENOW - 65;
$inchat=$DB_site->query("SELECT *
FROM " . TABLE_PREFIX . "chatters
WHERE chattime > $chatdatecut
ORDER BY username ASC");

if ($DB_site->num_rows($inchat)==0) {
$nobody = "No users are chatting.";
}

while ($chatting=$DB_site->fetch_array($inchat)) {

$chatusername = $chatting[username];
$chatuserid = $chatting[userid];

eval('$chatters .= ", ' . fetch_template('chat_chatters') . '";');
}
$chatters = substr($chatters , 2);
Just as the instructions said. I made no changes. Thank you for the help...

Kyle

EDIT: File removed by Boofo. vBulletin files cannot be posted here. Sorry.
Reply With Quote
  #43  
Old 05-27-2004, 02:44 PM
Fender963 Fender963 is offline
 
Join Date: May 2004
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dont worry about it EvilLS1, I figured it out. I'm an idiot. Thank you for the help though!

Kyle
Reply With Quote
  #44  
Old 05-27-2004, 05:20 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, glad ya got it sorted out.
Reply With Quote
  #45  
Old 05-27-2004, 07:28 PM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've just added this and it works well ... except if a member has elected to be hidden he/she is still showing as online in the chatroom.

Amy ideas?
Reply With Quote
  #46  
Old 05-27-2004, 07:31 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by moonclamp
I've just added this and it works well ... except if a member has elected to be hidden he/she is still showing as online in the chatroom.

Amy ideas?
Yeah thats not a bug. I just didn't bother adding it because the hidden users will be listed in the chat's userlist anyway, so why hide them on forumhome? I didn't think it was necessary.
Reply With Quote
  #47  
Old 05-27-2004, 07:38 PM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My hidden users aren't worried about other members seeing them online.

They are more worried about showing online to non-members who have no access to chat.

Is this easy to change?

... thanks
Reply With Quote
  #48  
Old 05-27-2004, 08:01 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Moonclamp,
I can give you a quick fix which will make it so that hidden users are never shown in chat (even to those who have permission to see invisible users).

In chat.php find:
Code:
 $somestuff = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "chatters WHERE userid=$userid");

	if ($DB_site->num_rows($somestuff)!=0) 
{
	$DB_site->query("UPDATE " . TABLE_PREFIX . "chatters SET chattime = $time WHERE userid = $userid");
} else {
  $DB_site->query("INSERT INTO " . TABLE_PREFIX . "chatters (username,chattime,userid) VALUES ('".addslashes($chatuser)."','$time','".intval($userid)."')");
}
Replace it with:
Code:
if ($bbuserinfo[invisible]!=1) {
 $somestuff = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "chatters WHERE userid=$userid");

	if ($DB_site->num_rows($somestuff)!=0) 
{
	$DB_site->query("UPDATE " . TABLE_PREFIX . "chatters SET chattime = $time WHERE userid = $userid");
} else {
  $DB_site->query("INSERT INTO " . TABLE_PREFIX . "chatters (username,chattime,userid) VALUES ('".addslashes($chatuser)."','$time','".intval($userid)."')");
}
}
I didn't test it but it should work.
Reply With Quote
  #49  
Old 05-27-2004, 08:07 PM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That'll do for me ~ I can always see who is there by going to online.php

Thank you
Reply With Quote
  #50  
Old 05-27-2004, 08:18 PM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

except it didn't work ... and '$somestuff' should have been called '$some****'
Reply With Quote
  #51  
Old 05-27-2004, 08:21 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had to use somestuff b/c the other is censored here.

Did you wait 60 seconds for the old session to expire before testing it? Strange.. It should work.
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 02:15 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.06976 seconds
  • Memory Usage 2,314KB
  • 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
  • (2)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete