MyBB Community Forums

Full Version: Integration of PJIRC and MyBB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Hi, I was wondering if it is possible to integrate pjirc into MyBB as a page or a link that people can click on and the applet would come in a seperate window. In either of these scenarios I would like it to have the person who is logged in to have their user name for the chat the same as theirs on the board.

If you have any questions or have a solution post here please,

Thank you Smile
**BUMP**
Please help

Thank you
Here's how I've integrated PJIRC into my board.

1. Download PJIRC and extract the archive on your PC.

2. Upload the folders "img" and "snd" and the following files to the root directory of your board:

# background.gif
# english.lng
# irc.cab
# irc.jar
# IRCApplet.class
# pixx.cab
# pixx.jar
# pixx-english.lng
# pjirc.cfg
# securedirc.cab

3. Go to your Admin-CP and create a new global template with the name "chat":
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>$settings[bbname] - Chat</title>
$headerinclude
</head>
<body>
$header
<!-- Applet Start -->
<br /><div style="text-align: center;">
<applet code=IRCApplet.class archive="irc.jar,pixx.jar" width=640 height=400>
<param name="CABINETS" value="irc.cab,securedirc.cab,pixx.cab">

<param name="nick" value="$username">
<param name="alternatenick" value="Anonym">
<param name="fullname" value="$usergroup">
[color=red]<param name="host" value="irc.domain.tld">
<param name="command1" value="/join Channel">[/color]
<param name="gui" value="pixx">

<param name="quitmessage" value="See you!">
<param name="asl" value="true">
<param name="useinfo" value="true">
<param name="language" value="english">

<param name="style:bitmapsmileys" value="true">
<param name="style:smiley1" value="Smile 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="Wink img/clin-oeuil.gif">
<param name="style:smiley11" value=":-( img/triste.gif">
<param name="style:smiley12" value="Sad 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:backgroundimage" value="true">
<param name="style:backgroundimage1" value="all all 0 background.gif">
<param name="style:sourcefontrule1" value="all all Serif 12">
<param name="style:floatingasl" value="true">

<param name="pixx:timestamp" value="true">
<param name="pixx:highlight" value="true">
<param name="pixx:highlightnick" value="true">
<param name="pixx:styleselector" value="true">
<param name="pixx:setfontonstyle" value="true">

</applet>
</div>
<!-- Applet End -->
$footer
</body>
</html>
You can edit the configuration to fit your needs and you have to edit the red colored lines (Server and Channel).

4. Create a new PHP file with the name chat.php and upload it into the root directory of your board:
<?php
define("KILL_GLOBALS", 1);

require "./global.php";
require "./inc/functions_post.php";

// Navigation
addnav("Chat");

// Guest?
if ($mybb->user['uid'] == "0")
{
nopermission();
}

// Get usergroup
$query = $db->query("SELECT title FROM ".TABLE_PREFIX."usergroups WHERE gid = '".$mybb->user['displaygroup']."'");
$get_groups = $db->fetch_array($query);

$username = $mybb->user['username'];
$usergroup = $get_groups['title'];

// Output
eval("\$chat = \"".$templates->get("chat")."\";");
outputpage($chat);
?>

5. Open online.php and search for:
        case "calendar_editevent":
            $locationname = $lang->editing_event;
            break;
Add after:
        case "chat":
            $locationname = "<a href=\"chat.php\">Chat</a>";
            break;
Search for:
            else
            {
                $user['activity'] = "calendar";
            }
            break;
Add after:
        case "chat":
            $user['activity'] = "chat";
            break;
Done! Hope it works. Wink
Michael83 Wrote:Here's how I've integrated PJIRC into my board.

1. Download PJIRC and extract the archive on your PC.

2. Upload the folders "img" and "snd" and the following files to the root directory of your board:

# background.gif
# english.lng
# irc.cab
# irc.jar
# IRCApplet.class
# pixx.cab
# pixx-english.lng
# pjirc.cfg
# securedirc.cab

