Support Forums

Full Version: PJIRC and how to make designs.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, in this guide I will show you how to create a front end for your PJIRC and how PJIRC works.

Example: http://f4c3b00k.info/chat.php

What is PJIRC?
PJIRC.com Wrote:PJIRC - pronunciate Pi as the Greek letter, J as in Java, and "irk" as James T. Kirk - stands for "Plouf's Java IRC Client".

Originally, PJIRC wasn't supposed to become a popular java irc client. It was just a little test to know whether I (Plouf) was able to help some friends at the designing of a little webchat application for their website: Mandragor.

But after having spent some evening on this "little test", the client was already more advanced than it was supposed to be, Pixx designed an original interface and PJIRC was born.

So PJIRC was used as a webchat for Mandragor, using the DWChat irc network. Soon after, DWChat decided to use it on their official websiste. Since DWChat was close to Apinc, a non-commercial internet association, some of the websites it was hosting started to use PJIRC as well. In order to offer some support to those people, a mailing list was created.

Today, PJIRC is a very complete Java IRC Client. It can be run from an applet, but can also be executed from any "stand alone" java virtual machine. Here is a non-exhaustive list of its features:

* Highlight support
* ASL handling
* Graphical bitmap used for smiley's
* Nickname auto completion
* Nick, channel and URL catcher
* Sound support
* Multilingual support
* Esthetical options such as background image, per-channel color configuration, and so on...
* UTF-8 encoding support
* Support for external control via javascript
* "On connect" command list
* Time stamping
* Fast, light and reliable
* Free and open source

Philippe "Plouf" Detournay

First you need to download pjIRC, to download go here: http://www.pjirc.com/downloads.php

Ok, let's start out with the front end. Here I will explain how to make a front end.

First off here is the full code:

PHP Code:
<FORM name="login" method="post" action="irc/irc.php" onSubmit="return validate(this);">
                
Username : <INPUT NAME="username" value="Guest???" TYPE="text" SIZE="25" class="formspacing"><br />
        
Password : <INPUT NAME="password" TYPE="password" SIZE="25" class="formspacing"><br />
        
Theme : <select name="bg" style="width: 159px" class="formspacing">
                    <
option value="dark">Dark
                    
</option>
                </
select><br />
                        <
INPUT NAME="submit" TYPE="submit" VALUE="Connect" class="formspacing">
        </
FORM

Bassically all you need to change is the action="irc/irc.php" part, that is going to be the second part of this code, so be sure to save the second part as what you put there. The second thing you can change is the theme part, I will explain later how to make these themes and include a few of my themes.

Ok, now the second part is the backend which is the most important. Here it is:

PHP Code:
<?
        $bg 
= (isset($_REQUEST['bg']))    ? $_REQUEST['bg']    : "";
        
$pass = (isset($_REQUEST['password']))    ? $_REQUEST['password']    : "";
        
$username = (isset($_REQUEST['username'])) ? $_REQUEST['username']  : "Guest???";
        
$method "GET";
?>
                                <applet code=IRCApplet.class archive="irc.jar,pixx.jar" style="width: 800px; height: 600px">
                                        <param name="fileparameter" value="<?=$bg?>.ini">
                                        <param name="CABINETS" value="irc.cab,securedirc.cab,pixx.cab">
                                        <param name="nick" value="<?=$username?>">
                                        <param name="alternatenick" value="<?=$username?>??">
                                        <param name="fullname" value="mynameis940">
                                        <param name="port" value="6667">
                                        <param name="multiserver" value="true">
                                        <param name="autoconnection" value="true">
                                        <param name="command1" value="join #CHANNEL">
                                        <param name="command2" value="privmsg nickserv identify <?=$pass?>">
                                        <param name="gui" value="pixx">
                                        <param name="quitmessage" value="mynameis940">
                                        <param name="asl" value="true">
                                        <param name="useinfo" value="true">
                                        <param name="style:backgroundimage" value="false">
                                        <param name="style:backgroundimage1" value="all all 0 background.gif">
                                        <param name="style:sourcefontrule1" value="all all Serif 12">
                                        <param name="host" value="IRCSERVERHERE">
                                        <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:nickfield" value="true">
                                        <param name="pixx:styleselector" value="true">
                                        <param name="pixx:setfontonstyle" value="true">
                                </applet> 

