Images used (examples): Difference between revisions

m
→‎Random image: Needs cache bypass
imported>FrozenPlum
(remove tempnote template as openreferences was fixed in v3.5.0. Is now working as intended.)
imported>FrozenPlum
m (→‎Random image: Needs cache bypass)
 
(2 intermediate revisions by the same user not shown)
Line 1:
{{purgenote}}
{{DPL manual|section=Examples|subsection=Images used}}
 
Line 20 ⟶ 19:
 
==Images contained in article==
'''Example:'''<br><br><!-- transclude example from subpage-->{{#lsth:Criteria for page selection/Parameter: imagecontainer (example 1)|Example}}
{{example|base=Criteria for page selection|imagecontainer|eg=1}}
 
Line 42 ⟶ 41:
 
==List images used (existing or not)==
'''Example''':<br>
Lists all images used in the ''Orange'' articles. <code>openreferences=true</code> lists non-existing images, including those not housed locally, such as images used from [https://meta.wikimedia.org/wiki/Wikimedia_Commons Wikimedia Commons]. Non-existing images are displayed as red links.
 
<pre>
{{#dpl:
Line 48 ⟶ 50:
}}
</pre>
 
Lists all images used in the ''Orange'' articles. <code>openreferences=true</code> lists non-existing images, including those not housed locally, such as images used from [https://meta.wikimedia.org/wiki/Wikimedia_Commons Wikimedia Commons]. Non-existing images are displayed as red links.
 
'''Result:'''
Line 57 ⟶ 59:
 
==Display images used==
'''Example:'''<br>
Lists all images used in the ''Apple'' and ''Orange'' articles. <code>openreferences=true</code> lists non-existing images, including those not housed locally, such as images used from [https://meta.wikimedia.org/wiki/Wikimedia_Commons Wikimedia Commons]. Using <code>escapelinks=false</code> would display the image at full size, except formatting the output using <code>format=</code> allows control over the result, including display size.
 
<pre>
{{#dpl:
Line 62 ⟶ 67:
|openreferences=true
|escapelinks=false
|format=,[[%PAGE%,{{!}}150px50px]]\n\n,
}}
</pre>
 
Lists all images used in the ''Apple'' and ''Orange'' articles. <code>openreferences=true</code> lists non-existing images, including those not housed locally, such as images used from [https://meta.wikimedia.org/wiki/Wikimedia_Commons Wikimedia Commons]. Using <code>escapelinks=false</code> would display the image at full size, except formatting the output using <code>format=</code> allows control over the result, including display size.
 
'''Result:'''
Line 74 ⟶ 78:
|openreferences=true
|escapelinks=false
|format=,[[%PAGE%,{{!}}150px50px]]\n\n,
}}
 
==Random image==
'''Example:'''<br>
Displays one random image from the given category, formatted to display the image itself. Note that if only a small number of images exist, the likelihood of '''frequent''' repeats on page refresh is much, much higher.
<pre>
{{#dpl:
|category=Images:Fruit
|randomcount=1
|format=,[[File:%TITLE%,{{!}}30px]]
|allowcachedresults=no
}}
</pre>
 
'''Result:'''
{{#dpl:
|category=Images:Fruit
|randomcount=1
|format=,[[File:%TITLE%,{{!}}30px]]
|allowcachedresults=no
}}
 
[[Category:Miscellaneous examples]]
Anonymous user