Difference between revisions of "Template:News"

From Funtoo
Jump to: navigation, search
Line 19: Line 19:
 
{{#ifeq:{{{Publication Status|}}|Draft|{{NotYetPublished}}}}{{#set:Summary={{{Summary|}}}|News Category={{{News Category|}}}|Publication Status={{{Publication Status|}}}|Icon={{{Icon|}}}|Publication Date={{{Publication Date|}}}|News Format={{{News Format}}}}}
 
{{#ifeq:{{{Publication Status|}}|Draft|{{NotYetPublished}}}}{{#set:Summary={{{Summary|}}}|News Category={{{News Category|}}}|Publication Status={{{Publication Status|}}}|Icon={{{Icon|}}}|Publication Date={{{Publication Date|}}}|News Format={{{News Format}}}}}
 
{{#set:Author=User:{{{Author|}}}|Gravatar MD5={{#show: User:{{{Author}}} | ?Gravatar MD5}}}}
 
{{#set:Author=User:{{{Author|}}}|Gravatar MD5={{#show: User:{{{Author}}} | ?Gravatar MD5}}}}
 +
{{#ifeq:{{{News Format|}}}|Extended|
 +
{{#widget:NewsInfo|body={{{Summary|}}}|user={{{Author|}}}|icon_url={{#if:{{{Icon|}}}|icon_url={{filepath:{{#sub:{{{Icon}}}|5}}|64}}|icon_url=http://www.gravatar.com/avatar/{{{Gravatar MD5|}}}/?s=64&d=retro&r=g}}
 +
}}
 +
<p><b>{{#time:F j, Y|{{{Publication Date}}}}}</b></p>
 
__NOTITLE__
 
__NOTITLE__
 
</div></div><div class="row"><div class="col-xs-12 col-sm-4 col-sm-push-8">
 
</div></div><div class="row"><div class="col-xs-12 col-sm-4 col-sm-push-8">

Revision as of 00:00, October 23, 2014

Use like so:

{{News
|Summary=Test News Item
|News Category=General
|Author=Drobbins
|Publication Status=Draft
|Publication Date=2014/10/16
|Icon=File:foobar.jpg
|News Format=Short (or Extended)
}}