Again you just need to change a few things to your servers info, in line 9:
PHP Code:
<param name="command1" value="join #CHANNEL"

change the #channel to the channel you would like the user to join.

You also need to set the irc server in line 18:

PHP Code:
<param name="host" value="IRCSERVERHERE"

Now, let's start with the Styles for this. Here is my style:

Code:
pixx:color0=c0c0c0
    pixx:color1=FFFFFF
    pixx:color2=303030
    pixx:color3=c0c0c0
    pixx:color4=303030
    pixx:color5=1e1e1e
    pixx:color6=575757
    pixx:color7=1e1e1e
    pixx:color8=F48000
    pixx:color9=F48000
    pixx:color10=1e1e1e
    pixx:color11=F48000
    pixx:color12=303030
    pixx:color13=1e1e1e
    pixx:color14=303030
    pixx:color15=1e1e1e
    style:sourcecolorrule1=all all 0=1f1f1f 1=ffffff 2=ffffff 3=c0c0c0 4=c0c0c0 5=c0c0c0 6=ffffff

To make the style's you just need to use color codes from html (w3schools)

Code:
# pixx:color0=000000   <!--(Black)    -Scrollbar Slider outline: Button outline / Popup & Close Button Text & outline
    # pixx:color1=FFFFFF   <!--(White)    -Button Border & Text : ScrollBar Border & arrow : Popup & Close button Border : User List border & Text & icons
    # pixx:color2=868686   <!--(Dark grey)    -Windows Buttons shadow color (the float & close button [X]) difficult to actually see.
    # pixx:color3=808080   <!--(Darker grey)-Scrollbar 3D shadow color
    # pixx:color4=D0D0D0   <!--(Light grey) -Scrollbar 3D highlight colour
    # pixx:color5=336699   <!--(Light Blue) -Menu buttons & Scrollbar Slider  faces
    # pixx:color6=084079   <!--(Blue)    -Menu backgrounds : Nicklist background & Slider tracks
    # pixx:color7=003167   <!--(Dark Blue)    -Selected Button face color  : Status button & Window button active colour
    # pixx:color8=A40000   <!--(Red)    -Button Flash color : Event color (Informs people of channel usage etc.)
    # pixx:color9=4B8ECE   <!--(Pale Blue)    -Windows Buttons face (Close button [X] etc.)
    # pixx:color10=008000   <!--(Dark Green) -Vop button background
    # pixx:color11=336699   <!--(Light Blue) -SemiOP & Aop button background
    # pixx:color12=336699   <!--(Light Blue) -Founder button background
    # pixx:color13=4040FF   <!--(Vivid Blue) -ASL Male
    # pixx:color14=FF40FF   <!--(Bright Pink)-ASL Female
    # pixx:color15=336699   <!--(Light Blue) -ASL Undefined | Nick button face & Floating text background
    # SourceColorRules
    #    0=FFFFFF   (White)      -Text Background colour.
    #    1=000000    (Black)      -Normal Text foreground colour. Also: status messages in the status window.
    #    2=00007F   (Dark Blue)   -Quit messages. Does not include kicks.
    #    3=009300   (Green)      -Status messages, including kicks, topic changes, mode changes etc..
    #    4=FF0000   (Bright Red)   -CTCP Responses.
    #    5=7F0000   (Maroon)   -Notices.
    #    6=9C009C   (Bright Purple)   -Action text/IDENTD messages
    #
    ########################################################################################################################################################

Save the style as BLANK.ini and you need to remember the BLANK part to add it to the frontend. To add a style to the front end you have to edit:

PHP Code:
Theme : <select name="bg" style="width: 159px" class="formspacing">
                    <
option value="dark">Dark
                    
</option>
                </
select><br /> 

Say you save a style as blue.ini then you just need to add to the options this:

PHP Code:
<option value="blue">Blue
                    
</option

or if you save it as black.ini add this:

PHP Code:
<option value="black">Black
                    
</option



Here are a few styles that I have made:

Blue:

Black & purple:

Black & white:

Blue & grey:

Light:

Light grey:

Pink:

Purple:


Hope you enjoyed it Big Grin


Credits: ME.
This belongs in the web dev section if im not mistaken. ;)
PJIRC is java.