Portals

How to use the Wikipedia portal technology
The objective of this document is to try to simplify the implementation of a Wikipedia-style portal in a normal Mediawiki system. This was tested with version 1.17 of Mediawiki.

Prerequisites

 * The ParserFunctions extension will need to have been installed.
 * A 'Portal' namespace will need to have been added (http://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_add_extra_namespaces.3F)


 * Copy/import the templates and other documents, an example of which is available here. Note that these were copied from Wikipedia, then modified to correct some inconsistencies. The templates were mostly ok, there were problems in the naming of "box-header" and "box-footer" in some places. Also, there were document prefixes missing in some places.

Steps
To create a new portal on the topic &quot;Topic&quot; using the box portal skeleton template follow these steps:

{| !width='50' valign='top' | 1. Save
 * Create a new page using Portal:Topic as the title of the page (where &quot;Topic&quot; is the subject of your portal) and enter the following text

This will create a skeleton of the portal, for modification. You need to modify the overall layout and define the sections that you want, for example &quot;Selected Articles&quot;, &quot;News&quot;, &quot;Photos&quot;, etc. There are basically two types of sections: fixed information, and randomly selected information. The fixed sections can be used for constant information, like the portal overview or tasks to be completed. The random sections can be used for information which constantly changes in order to generate interest in the user for making a repeat visit to the portal, like photos, &quot;did you know this&quot;, etc. The pre-defined sections in the skeleton are simply examples and will almost certainly need to be adjusted. !valign='top'| 2.
 * To define the format of the subpages, which are the box sections on the portal page, click the template links to the subpage header and footer which will be found near the top of your new portal page. You can modify the appearance of the section boxes by modifying the &quot;box-header&quot; document.
 * Save Portal:Topic/box-header with this text:

!valign='top'| 3. !valign='top'| 4.
 * Save Portal:Topic/box-footer with this text:
 * Modify the Template:Browsebar document to design the browse bar which appears at the top of all portal pages. Note that the example provided is from Wikipedia. This format requires a Portal:Contents/Portals document. Depending on the number of portals in your system, you can modify the design to suit your needs. You can also remove the reference to from your Portal:Topic page if you don't require a browse bar.
 * Place a link to your portal at the top of an appropriate article (of the same or different name) by placing a portal there. If the article name is different than the portal name, use.

For an explanation of how and why this format works go here.

To define an icon for the portal, create a document Template:Portal/Images/Topic with the text:

MyTopicIcon.svg

Upload the image &quot;MyTopicIcon.svg&quot;. Now your icon will appear where the portal template is used. !valign='top'| 5. !valign='top'| 6. !valign='top'| 7.
 * Update Number of portals if desired.
 * colspan=2| At this point, you have created a Portal under construction. It is a framework with a lot of red links where content should go.  A fair amount of work is still necessary to turn a skeleton portal into one ready for browsing. The first thing to do is to decide on the layout and naming for the box sections (subpages), and identifying which ones will be fixed data and which ones will be random.
 * colspan=2| At this point, you have created a Portal under construction. It is a framework with a lot of red links where content should go.  A fair amount of work is still necessary to turn a skeleton portal into one ready for browsing. The first thing to do is to decide on the layout and naming for the box sections (subpages), and identifying which ones will be fixed data and which ones will be random.
 * Return to your portal page Portal:Topic and begin editing (general instructions on editing a portal are below). Basically follow the red links to create sub-pages that will fill the boxes.
 * Consider the first box in the skeleton as an example of a fixed section. The title bar should contain the name of your topic, and the contents should have Portal:Topic/Intro. Click on the link in the contents to create the &quot;Intro&quot; article. When saved, this article will then appear as the contents of the section.

The fixed sections are defined, for example, in this manner, using the &quot;box-header&quot; template:

In this case, &quot;Things to do&quot; is the title of the section, and Portal:Topic/Opentask is the name of the article to be placed in the box. !valign='top'| 8.
 * Consider the second box in the skeleton as an example of a random section. The title bar should have &quot;Selected article&quot; as the title, and the content should have several &quot;red&quot; links. There are two types of random selections, see http://en.wikipedia.org/wiki/Template:Random_portal_component and http://en.wikipedia.org/wiki/Template:Random_portal_component_with_nominate for a discussion on how they work and which one to use.

The random sections resemble:

In this case, the title is &quot;Selected article summary&quot;, the article summaries are located under Portal:Topic/Selected article, there are 5 articles (named Portal:Topic/Selected article/1 to Portal:Topic/Selected article/5), and the footer (link to Portal:Topic/Selected article) is &quot;More articles...&quot;.

The random selection sections require some support documents which need to be created first:

Document Portal:Topic/Selections/Layout (used to format the content of the section box)

Layout template
Document Portal:Topic/Selections (used to show and manage documents in the section)

Usage
The template used for the creation of these sub-pages is located at /Layout
 * 1) Select an existing article to add
 * 2) Copy format text from /Layout
 * 3) Add a new Selected article to the next available subpage by clicking its red link
 * 4) Paste format text then fill in image and caption, if any, text (summary of article), and article link
 * 5) Update &quot;max=&quot; to new total for its Random portal component on the main portal page.

At this point, you can add your documents to the list in Portal:Topic/Selections by following the instructions at the top of the page. By default, there are 50 available articles. This can be changed by editing the Numbered subpages template.


 * }