Site Hacks

(Redirected from Admin:Site Hacks)

Things to make sure to remember when upgrading to a new version of MediaWiki.

Site Hacks

Adding the header image:

Change the header part of skins/'Vector.php' to

 
      <!-- header -->
                <div id="mw-head" class="noprint">
                        <?php $this->renderNavigation( 'PERSONAL' ); ?>
                        <div id="left-navigation">
                             <div>
                                  <a style="position: absolute; left:0; top:-70px;" href="/chinese/grammar/Main_Page"  title="Visit the main page">
                                           <img src="http://resources.allsetlearning.com/gramwiki/images/b/b4/Wiki-title.png"/>
                                   </a>
                              </div>
                                <?php $this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?>
                        </div>
                        <div id="right-navigation">
                                <?php $this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?>
                        </div>
                </div>
       <!-- /header -->




Changing search options:

includes/specials/SpecialSearch.php

Add this to SpecialSearch.php (~line 968)

                        'references' => array(
                                'message' => 'searchprofile-ref',
                                'tooltip' => 'searchprofile-ref-tooltip',
                                'namespaces' => array( NS_REF ),
                                ),

To remove options, comment them out.

Second, follow instructions in languages/messages/MessagesEn.php and add appropriate variables that give the text results of searchprofile-ref and searchprofile-ref-tooltip.


CSS skin change for ASL Extension.

Add this to whichever skin is being used (likely Vector, so skins/vector/screen.css

#ccButton {
        z-index: 100;
}
#detectBox{
        z-index: 100;
} 

Not sure why, but there's an error in the Semantic MediaWiki page that displays their image. To get the image back change line 428 in SMW_Setup.php to

$wgFooterIcons["poweredby"]["semanticmediawiki"]["src"] = "/gramwiki/extensions/SemanticMediaWiki/skins/images/smw_button.png";

Remove go button Comment out this the line (~477) in the main file of the skin you're using

echo $this->makeSearchButton( 'go', array( 'id' => 'searchGoButton', 'class' => 'searchButton' ) );