OpenWetWare:Software/Extensions/HeaderFooter: Difference between revisions
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=HeaderFooter Extension= | |||
==Origin== | |||
See http://www.mediawiki.org/wiki/Extension:Header_Footer for original extension. | See http://www.mediawiki.org/wiki/Extension:Header_Footer for original extension. | ||
Line 5: | Line 8: | ||
This also uses a second extension, ArticleCacheClass, by the same author. | 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 | 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: | To modify the contents of the displayed header, do it here: | ||
[[Template:SurveyHeader|Template:SurveyHeader]] | [[Template:SurveyHeader|Template:SurveyHeader]] | ||
===Namespaces Using This Extension=== | |||
This template is used by 2 other pages: | This template is used by 2 other pages: | ||
Line 17: | Line 24: | ||
For the project (OpenWetWare) namespace: [[OpenWetWare:Header|OpenWetWare:Header]] | For the project (OpenWetWare) namespace: [[OpenWetWare:Header|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: | 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 | $hfObj->setNsParams(<namespace constant>, array('enable'=>true)); // enable header for a specific namespace | ||
Line 27: | Line 34: | ||
$hfObj->setNsParams(NS_MAIN, array('enable'=>true)); // enable for the main namespace | $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 | $hfObj->setNsParams(NS_PROJECT, array('enable'=>true)); // enable for the project (OpenWetWare) namespace | ||
==Namespaces== | |||
Defined namespaces to use: | 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. | |||
Latest revision as of 14:09, 28 November 2007
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:
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.