vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Chat Hack (https://vborg.vbsupport.ru/showthread.php?t=1344)

06-23-2000 03:09 PM

First of all, let me thank all who have worked on the various hacks already. The work you all do is tremendous. Here is my suggestion for a hack that I think would be quite useful.

It's a real time chat hack. Now I know there are plenty of scripts out there that let you set up chat rooms, but I'm talking about one integrated into vBulletin. I envision a chat system where the room is always open to registered users. The column of users would be listed somewhere on the page, and double clicking a user would bring up their profile. I have no idea how difficult this would be to create, or what kind of strain would be put on the server, but if it could be done I think it would be a tremendous addition.

What do you guys think,
Cameron

06-23-2000 04:33 PM

I am all for it as I am using phpMyChat but it is not integrated with the board.

06-23-2000 04:58 PM

I support the idea but lack the knowledge.

06-23-2000 05:15 PM

I'm glad to see others are interested as well. Skimming through the boards, I noticed a similar thread: http://www.vbulletin.com/forum/showt...?threadid=1150 , however it really hasn't been worked on much. I know those skilled in PHP are wrapped up in the Private Messaging and Avatar hacks right now, but if there is enough interest, maybe someone could put it on a furure to do list.

Cameron

06-23-2000 10:26 PM

I support the idea but lack the knowledge,too!

06-24-2000 05:02 PM

I have sort of integrated phpMyChat into my forums - you can check it out below. I have not worked on integrating the logins as of yet but I hope too soon..

06-25-2000 05:57 PM

I would love to see this hack.

Sadly, I have no PHP coding skills.

On a side note, would it be possible to integrate with a java-based chatroom? Like this one:

http://asiansinc.com/chat.shtml

Far-fetched, but...

07-08-2000 06:08 PM

Can someone tell me where to get phpmychat?

Thanks!

07-08-2000 06:12 PM

http://phpheaven.free.fr//phpmychat.php3

Email Group Support is at http://www.egroups.com/group/phpmychat

07-11-2000 05:00 AM

Integrating phpMyChat into vBulletin is actually pretty easy. There are a couple of tricks to do with phpMyChat. You don't want to allow anyone to register (they are going to get in through vBulletin) and you want them to return to vBulletin when they exit phpMyChat.

Here's the vBulletin hack for index.php:
Quote:

//BEGIN CHAT HACK
if ($bbusername) {
$chatbulb = 'images/off.gif';
$numchattersa = $DB_site->query_first("SELECT count(username) AS username FROM c_users");
$numchatters = $numchattersa[username];
if ($numchatters == 0)
{
$chatbulb = 'images/off.gif';
$chatmessage = 'Chat room is currently empty';
} else {
$chatbulb = 'images/on.gif';
$chatmessage = "There are $numchatters people in the chat room";
}
eval("\$chatinfo .= \"".gettemplate("chatloggedin")."\";");
} else {
eval("\$chatinfo .= \"".gettemplate("chatloggedout")."\";");
}
//END CHAT HACK
You have to create two new templates (chatloggedin and chatloggedout) that are used just like the personal message hack templates. You will notice that the c_users table in the select statement is actually a phpMyChat table. The on light will display whenever anyone is in the chat room. If they are not logged on to vBulletin, they won't be permitted into the chat room.

Here is the chatloggedin template:
Quote:

<tr bgcolor="#C3C3EB">
<td><img src="$chatbulb"></td>
<td colspan=5>
<FONT SIZE="2" FACE="arial, helvetica"><b><a href="/phpMyChat/index.php3?U=$username&PASSWORD=&N=20&D=10">Join The Chat</a></b></font>
<BR><FONT SIZE="1" FACE="verdana,arial,helvetica">$chatmessage</font></td>
</tr>
Notice that we are linking into phpMyChat with the vBulletin username and no password. This makes them a non-registered user of phpMyChat. This works but it isn't great security wise. When I get a chance I will clean this up to secure it better.

Here is the chatloggedout template:
Quote:

<tr bgcolor="#C3C3EB">
<td colspan=6>
<smallfont>You must login to join the chat!</smallfont></td>
</tr>
Here's the hack for index.php3 of phpMyChat. At the very end, replace the login screen html with a redirection back to the vBulletin board. This will also prevent anyone from logging into phpMyChat any way except through the vBulletin board.

Quote:

<html>
<head>
<title>vBulletin Redirect</title>
<meta http-equiv="Refresh" content="0; URL=/forum/index.php">
</head>
<body bgcolor="#ffffff" text="#000000" id=all>
<p>Thank you for participating in our chat. You are are now being returned to the <a href="/forum/index.php">VBulletin forum</a>.</p>
</body>
</html>
This works, it was easy to code, but I'm sure it isn't the best way to do it. It certainly isn't the most secure.


[Edited by Tom on 07-11-2000 at 02:08 AM]


All times are GMT. The time now is 04:30 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.01199 seconds
  • Memory Usage 1,744KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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