Wikipedia:WikiProject Council/Guide/Technical notes

From Wikipedia, the free encyclopedia

Advanced project banners

As a WikiProject grows and adopts various processes, it becomes necessary for its project banner template to do more than merely marking an article as being within the project's scope. For example, article assessments and peer reviews all generate metadata about an article; the most obvious place to store and display such information is in the banner of the relevant project.

Browsing through Category:WikiProject banners shows that there are a variety of different optional features that are added to banners by various projects, This section aims to present an annotated example banner that, while relatively simple, demonstrates the most common and useful coding options for such templates. It is not, of course, an exhaustive overview of all the possibilities; some extremely complicated banners (such as {{WPBeatles}}, {{WPMILHIST}}, or {{WPBiography}}) include dozens of optional fields and other advanced features, and projects that need them are advised to peruse existing banners for ideas. The case presented here, however, should be sufficient for the majority of WikiProjects, at least initially.

The banner is constructed for the hypothetical Tulips WikiProject, and includes a number of features:

  • Variable-size display
  • Article assessment support, including auto-assessments
  • A show/hide block for additional fields
  • Optional fields for a peer review department

The code for the banner is given below, followed by an annotated explanation of how each feature is implemented:

{| class="messagebox {{#ifeq:{{lc:{{{nested|}}}}}|yes|collapsible collapsed nested|{{#ifeq:{{lc:{{{small|}}}}}|yes|small|standard}}}}-talk"
{{#ifeq:{{lc:{{{nested|}}}}}|yes|
! style="text-align: center" colspan="2" {{!}} [[Wikipedia:WikiProject Tulips|WikiProject Tulips]] {{#if:{{{class|}}} |      (Rated {{ucfirst:{{{class}}}}}-Class)}}
}}
|-
| [[Image:Tulip-blossom.jpg|{{#ifeq:{{{small|}}}|yes|30px|45px}}]]
| This {{#ifeq:{{{class|}}}|NA|non-article page|article}} is within the scope of the '''[[Wikipedia:WikiProject Tulips|Tulips WikiProject]]'''.  {{#ifeq:{{{small|}}}|yes||If you would like to participate, please visit the project page, where you can join the project and see a list of open tasks.}}
|-
{{#if:{{{class|}}} | {{#ifeq:{{{class|}}}|NA|
{{!}} {{{{{class}}}-Class}}
{{!}} This page is not an article and does not require a [[Wikipedia:WikiProject Tulips/Assessment|rating]]. 
|
{{!}} {{{{{class}}}-Class|category={{{class}}}-Class tulips articles}}
{{!}} This article has been [[Wikipedia:WikiProject Tulips/Assessment|rated]] as {{{class}}}-Class on the [[Wikipedia:WikiProject Tulips/Assessment#Quality scale|quality scale]]. 
}}
|
{{!}} {{-Class}}
{{!}} This article has not yet [[Wikipedia:WikiProject Tulips/Assessment|received a rating]] on the [[Wikipedia:WikiProject Tulips/Assessment#Quality scale|quality scale]].
}}
|-
{{#ifeq:{{{class|}}}|Stub|
{{#ifeq:{{{auto|}}}|yes|
{{!}} style="background: red;" {{!}} [[Image:Diamond-caution.svg|18x18px|center]]
{{!}} This article has been ''automatically'' rated as '''Stub-Class''' because it uses a [[Wikipedia:Stub|stub template]].
* If you '''agree''' with the assessment, please remove <code>{{!}}auto=yes</code> from this template.
* If you '''disagree''' with the assessment, please change it by editing the <code>{{!}}class=</code> parameter in this template and removing the stub template from the article.<includeonly>[[Category:Automatically assessed tulips articles|{{PAGENAME}}]]</includeonly>
}}
}}
|- 
{{#if:{{{peer-review|}}}
{{{old-peer-review|}}}|
{{!}} colspan="2" {{!}}
{{{!}} class="collapsible collapsed" style="width: 100%; background: transparent;" 
{{!}}-
! colspan="2" style="text-align: left;" {{!}} More information:
{{!}}-
{{!}} style="width: 43px;" {{!}}
{{!}}
{{!}}-
{{#ifeq:{{{peer-review|}}}|yes|
{{!}} style="background: gainsboro;" align="center" {{!}} '''[[Wikipedia:WikiProject Tulips/Peer review|PEER]]'''
{{!}} This {{#ifeq:{{{class|}}}|NA|page|article}} is [[Wikipedia:WikiProject Tulips/Peer review/{{ARTICLESPACE}}{{PAGENAME}}|currently]] being [[Wikipedia:WikiProject Tulips/Peer review|peer reviewed]].<includeonly>[[Category:Requests for tulips peer review|{{PAGENAME}}]]</includeonly>
}}
{{!}}-
{{#ifeq:{{{old-peer-review|}}}|yes|
{{!}} style="background: gainsboro;" align="center" {{!}} '''[[Wikipedia:WikiProject Tulips/Peer review|PEER]]'''
{{!}} This {{#ifeq:{{{class|}}}|NA|page|article}} has had a [[Wikipedia:WikiProject Tulips/Peer review|peer review]] which is now [[Wikipedia:WikiProject Tulips/Peer review/{{ARTICLESPACE}}{{PAGENAME}}|archived]].<includeonly>[[Category:Old requests for tulips peer review|{{PAGENAME}}]]</includeonly>
}} 
{{!}}}
}}
|}<noinclude>
[[Category:WikiProject banners|Tulips]]  
</noinclude><includeonly>{{#switch:{{{class}}}
|FA=[[Category:FA-Class tulips articles|{{PAGENAME}}]]
|A=[[Category:A-Class tulips articles|{{PAGENAME}}]] 
|GA=[[Category:GA-Class tulips articles|{{PAGENAME}}]]
|B=[[Category:B-Class tulips articles|{{PAGENAME}}]]
|Start
|start=[[Category:Start-Class tulips articles|{{PAGENAME}}]]
|Stub
|stub=[[Category:Stub-Class tulips articles|{{PAGENAME}}]] 
|NA = [[Category:Non-article tulips pages|{{PAGENAME}}]]
|#default=[[Category:Unassessed tulips articles|{{PAGENAME}}]]
}}</includeonly>

Basic framework

{| class="messagebox {{#ifeq:{{lc:{{{nested|}}}}}|yes|collapsible collapsed nested|{{#ifeq:{{lc:{{{small|}}}}}|yes|small|standard}}}}-talk"

...

|}<noinclude>
[[Category:WikiProject banners|Tulips]]  
</noinclude>

The basic framework of the banner is a table that uses one of three CSS classes, depending on the values of the nested and small parameters. Normally, the banner is shown with class="messagebox standard-talk" (which displays a full-size banner across the top of the talk page) set; when the banner is included with small=yes, however, it uses class="messagebox small-talk", which displays it at a smaller size, floating on the right margin. When the banner is included in a {{WikiProjectBannerShell}}, the parameter nested=yes is required to display correctly in the shell via class="messagebox collapsible collapsed nested".

{{#ifeq:{{lc:{{{nested|}}}}}|yes|
! style="text-align: center" colspan="2" {{!}} [[Wikipedia:WikiProject Tulips|WikiProject Tulips]]
}}
|-

To save space while still having the WikiProjects visible on pages in the scope of a large number of projects, {{WikiProjectBannerShell}} can be used to display each banner as a one-line box with a "show" link. This creates that visible headline when nested=yes is used.

|-
| [[Image:Tulip-blossom.jpg|{{#ifeq:{{{small|}}}|yes|30px|45px}}]]
| This {{#ifeq:{{{class|}}}|NA|non-article page|article}} is within the scope of the '''[[Wikipedia:WikiProject Tulips|Tulips WikiProject]]'''.  {{#ifeq:{{{small|}}}|yes||If you would like to participate, please visit the project page, where you can join the project and see a list of open tasks.}}

The familiar main message of the banner has been enhanced by making some of the text only display in the full-size banner, and changing the term used for the page when a non-article rating (see below) is selected.

Assessment support

Support for article assessments is typically implemented in two parts: code within the body of the banner to display the assessment, and code outside it to add the needed categories. While it's possible to combine the two, this often results in less readable code.

|-
{{#if:{{{class|}}} | {{#ifeq:{{{class|}}}|NA|
{{!}} {{{{{class}}}-Class}}
{{!}} This page is not an article and does not require a [[Wikipedia:WikiProject Tulips/Assessment|rating]]. 
|
{{!}} {{{{{class}}}-Class|category={{{class}}}-Class tulips articles}}
{{!}} This article has been [[Wikipedia:WikiProject Tulips/Assessment|rated]] as {{{class}}}-Class on the [[Wikipedia:WikiProject Tulips/Assessment#Quality scale|quality scale]]. 
}}
|
{{!}} {{-Class}}
{{!}} This article has not yet [[Wikipedia:WikiProject Tulips/Assessment|received a rating]] on the [[Wikipedia:WikiProject Tulips/Assessment#Quality scale|quality scale]].
}}
|-
{{#ifeq:{{{class|}}}|Stub|
{{#ifeq:{{{auto|}}}|yes|
{{!}} style="background: red;" {{!}} [[Image:Diamond-caution.svg|18x18px|center]]
{{!}} This article has been ''automatically'' rated as '''Stub-Class''' because it uses a [[Wikipedia:Stub|stub template]].
* If you '''agree''' with the assessment, please remove <code>{{!}}auto=yes</code> from this template.
* If you '''disagree''' with the assessment, please change it by editing the <code>{{!}}class=</code> parameter in this template and removing the stub template from the article.<includeonly>[[Category:Automatically assessed tulips articles|{{PAGENAME}}]]</includeonly>
}}
}}

The in-banner code checks the class parameter and displays one of three lines, depending on whether the parameter's value is a non-article assessment (NA), an article assessment, or blank. If the value indicates that the article has been rated as "Stub-Class", and the auto parameter is set to yes, another line is shown, indicating that the article has been automatically assessed and providing instructions on changing the assessment.

<includeonly>{{#switch:{{lc:{{{class}}}}}
|fa=[[Category:FA-Class tulips articles|{{PAGENAME}}]]
|a=[[Category:A-Class tulips articles|{{PAGENAME}}]] 
|ga=[[Category:GA-Class tulips articles|{{PAGENAME}}]]
|b=[[Category:B-Class tulips articles|{{PAGENAME}}]]
|start=[[Category:Start-Class tulips articles|{{PAGENAME}}]]
|stub=[[Category:Stub-Class tulips articles|{{PAGENAME}}]]
|na = [[Category:Non-article tulips pages|{{PAGENAME}}]]
|#default=[[Category:Unassessed tulips articles|{{PAGENAME}}]]
}}</includeonly>

The out-of-banner code is a #switch statement that adds the appropriate category based on which value is selected for the class parameter.

The assessment class is often included in the WikiProjectBannerShell headline as well, by inserting the following code after the WikiProject link.

 {{#if:{{{class|}}} | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Rated {{ucfirst:{{{class}}}}}-Class)}}

Show/hide blocks

|- 
{{#if:{{{peer-review|}}}
{{{old-peer-review|}}}|
{{!}} colspan="2" {{!}}
{{{!}} class="collapsible collapsed" style="width: 100%; background: transparent;" 
{{!}}-
! colspan="2" style="text-align: left;" {{!}} More information:
{{!}}-
{{!}} style="width: 43px;" {{!}}
{{!}}

...

{{!}}}
}}

The optional fields of the banner are enclosed within a table that acts as a show/hide block, only displaying the output of the optional fields when the [show] button is clicked by a user. The #if statement at the top lists all the possible optional fields; if none of them are given values, the show/hide block will not appear at all. If additional fields are added to the banner, they should be copied into the list as well.

Optional fields

{{!}}-
{{#ifeq:{{{peer-review|}}}|yes|
{{!}} style="background: gainsboro;" align="center" {{!}} '''[[Wikipedia:WikiProject Tulips/Peer review|PEER]]'''
{{!}} This {{#ifeq:{{{class|}}}|NA|page|article}} is [[Wikipedia:WikiProject Tulips/Peer review/{{ARTICLESPACE}}{{PAGENAME}}|currently]] being [[Wikipedia:WikiProject Tulips/Peer review|peer reviewed]].<includeonly>[[Category:Requests for tulips peer review|{{PAGENAME}}]]</includeonly>
}}
{{!}}-
{{#ifeq:{{{old-peer-review|}}}|yes|
{{!}} style="background: gainsboro;" align="center" {{!}} '''[[Wikipedia:WikiProject Tulips/Peer review|PEER]]'''
{{!}} This {{#ifeq:{{{class|}}}|NA|page|article}} has had a [[Wikipedia:WikiProject Tulips/Peer review|peer review]] which is now [[Wikipedia:WikiProject Tulips/Peer review/{{ARTICLESPACE}}{{PAGENAME}}|archived]].<includeonly>[[Category:Old requests for tulips peer review|{{PAGENAME}}]]</includeonly>
}} 

There are two optional fields, peer-review and old-peer-review, that add support for a WikiProject peer review. Each one, when set to yes, displays an additional row in the banner, and adds the corresponding category.

The choice of a peer review for this example is arbitrary. Any other optional fields (such as collaborations, portal queue links, etc.) can be added identically to them, merely by changing the field name, displayed text, and category name within the code.

Using the banner

The full syntax of the resulting banner when used on a talk page is:

{{WPTULIPS
|class=
|small=
|nested=
|auto=
|peer-review=
|old-peer-review=
}}

Thus, to display a small banner on an article rated as "B-Class" with a current peer review, an editor would add

{{WPTULIPS
|class=B
|small=yes
|peer-review=yes
}}

to the talk page. It is considered polite to trim any blank fields when including the banner, as, for very complicated ones, the large number of unused fields tends to be rather messy.

Internal navigation templates

This section discusses internal navigation templates for WIkiProjects; for navigational templates used in articles, see Wikipedia:Navigational templates.

As a WikiProject grows, it begins to acquire large numbers of subpages for various specialized purposes (such as assessment and peer review work or task forces); the largest projects can have dozens of subpages. The best way to ensure that all of these subpages can be easily located is to create a navigational template linking to them.

Most projects follow a fairly standard design for the template. It is placed as a right-floating bar, listing subpages (and usually corresponding talk pages), one per line. Here, for example, is part of the code for the navigational template used by the Lithuania WikiProject:

{| cellpadding="0" cellspacing="0" style="float: right; clear: right; border: 1px solid #aaa; 
padding: 5px; margin: 0em 0em 1em 1em; max-width: 300px; background: white;" 
! style="background: #99FF66; padding:5px; text-align: center;" | 
[[Image:Lietuvos-Lithuania 5.png|left|50px]] 
[[Wikipedia:WikiProject Lithuania|Lithuania<br/> WikiProject]]
|- 
|
{| cellpadding="3" cellspacing="0" style="font-size: 90%; width: 100%; background: ivory;"
|- style="background: #CCFF99; "
! colspan="2" style="text-align: center; border-top: 1px solid black; " | 
General information
|- 
| [[Wikipedia:WikiProject Lithuania|Main project page]]
| [[Wikipedia talk:WikiProject Lithuania|talk]]
|- 
| [[Template:WikiProject Lithuania|Project banner]]
| [[Template talk:WikiProject Lithuania|talk]]
|-
| [[Wikipedia:WikiProject Lithuania/Tips|Top 10 tips]]
| [[Wikipedia talk:WikiProject Lithuania/Tips|talk]]
|-
| [[:Category:Extremely short Lithuania articles|Extremely short articles]]
| [[Category talk:Extremely short Lithuania articles|talk]]
|- 
! colspan="2" style="text-align: center; border-top: 1px solid black; background: #CCFF99; " | 
[[Wikipedia:WikiProject Lithuania/Assessment|Assessment]]
|- 
| [[Wikipedia:WikiProject Lithuania/Assessment/Summary|Summary]]
| [[Wikipedia talk:WikiProject Lithuania/Assessment/Summary|talk]]
|}
|}

Another common feature for on navigational templates can be seen at the bottom of the navigational template used by the Military history WikiProject:

...
|-
| colspan="2" | 
<small class="editlink noprint plainlinksneverexpand">
[{{SERVER}}{{localurl:Wikipedia:WikiProject Military history/Navigation|action=edit}} edit] · 
[[Special:Recentchangeslinked/Wikipedia:WikiProject Military history/Navigation|changes]]
</small>

The key is the "changes" link; when the template is properly constructed, Special:Recentchangeslinked can be used to view, at a glance, any changes made to any of a WikiProject's pages.

The visual layout of project navigational templates tends to vary by project, with three stripe colors, two stripe colors, or colored boxes being common.

Task list templates

{{todo}}

The simplest way of creating separate task lists is {{todo}}, which can be placed directly on any WikiProject page to generate a /to_do subpage whose contents can be separately edited (via the "edit" link at the top right of the box); this subpage can contain an arbitrary list of tasks. One example is the subpage used by the Melbourne WikiProject. Once the subpage is created, the to-do list can be placed onto any other page using the template {{todo|target=Talk:Foo}}.

Custom templates

A more sophisticated approach is to create a separate, custom template for the WikiProject's open task list. For example, the Tulips project could create {{WikiProject Tulips Tasks}}, which could then be transcluded where needed. Common places to include the template are the project pages themselves, and sometimes inside of a show/hide block in the project banner. Interested project participants can also transclude the template on their user pages.

In many cases, the premade {{tasks}} template can be used inside the custom template to efficiently organize a WikiProject's open task list:

{{tasks
|requests= 
|copyedit=
|wikify=
|merge=
|cleanup=
|expand= 
|verify= 
|disambiguation=
|stubs= 
|update=
|npov= 
|other= 
}}

Each parameter can be filled with a list of the relevant articles for each type of work needed; for examples, see the lists maintained by the Israel WikiProject.

The open task templates can become arbitrarily complex, including features such as sub-templates for particular task forces; see, for example, the template used by the Military history WikiProject.

Automation

New article bot

Category count

Watchlists

  • Create a list of all pages within your scope, and use Special:RecentChangesLinked to find any pages that have been changed recently. User:SQLBot and User:Femto Bot used to maintain the lists (both defunct?). Example: WikiProject Firearms/Watchlist
  • AWB can be used to create watchlists using the save list options, "CSV file with wikimarkup" or "Text file with wikimarkup". Use template links or categories to generate the list, save the list to a text file, copy and paste links into the watchlist page. Use "convert from talk pages" option to get the article lists.

Newsletter delivery

  • Newsletter delivery bots can help with delivering project newsletters to the project participants who have signed up. They can deliver either a link or a full-version based on participant choice.

Assessment automation

Projects can request at bot requests page for help with,

  • project banner tagging using WikiProject tagging bots
  • request for class parameter to be populated from other project banners on the talk page
  • request for auto classifying stub categories with class=Stub
  • recursively traverse a root category and generate a category listing for a project review. The reviewed categories can be used by bot-operator for tagging the project banner.

WP 1.0 bot

  • Generate categories page can used to quickly create assessment categories.
  • This form can be used to run the WP 1.0 bot manually for a specific project.

AWB plugins

Igor

  • Igor, a WikiProject management tool, can be used to easily maintain the often tedious and laborious tasks of managing a medium to large WikiProject.

Lists of cleanup-flagged articles

Article alerts

See also

Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:WikiProject_Council/Guide/Technical_notes&oldid=772189377"
This content was retrieved from Wikipedia : http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Council/Guide/Technical_notes
This page is based on the copyrighted Wikipedia article "Wikipedia:WikiProject Council/Guide/Technical notes"; it is used under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC-BY-SA). You may redistribute it, verbatim or modified, providing that you comply with the terms of the CC-BY-SA