vb.org Archive

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

Mark0380 05-27-2001 03:39 PM

Credit for this should predominantly go to forum users Tim Mousel and Trog for giving me two necessary coding springboards for getting this hack (or is it mod?!?) together - thanks guys!!!!!

I am sure someone has already done this with MultiCity Chat anyway, so apologies for the duplicity - but I thought newbies might appreciate having this feature all the same.

Basically, the hack enables you to have a free MultiCity Chatroom integrated with your vBulletin forum. It automatically logs in registered forum users with their member-name, and an error message and login prompt is presented for those unregistered/not logged-in. And when you disconnect from the chat room, it refreshes to the main page of your forum.

Step 1.
Set yourself up with a free MultiCity chat account at http://www.multicity.com - don't worry about configuring variables such as color and chatroom description on their site, its all editable later.

Step 2.
Add a new template and call it 'chat_hack'.

Step 3.
Insert the following code into your 'chat_hack' template, remembering to insert the script code you obtained from MultiCity, rather than what's displayed here.

There are a lot of variable parameters for the customisation of the MultiCity chat. Most of these are cosmetic things, but a couple of them are vital for getting the auto-login functions to work properly. So check through my pasted script code here and look for the entries marked with asterixes - these are the configurable options that I tweaked OR added to the default code that MultiCity give you. Note: "AutoLogin" and "AutoLoginName" parameters are essential. Hope that makes sense!!!!

PHP Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<
HTML>
<
HEAD>
<
TITLE>$bbtitle Live Chat</title>
$headinclude
</head>
<
body>
$header

<table border="0" width="100%" cellpadding="0" cellspacing="0"><tr>
<
td width="100%">$navbar<br></TD>
</
tr></table>

<
div align="center">

<
center>
   
<!--
Change the code between the applet tags to the code you are given when you sign up for your free chat account.-->

<
APPLET CODEBASE="http://www.multichat.com/ChatBox" ARCHIVE="multichat.jar" CODE="GUIClient.class" WIDTH="562" HEIGHT="385" ALIGN="BOTTOM">
<
PARAM NAME="cabbase" VALUE="multichat.cab">
<
PARAM NAME="affiliate" VALUE="">
<
PARAM NAME="AllowCreateForum" VALUE="TRUE">
<
PARAM NAME="AppletBackground" VALUE="#CCCCCC">
*****<
PARAM NAME="AutoForwardingURL" VALUE="http://www.yoursiteurl.com">****
<
PARAM NAME="BannerImage" VALUE="">
<
PARAM NAME="Category" VALUE="6">
<
PARAM NAME="ChatAreaBackground" VALUE="white">
<
PARAM NAME="ChatAreaForeground" VALUE="black">
*****<
PARAM NAME="Description" VALUE="Put a description for your site or chat room here!!!">*****
<
PARAM NAME="Domain" VALUE="0">
*****<
PARAM NAME="FontName" VALUE="Helvetica">*****
*****<
PARAM NAME="FontSize" VALUE="12">*****
<
PARAM NAME="HelpURL" VALUE="http://www.multicity.com/support/chat/index.htm">
*****<
PARAM NAME="hidepassword" VALUE="TRUE">*****
*****<
PARAM NAME="HomepageURL" VALUE="www.yoursiteurl.com">*****
<
PARAM NAME="Language" VALUE="EN">
<
PARAM NAME="LocatorEnabled" VALUE="TRUE">
<
PARAM NAME="ShowLiveChat" VALUE="T">
*****<
PARAM NAME="ShowUserInfoLine" VALUE="FALSE">*****
*****<
PARAM NAME="Subject" VALUE="*Put your chatroom subject here">*****
<
PARAM NAME="Translation" VALUE="FALSE">
<
PARAM NAME="UseGraphicText" VALUE="F">
<
PARAM NAME="Registered" VALUE="FALSE">
*****<
param name="AutoLogin" value="TRUE">*****
*****<
param name="AutoLoginName" value="{$bbuserinfo[username]}">*****
Your browser does not support Java applets.
Upgrade to a newer browser or use the Options menu to enable Java.
You may also use the link below to access the HTML version of your chat room.
</
APPLET>

</
center>

</
div>

<!-- 
Time-->
<
table border="0" width="100%" cellpadding="4" cellspacing="0"><tr>

<
td width="100%" valign="middle" align="center" nowrap><b><smallfont>$timezone</smallfont></b></td>
</
tr></table>
<!-- /
Time-->

$footer
</body>
</
html

Step 4.
Create a new file and name it 'chat.php', or whatever you need. Place the following code inside.

PHP Code:

<? 
require( "global.php" ); 

if( $bbuserid ) { 

$user = $DB_site->query_first( "SELECT username 
FROM user 
WHERE userid = $bbuserid" ); 
$bbusername = $user[ username ]; 
eval("dooutput(\"".gettemplate('chat_hack')."\");"); 
} else { 
eval("dooutput(\"".show_nopermission()."\");"); 
} // end if 
?>

Step 5.
Upload 'chat.php' to your main forums directory.

Step 6.
Test the file, and assuming everything is working okay, link into your forums page.

I truly hope it works for everyone. It is certainly working for me!

Just point your browser to my forums page (http://www.leatherforums.com) and look for the button 'live chat' in the header menu at the top of any page. And if you do register with my forums simply to test this mod, please please PLEASE do the decent thing and contact me to request your account is removed afterwards, okay? Thanks.

Steve Machol 05-27-2001 04:00 PM

Excellent! I use Multicity Chat and can't wait to try this out!

Steve Machol 05-27-2001 05:40 PM

I just added this. Very cool! :cool:

http://www.optiboard.com/forums/chat.php

Questions:

1. What happens when a non-registered user tries to enter?

2. Is there a way to detect if there are users in the Chat Room? This would be an excellent addition!

julius 05-27-2001 05:51 PM

Excellent!:)

Mark0380 05-27-2001 05:56 PM

Quote:

Originally posted by smachol
What happens when a non-registered user tries to enter?
The same that would happen if a non-registered user tries to post an event to the calendar or a message to a "registered users only" forum. You get the default "You are Unregistered" message, with an option to login. If you login at the prompt provided, it automatically takes you into the chat room.

As for question two, I am not sure how you could achieve this, or if it would even be possible. Sorry :(

Steve Machol 05-27-2001 06:04 PM

Thanks. I like the idea of the Chat being open to registered members only.

I did have one user say she couldn't log in though. Another one got in fine. I'm continuing to test it out.

As for the second question, maybe someone else will know how to add this feature to the hack!

julius 05-27-2001 07:22 PM

I'm using multicity chat only for registerd members along six months, with another chat_hack that is in this forum, and many registered users behind firewall can't enter in.

Steve Machol 05-27-2001 10:56 PM

Follow up:

The user that couldn't use the chat has a two letter user name. When she logged into the chat room with a a five character name it worked. My forum's options have been revised to accept 2 letter user names. Any idea why this hack won't allow them?

I'm also getting scattered reports of others that aren't able to get in. So far I don't have any specific information about their problems yet. I'm trying to get browser and version information from them.

-dloh-hammer 05-28-2001 02:25 AM

someone knows ?

how to put the chatwindow direcly under the forumcats (but not in footer) in forumhome ?

RobAC 05-28-2001 04:10 AM

Dude,

This is awesome!!!!!!!!!!! I love it!!!!!


All times are GMT. The time now is 12:32 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.01079 seconds
  • Memory Usage 1,776KB
  • 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
  • (1)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