Extension:IRC Chat/v2.01
|
IRC Chat Release status: archive |
|
|---|---|
| Implementation | Special |
| Description | Adds an IRC Applet to your wiki |
| Author(s) | Quentin Sheets |
| Version | 2.01 (2008-01-01) |
| MediaWiki | 1.6.10+ |
| License | GPL |
| 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.
New features of this release:
- IRC FAQ and Rules pop ups.
- Skin based:
- IRC size
- Pre/post IRC applet HTML. (for those DIVs and TABLEs)
[edit] Installation
- OPTIONAL -- Download the PJIRC binary, which can be found at www.pjirc.com, and save it into the
/ircdirectory of your website. - Run SQL command and patch files
- Save the source code below into its respective files. (Remember to change
CHAT-PAGE-NAMEto your wanted page name) - Enjoy your new IRC client.
[edit] SQL and Patch
In the SQL command line, run:
ALTER TABLE USER ADD user_irc_nick VARCHAR(255) NOT NULL AFTER user_real_name;
In the regular command line, run:
$ cd /path/to/wiki/ $ patch -p0 < mw1.X.X-irc.patch
Where 1.X.X is your MediaWiki version. Patch files can be found here.
- NOTE: If you are unable to patch the files via command line (external host), you may download the pre-patched files.
[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' => '2.01', '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' => 'IRC Chat', 'ircnick' => 'WikiUser??', 'yourircnick' => 'IRC Nick:', 'ircfaq' => 'Common Q & A would go HERE.', 'ircfaqtitle' => 'IRC FAQ', 'ircrules' => 'Rules Belong HERE.', 'ircrulestitle' => 'IRC Rules', 'closewindow' => 'Close Window')); SpecialPage::addPage(new SpecialPage('IRC')); }
To edit the ircfaq and ircrules messages, you should navigate to MediaWiki:ircfaq and MediaWiki:ircrules after installing this extension. Please, do not try editing it in the file above, as doing such could cause problems with the functioning of the wiki.
includes/SpecialIRC.php
Freenode hosted applet or locally installed applet (click one)
[edit] Changes to MonoBook and all MonoBook based skins
Insert the lines you see with the + in front of them where you see them here. This will not need to be done in skins like Cologne Blue and Nostalgia, for they already include the lines by default.
Note: The following should be done to the main skin file (i.e. skins/MonoBook.php), and not the dependencies file (i.e. skins/MonoBook.deps.php).
* @addtogroup Skins */ class SkinMonoBook extends SkinTemplate { /** Using monobook. */ function initPage( &$out ) { SkinTemplate::initPage( $out ); $this->skinname = 'monobook'; $this->stylename = 'monobook'; $this->template = 'MonoBookTemplate'; } + function getSkinName() { + return "monobook"; + } } /** * @todo document
For the skin based colors to work correctly, the skin name must be lower-case.
[edit] Known Issues
- None
