Difference between revisions of "Template:Did you know/Queue/IsQueueEmpty"

From blackwiki
Jump to navigation Jump to search
imported>BlueMoonset
(creating template to return whether the queue (number) being entered is "empty" (single-line placeholder) or not; returns 1 if empty, 0 if not)
 
imported>BlueMoonset
(was this returning an extra line? adding includeonly section, moving noinclude to incorporate test section)
 
Line 1: Line 1:
{{#expr:{{PAGESIZE:Template:Did you know/Queue/{{{1|{{Did you know/Queue/Next}} }}}|R}} < 100}}<noinclude>
+
<includeonly>{{#expr:{{PAGESIZE:Template:Did you know/Queue/{{{1|{{Did you know/Queue/Next}} }}}|R}} < 100}}</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
</noinclude>
 
 
<!-- temporary test section
 
<!-- temporary test section
 
Did you know/Queue/Next: {{Did you know/Queue/Next}}
 
Did you know/Queue/Next: {{Did you know/Queue/Next}}
Line 7: Line 6:
 
PAGESIZE of queue 7: {{PAGESIZE:Template:Did you know/Queue/7}}
 
PAGESIZE of queue 7: {{PAGESIZE:Template:Did you know/Queue/7}}
 
-->
 
-->
 +
</noinclude>

Latest revision as of 22:16, 12 June 2020

Template documentation[view] [edit] [history] [purge]

This template returns a 1 if the DYK queue submitted is empty, and a 0 if it has been filled. An empty queue is considered any under 100 characters in size per the PAGESIZE template; such queues should consist of the template Template:Tq. Queues that are filled are typically 10,000 characters or more.

This is a required subtemplate for {{Did you know/Queue/LocalUpdateTimes}}, and should not be deleted.

Parameters

There is a single parameter, which is the number of the DYK queue being queried. At present, there are seven queues, numbered from 1 to 7. Unexpected results will occur if this is called with any integer that is not so associated with an extant DYK queue.

If no parameter is submitted, the template will determine whether the next queue to be promoted ({{Did you know/Queue/Next}}) is empty.