Template:WeaponsTable: Difference between revisions

From Horizon Wiki Mirror
Content deleted Content added
imported>Aramachus
Created page with "<includeonly><onlyinclude><!-- -->{{#dpl: |category = {{{cat1}}} |category = {{{cat2|}}} |category = {{{cat3|}}} |notcategory = {{{notcat1|}}} |notcategory = {{{notcat2|}}} |notcategory = {{{notcat3|}}} |title = {{{title1|}}} |title = {{{title2|}}} |title = {{{title3|}}} |title = {{{title4|}}} |title = {{{title5|}}} |title = {{{title6|}}} |count = {{{count|}}} |include={Item Statistics¦WeaponsTable.dpl},{HorizonChangesBox} |includematch = {{#if:{{{job|}}}|/jobs\s*=.*\[\..."
 
imported>Aramachus
No edit summary
Line 20: Line 20:
}}<!--
}}<!--
--></onlyinclude></includeonly>
--></onlyinclude></includeonly>
==Usage==
Wrapper Template to generate lists of weapons based on categories.

Syntax:
<pre>{{WeaponsTable|cat1|...|notcat1|...|title1|...|job|count}}</pre>

*Use cat1, cat2, cat3 to include required categories
:(note: you can use <nowiki>{{!}}</nowiki> to use a logical OR in a category)
*Use notcat1, notcat2, notcat2 to exclude categories
*Use title1, title2, ..., title6 to include specific pages
*Use job to include only gear by job XXX
*(The count parameter is mainly used for testing)
**Also: count does not work with job parameter since the job parameter seems to filter after generating the list and after the count parameter cropped the list.
==Examples==

'''''Some Example tables have been limited to output only 5 items (through the optional parameter count=5) because they serve only as examples. The syntax shown in the examples would generate the full tables.'''''

===Example 1===
Syntax:
<pre>{{WeaponsTable|cat1=Artifact Weapons}}</pre>

Will give out all weapons of category "Artifact Weapons".

{{WeaponsTable|cat1=Artifact Weapons|count=5}}

===Example 2===
Syntax:
<pre>{{WeaponsTable|cat1=Artifact Weapons|job=WHM}}</pre>

Will give out all weapons which are categorized as "Artifact Weapons" and have "WHM" (or "all") in their job list. So this will return the WHM AF Weapon only.

{{WeaponsTable|cat1=Artifact Weapons|job=WHM}}

Revision as of 22:00, 2 September 2023

Usage

Wrapper Template to generate lists of weapons based on categories.

Syntax:

{{WeaponsTable|cat1|...|notcat1|...|title1|...|job|count}}
  • Use cat1, cat2, cat3 to include required categories
(note: you can use {{!}} to use a logical OR in a category)
  • Use notcat1, notcat2, notcat2 to exclude categories
  • Use title1, title2, ..., title6 to include specific pages
  • Use job to include only gear by job XXX
  • (The count parameter is mainly used for testing)
    • Also: count does not work with job parameter since the job parameter seems to filter after generating the list and after the count parameter cropped the list.

Examples

Some Example tables have been limited to output only 5 items (through the optional parameter count=5) because they serve only as examples. The syntax shown in the examples would generate the full tables.

Example 1

Syntax:

{{WeaponsTable|cat1=Artifact Weapons}}

Will give out all weapons of category "Artifact Weapons".

Extension:DynamicPageList4 (DPL4), version 4.0.0: Error: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:WeaponsTable: The DynamicPageList4 extension (version 4.0.0) produced a SQL statement which led to a Database error.<br/>The reason may be an internal error of DynamicPageList4 or an error that you made; especially when using parameters like 'categoryregexp' or 'titleregexp'. Usage of non-greedy <code>*?</code> matching patterns are not supported.<br/>The error message was:<br/><code>Error 1054: Unknown column 'cl1.cl_to' in 'ON' Function: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:WeaponsTable Query: SET STATEMENT max_statement_time=10 FOR SELECT DISTINCT p.page_namespace AS `page_namespace`,p.page_id AS `page_id`,p.page_title AS `page_title` FROM `page` `p` JOIN `categorylinks` `cl1` ON (((p.page_id = cl1.cl_from) AND (cl1.cl_to = 'Artifact_Weapons'))) WHERE p.page_is_redirect = 0 LIMIT 5 </code>

Example 2

Syntax:

{{WeaponsTable|cat1=Artifact Weapons|job=WHM}}

Will give out all weapons which are categorized as "Artifact Weapons" and have "WHM" (or "all") in their job list. So this will return the WHM AF Weapon only.

Extension:DynamicPageList4 (DPL4), version 4.0.0: Error: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:WeaponsTable: The DynamicPageList4 extension (version 4.0.0) produced a SQL statement which led to a Database error.<br/>The reason may be an internal error of DynamicPageList4 or an error that you made; especially when using parameters like 'categoryregexp' or 'titleregexp'. Usage of non-greedy <code>*?</code> matching patterns are not supported.<br/>The error message was:<br/><code>Error 1054: Unknown column 'cl1.cl_to' in 'ON' Function: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:WeaponsTable Query: SET STATEMENT max_statement_time=10 FOR SELECT DISTINCT p.page_namespace AS `page_namespace`,p.page_id AS `page_id`,p.page_title AS `page_title` FROM `page` `p` JOIN `categorylinks` `cl1` ON (((p.page_id = cl1.cl_from) AND (cl1.cl_to = 'Artifact_Weapons'))) WHERE p.page_is_redirect = 0 LIMIT 500 </code>