OpenWetWare:Software/Extensions/HeaderFooter

From OpenWetWare
Jump to navigationJump to search

HeaderFooter Extension

Origin

See http://www.mediawiki.org/wiki/Extension:Header_Footer for original extension.

This also uses a second extension, ArticleCacheClass, by the same author.

This extension currently (11-27-2007) is being used to display a message regarding surveys. The previous extension used for this, SpecialHeader, was not reliable.

Use

Namespace Headers

To modify the contents of the displayed header, do it here:

   Template:SurveyHeader

Namespaces Using This Extension

This template is used by 2 other pages:

For the main namespace: header For the project (OpenWetWare) namespace: OpenWetWare:Header

LocalSettings.php

The following code needs to be added to enable the notice for a namespace AFTER the include of the extension files:

$hfObj->setNsParams(<namespace constant>, array('enable'=>true)); // enable header for a specific namespace

Current Namspaces used:

$hfObj->setNsParams(NS_MAIN, array('enable'=>true)); // enable for the main namespace $hfObj->setNsParams(NS_PROJECT, array('enable'=>true)); // enable for the project (OpenWetWare) namespace

Namespaces

Defined namespaces to use: {- border="1" |- |NS_MAIN |- |NS_TALK |- |NS_USER |- |NS_USER_TALK |- |NS_PROJECT |- |NS_PROJECT_TALK |- |NS_IMAGE |- |NS_IMAGE_TALK |- |NS_MEDIAWIKI |- |NS_MEDIAWIKI_TALK |- |NS_TEMPLATE |- |NS_TEMPLATE_TALK |- |NS_HELP |- |NS_HELP_TALK |- |NS_CATEGORY |- |NS_CATEGORY_TALK |- |}

Problems

  • You must bracket all headers with the <wikionly></wikionly> tags.
    • This will keep the headers from being generated on dewikified pages for individual labs.
  • The <wikionly> tags may not be used in templates.
    • They should be on the headers themselves.
    • Still not clear why.
  • There should be at least one blank line after the </nowiki> tag in the header.
    • If this is not present, the first line of the page upon which the header is displayed will NOT be interpreted as wiki text.
  • All Header tags should be protected.