vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Show "who's in chat room" on forum home page with integrated phpmychat! (https://vborg.vbsupport.ru/showthread.php?t=37283)

Velocd 04-11-2002 03:38 AM

Show "who's in chat room" on forum home page with integrated phpmychat!
 
This would greatly help getting more people into my integrated phpmychat room, since when users are on the main forum page they can see who's online in the chat room.

Currently I'm only asking for a number (digit) of the people who are in the chat room, but if it were somehow possible to get it displaying the usernames, that would be really sweet. I know this isn't a Vbulletin hack, but in a sense it is since you are modifying/adding code to Vbulletin templates and php files. (it would also be really cool if done).

thanks :D

mem 04-11-2002 04:06 AM

1 Attachment(s)
DO you want attachment ?? :p


sorry , my english is poll !! :paranoid:

Velocd 04-11-2002 04:20 AM

You bet I do! In..uh, english that is http://www.diffusion4.com/images/smi...tdroplaugh.gif

mem 04-11-2002 04:31 AM

1 Attachment(s)
DO you want attachment ?? :p

if you want it . you need to


Looking for:
====================
index.php

PHP Code:

} else { 
$pminfo=''



Add the string after it....:
========================
PHP Code:

//END CHAT HACK 
// Cleanup Old Users First! 
// 240 = Wait 4 mins before deleteing inactive users 
$DB_site->query("DELETE from c_users where u_time < ".(time() - 240)." and u_time > 0"); 
$numchattersa $DB_site->query_first("SELECT count(username) AS username FROM c_users"); 
// Ok Get Users and Stats 
if ($bbuserinfo['userid']!=0) {
$chat_name $DB_site->query("SELECT username FROM c_users");
while ( 
$chat_names=$DB_site->fetch_array($chat_name)) {
$chat_username .= "&nbsp;$chat_names[username]&nbsp;";
}
$numchatters $numchattersa[username]; 
eval(
"\$chatinfo .= \"".gettemplate("chatlogged")."\";"); 


ADD chatlogged template
<font color=red> $numchatters</font> member<font color=green>$chat_username</font> in<a href="/green/chat/index.php3?
U=$username&PASSWORD=&N=20&D=10" target="_new" title="go to chat"> <font color=#B50101>your chat</font></a>
==========================

sorry , my english is poll !! :paranoid:

Velocd 04-11-2002 06:04 PM

I hate to say it but that didn't work at all! I tried it and it simply gave me an error when I loaded up my forums. Are you talking about forum/index.php for another index.php? I can't see how the code above references to the chat log. Please help me out :D

almightyone 04-12-2002 12:54 AM

well i agree a hack of this nature would be nice hopefully someone can get soemthing that works for us who would like to have it

mem 04-12-2002 01:46 AM

i think about your database !!

beacause my chat install database the same vbb

and i do it

you can try again ;)

Velocd 04-12-2002 02:10 AM

What Vbulletin version do you have mem? I tried to install it on 2.2.4 and just gave me errors. I'll try again though, hey what is the link to your forums mem? I wanna see the hack :D

mem 04-12-2002 02:26 AM

Quote:

Originally posted by Velocd
What Vbulletin version do you have mem? I tried to install it on 2.2.4 and just gave me errors. I'll try again though, hey what is the link to your forums mem? I wanna see the hack :D
i used vbb2.24 .

my forums http://www.greenkiss.com/green

;)

my chat http://www.greenkiss.com/green/chat/index.php3

Velocd 04-12-2002 02:34 AM

Here is the error I get:

--------------------------------------------------------
Database error in vBulletin 2.2.4:

Invalid SQL: DELETE from c_users where u_time < 1018581979 and u_time > 0
mysql error: Table 'velocd_Vbulletin.c_users' doesn't exist

mysql error number: 1146

Date: Thursday 11th of April 2002 11:30:19 PM
Script: http://www.diffusion4.com/index.php?
Referer: http://www.diffusion4.com/admin/index.php?action=head
--------------------------------------------------------

Are there any values that I should be changing from your code??

mem 04-12-2002 02:44 AM

the install of the datebase between the chat and vbb shold be in the same datebase

Velocd 04-12-2002 03:13 AM

Same database..?? Don't each require 1 database, of their own? Let me check this out really quick on my cpanel...

edit:

Is there a way I can switch over my phpmychat database to the one using vbb (ofcourse maintaining the vbb). What config file do I use or to modify to specify a different database? Anybody?

mem 04-12-2002 05:11 AM

1 Attachment(s)
IT's my database

version 04-12-2002 07:31 AM

Quote:

Originally posted by Velocd
Is there a way I can switch over my phpmychat database to the one using vbb (ofcourse maintaining the vbb). What config file do I use or to modify to specify a different database? Anybody?
https://vborg.vbsupport.ru/showthrea...threadid=37209

thehobbyforum 04-12-2002 11:56 AM

I tried to install the hack as well on v2.2.5 - nothing - no error message or anything - I have already integrated vb and phpmychat - the template you have calls for others that are not automatically placed in the directory?

Velocd 04-12-2002 04:18 PM

Quote:

Originally posted by version


https://vborg.vbsupport.ru/showthrea...threadid=37209

That didn't help, I don't care for installing another hack. I think I know how to do this anyway now...

thehobbyforum 04-12-2002 08:09 PM

OK got it working now - great hack - I changed a few things around to get it to wrok a little better - and read a little easier - outstanding!

Velocd 04-13-2002 12:58 AM

I can tell you like airplanes THF. When I checked your hobby forums, I saw no reference whatsoever on the forum home page to how many users were currently online in the chat room, so I'm not sure where you put it or if you got it up. :/

thehobbyforum 04-13-2002 01:01 AM

It is on the forums page under newest member!

Velocd 04-13-2002 01:08 AM

1 Attachment(s)
???? Not seeing it.

(see attachment)

thehobbyforum 04-13-2002 01:11 AM

Can you see the "store" info on the left side - I guess only members can see the who's chatting?

Velocd 04-13-2002 01:59 AM

Sweet, I successfully (and very easily) moved my tables to another database, and now the hack works perfectly :D

thehobbyforum 04-13-2002 02:03 AM

Glad you got it working - can you see it if you are not logged in?

Velocd 04-13-2002 02:17 AM

Yeah, since I put it in my welcome panel that is viewable by all who come to the forums. Though I plan to move it elsewhere..

ONE problemo though, and thats that phpmychat at default clears the members inchat log every 4 minutes. Anyway to set this to possibly 1 minute? Since when a user leaves the chat it still shows up on the forum as him/her being in the chat.

I'm sure its some file in the chat directory, just not sure which..


All times are GMT. The time now is 03:39 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.01294 seconds
  • Memory Usage 1,769KB
  • 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete