Extension:IRC Chat/v1.05
From MediaWiki.org
Formerly version 1.0
|
IRC Chat Release status: milestone |
|
|---|---|
| Type | Special page |
| Description | Adds an IRC Applet to your wiki |
| Author | Quentin Sheets |
| Version | 1.05 (May 5, 2007) |
| MediaWiki | 1.6.8+ |
| Download | see below |
Contents |
[edit] What does this version do?
This version allows users to engage in an IRC chat, using PJIRC through the MediaWiki interface. This is the first release of the extension, and is without the functionality of having user IRC nicks stored through User Preferences.
[edit] Installation
- OPTIONAL -- Download the PJIRC binary, which can be found at www.pjirc.com, and save it into the
/ircdirectory of your website. - Save the source code below into its respective files. (Remember to change
CHAT-PAGE-NAMEto your wanted page name) - In your browser, go to MediaWiki:IrcApplet on your site and copy the content listed here onto that page.
- Enjoy your new IRC client.
[edit] Changes to LocalSettings.php
require_once("$IP/extensions/IRC.php");
[edit] Code
extensions/IRC.php
<?php $wgExtensionFunctions[] = "wfExtensionSpecialIRC"; $wgExtensionCredits['specialpage'][] = array( 'name' => 'IRC Chat', 'author' => 'Quentin Sheets', 'version' => '1.05', 'description' => 'Allows users to engage in an IRC chat, using PJIRC through the MediaWiki interface.', 'url' => 'http://www.mediawiki.org/wiki/Extension:IRC_Chat', ); function wfExtensionSpecialIRC() { global $wgMessageCache; $wgMessageCache->addMessages(array( 'irc' => 'CHAT-PAGE-NAME', 'ircApplet' => 'PJIRC')); require_once('includes/SpecialPage.php'); SpecialPage::addPage(new SpecialPage('IRC')); } ?>
includes/SpecialIRC.php
<?php function wfSpecialIRC() { global $wgOut, $wfMsgHtml; $wgOut->addHTML(wfMsg('ircApplet')); } ?>
[edit] MediaWiki:IrcApplet
[edit] Using locally installed PJIRC
[edit] Changes to be made
- Change
YOUR-DOMAINto your website's URL address. (Obvious) ;) - Change the
hostparameter value, if different. - Add
<param name="Command1" value="/join #YourChannel">under theuseinfoparameter if you want your users to automatically join your channel
Mandatory: In the /irc directory change all .lng files to .txt
[edit] Content
<html><applet codebase=http://YOUR-DOMAIN/irc/ 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="Anonymous"> <param name="alternatenick" value="Anon???"> <param name="userid" value="wikichat"/> <param name="name" value="Wiki User"> <param name="host" value="irc.freenode.net"> <param name="port" value="6667"> <param name="gui" value="pixx"> <param name="quitmessage" value="PJIRC forever!"> <param name="asl" value="true"> <param name="useinfo" value="true"> <param name="pixx:lngextension" value="txt"> <param name="lngextension" value="txt"> <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: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"/> <h1>No java support</h1> <p> <font color="green">Sorry, but you need a Java 1.4.x enabled browser to use PJIRC.</font></p> </applet></html>
[edit] Using Freenode Hosted PJIRC
[edit] Changes to be made
- Add
<param name="Command1" value="/join #YourChannel">under theuseinfoparameter if you want your users to automatically join your channel
[edit] Content
<html><applet width="640" height="400" code="IRCApplet.class" archive="irc-unsigned.jar,pixx.jar" codebase="http://java.freenode.net/freenode/pjirc/"> <!-- <param name="CABINETS" value="irc.cab,pixx.cab">--> <param name="nick" value="Anonymous"/> <param name="alternatenick" value="Anon???"/> <param name="userid" value="wikichat"/> <param name="name" value="Wiki User"/> <param name="host" value="java.freenode.net"/> <param name="gui" value="pixx"/> <param name="quitmessage" value="PJIRC forever!"/> <param name="asl" value="false"/> <param name="useinfo" 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:backgroundimage" value="true"/> <param name="style:backgroundimage1" value="all all 0 pjirc-logo.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:nickfield" value="true"/> <param name="pixx:styleselector" value="true"/> <param name="pixx:setfontonstyle" value="true"/> <h1>No java support</h1> <p> <font color="green">Sorry, but you need a Java 1.4.x enabled browser to use PJIRC.</font></p> </applet></html>