3. Go to your Admin-CP and create a new global template with the name "chat":
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>$settings[bbname] - Chat</title>
$headerinclude
</head>
<body>
$header
<!-- Applet Start -->
<br /><div style="text-align: center;">
<applet code=IRCApplet.class archive="irc.jar,pixx.jar" width=640 height=400>
<param name="CABINETS" value="irc.cab,securedirc.cab,pixx.cab">

<param name="nick" value="$username">
<param name="alternatenick" value="Anonym">
<param name="fullname" value="$usergroup">
[color=red]<param name="host" value="irc.domain.tld">
<param name="command1" value="/join Channel">[/color]
<param name="gui" value="pixx">

<param name="quitmessage" value="See you!">
<param name="asl" value="true">
<param name="useinfo" value="true">
<param name="language" value="english">

<param name="style:bitmapsmileys" value="true">
<param name="style:smiley1" value="Smile 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="Wink img/clin-oeuil.gif">
<param name="style:smiley11" value=":-( img/triste.gif">
<param name="style:smiley12" value="Sad 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:backgroundimage" value="true">
<param name="style:backgroundimage1" value="all all 0 background.gif">
<param name="style:sourcefontrule1" value="all all Serif 12">
<param name="style:floatingasl" value="true">

<param name="pixx:timestamp" value="true">
<param name="pixx:highlight" value="true">
<param name="pixx:highlightnick" value="true">
<param name="pixx:styleselector" value="true">
<param name="pixx:setfontonstyle" value="true">

</applet>
</div>
<!-- Applet End -->
$footer
</body>
</html>
You can edit the configuration to fit your needs and you have to edit the red colored lines (Server and Channel).

4. Create a new PHP file with the name chat.php and upload it into the root directory of your board:
PHP Code:
<?php
define
("KILL_GLOBALS"1);

require 
"./global.php";
require 
"./inc/functions_post.php";

// Navigation
addnav("Chat");

// Guest?
if ($mybb->user['uid'] == "0")
{
nopermission();
}

// Get usergroup
$query $db->query("SELECT title FROM ".TABLE_PREFIX."usergroups WHERE gid = '".$mybb->user['displaygroup']."'");
$get_groups $db->fetch_array($query);

$username $mybb->user['username'];
$usergroup $get_groups['title'];

// Output
eval("\$chat = \"".$templates->get("chat")."\";");
outputpage($chat);
?>

5. Open online.php and search for:
PHP Code:
��������case "calendar_editevent":
������������$locationname $lang->editing_event;
������������break
Add after:
PHP Code:
��������case "chat":
������������$locationname "<a href=\"chat.php\">Chat</a>";
������������break
Search for:
PHP Code:
������������else
������������
{
����������������$user['activity'] = "calendar";
������������}
������������break
Add after:
PHP Code:
��������case "chat":
������������$user['activity'] = "chat";
������������break
Done! Hope it works. Wink

A million thank yous to you for helping this works great Smile.

Thank you so much for your help
Your should put that post in tutorials!! Big Grin
Hey. I don't understand how one could have an irc channel on their website, like irc.mywebsite.com?

Or am I not getting something?
Coolv Wrote:Hey. I don't understand how one could have an irc channel on their website, like irc.mywebsite.com?

Or am I not getting something?

No no no, Smile

Someone needs to host your channel. Just search on Google for IRC Channel. Then you just customize the server and channel paramaters to what your channel and server details. Then the applet works with your IRC Channel.

Good Luck Smile
Wait, so you have to do "/join #your-new-channelname" or what?

Or do you have to have a server or have someone host?
Someone needs to host it like IRCStorm or (if you have a gaming board) GameSurge.
So what do you have to do if you want them to host something like #abc? Please walk me through this, I'm a n00b when it comes to IRC.
Pages: 1 2 3 4