## To Do Items

• how do I get the search box to work?
• how do I embed teachertube videos in my wiki?
• how do I enter a Math formula, seems the easiest is Microsoft Word - export math equation. Design Science - makers of MathType doesn't work with IE10 or 11
• how do you get a list of all users on a wiki?

## Installation

### Amazon AWS

• Micro instances is free for first 12 months or 750 hrs each month.
• Step 0: login to console.aws.amazon.com jefferyjjensen.com normal (closed account on 5/24/2015)
• Step 1: Choose an Amazon Machine Image (AMI), Mark Hershberger recommends Debian based like Ubuntu Server 13.10 (PV) - ami-7eaecc4e (64-bit) available from Canonical (http://ubuntu.com/cloud/services) but I was unable to get this to work, so using Amazon Linux instead.
• Step 3: visit https://console.aws.amazon.com/console/home > Elastic Computing (EC2) > Running Instance > Connect
• Step 4: create a SSH connection to Amazon AWS
• UltraEdit SSH/Telnet Account Manager
• General Tab
• Server: 54.186.193.221
• Port: 22
• Authentication Tab
• Public Key Only
• Private key path: (e.g, jefferyjjensen.com/secure/aws/amazon.com/jjensen.pem, if skipped, will get error <b>Status: Failed to load key or certificate</b>
• UltraEdit SSH/FTP Account Manager
• Step 8: test connection http://54.186.193.221/
• Step 9: transfer files

### wiki.ccsdcurriculum.com

• Step 3. login to SmarterASP.NET control panel and upload. Unzip using SmarterASP.NET file manager to ccsdcurriculum.com/mediawiki
• Step 4. SmarterASP.NET MySQL Manager. Database Name: db_991088_ccsd, password: normal
• Step 4a. MySQL Settings.
• Database Host: MYSQL5006.smarterasp.net
• Database Name: db_991088_ccsd
• Database Table Prefix: leave blank
• Step 4b. name of wiki: CCSD Curriculum
• Step 4c. user rights profile: private wiki
• extensions: cite, gadgets, imagemap, inputbox, parserfuntions, wikieditor
• directory for deleted files H:roothomejefferyjjensen-001wwwccsdcurriculum.commediawikimediawiki-1.22.3imagesdeleted
• save LocalSettings.php and upload to ccsdcurriculum.commediawikimediawiki-1.22.3LocalSettings.php
• Error: uncommitted DB writes (transaction from DatabaseBase::query (MessageBlobStore::clear)). in H:roothomejefferyjjensen-001wwwccsdcurriculum.commediawikimediawiki-1.22.3includesdbDatabase.php on line 3944

## Extensions

### Semantic Bundle

• Procedure to install
3. the extract using Go Daddy File Manager (/public_html/gisengineering.com/w/extensions)
1. copy require_once lines of code
2. require_once( “$IP/extensions/SemanticBundle/SemanticBundleSettings.php” ); 3. require_once( “$IP/extensions/SemanticBundle/SemanticBundle.php” );
6. edit SemanticBundleSettings.php and uncomment Widgets lines (require_once and wgGroupPermissions)
7. visit www.gisengineering.com/w/Special:AllPages select Widgets from the drop down

### Collection Extension - PediaPress

2. use smarterasp.net to unzip and extract
3. rename folder wikimedia-mediawiki-extensions-Collection-bf7c4b9 to Collection

<syntaxhighlight lang=“php”>

1. export wiki to PDF, ODF and DocBook XML

### Category Tree

• CategoryTree also lets you put, on any page, a similar collapsible, hierarchical list of categories, but this one also listing the pages that each category holds.” <ref name=“Working with MediaWiki”>Working with MediaWiki, Yaron Koren, p. 99</ref>

### SyntaxHighlight_GeSHi

<syntaxhighlight lang=“php”> wikimedia-mediawiki-extensions-SyntaxHighlight_GeSHi-7fa4488 to SyntaxHighlight_GeSHi </syntaxhighlight>

• Step 5. edit LocalSettings.php, add the following at the end of the file

<syntaxhighlight lang=“html4strict” highlight=“4” enclose=“div”>

1. unzip in extensions folder, creates subfolder geshi, need to rename

### Math

NOMATHJAX

<syntaxhighlight lang=“php”> <script type=“text/javascript”

require_once( “$IP/extensions/MathJax/MathJax.php” ); </script> </syntaxhighlight> • Step 3 - type some math markup in a wiki page <syntaxhighlight lang=“php”> <script type=“text/javascript”  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script> </syntaxhighlight> • Step 2 - add math markup language to webpage. Hopefully can just type the equation in Microsoft Word Equation Editor and then copy the MathML and paste in the webpage <syntaxhighlight lang=“php”> <math xmlns=“http://www.w3.org/1998/Math/MathML”> <mi>a</mi><msup><mi>x</mi><mn>2</mn></msup> <mo>+</mo> <mi>b</mi><mi>x</mi> <mo>+</mo> <mi>c</mi> <mo>=</mo> <mn>0</mn> [/itex] </syntaxhighlight> ### Flickr ### Google Analytics ## Setup ### Short URL • Reference • Step 1. edit jefferyjjensen.commediawikiLocalSettings.php file, note I installed mediawiki in /mediawiki, not /w as the help file says. •$wgScriptPath = “/mediawiki”;
• $wgArticlePath = "/wiki/$1“;
• $wgUsePathInfo = true; • Step 2. edit jefferyjjensen.comweb.config and within the system.webServer tag, add the following • Changing the URL structure. By default, MediaWiki URLs appear in a format like: • mywiki.com/mediawiki/index.php?title=Main_page • However, the preferred format is something more like: • mywiki.com/wiki/Main_Page • This is the format that Wikipedia and other Wikimedia sites use. The 'wiki' directory can have any name, though 'wiki' makes sense for obvious reasons. There are various approaches to changing the URL format, based primarily on whether you have root access on the server on which the wiki resides. You can see all the steps required for the various approaches here: https://www.mediawiki.org/wiki/Manual:Short_URL • We will just note that there are some cases when users want to have a URL structure that looks simply like: • mywiki.com/Main_Page • It's certainly a clean-looking URL, but this is not recommended, because, among other reasons, it means that your server can't have helper files like robots.txt and favicon.ico. You can see a longer discussion of this approach here: https://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory" <ref name="Working with MediaWiki">[[http://workingwithmediawiki.com|Working with MediaWiki, Yaron Koren, p. 11-12</ref> ### Categories • Level 1 - Grandparent Category • Main • Main Page • Level 2 - Parent Category • Autodesk Inventor • Level 3 - Child Category • Machine Vise, Cams, Gears, Geneva Wheel • “Categories are MediaWiki's basic method of organizing information. On wikis that don't use Semantic MediaWiki, categories are really the only way to tag information about pages. Categories, for that reason, have been used in a large variety of ways - you only have to look at the explosion of categories on Wikipedia to see that. On the English-language Wikipedia, there are at least 6 ways in which categories get used: 1. to establish the basic type of page's subject, e.g. 'Space Shuttles' 2. to define further characteristics of a page's subject, e.g. 'Italian generals' 3. to note a larger topic to which this page's subject relates, e.g. 'Theosophy' 4. to tag temporary information about the page itself, e.g. 'Proposed deletion as of September 20, 2012' 5. to serve as a container super-category for other categories, e.g. 'Symphonies by composer' 6. to tag pages other than regular pages or categories, e.g. 'Animal templates' • There are better ways of tagging much of this information, which take less work and lead to less redundancy. In fact, Semantic MediaWiki, which we'll get to in later chapters, was first thought up in part in order to remove the need for the profusion of categories on Wikipedia. Still, even with Semantic MediaWiki, categories play an important role.” (Working with MediaWiki by Yaron Koren, p. 43-4) • Step 1. Adding a page to a category Edit LocalSettings.php to include the following: <syntaxhighlight lang=“php”> 1. Category Browser breadcrumb-style$wgUseCategoryBrowser = true; </syntaxhighlight>

• Step 2. Check if the proposed name category already exists, visit http://wiki.jefferyjjensen.com/wiki/Special:AllPages/Categories:
• Step 3a. create the parent category (e.g. Autodesk Inventor)
• Part A. Edit the wiki page you want to be included in the proposed category (e.g. Edit the Main Page)
• Part B. Add the following to the bottom of the wiki page, then click the <b>Save page</b> button

<syntaxhighlight lang=“php”> Inventor </syntaxhighlight>

• Part C. Click the newly created category link at the bottom of the saved wiki page
• Part D option 1. Will get a new page 'Creating Category:Machine Vise' then type

<syntaxhighlight lang=“php”> Vise </syntaxhighlight> In the edit portion of the page, will see the formatting buttons like Bold, Italic, Underline, etc. in the upper right corner of the editing portion of the page.

• Part D option 2. If the page already exists, will see Category:Autodesk Inventor heading. Below that will see another heading, <b>Pages in category “Autodesk Inventor”</b>
• Step 3b. create the child category (e.g. Geneva Wheel)
• Part A. Edit the parent wiki page you want to be included in the proposed category (e.g. Edit Inventor
• Part B. Add the following to the bottom of the wiki page, then click the <b>Save page</b> button

<syntaxhighlight lang=“php”> Wheel </syntaxhighlight>

• Part C. Click the newly created category link at the bottom of the saved wiki page Wheel
• Part D option 1. Will get a new page 'Creating Category:Geneva Wheel' then type

<syntaxhighlight lang=“php”> Wheel </syntaxhighlight>

• Step 4. assign a category to a page
• Part A. visit the child page, say Vise and edit the page. At the bottom add the following:

<syntaxhighlight lang=“php”> Inventor </syntaxhighlight>

• Part B. save the page. Then click the Autodesk Inventor category link at the bottom of the page. Should see that Vise is now listed as a child category of the Inventor parent page.
• “To assign a category to a page, simply add the link Category:Category name enclosed in square brackets to the page's wikitext. The usual place to add it is at the bottom of the page.”

<syntaxhighlight lang=“php”>

Sort of Warcraft:Class Guides of Magic:Class Guides </syntaxhighlight>

• Question: How do you make a category reference to the Main Page?
• Recommend using Categories instead of subpages

### Transclusion

• “You can embed pages within other pages - if, for instance, you have a lot of content whose editing you want to break up into multiple pages but still display together. If you have a page like 'History of chairs' that you want to embed in a page called 'Chairs', you can do that with the following wikitext:

<syntaxhighlight lang=“php”> history_of_chairs </syntaxhighlight> For pages in namespaces other than the main one, you simply put the entire page name in curly brackets, like: <syntaxhighlight lang=“php”> how_to_get_started </syntaxhighlight> Such embedding is also called 'transclusion'. The most important use of such transclusion is to include templates, which, unlike other page types, can take in variables when they're called. Templates are covered later in this chapter. Within transcluded pages, one can add the markup tags <noinclude>, <includeonly> and <onlyinclude>, all of which affect what shows up when the page is both viewed on its own, and transcluded elsewhere. These three tags are all covered in the section on templates.” (Working with MediaWiki by Yaron Koren, p. 29-30)

### Subpages

• “Subpages are a handy way to break up a single page into multiple pages, if it gets too big or unwieldy. A subpage is simply a page whose name takes the form “main page name/additional text”, where “main page name” already exists. So if you have a page about the company Ace Motors, and it contains a long section about company's history, you could spin off that section into its own page, named “Ace Motors/History”, and link to it from the “Ace Motors” page.” (Working with Mediawiki by Yaron Koren, p. 52)
• “Of course, you could also call the page 'History of Ace Motors', which is how it would be done on Wikipedia (Wikipedia doesn't use subpages in its main namespace, though it does use them in other namespaces, like 'Wikipedia:' and 'Template:'). So are subpages just another naming convention? To some extent, yes, although MediaWiki does offer one important feature that makes subpages feel more like they 'belong' to their main page: if you turn on the subpages, any page with a slash in its name will include a small 'breadcrumb' link at the top, pointing back to the 'main' page, i.e., the section before the slash, provided that the main page exists. This small feature goes a long way toward making subpages feel legitimate.” (Working with Mediawiki by Yaron Koren, p. 52-3)
• “Sub-subpages, and pages further down the hierarchy, are also possible, provided that each page further up in the hierarchy already exists. The 'breadcrumb' link at the top will link to each sub-section of the page name in turn. So you could have a page like “Ace Motors/History/Europe/1900-1950”, and, if subpages are enabled for the main namespace, the top of the page will look like: (Working with Mediawiki by Yaron Koren, p. 52-3)

#### Enabling subpages

• “Subpages are enabled through the global variable $wgNamespacesWithSubpages, which by default is empty. If you want to have subpages, say, the main namespace and the template namespace, you could add the following to LocalSettings.php: <syntaxhighlight lang=“php”>$wgNamespacesWithSubpages = array( NS_MAIN, NS_TEMPLATE ); </syntaxhighlight>

Conversely, if you wanted every namespace to have subpages, you would be best off calling array_fill(), like the following:

<syntaxhighlight lang=“php”> \$wgnamespacesWithSubpages = array_fill( 0, 200, true ); </syntaxhighlight>

(In this case, 200 is an arbitrarily high number, with the assumption that there are no namespaces on this wiki with an ID greater than 200).” (Working with Mediawiki by Yaron Koren, p. 53)

### Videos

• “A wiki doesn't usually consist of text alone, and often it's helpful to embed outside media into the pages. MediaWiki itself doesn't allow for embedding HTML and JavaScript within pages, though, which means that audio and video players, and other content like RSS viewers, can't be added by default into MediaWiki. To get around this problem, a staggering array of extensions have been created, tasked with embedding specific players and widgets. Of the around 1,000 extensions listed on mediawiki.org, 44 are in the 'Video player extensions' category; and around 12 exist for YoutTube alone. Each one embeds into the wiki page some variation of the required HTML and JavaScript. The need for all of these ended, however, in 2008, when the Widgets extension was released.” (Working with MediaWiki by Yaron Koren, p. 263)

### Formatting

• Basic wiki formatting text

<syntaxhighlight lang=“php”> Example Adds wiki page to category 'example' thumb|Text image thumbnail –~~~~ signature with timestamp </syntaxhighlight>

<ul> <li>Reference</li> <ul>

<li>[[http://www.mediawiki.org/wiki/Help:Formatting|MediaWiki Help:Formatting]]</li>

</ul> </ul>

## MediaWiki People

recommend using Amazon Web Service or digitalocean.com to host mediawiki sites

## References

<references />

Jjensen (talk) 21:01, 9 March 2014 (PDT) Software Applications:MediaWiki MediaWiki notes by Jeff Jensen