View Full Version : How do I embed pjirc chat with vBulletin 3.6? (simple version)


Floris
5th March 2007, 09:56 AM
You can run pjirc chat stand alone, or integrate it with vBulletin. Here is how to integrate it with vBulletin. This is the simple version, no custom files, no source code modifications, and only the need to add a new template.

Add a new custom template

Admin Control Panel > Styles & Templates > Styles Manager > dropdown: Add a new template. Name it chat, prefix it with custom_ so the misc.php file can use it:

custom_chat
Use the following code :


$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle]</title>
</head>
<body>
$header
$navbar

<center>
<h2>Live IRC Java Chat on irc.vBulletin-Chat.com, port 6667, channel #vBFans</h2><hr />
<applet code=IRCApplet.class archive="irc.jar,pixx.jar" width=740 height=500>
<param name="CABINETS" value="irc.cab,securedirc.cab,pixx.cab">

<param name="nick" value="vBChat???">
<param name="alternatenick" value="Chat???">
<param name="name" value="vBChat Java User">
<param name="host" value="irc.vBulletin-Chat.com">
<param name="port" value="6667">
<param name="command1" value="/join #vBfans">
<param name="gui" value="pixx">
<param name="quitmessage" value=" www.vBulletin-Chat.com ">
<param name="asl" value="true">

<param name="style:bitmapsmileys" value="true">
<param name="style:smiley1" value=":) img/sourire.gif">
<param name="style:smiley2" value=":-) img/sourire.gif">
<param name="style:smiley3" value=":-D img/content.gif">
<param name="style:smiley4" value=":d img/content.gif">
<param name="style:smiley5" value=":-O img/OH-2.gif">
<param name="style:smiley6" value=":o img/OH-1.gif">
<param name="style:smiley7" value=":-P img/langue.gif">
<param name="style:smiley8" value=":p img/langue.gif">
<param name="style:smiley9" value=";-) img/clin-oeuil.gif">
<param name="style:smiley10" value=";) img/clin-oeuil.gif">
<param name="style:smiley11" value=":-( img/triste.gif">
<param name="style:smiley12" value=":( img/triste.gif">
<param name="style:smiley13" value=":-| img/OH-3.gif">
<param name="style:smiley14" value=":| img/OH-3.gif">
<param name="style:smiley15" value=":'( img/pleure.gif">
<param name="style:smiley16" value=":$ img/rouge.gif">
<param name="style:smiley17" value=":-$ img/rouge.gif">
<param name="style:smiley18" value="(H) img/cool.gif">
<param name="style:smiley19" value="(h) img/cool.gif">
<param name="style:smiley20" value=":-@ img/enerve1.gif">
<param name="style:smiley21" value=":@ img/enerve2.gif">
<param name="style:smiley22" value=":-S img/roll-eyes.gif">
<param name="style:smiley23" value=":s img/roll-eyes.gif">
<param name="style:floatingasl" value="true">

<param name="pixx:highlight" value="true">
<param name="pixx:highlightnick" value="true">
</applet>

<hr />
Please chat in English, and respect the chat rules: Behave, no swearing and no vBulletin support.<br />
Users with ! or @ in front of their names are the channel operators, feel free to ask them questions.
<hr />
Want to add this chat to your own web site? <a href="http://www.vbulletin-chat.com/showthread.php?t=24433">Click here to find out how</a>
</center>

$footer
</body>
</html>
Change the value #vbfans in the following line to your own chat channel:
<param name="command1" value="/join #vBfans">

Now do the same for this line, replacing it with your own chat channel:
<h2>Live IRC Java Chat on irc.vBulletin-Chat.com, port 6667, channel #vBFans</h2><hr />

And then save the template.

Now, get the pjirc files and upload them to your forum directory. Make sure that you are not uploading any index.html file.


Now use your web-browser and go to

http://<domain>/misc.php?do=page&template=chat

And change the domain to your own.

Kestryll
11th July 2007, 09:23 AM
Well, I tried this and the Java Applet won't start, I would suspect it was a Java issue on my comp but I can load this sites java chat okay.


I get this error:

Java Plug-in 1.5.0_10
Using JRE version 1.5.0_10 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\


----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

load: class IRCApplet.class not found.
java.lang.ClassNotFoundException: IRCApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more

vol_freak
20th August 2007, 07:32 AM
Great thread, thank you Floris. I have a mod installed similar to this called javachat. However, I'm needing to have a custom skin for my chat and your solution looks easier in that regard. However, I'm not really thrilled with the idea of copying my pjirc files directly into my forum directory. Would it be possible to copy them into a subdirectory? If so, what would I need to change, just the path to the script or would it not work?

terapisnack
21st March 2008, 02:14 PM
Great thread!! Although, I've got the same problem as Kestryll. Don't understand.. How can I fix that? :S