https://bugzilla.wikimedia.org/show_bug.cgi?id=19304
Web browser: ---
Summary: Vector Skin needs hook similar to
SkinTemplateContentActions
Product: MediaWiki
Version: 1.16-svn
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Normal
Component: Vector Skin
AssignedTo: [email protected]
ReportedBy: [email protected]
When using the Vector skin, extensions currently have no way to alter the
navigation links at the top. For Monobook, this can be done using the
SkinTemplateContentActions hook.
This is useful e.g. to redirect users to a special edit page.
See e.g. http://spiele.j-crew.de/wiki/Die_Expedition, with the edit page being
http://spiele.j-crew.de/wiki/Spezial:Spiel_bearbeiten/Die_Expedition.
The code to achieve this is simple:
$wgHooks['SkinTemplateContentActions'][] = 'wfAlterEditPageLinkHook';
function wfAlterEditPageLinkHook( &$content_actions ) {
global $wgTitle, $wgArticle;
if( array_key_exists( 'edit', $content_actions ) &&
$wgTitle->isContentPage() && $wgArticle->isCurrent() ){
$content_actions['edit']['href'] = Title::newFromText(
'Spezial:Spiel_bearbeiten/'. $wgTitle->getPrefixedDBkey() )->escapeLocalURL();
}
return true;
}
Maybe a similar hook can be added to SkinVector::buildNavigationUrls()?
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l