vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Who's in chat on forumhome.. (No eggdrop) (https://vborg.vbsupport.ru/showthread.php?t=65099)

Fender963 05-27-2004 03:39 AM

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. ;)

Fender963 05-27-2004 02:44 PM

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

Kyle

EvilLS1 05-27-2004 05:20 PM

Ok, glad ya got it sorted out. :)

moonclamp 05-27-2004 07:28 PM

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?

EvilLS1 05-27-2004 07:31 PM

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.

moonclamp 05-27-2004 07:38 PM

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

EvilLS1 05-27-2004 08:01 PM

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.

moonclamp 05-27-2004 08:07 PM

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

Thank you

moonclamp 05-27-2004 08:18 PM

except it didn't work ... and '$somestuff' should have been called '$some****' ;)

EvilLS1 05-27-2004 08:21 PM

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

Did you wait 60 seconds for the old session to expire before testing it? Strange.. It should work.


All times are GMT. The time now is 01:45 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.01175 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete