Difference between revisions of "Template:News item header"

From DoomWiki.org

m (Add dateModified)
(Add et al parameter)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="hentry" itemscope itemprop="blogPost" itemtype="http://schema.org/BlogPosting" style="width: 100%; margin-bottom:7px; border:1px solid #cedff2; padding:2px; color: inherit; background-color: #f5faff;"
+
{| class="hentry" itemscope itemtype="http://schema.org/NewsArticle" itemref="globalPublisher" style="width: 100%; margin-bottom:7px; border:1px solid #cedff2; padding:2px; color: inherit; background-color: #f5faff;"
 
|-
 
|-
 
|
 
|
 
{| style="width: 100%; color: inherit; background-color: #cedff2" class="plainlinks"
 
{| style="width: 100%; color: inherit; background-color: #cedff2" class="plainlinks"
| style="text-align: left; font-size:11pt; font-weight:bold; padding:5px; margin-left:0px; width:100%;"| <span class="entry-title" itemprop="headline">{{{title}}}</span>{{#if:{{{timestamp|}}}|&nbsp;- <time class="published updated" itemprop="datePublished dateModified" datetime="{{#iferror:{{#time:Y-m-d|{{{timestamp}}}}}}}">{{#time:d F Y|{{{timestamp}}}}}</time>}}
+
| style="text-align: left; font-size:11pt; font-weight:bold; padding:5px; margin-left:0px; width:100%;"| <span class="entry-title" itemprop="name headline">{{{title}}}</span>{{#if:{{{timestamp|}}}|&nbsp;- <time class="published updated" itemprop="datePublished dateModified" datetime="{{#iferror:{{#time:Y-m-d|{{{timestamp}}}}}}}">{{#time:j F Y|{{{timestamp}}}}}</time>}}
 
|}
 
|}
 
|-
 
|-
 
|  
 
|  
<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="givenName">{{#ifexist:User:{{{author}}}|[[User:{{{author}}}|{{{author}}}]]|{{{author}}}}}</span> for <span itemscope itemprop="memberOf" itemtype="http://schema.org/Organization"><span class="org" itemprop="name">{{SITENAME}}</span></span></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>{{et al|{{{etal|}}}}} 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 17: Line 17:
 
* title: Title of the news article. This should be in newspaper headline format.
 
* title: Title of the news article. This should be in newspaper headline format.
 
* 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.
 +
** etal: If provided, additional authors can be credited. List the author's names as the parameter value.
 
* 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.

Latest revision as of 13:12, 15 December 2018

By

Usage[edit]

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.
    • etal: If provided, additional authors can be credited. List the author's names as the parameter value.
  • 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.