MediaWiki
| CSharp-Online.NET:FAQs |
|
| edit |
MediaWiki FAQ
The MediaWiki FAQ is a compendium of changes, extensions, and URIs required to run the C# Onlne.NET site.
Categories
Special:Categories to list all categories. Must be logged in as Sysop.
Configuration settings list
Extensions and tags
HTML page titles
Edit MediaWiki:Pagetitle to change all page titles displayed in the browser window. Must be logged in as Sysop.
The default is:
$1 - yoursitename
$1 will contain the PAGENAME at runtime.
Keywords for meta tags in HTML Header
Edit <mediawikihome>/includes/OutputPage.php. Append keywords to the line $wgOut->:
$wgOut->addMeta('KEYWORDS', $a.'<keyword1>,<keyword2>,...');
Links
Messages
Edit Special:Allmessages. Must be logged in as Sysop.
Navigation Sidebar
The navigation bar is shown at the left hand side of each MediaWiki page by default.
Minor edits
Edit MediaWiki:Sidebar page in versions 1.5 and newer. Must be logged in as Sysop.
Major edits
In <mediawikihome>/skins/MonoBook.php, locate this line:
<?php if( $this->data['language_urls'] ) { ?><div id="p-lang" class="portlet">Immediately above that line, add this:
<div id="p-someAd" class="portlet"> <h5>Some Ad</h5> <div class="pBody"> <!-- ad HTML goes here --> </div> </div>
<nowiki> tag
Use the <nowiki>text</nowiki> tags to avoid wiki formatting on the text inside the tags.
Site title
Edit MediaWiki:Sitetitle to change how the title of your site is displayed. Must be logged in as Sysop.
The default is:
{{SITENAME}}
SITENAME is set in LocalSettings.php as PHP variable $wgSitename. It can be changed there instead.
Social bookmarks
Add to MonoBook.php in:
<div class="portlet" id="p-personal">
and
<div id="footer">
<a href="javascript:location.href='http://del.icio.us/post?v=2&url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title)+' '"><img src="grafx/delicious14x14.png" height="14" width="14" alt="del.icio.us C# Online.NET"></a> <a href="javascript:location.href='http://digg.com/submit?phase=2&title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(document.location.href)+' '"><img src="grafx/digg14x12.png" height="12" width="14" alt="digg C# Online.NET"></a> <a href="javascript:location.href='http://www.dotnetkicks.com/kick/?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title)+' '"><img src="grafx/dotnetkicks14x14.png" height="14" width="14" alt="DotNetKicks C# Online.NET"></a> <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&t='+encodeURIComponent(document.title)+' '"><img src="grafx/furl14x14.png" height="14" width="14" alt="furl C# Online.NET"></a> <a href="index.php?title=Social_bookmarking">?</a>
Tagline
MediaWiki:Tagline to edit the tagline. The tagline appears just under the horizontal line beneath the article heading.
Title intercept
Edit <mediawikihome>/includes/OutputPage.php. Intercept page title and convert "csharp", etc. to "C#" for display.
$name=preg_replace('/(.*?)[Cc][Ss]harp(.*)/i', '$1C#$2', $name);
Create your own skin
- Make a copy skins/monobook and rename it /csobook.
- Make a copy of skins/MonoBook.php and rename it CSOBook.php
- Edit CSOBook.php
class SkinCSOBook extends SkinTemplate { /** Using monobook. */ function initPage( &$out ) { SkinTemplate::initPage( $out ); $this->skinname = 'csobook'; $this->stylename = 'csobook'; $this->template = 'CSOBookTemplate'; } ... class CSOBookTemplate extends QuickTemplate { ... wfRunHooks( 'CSOBookTemplateToolboxEnd', array( &$this ) );