https://bugzilla.wikimedia.org/show_bug.cgi?id=33435

       Web browser: ---
             Bug #: 33435
           Summary: Add MediaWiki:Multiboilerplate to the Admin Links page
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: MultiBoilerplate
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


Add following lines in MultiBoilerplate.php and it will show up in the Admin
links (extension). My use of wfMsg( 'boilerplates' ) is a quick hack, and it
should be a string on it own.



$wgHooks['AdminLinks'][] = 'MultiBoilerplateAddToAdminLinks';

function MultiBoilerplateAddToAdminLinks( &$admin_links_tree ) {
        global $wgMultiBoilerplateOptions;
        if ( !$wgMultiBoilerplateOptions) {
                $general_section = $admin_links_tree->getSection( wfMsg(
'adminlinks_general' ) );
                $extensions_row = $general_section->getRow( 'extensions' );
                if ( is_null( $extensions_row ) ) {
                        $extensions_row = new ALRow( 'extensions' );
                        $general_section->addRow( $extensions_row );
                }
                $extensions_row->addItem( ALItem::newFromEditLink(
'Multiboilerplate',  wfMsg( 'boilerplates' ) ) );
        }
        return true;
}

-- 
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

Reply via email to