Difference between revisions of "Template:Source"

From Discourse DB
Jump to navigation Jump to search
m (Reverted edits by Yaron Koren (Talk); changed back to last version by Nick Grandy)
(Text => String)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<noinclude>This template holds information on an online or printed publication; it should be called with the following structure:
This is a [[is of type::Type:Source|source]].
<pre>{{Source
|publication type=The type of publication; can be Newspaper, Magazine, Online magazine or Blog
|circulation=The reported circulation, if it's a newspaper or magazine
|monthly unique visitors=Used for blogs or online magazines
|country=The country in which the source is published
|language=The language in which it is written
|url=The main URL for this source
}}
</pre>
For a newspaper, if there are different numbers for circulation for weekdays and Sundays, go with the higher one.


Publication type: [[Publication type:={{{type| }}}]]
The order of the fields is not relevant.
{{#cargo_declare:_table=Sources|Type=String (size=20;allowed values=Newspaper, Magazine, Online magazine, Blog)|Circulation=Integer|Monthly_unique_visitors=Integer|Country=String (size=50)|Language=String|URL=URL}}
</noinclude><includeonly>{{#cargo_store:_table=Sources|Type={{{type|}}}|Circulation={{{circulation|}}}|Monthly_unique_visitors={{{monthly unique visitors|}}}|Country={{{country|}}}|Language={{{language|}}}|URL={{{url|}}} }}
This is a [[:Category:Sources|source]].


{{#if:{{{circulation| }}}|Circulation: [[Circulation:={{{circulation}}}]] }}{{#if:{{{monthly unique visitors| }}}|Unique visitors per month: [[Monthly unique visitors:={{{monthly unique visitors}}}]]}}
'''Publication type:''' {{{type|}}}


Country of origin: [[Publication country:={{{country| }}}]]
{{#if:{{{circulation|}}}|'''Circulation:''' {{{circulation|}}} }}{{#if:{{{monthly unique visitors|}}}|'''Unique visitors per month:''' {{{monthly unique visitors}}}}}


Language of publication: [[Publication language:={{{language| }}}]]
'''Country of origin:''' {{{country|}}}


URL: [[url:={{{url| }}} ]]
'''Language of publication:''' {{{language|}}}
 
'''URL:''' {{{url|}}}


Opinion items that have appeared in this source:
Opinion items that have appeared in this source:


<ask mainlabel="Title" sort="Published on" order="descending" limit="30"> [[Category:Items]] [[Published by::{{PAGENAME}}]] [[Was written by::*]] [[Published on:=*]] [[Published on:=+]] [[Addresses topic::*]]
{{#cargo_query:tables=Items,Opinions
</ask>
|join on=Items._pageName=Opinions._pageName
|where=Source = "{{PAGENAME}}"
|fields=Items._pageName=Title,Author,Date,Topic
|group by=Items._pageName
|order by=Date DESC
}}


[[Category:Sources]]
[[Category:Sources]]
</includeonly>
</includeonly>

Latest revision as of 17:57, November 6, 2015

This template holds information on an online or printed publication; it should be called with the following structure:

{{Source
|publication type=The type of publication; can be Newspaper, Magazine, Online magazine or Blog
|circulation=The reported circulation, if it's a newspaper or magazine
|monthly unique visitors=Used for blogs or online magazines
|country=The country in which the source is published
|language=The language in which it is written
|url=The main URL for this source
}}

For a newspaper, if there are different numbers for circulation for weekdays and Sundays, go with the higher one.

The order of the fields is not relevant. This template defines the table "Sources". View table.