Difference between revisions of "Template:Forum/header"
Dinoguy1000 (talk | contribs) (move the whole check to the subtemplates) |
|||
Line 2: | Line 2: | ||
| style = height: 3.5em; width: 100%; margin: 0; | | style = height: 3.5em; width: 100%; margin: 0; | ||
| image = '''Forums:''' | | image = '''Forums:''' | ||
− | | imageright = {{ #ifexpr: {{ #if:{{{sticky|}}}{{{demo|}}}|1 | + | | imageright = {{ |
− | + | #ifexpr: {{ | |
− | | | + | #if: {{{sticky|}}}{{{demo|}}}<!-- bypass time check for stickied and demo uses --> |
+ | | 1 | ||
+ | | {{ #time: U }} - {{ #time: U | {{REVISIONTIMESTAMP}} }} < 3456000 | ||
+ | }}<!-- only forum pages edited in the last 40 days get the "post" button --> | ||
+ | | {{ | ||
+ | #if: {{{index|}}}<!-- no "post" button on forum index pages --> | ||
+ | || <span style="white-space: nowrap;">[{{fullurl:{{FULLPAGENAMEE}}|action=edit§ion=new}} http://images.wikia.com/anime/en/images/4/4e/Forum_new.gif] [{{fullurl:{{FULLPAGENAMEE}}|action=edit§ion=new}} Post]</span> | ||
+ | }} | ||
}} | }} | ||
| text = [[Forum:Index|Index]] '''''→''''' {{ | | text = [[Forum:Index|Index]] '''''→''''' {{ | ||
Line 19: | Line 26: | ||
}}<includeonly>{{<!-- topic cats --> | }}<includeonly>{{<!-- topic cats --> | ||
#if: {{{demo|}}} | #if: {{{demo|}}} | ||
− | | <!-- | + | | <!-- no categories for demo uses --> |
| [[Category:{{ | | [[Category:{{ | ||
#if: {{{index|}}} | #if: {{{index|}}} | ||
Line 35: | Line 42: | ||
}}</includeonly>{{ | }}</includeonly>{{ | ||
#ifeq: {{ #titleparts: {{FULLPAGENAME}} | 1 | 1 }} | Template:Forum | #ifeq: {{ #titleparts: {{FULLPAGENAME}} | 1 | 1 }} | Template:Forum | ||
− | + | | <!-- no maintenance cats for Template:Forum or any subtemplates, though we are going to do a bit else here -->{{ | |
#switch: {{PAGENAME}} | #switch: {{PAGENAME}} | ||
| Forum/header | Forum/header/doc | Forum/header/sandbox | Forum/header/testcases | Forum = | | Forum/header | Forum/header/doc | Forum/header/sandbox | Forum/header/testcases | Forum = | ||
| #default = [[Category:Forumheader preload templates|{{SUBPAGENAME}}]]<!-- keep track of the preload templates --> | | #default = [[Category:Forumheader preload templates|{{SUBPAGENAME}}]]<!-- keep track of the preload templates --> | ||
}} | }} | ||
− | | | + | | <!-- maintenance cats -->{{Forum/header/move notice}}<!-- wrong namespace check |
− | + | ||
− | + | -->{{Forum/header/archived notice|index={{{index|}}}|sticky={{{sticky|}}}}}<!-- necrobumping | |
− | + | ||
− | + | -->{{ | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
#if: {{{3|}}}{{{4|}}}{{{5|}}} | #if: {{{3|}}}{{{4|}}}{{{5|}}} | ||
| [[Category:Forumheader transclusions to be checked|P]]<!-- see if {{{3}}}-{{{5}}} are used anywhere and if so how --> | | [[Category:Forumheader transclusions to be checked|P]]<!-- see if {{{3}}}-{{{5}}} are used anywhere and if so how --> | ||
}}{{ | }}{{ | ||
#if: {{{index|}}}{{{demo|}}} | #if: {{{index|}}}{{{demo|}}} | ||
− | | <!-- forum index or | + | | <!-- forum index or demo; no further parameter checking necessary --> |
| {{ | | {{ | ||
#switch: {{{1|¬}}} | #switch: {{{1|¬}}} |
Revision as of 04:18, 1 March 2011
Forums: | Index → [[Forum:{{{1}}}|{{{1}}}]] → Forum/header |
{{Forum/header}}
is a template used to organize forum threads. It appears at the top of forum pages and allows them to appear in forum indexes and categories. It also produces certain notices depending on the status of the forum thread.
Usage
In the vast majority of cases, it is not necessary to manually add or modify this template, as it is added automatically when a thread is created using the "new topic" box.
The first unnamed parameter is for the name of the forum section: {{Forum/header|Section of the forum}}
For example, {{Forum/header|General Yu-Gi-Oh! Discussion}}
produces:
Forums: | Index → General Yu-Gi-Oh! Discussion → Forum/header Please sign your comments with ~~~~. See Help:Signatures and Help:Talk pages for further information. |
A second unnamed parameter can be used to add the thread to another section. For example: {{Forum/header|Yu-Gi-Oh! Wiki Community Discussion|Yu-Gi-Oh! Ruling Queries}}
produces:
Forums: | Index → Yu-Gi-Oh! Wiki Community Discussion → Forum/header Index → Yu-Gi-Oh! Ruling Queries → Forum/header Please sign your comments with ~~~~. See Help:Signatures and Help:Talk pages for further information. |
To sticky a thread (i.e. add it to a separate section on index pages, so that it will remain near the top regardless of how long it has been since it was last edited), add |sticky=true to the template. For example: {{Forum/header|Yu-Gi-Oh! Deck help|sticky=true}}
produces:
Forums: | Index → Yu-Gi-Oh! Deck Help → Forum/header Please sign your comments with ~~~~. See Help:Signatures and Help:Talk pages for further information. |
To demonstrate how to use the template, add |demo=true to the template; this will prevent it from adding any categories or displaying the move or archive notices. For example: {{Forum/header|Yu-Gi-Oh! Lists Discussion|demo=true}}
(all the examples provided here use this).
Notices
Wrong namespace
If the thread is not in the forum namespace, a box instructing that the page be moved appears. By default, this box only shows for administrators, but other users can make it visible by adding the code div.sysop-show { display: block !important; }
to their wikia.css or monobook.css file.
Administrators: This page is in the wrong namespace.
|
Archived
If the thread was last edited more than 40 days ago, the edit and new topic links become unavailable and the following notice appears. The number of days increases the longer the thread goes unedited. This notice does not appear on sticky threads, index pages, or threads in the Wiki Discussion forum.
Wiki Discussion and sticky threads, as well as threads not old enough to be auto-archived, can be manually archived by adding |archived=true to the template. To avoid resetting the day count to 0 when manually archiving, |last edit=date can be used to get the counter to start from a specified date, which should usually be the date of the edit before the manual archive (for instance, to set the last date at 14:37, August 21, 2011, you would write |last edit=14:37, August 21, 2011). The time zone used should be UTC.
This forum thread has been unedited for 4656 days and is considered archived. |
Threads which have been full protected are automatically considered archived, regardless of how long it's been since the last edit or if the last edit
or archived
parameters have been used. All threads which have been full protected also omit the "Please don't add to the discussion, unless absolutely necessary." sentence, since non-admins cannot edit them.