OpenWetWare:Administration/Customization

From OpenWetWare
Jump to navigationJump to search

Chat

Search

MySQL full-text search (3 character words)

The default minimum value is four characters. The default maximum depends on your version of MySQL. If you change either value, you must rebuild your FULLTEXT indexes.

Namespaces to search by default

In LocalSettings.php:

$wgNamespacesToBeSearchedDefault = array( -1 => 0, NS_MAIN => 1, NS_USER => 0,
 NS_USER_TALK => 0, NS_PROJECT_TALK => 0, NS_IMAGE_TALK => 0, 
 NS_IMAGE_TALK => 0, NS_TEMPLATE_TALK => 0, NS_HELP_TALK => 0, 
 NS_CATEGORY_TALK => 0, 
 100 => 1, 102 => 1 );

List of MW namespaces

Google search

Current implementation

$wgOut->addWikiText( wfMsg( 'Googlesearchheader' ) ); $wgOut->addHTML( wfMsg( 'Googlesearch', $term ) );

===Try Google Search===
<div style="margin-left: 2em">

<div style="width:130px;float:left;text-align:center;position:relative;top:-8px"><a href="http://www.google.com/" style="padding:0;background-image:none"><img src="http://www.google.com/logos/Logo_40wht.gif" alt="Google" style="border:none" /></a></div>

<!-- Google CSE Search Box Begins -->
<form id="searchbox_002907624540990077409:p0fud5ft4ii" action="http://openwetware.org/wiki/OpenWetWare:GoogleSearchResults">
  <input type="hidden" name="cx" value="002907624540990077409:p0fud5ft4ii" />
  <input name="q" type="text" size="40" value="$1" />
  <input type="submit" name="sa" value="Search" />
  <input type="hidden" name="cof" value="FORID:9" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_002907624540990077409%3Ap0fud5ft4ii"></script>
<!-- Google CSE Search Box Ends -->
<html>

<!-- Google Search Result Snippet Begins -->
<div id="results_002907624540990077409:p0fud5ft4ii"></div>
<script type="text/javascript">
  var googleSearchIframeName = "results_002907624540990077409:p0fud5ft4ii";
  var googleSearchFormName = "searchbox_002907624540990077409:p0fud5ft4ii";
  var googleSearchFrameWidth = 600;
  var googleSearchFrameborder = 0;
  var googleSearchDomain = "www.google.com";
  var googleSearchPath = "/cse";
</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
<!-- Google Search Result Snippet Ends -->

</html>

Other implementations

Miscellaneous

How to hide Main Page title

Mediawiki version 1.9+
Add the following to the MediaWiki:Monobook.css on your wiki: body.page-Main_Page h1.firstHeading { display:none; }