Template:Bluepost: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(revert note)
m (This revision and previous are available under: CC BY-SA 3.0. See list of authors in previous history below.)
 
(13 intermediate revisions by 10 users not shown)
Line 1: Line 1:
Adds a formatted Blizzard 'Blue' post to a wiki page.


;Usage
:poster= blue post author
:body= textual content of the post
:link= link to the original post
<!--  recent squeeze causing many of the blue boxes to overflow its container. below are fixes -->
:width= (Optional) - forces width. Default is as wide as document flow allows.
:tight= [0,1] (Optional) - fit in smaller spaces. Default is '0'.
:state= [none|plain|off, hide|coll|collapsed, show|uncollapsed] (Optional) - 'none' disables collapse, 'hide' starts as collapsed. Default is 'none'.
:header= heading= (Optional) - Header for collapse bar title, or as a general header for the post.
See [[Template:Bluepost/doc]] for more instructions and examples.<!-- fairly high volume template, please don't integrate docs -->
[[Category:WoW utility templates|{{PAGENAME}}]]
----
;Template
<onlyinclude><includeonly><!--
-->{{#vardefine:tSTATE|{{#if:{{{state|}}}|{{{state|}}}|none}}}}<!--
-->{{#vardefine:tCOLL|{{#switch:{{#var:tSTATE}}|plain|none|off=|mw-collapsible}}}}<!--
-->{{#vardefine:tCSTATE|{{#if:{{#var:tCOLL}}|{{#switch:{{{state|}}}|hide|coll|collapsed=mw-collapsed}}}}}}<!--
-->{{#vardefine:tCHEAD|{{#if:{{{header|}}}|{{{header|}}}|{{#if:{{{heading|}}}|{{{heading|}}}}}}}}}<!--
-->{{#vardefine:tWIDTH|{{#if:width|{{{width|}}}}}}}<!-- trim
    TABLE
-->{{#if:{{#var:tCHEAD}}{{#var:tCOLL}}|<!--
--><table class="darktable {{#var:tCOLL}} {{#var:tCSTATE}}">
<tr><th>{{#var:tCHEAD|{{{title|Blue post}}}}}</th>
<tr><td>
}}<!--
    POST
--><div style="border:black 1px solid; background:#222; color:#00c0ff; margin:.8em {{#ifeq:{{{tight|}}}|1|.2em|1.2em}}; padding:.8em .8em .4em .8em; {{#if:{{#var:tWIDTH}}|width:{{#var:tWIDTH}};}} {{#ifeq:{{{overflow|1}}}|1|overflow:auto;}}">
[[File:blizz.gif|left]] <span style="color: white;">{{#if:{{{title|}}}|'''{{{title}}}''' {{!}}&nbsp;}}{{#if:{{{date|}}}|{{#iferror:{{#time:Y-m-d H:i|{{{date}}}}}&nbsp;|<span style="color:red">'''"{{{date|}}}" is not a valid date.'''</span>[[Category:Articles with a date parse error]]}}{{!}} }}</span> '''[[{{{poster}}}|<span style="color:#ffac04;">{{{poster}}}</span>]]'''
<div style="padding:.5em 0;">{{{body}}}</div>
{{#if:{{{link|}}}|[{{{link}}} <span style="color: #ffac04;">View original post</span>]}}{{#if:{{{archivelink|}}}|&nbsp;[{{{archivelink}}} <span style="color: #cc8c04;">View archive post</span>]}}
</div><!--
    TABLE END
-->{{#if:{{#var:tCHEAD}}{{#var:tCOLL}}|
</td></tr></table>
}}<!--
--></includeonly></onlyinclude>

Latest revision as of 23:23, 22 February 2014

Adds a formatted Blizzard 'Blue' post to a wiki page.

Usage
poster= blue post author
body= textual content of the post
link= link to the original post
width= (Optional) - forces width. Default is as wide as document flow allows.
tight= [0,1] (Optional) - fit in smaller spaces. Default is '0'.
state= [none|plain|off, hide|coll|collapsed, show|uncollapsed] (Optional) - 'none' disables collapse, 'hide' starts as collapsed. Default is 'none'.
header= heading= (Optional) - Header for collapse bar title, or as a general header for the post.

See Template:Bluepost/doc for more instructions and examples.


Template