User:JL-Bot/Project content/documentation: Difference between revisions

Content deleted Content added
Optional parameters: update settings based on changes at Template:Columns-list
Wikipedia:Featured sounds decomissioned
 
(46 intermediate revisions by 12 users not shown)
Line 1:
{{Documentation subpage}}
{{Shortcut|WP:RECOG}}
__NOTOC__
This template is used to have the bot generate a listing of recognized content (e.g. [[Wikipedia:WikiProject Physics/Recognized content]]).
 
[[Apple Inc.|This]] template is used to have {{U|JL-Bot}} generate a listing of ''Recognized Content'', like [[WP:FA|featured articles]], [[WP:GA|good articles]], articles featured in the [[WP:DYK|''Did you know?'']] or [[WP:ITN|''In the News'']] section of the main page, and so on. For some examples, see [[Wikipedia:WikiProject Physics/Recognized content]] or [[Wikipedia:WikiProject Women in Red/Recognized content]].
===Usage===
 
You can also use it to generate lists of [[WP:DYK|''Did You Know?'']] blurbs (e.g. [[Wikipedia:WikiProject Physics/Did you know]] or [[Wikipedia:WikiProject Women in Red/DYK]]).
 
For details on what ''Recognized Content'' is exactly and how to make the most out of it, see [[Wikipedia:Wikipedia Signpost/2023-07-17/Tips and tricks|this ''Signpost'' article]].
 
==Usage==
Place the template where you want the content displayed:
 
Line 14 ⟶ 18:
}}
</nowiki></pre>
 
To hide the message box at the top, simply use
*{{para|mbox|no}}
 
The template contains no content so it does not impact the visual appearance of the page which transcludes it.
 
ItOnly willuse only workthis in the following namespaces:
* <code>Wikipedia:</code>
* <code>Wikipedia talk:</code>
* <code>Portal:</code>
* <code>Portal talk:</code>
* <code>Book:</code>
* <code>Book talk:</code>
* <code>User:</code>
* <code>User talk:</code>
 
While it will technically work in the following namespaces
* <code>Portal talk:</code>
* <code>Wikipedia talk:</code>
it should normally not be used there (at least on the root of talk pages of Portals and WikiProject).
 
===Project parameter===
Line 33 ⟶ 41:
*<code>|category = Name of project category</code>
 
