Difference between pages "Template:News" and "Widget:NewsDisplay"

(Difference between pages)
 
 
Line 1: Line 1:
<noinclude>
+
<div class="media"><div class="pull-left"><img class="media-object img-circle" style="opacity: 0.5;" src="<!--{$icon_url|escape:'html'}-->" alt="<!--{$user|escape:'html'}-->"></div>
Use like so:
+
<div class="media-body"><!--{if $format eq 'Short'}-->
 
+
<h4 class="media-heading" style="line-height: 18px; font-size: 14px;  font-weight: bold; "><!--{$title|escape:'html'}--></h4>
<pre>
+
<!--{else}--><!--{$format|escape:'html'}-->
{{News
+
<a href="/News:<!--{$title|escape:'html'}-->"><h4 class="media-heading" style="line-height: 18px; font-size: 14px;  font-weight: bold; "><!--{$title|escape:'html'}--></h4></a><!--{/if}-->
|Summary=Test News Item
+
<!--{$body|escape:'html'}-->
|News Category=General
+
</div>
|Author=Drobbins
+
<div style="float: right; text-align: right; display: inline-block;">
|Publication Status=Draft
+
<span style="color: #888; font-size: 10px;"><!--{$date|escape:'html'}--> by <a href="/User:<!--{$user|escape:'html'}-->"><!--{$user|escape:'html'}--></a></span>
|Publication Date=2014/10/16
+
</div>
|Icon=File:foobar.jpg
+
</div>
|News Format=Short (or Extended)
+
}}
+
</pre>
+
 
+
</noinclude><includeonly>
+
<div class="container" style="margin-top: 20px;"><div class="row"><div class="col-xs-12">
+
= {{PAGENAME}} =
+
{{#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}}}}
+
{{#ifeq:{{{News Format|}}}|Extended|
+
{{#widget:NewsInfo|body={{{Summary|}}}|user={{{Author|}}}|icon_url={{#if:{{{Icon|}}}|{{filepath:{{#sub:{{{Icon}}}|5}}|80}}|http://www.gravatar.com/avatar/{{#show: User:{{{Author}}} | ?Gravatar MD5}}/?s=80&d=retro&r=g}}|date={{#time:F j, Y|{{{Publication Date}}}}}
+
}}}}
+
</div></div><div class="row"><div class="col-xs-12">
+
</includeonly>
+

Revision as of 00:25, October 23, 2014

<a href="/News:">

</a>

by <a href="/User:"></a>