Difference between revisions of "Help:MediaWiki basics/Training review"

From LIMSWiki
Jump to navigationJump to search
(Corrected formatting issue)
(Added more to page.)
Line 162: Line 162:
</blockquote>
</blockquote>
</pre>
</pre>
===Linking to other content===
Both internal and external links help drive the currents of discovery and collaboration within and even outside the wiki. Without links, wiki pages would be much more static and lend themselves less to collaboration and cohesiveness.
Links provide embedded navigation to other content within the wiki or to content outside the wiki. They are an important part of wiki editing and provide convenient avenues for further user research.
Let's review link formation methods in MediaWiki:
* Internal links require a set of double opening and closing square brackets, and the link text can stand alone as both the link to a specific page and as descriptive text: <code><nowiki>[[Informatics]]</nowiki></code> yields... [[Informatics]]
* You can give internal links a new title by adding a pipe (|) after the link title and then typing the text you want to appear: <code><nowiki>[[Informatics|Yo mama (knows informatics)]]</nowiki></code> yields... [[Informatics|Yo mama (knows informatics)]]
* External links require a set of single opening and closing square brackets, and the link text can be omitted: <code><nowiki>[https://en.wikipedia.org/]</nowiki></code> yields... [https://en.wikipedia.org/]
* It's much better to give external links a link title by adding one space and typing the text you want to appear in place of the URL: <code><nowiki>[https://en.wikipedia.org/ Wiki wiki oxenfree!]</nowiki></code> yields... [https://en.wikipedia.org/ Wiki wiki oxenfree!]
===Adding media===
We discovered that adding media can dress up a wiki page or even make it more functional. That wiki image at the top? It sure is colorful and adds something to an otherwise monotonous page of white and gray.
We learned [[commons:Main Page|Wikimedia Commons]] (WC) is a great starting point for finding public domain and copyright-free images, and LIMSwiki integrates with WC to make it easier for you to include media from there in your wiki content. You add media files using the <code><nowiki>[[File:FileName.format]]</nowiki></code> code format, though additional parameters can be added to better format images, videos, and soundfiles on your wiki pages.
Here's an image file with most of the common parameters attached:
[[File:Wiki Wiki Mart (Andjam79).jpg|thumb|left|baseline|100px|alt=A grocery sign showing Wiki Wiki Mart|Wiki Wiki Mart]]
<br />&nbsp;<br />
And the code for that image: <code><nowiki>[[File:Wiki Wiki Mart (Andjam79).jpg|thumb|left|baseline|100px|alt=A grocery sign showing Wiki Wiki Mart|Wiki Wiki Mart]]</nowiki></code>
<br />&nbsp;<br />&nbsp;<br />
Video and sound files work in a similar fashion. Here's an example of a Wikimedia Commons sound file in .ogg format:
[[File:Accordion chords-01.ogg|noicon]] ...using the code <code><nowiki>[[File:Accordion chords-01.ogg|noicon]]</nowiki></code>
And here's an example using a Wikimedia Commons video file in .ogg format:
[[File:Open research.ogg|thumb|left|200px|Open science]] ...using the code <code><nowiki>[[File:Open research.ogg|thumb|left|200px|Open science]]</nowiki></code>
===Templates and citations===
We mentioned you can also implement sound into a wiki using a thing called a template. What is that again? Oh yeah, a template is essentially a container that holds content you use frequently and need to deploy rapidly in an organized way. It could be a frequently used table, a set of boiler text, or a complicated set of code that calculates something for you. One example is the {{tl|Ombox productfeature}} template, which appears on every [[:Category:Vendors|vendor page]] containing product features. Instead of typing all that for every page, or even copy-pasting the code every time, a simple call to the templated content is all that's needed.
Templates are called using the <code><nowiki>{{Template name}}</nowiki></code> syntax, and they may include modifiable parameters. The parameters will vary from template to template, and most templates have help documentation to assist users. We later went on to explain how the most common templates for the wiki are the citation templates, specifically:
* {{tl|Cite web}}: <code><nowiki><ref name="">{{Cite web |url= |format= |title= |work= |author= |publisher= |date= |accessdate=}}</ref></nowiki></code>
* {{tl|Cite book}}: <code><nowiki><ref name="">{{Cite book |url= |chapter= |title= |author= |pages= |publisher= |year= |edition= |volume= |isbn= |accessdate=}}</ref></nowiki></code>
* {{tl|Cite journal}}: <code><nowiki><ref name="">{{Cite journal |url= |format= |journal= |chapter= |title= |author= |year= |volume= |issue= |pages= |pmid= |doi= |accessdate=}}</ref></nowiki></code>
* {{tl|Cite news}}: <code><nowiki><ref name="">{{Cite news |url= |format= |title= |author= |agency= |publisher= |newspaper= |pages= |location= |date= |accessdate=}}</ref></nowiki></code>
The code is placed after a statement requiring citation. A unique "ref name" is assigned to the citation; if the citation needs to be used again later, only a call to the "ref name" (like this: <code><nowiki><ref name="UniqueName" /></nowiki></code>) is needed, saving work for the editor. The rest of the parameters in the citation template are completed with the applicable source information. Finally, the following code is required at the bottom of the page to correctly display the citations:
<pre>
==References==
<references />
</pre>
===Categorizing pages===


<!---Place all category tags here-->
<!---Place all category tags here-->
[[Category:LIMSwiki training]]
[[Category:LIMSwiki training]]

Revision as of 02:54, 23 October 2013

So you've completed the four MediaWiki training exercises? If you haven't you can find them here:

If you have, then it's time to review.

MediaWiki review

The wiki

Chiodini wiki.jpg

You learned MediaWiki is free software licensed under the GNU General Public License (GPL). It's powerful, it's scalable, and it's full of features. It uses wikitext format, a special set of codes to present information in the wiki. When content is edited in MediaWiki, previous versions of the page are retained, allowing easy reverts in case of vandalism or spamming.

From there you learned about what a wiki actually is. It allows authorized users to do what?

  1. add content
  2. modify content
  3. remove content
  4. collaborate with others
  5. build and manage knowledge bases
  6. maintain research notes
  7. maintain community web content
  8. disseminate information to a broad audience
  9. provide consistency to otherwise disparate information
  10. did we mention "collaborate"?

Creating pages and organizing content

Creating a page involves choosing the right namespace, selecting an appropriate title, entering the title into the search box, selecting "Go", and choosing the option to create the page on the wiki. Of course, namespaces have particular purposes, titles have naming conventions, and page content has particular formatting and organization requirements, at least to meet the standards of LIMSwiki.

Once the page is started, you begin adding substance to it. If it's a page about say... the clinical laboratory, you'll have plenty to write about: what it is, how it operates, and how it's regulated. That's likely three separate sections right there. You'll want to divide that content, and you do it by using headings and subheadings. You should immediately notice this "Creating pages and organizing content" section is subheaded to "MediaWiki review" for example.

Aside from creating sections with headers and subheaders, later entering paragraphs of text into those sections, we discussed at least three other ways to organize content on pages:

1. With bulleted lists like this...

  • This is a point I want to make.
  • This point may logically follow the previous or it may stand by itself.
  • And while no less important, this point is here on its own.

...formatted like this:

* This is a point I want to make.

* This point may logically follow the previous or it may stand by itself.

* And while no less important, this point is here on its own.

2. With numerical ordered lists like this...

  1. Item number one goes here.
  2. Item number two goes here.
  3. And let's not forget item number three.

...formatted like this:

# Item number one goes here.
# Item number two goes here.
# And let's not forget item number three.

3. With tables like this...

Wonder Books Prices
Product Student price Commercial price
Summer Has Gone $12.95 $15.95
Winter Is Coming $13.49 $16.19

...formatted like this:

{| class="wikitable"
 |-
  ! colspan="3"| Wonder Books Prices
 |-
  ! style="color:green; background-color:#afafba;" | Product
  ! style="color:green; background-color:#afafba;" | Student price
  ! style="color:green; background-color:#afafba;" | Commercial price
 |- 
  | '''Summer Has Gone'''
  | style="background-color:white;" align="center" | $12.95
  | style="background-color:white;" align="center" | $15.95
 |- 
  | '''Winter Is Coming'''
  | style="background-color:white;" align="center" | $13.49
  | style="background-color:white;" align="center" | $16.19
 |- 
|}

Formatting textual content

We learned there are numerous ways to format the text you enter into the wiki. Some of those methods use built-in MediaWiki code, while others use HTML-based codes to render text a certain way.

Let's throw all those formatting methods into a piece of text, just for fun. Then we'll show the code used to get the result:

Once upon a time a sleepy sister Sarah constantly strove to stay awake. She sang a song that went a little something like this...

Slumber grips me
tight and true.
Why I fight it
I can't say.

Sighing softly 
I climb the stairs,
open the door,
and peek inside,
only to find
what I had left behind.

She found she had reached the point of sleepiness2 afterwards. She fought to keep her eyes open. Yet by the door she also saw a book with the title "True Sleep Is Never Far Away".

She opened to a random page to find the following words: "When sleep dreams overtake you, fly freely with the current."

What could this mean? she pondered.

And the code, with all the formatting marks in their full glory...

<blockquote>
'''Once upon a time''' a sleepy sister Sarah ''constantly'' strove to stay awake. She sang a song that went a little something like this...

<pre>Slumber grips me
tight and true.
Why I fight it
I can't say.

Sighing softly 
I climb the stairs,
open the door,
and peek inside,
only to find
what I had left behind.</pre>

She found she had reached the point of sleepiness<sup>2</sup> afterwards. She fought to keep her eyes open. Yet by the door she also saw a book with the title "<tt>True Sleep Is Never Far Away</tt>". 

She opened to a random page to find the following words: "When <strike>sleep</strike> dreams overtake you, fly freely with the <u>current</u>." 

<code><nowiki>What could this mean?</nowiki></code> she pondered.
</blockquote>

Linking to other content

Both internal and external links help drive the currents of discovery and collaboration within and even outside the wiki. Without links, wiki pages would be much more static and lend themselves less to collaboration and cohesiveness.

Links provide embedded navigation to other content within the wiki or to content outside the wiki. They are an important part of wiki editing and provide convenient avenues for further user research.

Let's review link formation methods in MediaWiki:

  • Internal links require a set of double opening and closing square brackets, and the link text can stand alone as both the link to a specific page and as descriptive text: [[Informatics]] yields... Informatics
  • You can give internal links a new title by adding a pipe (|) after the link title and then typing the text you want to appear: [[Informatics|Yo mama (knows informatics)]] yields... Yo mama (knows informatics)
  • External links require a set of single opening and closing square brackets, and the link text can be omitted: [https://en.wikipedia.org/] yields... [1]
  • It's much better to give external links a link title by adding one space and typing the text you want to appear in place of the URL: [https://en.wikipedia.org/ Wiki wiki oxenfree!] yields... Wiki wiki oxenfree!

Adding media

We discovered that adding media can dress up a wiki page or even make it more functional. That wiki image at the top? It sure is colorful and adds something to an otherwise monotonous page of white and gray.

We learned Wikimedia Commons (WC) is a great starting point for finding public domain and copyright-free images, and LIMSwiki integrates with WC to make it easier for you to include media from there in your wiki content. You add media files using the [[File:FileName.format]] code format, though additional parameters can be added to better format images, videos, and soundfiles on your wiki pages.

Here's an image file with most of the common parameters attached:

A grocery sign showing Wiki Wiki Mart
Wiki Wiki Mart


 

And the code for that image: [[File:Wiki Wiki Mart (Andjam79).jpg|thumb|left|baseline|100px|alt=A grocery sign showing Wiki Wiki Mart|Wiki Wiki Mart]]


 
 

Video and sound files work in a similar fashion. Here's an example of a Wikimedia Commons sound file in .ogg format:

...using the code [[File:Accordion chords-01.ogg|noicon]]

And here's an example using a Wikimedia Commons video file in .ogg format:

Open science

...using the code [[File:Open research.ogg|thumb|left|200px|Open science]]

Templates and citations

We mentioned you can also implement sound into a wiki using a thing called a template. What is that again? Oh yeah, a template is essentially a container that holds content you use frequently and need to deploy rapidly in an organized way. It could be a frequently used table, a set of boiler text, or a complicated set of code that calculates something for you. One example is the {{Ombox productfeature}} template, which appears on every vendor page containing product features. Instead of typing all that for every page, or even copy-pasting the code every time, a simple call to the templated content is all that's needed.

Templates are called using the {{Template name}} syntax, and they may include modifiable parameters. The parameters will vary from template to template, and most templates have help documentation to assist users. We later went on to explain how the most common templates for the wiki are the citation templates, specifically:

  • {{Cite web}}: <ref name="">{{Cite web |url= |format= |title= |work= |author= |publisher= |date= |accessdate=}}</ref>
  • {{Cite book}}: <ref name="">{{Cite book |url= |chapter= |title= |author= |pages= |publisher= |year= |edition= |volume= |isbn= |accessdate=}}</ref>
  • {{Cite journal}}: <ref name="">{{Cite journal |url= |format= |journal= |chapter= |title= |author= |year= |volume= |issue= |pages= |pmid= |doi= |accessdate=}}</ref>
  • {{Cite news}}: <ref name="">{{Cite news |url= |format= |title= |author= |agency= |publisher= |newspaper= |pages= |location= |date= |accessdate=}}</ref>

The code is placed after a statement requiring citation. A unique "ref name" is assigned to the citation; if the citation needs to be used again later, only a call to the "ref name" (like this: <ref name="UniqueName" />) is needed, saving work for the editor. The rest of the parameters in the citation template are completed with the applicable source information. Finally, the following code is required at the bottom of the page to correctly display the citations:

==References==
<references />

Categorizing pages