10-05-2009, 05:32 PM
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?
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:
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:
Again you just need to change a few things to your servers info, in line 9:
change the #channel to the channel you would like the user to join.
You also need to set the irc server in line 18:
Now, let's start with the Styles for this. Here is my style:
To make the style's you just need to use color codes from html (w3schools)
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:
Say you save a style as blue.ini then you just need to add to the options this:
or if you save it as black.ini add this:
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
Credits: ME.
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:
Spoiler (Click to View)
PHP Code:
pixx:color0=000000
pixx:color1=ccccff
pixx:color2=8888dd
pixx:color3=ccccff
pixx:color5=0000aa
pixx:color6=0000bb
pixx:color7=0000ee
pixx:color8=B657FF
pixx:color9=0000aa
pixx:color10=0000aa
pixx:color11=0000cc
pixx:color12=0000FF
pixx:color13=000000
pixx:color14=000000
pixx:color15=0000aa
style:sourcecolorrule1=all all 0=0000bb 1=aaccff 3=aaa0c0 5=004184 6=dd0000
Black & purple:
Spoiler (Click to View)
PHP Code:
pixx:color0=9E62F0
pixx:color1=9E62F0
pixx:color2=9E62F0
pixx:color3=9E62F0
pixx:color4=824CA8
pixx:color5=2B3244
pixx:color6=1B2131
pixx:color7=1B2131
pixx:color8=663C84
pixx:color9=2B3244
pixx:color10=2B3244
pixx:color11=2B3244
pixx:color12=2B3244
pixx:color13=2B3244
pixx:color14=2B3244
pixx:color15=202942
style:sourcecolorrule1=all all 0=1B2131 1=DDDDDD 2=518CE2
Black & white:
Spoiler (Click to View)
PHP Code:
pixx:color0=ffffff
pixx:color1=ffffff
pixx:color2=000000
pixx:color3=000000
pixx:color4=000000
pixx:color5=000000
pixx:color6=000000
pixx:color7=000000
pixx:color8=0000ff
pixx:color9=000000
pixx:color10=008000
pixx:color11=ff0000
pixx:color12=ff8000
pixx:color13=000000
pixx:color14=000000
pixx:color15=000000
style:sourcecolorrule1=all all 0=000000 1=ffffff 2=a0a0a0 3=0000ff 4=ff8000 5=ffff00 6=660066
Blue & grey:
Spoiler (Click to View)
PHP Code:
pixx:color0=1073A5
pixx:color1=FFFFFF
pixx:color2=4E5162
pixx:color3=FFFFFF
pixx:color4=4E5162
pixx:color5=1073A5
pixx:color6=D8DEE3
pixx:color7=1D7EAE
pixx:color8=056B9E
pixx:color9=D8DEE3
pixx:color10=005DB0
pixx:color11=FFA34F
pixx:color12=1D7EAE
pixx:color13=1D7EAE
pixx:color14=1D7EAE
pixx:color15=1073A5
style:sourcecolorrule1=all all 5=076C9F 8=C0C000 11=8080FF 13=4040FF
Light:
Spoiler (Click to View)
PHP Code:
pixx:color1=3C4D81
pixx:color4=D3DFF4
pixx:color5=D3DFF4
pixx:color6=D4E0F5
pixx:color7=F6F7FC
pixx:color8=F6F7FC
pixx:color9=F6F7FC
pixx:color10=F6F7FC
pixx:color11=F6F7FC
pixx:color12=F6F7FC
pixx:color13=F6F7FC
pixx:color14=F6F7FC
pixx:color15=F6F7FC
Light grey:
Spoiler (Click to View)
PHP Code:
pixx:color0=DEE3E7
pixx:color1=000000
pixx:color2=DEE3E7
pixx:color3=DEE3E7
pixx:color4=D1D7DC
pixx:color5=DEE3E7
pixx:color6=E5E5E5
pixx:color7=D1D7DC
pixx:color8=FFA34F
pixx:color9=000000
pixx:color10=EFEFEF
pixx:color11=FFA34F
pixx:color12=599FCB
pixx:color13=DEE3E7
pixx:color14=DEE3E7
pixx:color15=DEE3E7
Pink:
Spoiler (Click to View)
PHP Code:
pixx:color0=000000
pixx:color1=000000
pixx:color2=c0c0c0
pixx:color3=dddddd
pixx:color5=F8E4FE
pixx:color6=F8E4FE
pixx:color7=c0c0c0
pixx:color8=ff0000
pixx:color9=F8E4FE
pixx:color10=00ffff
pixx:color11=0000ff
pixx:color12=E7CA05
pixx:color13=000000
pixx:color14=000000
pixx:color15=F5C7F2
style:sourcecolorrule1=all all 0=F5C7F2 3=0000c0 5=004184 6=dd0000
Purple:
Spoiler (Click to View)
PHP Code:
pixx:color0=66ccff
pixx:color1=AAAAFF
pixx:color2=CC00FF
pixx:color3=CC00FF
pixx:color4=CC00FF
pixx:color5=880088
pixx:color6=990099
pixx:color7=880000
pixx:color8=FF00FF
pixx:color9=990099
pixx:color10=CC00FF
pixx:color11=CC00FF
pixx:color12=CC00FF
pixx:color13=AA55AA
pixx:color14=AA55AA
pixx:color15=AA55AA
style:sourcecolorrule1=all all 0=880088 1=AAAAFF 3=C000C0 5=844184 6=DD00DD
Hope you enjoyed it
Credits: ME.