User:Milotheshort/Test Page I

if( !defined( 'MEDIAWIKI' ) ) { die( "This file is part of MediaWiki and is not a valid entry point\n" ); } $myRedirectPng = "/extensions/myRedirectButton/myRedirect.png";

$wgHooks['EditPage::showEditForm:initial'][] = 'myRedirectButton'; $wgExtensionCredits['myRedirectButton'][]= array( 'name'         => 'my Redirect Button Extension',   'version'      => '1.0.0',   'author'       => 'Your Name',   'url'          => 'http://www.your.com/myredirectbutton/',   'description'  => 'This extension is for demonstration only.');

// Add a button to the internal editor function myRedirectButton ($editPage) { global $wgOut, $wgScriptPath, $myRedirectPng; // Insert javascript script that hooks up to create button. $wgOut->addScript("\n".      "function myAddButton{\n".       "  addButton('$myRedirectPng','Redirect','#REDIRECT ','','Insert text');".       "  }\n".       "addOnloadHook(myAddButton);\n".       " "); return true; }