From mediawiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: unmaintained
Implementation User interface
Description Provides a small textbox to login automatically in CGI:IRC
Author(s) (SeBas891talk)
Latest version 0.1
License No license specified
Download see below

Check usage and version matrix.

What can this extension do?[edit]

It provides a small textbox to login automatically in CGI:IRC, which is a web-based IRC client.


Just add the following line to any page.


Make sure you put the right url to your irc.cgi

Download instructions[edit]

Please cut and paste the code found below and place it in $IP/extensions/cgiirclogin.php. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.


To install this extension, add the following to LocalSettings.php:


Configuration parameters[edit]

Don't forget to configure the channel you wish to connect, it's hardcoded in the extension.


# This is my first extension, it is inspired by the mailman extension.
# To activate the extension add this line to your file LocalSettings.php
# require_once("extensions/cgiirclogin.php");
# To use it insert in a page the following with the correct URL to your
# installacion of irc.cgi
# <cgiirclogin>http://example.com/cgi-bin/cgiirc/irc.cgi</cgiirclogin>
# Change the Channel in the form below....

$wgExtensionCredits['parserhook'][] = array(
        'name' => 'CgiIrcLogin',
        'version' => 0.1,
        'author' => 'SeBas891',
        'url' => 'http://www.mediawiki.org/wiki/Extension:CgiIrcLogin',
        'description' => 'Provides a small textbox to login automatically in CGI:IRC.',

$wgExtensionFunctions[] = "wfCgiIrcLoginExtension";

function wfCgiIrcLoginExtension() {
     global $wgParser;
     $wgParser->setHook( "cgiirclogin", "printCgiIrcLoginForm" );

function printCgiIrcLoginForm( $input, $argv ) {

     global $wgParser;

     $output = "<form action=\"$input\" method=\"post\">".
       "Tu nombre: <input name=\"Nickname\" type=\"text\" value=\"\" />".
       "<input name=\"Channel\" type=\"hidden\" value=\"#mediawiki\" />".
       "<input name=\"format\" type=\"hidden\" value=\"default\" />".
       "<input name=\"interface\" type=\"hidden\" value=\"ie\" />".
       "<input type=\"submit\" value=\"Chat\">".
     return $output;