User:JL-Bot/Project content/documentation

This is an old revision of this page, as edited by JLaTondre (talk | contribs) at 19:36, 27 December 2010 (new options for sorting and displaying the date on main page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This template is used to have the bot generate a listing of a Project's recognized content. For an example, see Wikipedia:WikiProject Physics/Recognized content.

Usage

Place the template where you want the content displayed:

{{User:JL-Bot/Project content
|project parameter (see below)
|content parameters (see below)
|optional parameters (see below)
}}

The bot expects to see a single parameter per line with the closing }} on its own line. Failure to follow that will cause the bot to ignore parameters.

The template contains no content so it does not impact the visual appearance of the page which transcludes it.

It will only work in the following namespaces:

  • User:
  • User talk:
  • Project:
  • Project talk:
  • Portal:
  • Portal talk:

Project Parameter

The project parameter defines how the bot is to identify project content. One of the two following parameters needs to be provided:

  • |template = Name of project template
  • |category = Name of project category

The template parameter needs to have the name of the talk page template that is used by the project to identify articles within its scope. For example, WikiProject Physics uses the {{physics}} template so the parameter for them would be |template = Physics. If there are redirects to the template (ex. {{WPPhysics}} to {{physics}}), pages tagged with the redirect will still be picked up as they show up in the target's transclusions. However, do not use a redirect as the template name as only pages tagged with the redirect will be picked up.

The category parameter needs to have the name of the category that is used by the project to identify articles within its scope.

The template parameter will override the category parameter if both are present.

Content Parameters

The content parameters define the content types to be listed. The following types are supported:

The content will be listed in the order the parameters appear in the template.

Optional Parameters

The following optional parameters are supported:

  • |compact -- specifies compact layout instead of column layout (ex: article1 · article2)
  • |maximum = # -- specifies the maximum articles to list in compact mode
  • |columns = # -- defines the # of columns to be displayed in default column layout
  • |icons -- specifies the use of content type icons before page names
  • |icons-heading -- specifies the use of content type icons before the headings
  • |heading = # -- defines the heading level (number of "="s) to use; the default is level 2
  • |pictures-list -- specifies pictures should be listed (obeying the columns, icons, and compact options)
  • |dates -- specifies including in the output the date the content was on the Main Page (where applicable)
  • |sorting = <value> -- specifies the sorting to use (see below)

The compact option overrides the columns and icons options.

The maximum option only applies when the compact option is set.

The heading option allows for 0 and 2-6. A value of 2-6 defines the heading level (i.e. the number of "="s to use). A value of 0 means to not use a formal heading level, but instead use the ";Title" syntax.

Pictures will use the <gallery></gallery> syntax if the pictures-list option is not set.

The sorting option may be set to default (sort by DEFAULTSORT key), alpha (sort alphabetically), date-default (sort Main Page content by date, remainder by DEFAULTSORT key), and date-alpha (sort Main Page content by date, remainder alphabetically). The default is default if not specified.

Output

The results will be written to same page as the template. They will be prefaced by a comment header and followed by a comment footer. This header and footer are not visible on the displayed page, but are needed to allow the bot to identify prior results.

  • header = <!-- Start of content generated by JL-Bot -->
  • footer = <!-- End of content generated by JL-Bot -->

If the bot doesn't find a valid header and footer (ex. first run), it will place the results immediately below the template. If it does find a valid header and footer (updates), it will replace the content between the header and footer with the new results.