Extension:GIS Trivia

What does it do?
GIS Trivia is a MediaWiki tag extension that displays randomly selected GIS-based trivia questions with multiple choice answers. Its purpose is to challenge the user's knowledge of GIS-related information. It also provides a link to an internal article that can be used to determine the correct answer.

How do I use it?
Since this is a tag extension, all you need to do is to add the following two tags to your wiki article: 



When the article is displayed, the tags will be replaced by a GIS Trivia question.

Configurable Options
User configurable options can be declared in two ways. The first way is to declare them as parameters of the tag itself. This type of declaration is referred to as tag options. The second way to declare the options is to insert them between the start and end tags. This this type of declaration is referred to as content options.

Tag options
This extension only supports one tag option: nogreeting. The presence of this option within the tag indicates that the normal greeting text should be omitted. The default behavior is to display a random greeting text. The following example shows how this option should be used.

Content Options
There are no content related parameters associated with this extension.

How does it work?
This extension processes the contents of the Wiki.GIS.com:GIS Trivia page (also called the data page) and displays its contents accordingly. The contents of this page can be placed in four specific groups: Greetings, Questions, Answers, and Links. The design of the extension allows an unlimited number of these components to be processed.

Random selections
This extension uses a random number generator whose seed is derived from today's date. This is required so that the random number generated will be the same for a 24 hour period. In more practical terms, this guarantees that the same question and greeting will be selected for a day. Once the date changes, so will the question and greeting selected.

Greeting tags
The first component displayed is that of the selected greeting. Greetings are contained between the following two tags:

 

There is no limit to the number of greetings that can be placed on the data page. All of the text that is to be displayed for the selected greeting must be placed between these two tags. For example,

you place your greeting text here this is the text of the second greeting

Question tags
The second component displayed is that of the selected question. Questions are contained between the following two tags:    There is no limit to the number of questions that can be placed on the data page. Unlike greetings, questions encapsulate both answers and a link. The portion of the question that is to be displayed must be contained between the starting tag and the first inner tag.

For example, consider the following question that contains two multiple choice answers: The text of the question goes here this is the first choice this is the second choice Some-internal-page

Answer tags
The third component displayed is that of the multiple choice answers of the question. There is no limit to the number of multiple choice answers for a question. Please refer to the example above for more clarity.

Link or URL tags
The last component displayed is that of the link to the internal page that contains the answer. These links are contained between the following two tags:

 

There must be only one link per question. The format of the link can be in one of three formats:
 * an external reference like http://www.somewhere.org
 * an assumed internal page like geography
 * an internal page like

Geography

Data page format
All text outside of the, , and associated tags are ignored by the extension. This allows the page to be formatted for easier viewing.

Credits
This extension was created in-house by our Wiki Technical Team