Difference between revisions of "Site Hacks"
(Created page with "Things to make sure to remember when upgrading. ===Site Hacks=== Adding the header image: Change the header part of '''Vector.php''' to <pre> <!-- header --> ...") |
m (WikiSysop moved page Admin:Site Hacks to Site Hacks) |
||
(7 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | Things to make sure to remember when upgrading. | + | Things to make sure to remember when upgrading to a new version of MediaWiki. |
===Site Hacks=== | ===Site Hacks=== | ||
Adding the header image: | Adding the header image: | ||
− | Change the header part of '''Vector.php''' to | + | Change the header part of ''skins/'Vector.php''' to |
<pre> | <pre> | ||
<!-- header --> | <!-- header --> | ||
Line 21: | Line 21: | ||
</div> | </div> | ||
</div> | </div> | ||
− | + | <!-- /header --> | |
</pre> | </pre> | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | Changing search options: | ||
+ | |||
+ | '''includes/specials/SpecialSearch.php''' | ||
+ | |||
+ | Add this to SpecialSearch.php (~line 968) | ||
+ | <pre> | ||
+ | 'references' => array( | ||
+ | 'message' => 'searchprofile-ref', | ||
+ | 'tooltip' => 'searchprofile-ref-tooltip', | ||
+ | 'namespaces' => array( NS_REF ), | ||
+ | ), | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | 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''' | ||
+ | <pre> | ||
+ | #ccButton { | ||
+ | z-index: 100; | ||
+ | } | ||
+ | #detectBox{ | ||
+ | z-index: 100; | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | ---- | ||
+ | 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 | ||
+ | <pre>$wgFooterIcons["poweredby"]["semanticmediawiki"]["src"] = "/gramwiki/extensions/SemanticMediaWiki/skins/images/smw_button.png";</pre> | ||
+ | |||
+ | ---- | ||
+ | Remove go button | ||
+ | Comment out this the line (~477) in the main file of the skin you're using | ||
+ | <pre>echo $this->makeSearchButton( 'go', array( 'id' => 'searchGoButton', 'class' => 'searchButton' ) );</pre> | ||
+ | |||
+ | [[Category:Admin]] |
Latest revision as of 05:04, 22 January 2017
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' ) );