$wgExtensionMessagesFiles['EditImage'] = $dir . 'EditImage.i18n.php';
$wgSpecialPages['EditImage'] = 'EditImage';
# $wgHooks['LanguageGetSpecialPageAliases'][] = 'EditImageLocalizedPageName';
+$wgHooks['SkinTemplateContentActions'][] = 'wfAddactionContentHook';
+#$wgHooks['UnknownAction'][] = 'wfAddactActionHook';
function myExtensionLocalizedPageName(&$specialPageArray, $code) {
# The localized title of the special page is among the messages of the extension:
+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;
+}
+
+
?>