Wiki Formatting

From Metro Studios Knowledgebase

Revision as of 18:47, 9 November 2010 by Jmbrimeyer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

[edit] Resources

  1. MediaWiki Formatting Guide
  2. GeSHi Syntax Highlighting Extension Documentation

[edit] Headings

For longer documents use headings in order to break the sections up in order to provide a table of contents for your documentation. Ex: = Heading 1 = == Heading 2 ==. MediaWiki Heading Documentation

[edit] Outbound Links

Use titles for your outbound links by formatting them as follows: [http://www.mediawiki.org/wiki/Help:Formatting#Level_1 MediaWiki Heading Documentation].

[edit] Commands/Single Line Source Code Examples

Wrap any commands/single line examples of source code with the <code></code> tags so they stand out and use a monospace font. example

[edit] Source Code

Wrap any multi-line source code examples in the <source lang=""></source> tags to implement GeSHi syntax highlighting. Feed it the language you're using in the lang attribute. Ex: <source lang="php"></source> GeSHi Languages

Here is a small example of what GeSHi can do:

<?
/**
 * Progress
 * 
 * @version 0.5(dev) Progress (Hawkeye Area Council - BSA Development)
 * 
 * @author John M Parks
 *
 * @abstract Progress Close - Makes sure Progress Main Class is loaded, preform the final 
 *           session_write_close(); to ensure all SESSION variables are written, and closes 
 *           MySQLi Link
 */
 
if(!is_object($PR))
        die('Progress Main Class not initialized before close.php');
 
$PR->processErrors();
 
if(TRACK_STACK)
{
        echo "\n\n<!-- Track Stack : -->\n";
        $PR->dumpTrackStack();
}
 
if(session_id())
        session_write_close();
else
        $PR->addError('Session closed prematurely before close.php', 0);
 
if(is_object($Con))
        $Con->close();
 
if(TRACK_EXEC_TIME)
{       
        // Punch the clock to calculate approx execution time
        $PR->punchClock();
        $PR->displayExecTime("<!-- Approx. Execution Time : {time} -->\n");
}
if(TRACK_MEM_USAGE)
        echo '<!-- Memory Usage '.number_format(memory_get_usage())." -->\n";
?>
Personal tools
Namespaces
Variants
Actions
Wiki Navigation
Knowledgebase
Toolbox