The <code>template</code> 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, [[Wikipedia:WikiProject Physics|WikiProject Physics]] uses the {{tl|WikiProject Physics}} template so the parameter for them would be <code>|template = WikiProject Physics</code>. If there are redirects to the template (ex. {{tl|WPPhysicsWP Physics}} to {{tl|WikiProject 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 <code>category</code> parameter needs to have the name of the category that is used by the project to identify articles within its scope.
 
If the project's template can be "merged" into another project's template ([http://en.wikipedia.org/w/index.php?title=Talk%3ASamuel_Adams&action=historysubmit&diff=431218663&oldid=415712940 example]), thanthen the <code>category</code> parameter is probably a better option as not all the project's articles will be tagged with the template.
 
Multiple <code>template</code> and <code>category</code> parameters can be specified and the bot will pick up articles in all the templates and categories specified. This can be useful in cases such as portals with multiple applicable projects.
Line 63 ⟶ 71:
*<code>|content-good-article-nominees</code> -- lists [[:Category:Good article nominees]] content
*<code>|content-a-class-articles = Name of project A-Class category</code> -- lists specified category's content
*<code>|content-b-class-articles = Name of project B-Class category</code> -- lists specified category's content
*<code>|content-c-class-articles = Name of project C-Class category</code> -- lists specified category's content
*<code>|content-mainpage-in-the-news</code> -- lists [[:Category:Wikipedia In the news articles]] content
*<code>|content-mainpage-featured</code> -- lists [[:Category:Featured articles that have appeared on the main page]] content
*<code>|content-mainpage-lists</code> -- lists [[:Category:Featured lists that have appeared on the main page]] content
*<code>|content-picture-of-the-day</code> -- lists [[:Template:Picture of the day]] content
*<code>|content-featured-topics</code> -- lists [[:Category:Wikipedia featuredFeatured topics]] & [[:Category:Wikipedia fully featured topics]] content
*<code>|content-former-featured-topics</code> -- lists [[:Category:Wikipedia former featured topics]] content
*<code>|content-good-topics</code> -- lists [[:Category:Wikipedia Good topics]] content
*<code>|content-featuredvital-soundsarticles-level-1</code> -- lists [[:Category:FeaturedWikipedia level-1 vital soundsarticles]] content
*<code>|content-vital-articles-level-2</code> -- lists [[:Category:Wikipedia level-2 vital articles]] content
*<code>|content-vital-articles-level-3</code> -- lists [[:Category:Wikipedia level-3 vital articles]] content
*<code>|content-vital-articles-level-4</code> -- lists [[:Category:Wikipedia level-4 vital articles]] content
*<code>|content-vital-articles-level-5</code> -- lists [[:Category:Wikipedia level-5 vital articles]] content
 
The content will be listed in the order the parameters appear in the template.
 
Multiple <code>content-a[abc]-class-articles</code> parameters can be specified and the bot will list the articles from all the specified categories.
:Note: To avoid having the page listed on [[:Category:Pages using duplicate arguments in template calls]], the multiple parameters can be numbered. Example:
:*<code>|content-a-class-articles1 = Name of project A-Class category one</code>
Line 83 ⟶ 97:
The following optional parameters are supported:
 
*; <code>|compact</code> --: specifies compact layout instead of column layout (ex: article1 · article2). The <code>compact</code> option overrides the <code>columns</code> and <code>icons</code> options.
*<code>; {{para|maximum = #|<var>number</codevar>}} --: specifies the maximum articles to list in <code>compact</code> mode. The <code>maximum</code> option only applies when the <code>compact</code> option is set.
*; <code>|small</code> --: specifies using a reduced text size in <code>compact</code> mode. The <code>small</code> option only applies when the <code>compact</code> option is set.
*<code>; {{para|columns = |#em</code>}} --: specifies column size in default column layout
*; <code>|icons</code> --: specifies the use of content type icons before page names
*; <code>|icons-heading</code> --: specifies the use of content type icons before the headings
*; {{para|heading|<codevar>|number</var>}} : defines the heading level (number of "="s) #to use; the default is level 2. The <code>heading</code> 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; thea defaultformal isheading level, 2but instead use the ";Title" syntax.
*; <code>|noheading</code> --: specifies that headings are not to be displayed. The <code>noheading</code> option overrides the <code>heading</code> option.
*; <code>|pictures-list</code> --: specifies pictures should be listed (obeying the columns, icons, and compact options). Pictures will use the <code><nowiki><gallery></gallery></nowiki></code> syntax if the <code>pictures-list</code> option is not set.
; {{para|gallery-heights|<var>number</var>}} : specifies the minimum height (in px) to be used for a picture gallery (see <code>heights=</code> option at [[Help:Gallery tag]])
*<code>|dates</code> -- specifies including in the output the date the content was on the Main Page (where applicable)
*; <code>|sorting = <value>dates</code> --: specifies including in the sortingoutput the date the content was on the toMain usePage (seewhere belowapplicable)
*; <code>|dateno-order = <value>captions</code> --: specifies thecaptions should not be added in picture gallery sortingmode. orderCaptions forare datesadded (seeby below)default.
; {{para|sorting|<var>value</var>}} : specifies the sorting to use. The <code>sorting</code> option may be set to <code>default</code> (sort by DEFAULTSORT key), <code>alpha</code> (sort alphabetically), <code>date-default</code> (sort Main Page content by date, remainder by DEFAULTSORT key), and <code>date-alpha</code> (sort Main Page content by date, remainder alphabetically). The default is <code>default</code> if not specified.
*<code>|display-total</code> -- specifies that a count of the number of pages in the content type is displayed
; {{para|date-order|<var>value</var>}} : specifies the sorting order for dates. The <code>date-order</code> option may be set to <code>increasing</code> or <code>decreasing</code>. This option only applies when the <code>sorting</code> option is set to <code>date-default</code> or <code>date-alpha</code>. The default is <code>increasing</code> if not specified.
*<code>|overflow-FA = Name of overflow page</code> -- specifies an overflow page for <code>content-featured-articles</code> when using <code>maximum</code>
*; <code>|overflowdisplay-GA = Name of overflow pagetotal</code> --: specifies anthat overflowa pagecount forof the number of pages in the <code>content-good-articles</code> whentype usingis <code>maximum</code>displayed
; {{para|overflow-FA|<var>page name</var>}}
*<code>|overflow-DYK = Name of overflow page</code> -- specifies an overflow page for <code>content-did-you-know-articles</code> when using <code>maximum</code>
; {{para|overflow-GA|<var>page name</var>}}
*<code>|dyk-blurb</code> or <code>|dyk-blurb= #</code> -- specifies displaying DYK blurbs instead of page names (see below)
; {{para|overflow-DYK|<var>page name</var>}}
; {{para|overflow-a-class|<var>page name</var>}}
; {{para|overflow-b-class|<var>page name</var>}}
; {{para|overflow-c-class|<var>page name</var>}}
; {{para|overflow-vital-1|<var>page name</var>}}
; {{para|overflow-vital-2|<var>page name</var>}}
; {{para|overflow-vital-3|<var>page name</var>}}
; {{para|overflow-vital-4|<var>page name</var>}}
; {{para|overflow-vital-5|<var>page name</var>}}
: specifies an overflow page for corresponding kind of article when using <code>maximum</code>. These options only apply when the <code>maximum</code> option is set. They allow a page name to be specified that will be added as a link after the maximum number of articles are outputted. This is designed to allow linking to a page that contains a full listing of the content type. See [[Wikipedia:WikiProject National Register of Historic Places/Recognized content|this page]] for an usage example.
; <code>|dyk-blurb</code> or {{para|dyk-blurb|<var>N</var>}} : specifies displaying DYK blurbs instead of page names. The <code>dyk-blurb</code> option displays the DYK blurb (if available) instead of the page name. If a number is specified, then the first <code><var>N</var></code> blurbs will be displayed normally and the remaining blurbs will be wrapped in <code><nowiki><include></noinclude></nowiki></code>. This can be used to limit the number of blurbs that are transcluded onto another page.
; <code>|dyk-blurb-paged</code> : specifies displaying DYK blurbs on subpages by year. This can be useful if the content would otherwise exceed the Wikipedia's maximum page size. The DYK blurbs will be saved to subpages organized by year. The subpages will be transcluded to the project content page with 10 blurbs per subpage. The subpages will follow the blurb formatting and sorting order specified for the main page.
::Note: These subpages are only for the bot's content. The subpages' content will be completely replaced when the project content is updated by the bot.
; <code>|italics</code>: specifies displaying {{tl|italic title}} in italics. The <code>italics</code> option will display pages marked as {{tl|italic title}}s in italics. If the page title ends in a parenthesized text, only the part before the parenthesizes will be italicized. However, it does not support the <code>|string</code> parameter (allowing a subset of the title to be in italics) or other italic templates that require parsing the page content to determine what portion of the title is to be italicized. This option should only be utilized if those limitations are suitable for the recognized content being displayed.
; {{para|type|<var>text</var>}} : replace text "recognized content" with <code><var>text</var></code> in the wikitext output.
 
==Output==
The <code>compact</code> option overrides the <code>columns</code> and <code>icons</code> options.
 
The <code>maximum</code> option only applies when the <code>compact</code> option is set.
 
The <code>small</code> option only applies when the <code>compact</code> option is set.
 
The <code>heading</code> 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.
 
The <code>noheading</code> option overrides the <code>heading</code> option.
 
Pictures will use the <code><nowiki><gallery></gallery></nowiki></code> syntax if the <code>pictures-list</code> option is not set.
 
The <code>sorting</code> option may be set to <code>default</code> (sort by DEFAULTSORT key), <code>alpha</code> (sort alphabetically), <code>date-default</code> (sort Main Page content by date, remainder by DEFAULTSORT key), and <code>date-alpha</code> (sort Main Page content by date, remainder alphabetically). The default is <code>default</code> if not specified.
 
The <code>date-order</code> option may be set to <code>increasing</code> or <code>decreasing</code>. This option only applies when the <code>sorting</code> option is set to <code>date-default</code> or <code>date-alpha</code>. The default is <code>increasing</code> if not specified.
 
The <code>overflow-FA</code>, <code>overflow-GA</code>, and <code>overflow-DYK</code> options only apply when the <code>maximum</code> option is set. They allow a page name to be specified that will be added as a link after the maximum number of articles are outputted. This is designed to allow linking to a page that contains a full listing of the content type. See [[Wikipedia:WikiProject National Register of Historic Places/Recognized content|this page]] for an usage example.
 
The <code>dyk-blurb</code> option displays the DYK blurb (if available) instead of the page name. If a <code>= #</code> is specified, then the first <code>#</code> pages will be displayed normally and the remaining pages will be wrapped in <code><nowiki><include></noinclude></nowiki></code>. This can be used to limited the number of blurbs that are transcluded onto another page.
 
===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.
 
Line 128 ⟶ 137:
 
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.
 
<includeonly>[[Category:Wikipedia lists of recognized content|*]]</includeonly>
==Example==
<pre><nowiki>
{{User:JL-Bot/Project content
|template = <!-- name of WikiProject template without the prefix "Template:" -->
|content-featured-articles
|content-former-featured-articles
|content-featured-lists
|content-former-featured-lists
|content-good-articles
|content-former-good-articles
|content-did-you-know-articles
|content-featured-pictures
|content-former-featured-pictures
|content-featured-portals
|content-former-featured-portals
|content-featured-article-candidates
|content-featured-list-candidates
|content-good-article-nominees
|content-a-class-articles =
|content-b-class-articles =
|content-c-class-articles =
|content-mainpage-in-the-news
|content-mainpage-featured
|content-mainpage-lists
|content-picture-of-the-day
|content-featured-topics
|content-former-featured-topics
|content-good-topics
|content-vital-articles-level-1
|content-vital-articles-level-2
|content-vital-articles-level-3
|content-vital-articles-level-4
|content-vital-articles-level-5
|columns = 2
|heading = 3
|icons
}}
<!-- Start of content generated by JL-Bot -->
 
<!-- End of content generated by JL-Bot -->
</nowiki></pre>
==Tracking category==
* {{clc|Category:Wikipedia lists of recognized content}} – For standalone/Near-standalone list pages. It will not list [[Wikipedia:WikiProject Physics]] if <code><nowiki>{{</nowiki>User:JL-Bot/Project content<nowiki>}}</nowiki></code> is directly embedded, but will list the standalone [[Wikipedia:WikiProject Physics/Recognized content]] (and similar lists).
<includeonly>
[[Category:Wikipedia lists of recognized content|*]]
</includeonly>