source: trunk/mediawiki/extensions/cgiirclogin.php @ 55

Last change on this file since 55 was 55, checked in by sebas, 16 years ago

reorganisacion.

File size: 1.1 KB
Line 
1<?php
2# This is my first extension, it is inspired by the mailman extension.
3#
4#
5# To activate the extension add this line to your file LocalSettings.php
6# require_once("extensions/cgiirclogin.php");
7#
8# To use it insert in a page the following with the correct URL to your
9# installacion of irc.cgi
10# <cgiirclogin>http://example.com/cgi-bin/cgiirc/irc.cgi</cgiirclogin>
11#
12# Change the Channel in the form below....
13
14$wgExtensionFunctions[] = "wfCgiIrcLoginExtension"; 
15 
16function wfCgiIrcLoginExtension() {
17     global $wgParser;
18     $wgParser->setHook( "cgiirclogin", "printCgiIrcLoginForm" );
19}
20 
21function printCgiIrcLoginForm( $input, $argv ) {
22 
23     global $wgParser;
24     $wgParser->disableCache(); 
25 
26     $output = "<form action=\"$input\" method=\"post\" target=\"_blank\" >".
27       "Tu nombre: <input name=\"Nickname\" type=\"text\" value=\"\" />".
28       "<input name=\"Channel\" type=\"hidden\" value=\"#redcta\" />".
29       "<input name=\"format\" type=\"hidden\" value=\"default\" />".
30       "<input name=\"interface\" type=\"hidden\" value=\"ie\" />".
31       "<input type=\"submit\" value=\"Chat\">".
32       "</form>";
33     return $output;
34}
35 
36?>
Note: See TracBrowser for help on using the repository browser.