Difference between revisions of "Template:News item header"

From DoomWiki.org

(Change over to NewsArticle; use NewsOrganization template for DoomWiki.org text; reference publisher by itemref)
(Test pic ability...)
Line 7: Line 7:
 
|-
 
|-
 
|  
 
|  
<div class="dw-div-dl" style="font-size: 95%;">''By <span class="author vcard" itemscope itemprop="author" itemtype="http://schema.org/Person"><span class="fn nickname" itemprop="name givenName">{{#ifexist:User:{{{author}}}|[[User:{{{author}}}|{{{author}}}]]|{{{author}}}}}</span> for {{NewsOrganization}}</span>''</div>
+
<div class="dw-div-dl" style="font-size: 95%;">''By <span class="author vcard" itemscope itemprop="author" itemtype="http://schema.org/Person"><span class="fn nickname" itemprop="name givenName">{{#ifexist:User:{{{author}}}|[[User:{{{author}}}|{{{author}}}]]|{{{author}}}}}</span> for {{NewsOrganization}}</span>''{{NewsImage|pic={{{pic|Wiki.png}}}|w={{{w|135}}}|h={{{h|135}}}}}</div>
<div class="entry-content" itemprop="articleBody"><noinclude>
+
<div class="entry-content" itemprop="articleBody">{{#if:{{{pic|}}}|[[File:{{{pic}}}|{{{w}}}px|right]]}}<noinclude>
 
</div>
 
</div>
 
|}
 
|}
Line 18: Line 18:
 
* author: Your {{SITENAME}} user account name. If you have created a User page, it will be automatically linked. This is used to create a vcard.
 
* author: Your {{SITENAME}} user account name. If you have created a User page, it will be automatically linked. This is used to create a vcard.
 
* timestamp: Date and/or time of the article's authorship, in any acceptable ISO date format. The input timestamp will be normalized to Day Month Year format regardless of the input format. Invalid timestamps will be suppressed from appearing in the hAtom, and an error message may appear on page.
 
* timestamp: Date and/or time of the article's authorship, in any acceptable ISO date format. The input timestamp will be normalized to Day Month Year format regardless of the input format. Invalid timestamps will be suppressed from appearing in the hAtom, and an error message may appear on page.
 +
* pic: A picture to display as a right-floating element in the news article. If specified, w and h should also be specified to set the image size.
 +
* w: width of image thumbnail
 +
* h: height of image thumbnail
  
 
Author your article content inline using regular MediaWiki markup after the {{tl|{{PAGENAME}}}} transclusion, and follow it with {{tl|News item end}} to properly close the entry.
 
Author your article content inline using regular MediaWiki markup after the {{tl|{{PAGENAME}}}} transclusion, and follow it with {{tl|News item end}} to properly close the entry.

Revision as of 11:26, 12 April 2016

By

Usage

Create a news item container. This container acts as an hAtom microformat feed entry, and is understood by search engines as a news item when properly filled out.

Parameters:

  • title: Title of the news article. This should be in newspaper headline format.
  • author: Your DoomWiki.org user account name. If you have created a User page, it will be automatically linked. This is used to create a vcard.
  • timestamp: Date and/or time of the article's authorship, in any acceptable ISO date format. The input timestamp will be normalized to Day Month Year format regardless of the input format. Invalid timestamps will be suppressed from appearing in the hAtom, and an error message may appear on page.
  • pic: A picture to display as a right-floating element in the news article. If specified, w and h should also be specified to set the image size.
  • w: width of image thumbnail
  • h: height of image thumbnail

Author your article content inline using regular MediaWiki markup after the {{News item header}} transclusion, and follow it with {{News item end}} to properly close the entry.