Template:Char

From Edge of Darkness Wiki

Char
Jump to: navigation, search
Line 1: Line 1:
-
<includeonly><!-- DB FOR USER INFO AND CHARACTER VARIABLES --><div class="chartempquotestatus" style="top: 10px !important; left: 13px !important;">[[Template:Char|<span title="View this template">v</span>]]&nbsp;·&nbsp;[[Template_talk:Char|<span title="Talk page">t</span>]]&nbsp;·&nbsp;[{{fullurl:{{transclude|Template:Char}}|action=edit}} <span style="text-decoration: none" title="Edit this template">e</span>]
+
<includeonly><!-- DB FOR USER INFO AND CHARACTER VARIABLES -->{{#get_db_data:db=nwod
-
</div>{{#get_db_data:db=nwod
+
|from=characters LEFT JOIN user u1 ON u1.userid = characters.char_userid LEFT JOIN user u2 ON u2.userid = characters.userid LEFT JOIN userfield uf1 ON uf1.userid = u1.userid LEFT JOIN userfield uf2 ON uf2.userid = u2.userid LEFT JOIN customavatar ON customavatar.userid = u1.userid LEFT JOIN customprofilepic ON customprofilepic.userid = u1.userid
|from=characters LEFT JOIN user u1 ON u1.userid = characters.char_userid LEFT JOIN user u2 ON u2.userid = characters.userid LEFT JOIN userfield uf1 ON uf1.userid = u1.userid LEFT JOIN userfield uf2 ON uf2.userid = u2.userid LEFT JOIN customavatar ON customavatar.userid = u1.userid LEFT JOIN customprofilepic ON customprofilepic.userid = u1.userid
|where=characters.threadid='{{{threadid|}}}'
|where=characters.threadid='{{{threadid|}}}'
Line 22: Line 21:
{{{threadid|}}}lastpost=COALESCE(u1.lastpost, u2.lastpost),  
{{{threadid|}}}lastpost=COALESCE(u1.lastpost, u2.lastpost),  
{{{threadid|}}}joindate=COALESCE(u1.joindate, u2.joindate),
{{{threadid|}}}joindate=COALESCE(u1.joindate, u2.joindate),
-
{{{threadid|}}}avatar=customavatar.visible, {{{threadid|}}}ppic=customprofilepic.visible, {{{threadid|}}}refinement=Refinement, {{{threadid|}}}oneaccount=(CASE WHEN characters.userid = characters.char_userid THEN 'Yes' ELSE 'No' END), {{{threadid|}}}status=(CASE Status WHEN 'Active' THEN 'Active' WHEN 'Deceased' THEN 'Deceased' ELSE 'Inactive' END), {{{threadid|}}}troupelabel=(CASE Venue WHEN 'Changeling' THEN 'Motley' WHEN 'Mage' THEN 'Cabal' WHEN 'Vampire' THEN 'Coterie' WHEN 'Werewolf' THEN 'Pack' WHEN 'Hunter' THEN 'Cell' ELSE NULL END), {{{threadid|}}}citylabel=(CASE Venue WHEN 'Changeling' THEN 'Freehold' WHEN 'Mage' THEN 'Consilium' WHEN 'Vampire' THEN 'Domain' END), {{{threadid|}}}refinementlabel=(CASE Venue WHEN 'Changeling' THEN 'Entitlement' WHEN 'Mage' THEN 'Legacy' WHEN 'Vampire' THEN 'Bloodline' WHEN 'Werewolf' THEN 'Lodge' ELSE 'Refinement' END), {{{threadid|}}}organizationlabel=(CASE Venue WHEN 'Changeling' THEN 'Court' WHEN 'Mage' THEN 'Order' WHEN 'Vampire' THEN 'Covenant' WHEN 'Werewolf' THEN 'Tribe' END), {{{threadid|}}}familylabel=(CASE Venue WHEN 'Changeling' THEN 'Seeming' WHEN 'Mage' THEN 'Path' WHEN 'Vampire' THEN 'Clan' WHEN 'Werewolf' THEN 'Auspice' WHEN 'Hunter' THEN 'Compact' ELSE 'Family' END), {{{threadid|}}}powerlabel=(CASE Venue WHEN 'Changeling' THEN 'Wyrd' WHEN 'Mage' THEN 'Gnosis' WHEN 'Vampire' THEN 'Blood Potency' WHEN 'Werewolf' THEN 'Primal Urge' ELSE NULL END)
+
{{{threadid|}}}avatar=customavatar.visible, {{{threadid|}}}ppic=customprofilepic.visible, {{{threadid|}}}refinement=Refinement, {{{threadid|}}}oneaccount=(CASE WHEN characters.userid = characters.char_userid THEN 'Yes' ELSE 'No' END), {{{threadid|}}}status=(CASE Status WHEN 'Active' THEN 'Active' WHEN 'Deceased' THEN 'Deceased' ELSE 'Inactive' END), {{{threadid|}}}troupelabel=(CASE Venue WHEN 'Changeling' THEN 'Motley' WHEN 'Mage' THEN 'Cabal' WHEN 'Vampire' THEN 'Coterie' WHEN 'Werewolf' THEN 'Pack' WHEN 'Hunter' THEN 'Cell' ELSE NULL END), {{{threadid|}}}citylabel=(CASE Venue WHEN 'Changeling' THEN 'Freehold' WHEN 'Mage' THEN 'Consilium' WHEN 'Vampire' THEN 'Domain'  ELSE 'City' END), {{{threadid|}}}refinementlabel=(CASE Venue WHEN 'Changeling' THEN 'Entitlement' WHEN 'Mage' THEN 'Legacy' WHEN 'Vampire' THEN 'Bloodline' WHEN 'Werewolf' THEN 'Lodge' ELSE 'Refinement' END), {{{threadid|}}}organizationlabel=(CASE Venue WHEN 'Changeling' THEN 'Court' WHEN 'Mage' THEN 'Order' WHEN 'Vampire' THEN 'Covenant' WHEN 'Werewolf' THEN 'Tribe' WHEN 'Hunter' THEN 'Conspiracy' ELSE 'Org.' END), {{{threadid|}}}familylabel=(CASE Venue WHEN 'Changeling' THEN 'Seeming' WHEN 'Mage' THEN 'Path' WHEN 'Vampire' THEN 'Clan' WHEN 'Werewolf' THEN 'Auspice' WHEN 'Hunter' THEN 'Compact' ELSE 'Family' END), {{{threadid|}}}powerlabel=(CASE Venue WHEN 'Changeling' THEN 'Wyrd' WHEN 'Mage' THEN 'Gnosis' WHEN 'Vampire' THEN 'Blood Potency' WHEN 'Werewolf' THEN 'Primal Urge' ELSE NULL END)
}}<!-- DB FOR AWARDS -->{{#get_db_data:db=nwod
}}<!-- DB FOR AWARDS -->{{#get_db_data:db=nwod
|from=rank_user JOIN rank ON rank.rank_id = rank_user.rank_id
|from=rank_user JOIN rank ON rank.rank_id = rank_user.rank_id
Line 43: Line 42:
|Character Type={{#external_value:{{{threadid|}}}venue}}
|Character Type={{#external_value:{{{threadid|}}}venue}}
|Venue={{#external_value:{{{threadid|}}}venue}}
|Venue={{#external_value:{{{threadid|}}}venue}}
 +
|{{#external_value:{{{threadid|}}}organizationlabel}}={{#external_value:{{{threadid|}}}organization}}
|Player=User:{{#external_value:{{{threadid|}}}mainname}}
|Player=User:{{#external_value:{{{threadid|}}}mainname}}
 +
|{{#external_value:{{{threadid|}}}familylabel}}={{#external_value:{{{threadid|}}}family}}
}}{{#if: {{#external_value: {{{threadid|}}}troupe }} |{{#set: {{#external_value:{{{threadid|}}}troupelabel}}={{#external_value:{{{threadid|}}}troupe}} }} | }}{{#if: {{#external_value: {{{threadid|}}}lastpost }} |{{#set:Sacramento End={{#time: M-d-Y|@{{#external_value: {{{threadid|}}}lastpost }}}} }} | }}{{#if: {{#external_value: {{{threadid|}}}lastpost }} |{{#set:Posted={{#time: Y-m-d|@{{#external_value: {{{threadid|}}}lastpost }}}}  }}|}}{{#if: {{#external_value: {{{threadid|}}}lastvisit }} |{{#set:Online={{#time: Y-m-d|@{{#external_value: {{{threadid|}}}lastvisit }}}}  }}|}}{{#if: {{#external_value: {{{threadid|}}}joindate }} |{{#set:Sacramento Start={{#time: Y-m-d|@{{#external_value:{{{threadid|}}}joindate}}}}  }}|}}{{#if: {{#external_value: {{{threadid|}}}joindate }} |{{#set:Tenure={{#expr: {{#expr: {{#external_value: {{{threadid|}}}lastpost }}-{{#external_value: {{{threadid|}}}joindate }} }} / 31556926 round 1 }} }} | }}<div style="position: absolute; right: 0px; top: -25px;">{{#for_external_table: <div style="display: inline; padding-left: 3px;" ><html><a href="http://nwod.org/forum/member.php?</html>{{#external_value: {{{threadid|}}}forumid }}<html>&tab=myranks" title="</html>{{{{{{threadid|}}}rankname}}}<html>"><img src="http://nwod.org/forum/</html>{{{{{{threadid|}}}rankimage}}}<html>" /></a></html></div> }}
}}{{#if: {{#external_value: {{{threadid|}}}troupe }} |{{#set: {{#external_value:{{{threadid|}}}troupelabel}}={{#external_value:{{{threadid|}}}troupe}} }} | }}{{#if: {{#external_value: {{{threadid|}}}lastpost }} |{{#set:Sacramento End={{#time: M-d-Y|@{{#external_value: {{{threadid|}}}lastpost }}}} }} | }}{{#if: {{#external_value: {{{threadid|}}}lastpost }} |{{#set:Posted={{#time: Y-m-d|@{{#external_value: {{{threadid|}}}lastpost }}}}  }}|}}{{#if: {{#external_value: {{{threadid|}}}lastvisit }} |{{#set:Online={{#time: Y-m-d|@{{#external_value: {{{threadid|}}}lastvisit }}}}  }}|}}{{#if: {{#external_value: {{{threadid|}}}joindate }} |{{#set:Sacramento Start={{#time: Y-m-d|@{{#external_value:{{{threadid|}}}joindate}}}}  }}|}}{{#if: {{#external_value: {{{threadid|}}}joindate }} |{{#set:Tenure={{#expr: {{#expr: {{#external_value: {{{threadid|}}}lastpost }}-{{#external_value: {{{threadid|}}}joindate }} }} / 31556926 round 1 }} }} | }}<div style="position: absolute; right: 0px; top: -25px;">{{#for_external_table: <div style="display: inline; padding-left: 3px;" ><html><a href="http://nwod.org/forum/member.php?</html>{{#external_value: {{{threadid|}}}forumid }}<html>&tab=myranks" title="</html>{{{{{{threadid|}}}rankname}}}<html>"><img src="http://nwod.org/forum/</html>{{{{{{threadid|}}}rankimage}}}<html>" /></a></html></div> }}
</div><div class="{{#external_value: {{{threadid|}}}venue}}page chartempwrapper {{#external_value: {{{threadid|}}}venue}}back" style="min-width: 600px;">
</div><div class="{{#external_value: {{{threadid|}}}venue}}page chartempwrapper {{#external_value: {{{threadid|}}}venue}}back" style="min-width: 600px;">
Line 133: Line 134:
<tr style="font-size: 30px;">
<tr style="font-size: 30px;">
<td>
<td>
-
{{#if: {{#external_value: {{{threadid|}}}familylabel}}
+
<div>[http://nwod.org/forum/{{#external_value: {{{threadid|}}}venue}}list.php [[{{#external_value: {{{threadid|}}}citylabel}} Status::{{#if: {{#external_value: {{{threadid|}}}statusvenue}} |{{#external_value: {{{threadid|}}}statusvenue}}|0}}]]]</div>
-
|<div>[http://nwod.org/forum/{{#external_value: {{{threadid|}}}venue}}list.php [[{{#external_value: {{{threadid|}}}citylabel}} Status::{{#if: {{#external_value: {{{threadid|}}}statusvenue}} |{{#external_value: {{{threadid|}}}statusvenue}}|0}}]]]</div>
+
-
|}}
+
</td>
</td>
<td>
<td>
Line 143: Line 142:
<div style="font-size: 16px; font-weight: bold; white-space: nowrap;">[[Kith Primary::{{#external_value: {{{threadid|}}}kith}}]]{{#set:Kith={{#external_value: {{{threadid|}}}kith}} }}</div>
<div style="font-size: 16px; font-weight: bold; white-space: nowrap;">[[Kith Primary::{{#external_value: {{{threadid|}}}kith}}]]{{#set:Kith={{#external_value: {{{threadid|}}}kith}} }}</div>
-
{{#ifeq: {{#external_value: {{{threadid|}}}dualkith}}
+
{{#ifeq: {{#external_value: {{{threadid|}}}dualkith}}
-
|None
+
|None
-
|
+
|
-
|<div style="font-size: 16px; font-weight: bold; white-space: nowrap;">[[Dual Kith::{{#external_value: {{{threadid|}}}dualkith}}]] {{#set:Kith={{#external_value: {{{threadid|}}}dualkith}} }}</div>
+
|<div style="font-size: 16px; font-weight: bold; white-space: nowrap;">[[Dual Kith::{{#external_value: {{{threadid|}}}dualkith}}]] {{#set:Kith={{#external_value: {{{threadid|}}}dualkith}} }}</div>
-
}}
+
}}
-
|<div>{{#if: {{#external_value: {{{threadid|}}}familylabel}} |[[{{#external_value: {{{threadid|}}}familylabel}} Status::{{#if: {{#external_value: {{{threadid|}}}statusfamily}} |{{#external_value: {{{threadid|}}}statusfamily}}|0}}]]|}}</div>
+
|<div>[[{{#external_value: {{{threadid|}}}familylabel}} Status::{{#if: {{#external_value: {{{threadid|}}}statusfamily}} |{{#external_value: {{{threadid|}}}statusfamily}}|0}}]]</div>
}}
}}
</td>
</td>
Line 160: Line 159:
</tr>
</tr>
<tr style="text-transform: uppercase; font-weight: bold;">
<tr style="text-transform: uppercase; font-weight: bold;">
-
<td>{{#if: {{#external_value: {{{threadid|}}}familylabel}}
+
<td>[[{{#external_value: {{{threadid|}}}citylabel}}]]</td>
-
|[[{{#external_value: {{{threadid|}}}citylabel}}]]
+
<td>[[{{#external_value: {{{threadid|}}}family}}]]</td>
-
|}}
+
<td style="white-space: nowrap;">[[{{#external_value: {{{threadid|}}}organization}}]]</td>
-
</td>
+
-
<td>{{#if: {{#external_value: {{{threadid|}}}familylabel}}
+
-
|[[{{#external_value:{{{threadid|}}}familylabel}}::{{#external_value: {{{threadid|}}}family}}]]
+
-
|}}
+
-
</td>
+
-
<td style="white-space: nowrap;">{{#if: {{#external_value: {{{threadid|}}}organizationlabel}}
+
-
|[[{{#external_value:{{{threadid|}}}organizationlabel}}::{{#external_value: {{{threadid|}}}organization}}]]
+
-
|}}
+
-
</td>
+
</tr>
</tr>
</table>
</table>

Revision as of 15:14, 26 January 2017

[edit] [purge] Template documentation

This is the new character template that pulls information from the character database rather than being inputted manually or scraping minisheets.

It requires the character sheet number, and support flags for Avatar (Face Claim), Quote and pic2 (for Werewolves and Changelings). Three optional 'boxes' can be displayed. It should be used at the very top of the page in the following format:

{{Char
|threadid = 23
|Avatar = Gavin Rossdale
|pic2 = No
|box1 = foo
|box2 = bar
|box3 = foobar
|Quote = Lorna, smile upon your least favorite but best looking son tonight...
}}

Pages using this template should 'close' the page with the appropriate venue footer.

Example of options:

Template Char 1.jpg

Personal tools
Namespaces
Variants
Actions
Navigation
games
Toolbox