getDBKey(); return true; } $wgExtensionCredits['specialpage'][] = array( 'name' => 'EditImage', 'version' => '0.1', 'author' => 'Benjamin Mako Hill', 'url' => 'http://www.mediawiki.org/wiki/User:Benjamin_Mako_Hill', 'description' => 'This extension provides a way for Mediawiki users to edit images from the web.' ); function wfAddActionContentHook( &$content_actions ) { global $wgRequest, $wgRequest, $wgTitle; $action = $wgRequest->getText( 'action' ); if ( $wgTitle->getNamespace() == NS_IMAGE ) { $editimage_page = SpecialPage::getTitleFor( 'EditImage');; $content_actions['editimage'] = array( 'class' => $action == 'editimage' ? 'selected' : false, 'text' => "Crop Image", // the wfMsg was not working... 'href' => $editimage_page->getLocalURL("image={$wgTitle->getPrefixedURL()}") ); } return true; } ?>