Help:Advanced Features

From Clinicaltools.com

Jump to: navigation, search

The following features go beyond basic writing and editing, enhancing the usability and aesthetics of one's entry.

Contents

Sortable Tables

One can create sortable tables in MediaWiki. In the example below, click on a double-arrow icon in order to sort the column in ascending order; click on it again to sort in descending order. Click on the edit tab in order to see the associated markup.

Table 1. Triangle-Area Economic Data from the 2000 Censusa
City/Town Median family income in 1999 (dollars) Families below poverty level (%) Single-family owner-occupied homes: Median value (dollars)
Carrboro $47,330 11.0% $172,800
Cary $88,074 2.1% $196,700
Chapel Hill $73,483 6.4% $229,100
Durham $51,162 11.3% $126,100
Hillsborough $46,793 11.0% $117,100
Morrisville $64,625 3.4% $173,200
Pittsboro $42,391 19.2% $120,500
Raleigh $60,003 7.1% $156,000
United States $50,046 9.2% $119,600
aAll data were retrieved from the American FactFinder.[1]

CSS

If you have administrative permissions, you can change the wiki's CSS. However, it is highly advisable that you first experiment off-line with any changes before implementing them on the live site. (Save copies of a page and its accompanying style sheet(s) onto your local directory and edit those to your heart's content.) In addition, note that there are two levels of CSS changes: minor ones that mostly involve color and major ones that involve repositioning elements.

Minor Changes

MediaWiki's primary style sheet is simply titled main. Most of the classes and id's that would concern Web designers can be found there. Minor changes are limited almost exclusively to color because of cross-browser inconsistency. When one begins to alter attributes like margin and padding, the results begin to waver across Firefox, IE6, IE7, Opera, and Safari. (IE6, of course, provides the most problems.)

MediaWiki conveniently provides a space where one can enter CSS to override the default in the main style sheet. Simply click on the edit tab (if you have permissions and are signed in) and insert the attributes/values of the specific classes/id's that you want to change. For minor (mostly color-related) changes, the following should be altered:


body {background:#______;}

h1, h2, h3, h4, h5, h6 {color:#______; border-bottom:1px solid #______;}

a {color:#______;}

a:active {color:#______;}

a:visited {color:#______;}

a.new:visited, #p-personal a.new:visited {color:#______;}

ul {list-style-image:none;}

#bodyContent a.external {color:#______;}

#bodyContent a.external:active {color: #______;}

#bodyContent a.external:visited {color: #______;}

#toc, .toc, .mw-warning {border:1px solid #______; background-color:#______;}

.portlet h5 {border-bottom:0px; color:#______;}

#p-cactions li a {background-color:#______; color:#______;}

#p-personal li a {color:#______}

#p-personal li a:hover {background-color:______; text-decoration:underline;}

#footer {border-top:1px solid #______; border-bottom:1px solid #______;}

Major Changes

Major changes require altering the position of elements via CSS. To see a bare-bones MediaWiki page without style, simply copy an entry's page source; paste it into Notepad, NetBeans, or other appropriate editor; and save it as an HTML file on your local directory. Since said directory presumably doesn't contain any MediaWiki CSS files, your HTML document will not reference any style sheet -- thus, it will display the content in its raw form.

To experiment with major design changes, simply add page-level CSS that affects the elements structuring your content. MediaWiki provides lots of classes and id's, so it is possible to make radical changes to your wiki. Check out the following screen shots for examples:

For more examples, see the following:

Auto-generated Footnotes

With the Cite.php extension, one can generate footnotes automatically -- similar to how footnotes are generated in word-processing software.

  • Select the place on the page where you want your footnotes to reside (usually at or near the bottom).
  • At that position, insert <references />
  • Then, for any given footnote, insert <ref>Footnote Text</ref>

For example:
MediaWiki is awesome.<ref>Doe J. Why MediaWiki is awesome. J Wiki Issues. 2008 Oct 1;1(1):3-13.</ref>

  • The text between the <ref></ref> tags automatically appears in your Footnotes or References section at the bottom of the page. MediaWiki automatically numbers the footnotes, based on the order in which they appear in the entry.

References

  1. United States Census Bureau. American FactFinder [database online]. Washington, DC: United States Census Bureau; 2000. http://factfinder.census.gov/ Accessed July 2, 2008.