Template:Char

From Edge of Darkness Wiki

Char
Jump to: navigation, search
m
 
(16 intermediate revisions not shown)
Line 2: Line 2:
|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|}}}'
-
|data={{{threadid|}}}troupe=COALESCE(uf1.field263, uf2.field263), {{{threadid|}}}threadid=characters.threadid, {{{threadid|}}}usertitle=COALESCE(u1.usertitle, u2.usertitle),
+
|data={{{threadid|}}}troupe=COALESCE(uf1.field263, uf2.field263),  
 +
{{{threadid|}}}threadid=characters.threadid,  
 +
{{{threadid|}}}usertitle=COALESCE(u1.usertitle, u2.usertitle),
 +
{{{threadid|}}}orgtitle=COALESCE(uf1.field298, uf2.field298),
{{{threadid|}}}mask=COALESCE(uf1.field173, uf2.field173),
{{{threadid|}}}mask=COALESCE(uf1.field173, uf2.field173),
-
{{{threadid|}}}cunning=COALESCE(uf1.field168, uf2.field168),  
+
{{{threadid|}}}cunning=characters.statusf,  
-
{{{threadid|}}}glory=COALESCE(uf1.field169, uf2.field169),  
+
{{{threadid|}}}glory=characters.statuso,  
-
{{{threadid|}}}honor=COALESCE(uf1.field170, uf2.field170),  
+
{{{threadid|}}}honor=characters.rhonor,  
-
{{{threadid|}}}purity=COALESCE(uf1.field171, uf2.field171),  
+
{{{threadid|}}}purity=characters.rpurity,  
-
{{{threadid|}}}wisdom=COALESCE(uf1.field172, uf2.field172),
+
{{{threadid|}}}wisdom=characters.rwisdom,
-
{{{threadid|}}}statusvenue=COALESCE(uf1.field165, uf2.field165),  
+
{{{threadid|}}}statusvenue=characters.statusv,  
-
{{{threadid|}}}statusorganization=COALESCE(uf1.field166, uf2.field166),  
+
{{{threadid|}}}statusorganization=characters.statuso,  
-
{{{threadid|}}}statusfamily=COALESCE(uf1.field167, uf2.field167),  
+
{{{threadid|}}}statusfamily=characters.statusf,  
-
{{{threadid|}}}lastpostid=COALESCE(u1.lastpostid, u2.lastpostid), {{{threadid|}}}usergroupid=COALESCE(u1.usergroupid, u2.usergroupid), {{{threadid|}}}posts=COALESCE(u1.posts, u2.posts),{{{threadid|}}}venue=Venue,  
+
{{{threadid|}}}lastpostid=COALESCE(u1.lastpostid, u2.lastpostid),  
 +
{{{threadid|}}}usergroupid=COALESCE(u1.usergroupid, u2.usergroupid),  
 +
{{{threadid|}}}posts=COALESCE(u1.posts, u2.posts),
 +
{{{threadid|}}}venue=Venue,  
{{{threadid|}}}family=IF(Family IS NULL OR Family = '', 'None', Family),
{{{threadid|}}}family=IF(Family IS NULL OR Family = '', 'None', Family),
{{{threadid|}}}organization=IF(Organization IS NULL OR Organization = '', 'None', Organization),
{{{threadid|}}}organization=IF(Organization IS NULL OR Organization = '', 'None', Organization),
{{{threadid|}}}dualkith=IF(DualKith IS NULL OR DualKith = '', 'None', DualKith),
{{{threadid|}}}dualkith=IF(DualKith IS NULL OR DualKith = '', 'None', DualKith),
{{{threadid|}}}kith=Kith,
{{{threadid|}}}kith=Kith,
-
{{{threadid|}}}presence=Presence, {{{threadid|}}}adv=Power, {{{threadid|}}}username=characters.char_name, {{{threadid|}}}mainname=characters.username, {{{threadid|}}}mainid=characters.userid,  
+
{{{threadid|}}}presence=Presence,  
 +
{{{threadid|}}}adv=Power,  
 +
{{{threadid|}}}faceclaim=faceclaim,
 +
{{{threadid|}}}username=characters.char_name,  
 +
{{{threadid|}}}mainname=characters.username,  
 +
{{{threadid|}}}mainid=characters.userid,  
{{{threadid|}}}forumid=IF(char_userid IS NULL OR char_userid = '', '0', char_userid),
{{{threadid|}}}forumid=IF(char_userid IS NULL OR char_userid = '', '0', char_userid),
{{{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'  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)
+
{{{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 'Ghoul' 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 'Ghoul' 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 35: Line 46:
|Presence={{#external_value:{{{threadid|}}}presence}}
|Presence={{#external_value:{{{threadid|}}}presence}}
|Character Name={{#external_value: {{{threadid|}}}username}}
|Character Name={{#external_value: {{{threadid|}}}username}}
-
|Avatar={{#if: {{{Avatar|}}}|{{{Avatar|}}}|Unknown}}
+
|Avatar={{#external_value:{{{threadid|}}}faceclaim}}
|PC or NPC=PC
|PC or NPC=PC
|Lived In=Sacramento
|Lived In=Sacramento
 +
|Secondary Picture={{{pic2|}}}
|Character Status={{#external_value:{{{threadid|}}}status}}
|Character Status={{#external_value:{{{threadid|}}}status}}
|Presence={{#external_value:{{{threadid|}}}presence}}
|Presence={{#external_value:{{{threadid|}}}presence}}
Line 45: Line 57:
|Player=User:{{#external_value:{{{threadid|}}}mainname}}
|Player=User:{{#external_value:{{{threadid|}}}mainname}}
|{{#external_value:{{{threadid|}}}familylabel}}={{#external_value:{{{threadid|}}}family}}
|{{#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 class="{{#external_value: {{{threadid|}}}venue}}page chartempwrapper {{#external_value: {{{threadid|}}}venue}}back" style="min-width: 600px; position: relative; margin-top: -73px; z-index: 9; border-top-right-radius: 0px !important; border-top-left-radius: 0px !important;">
+
}}{{#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 class="{{#external_value: {{{threadid|}}}venue}}page chartempwrapper {{#external_value: {{{threadid|}}}venue}}back" style="min-width: 600px; position: relative; margin-top: -73px; border-top-right-radius: 0px !important; border-top-left-radius: 0px !important;">
{{#switch:{{{pic2|}}}
{{#switch:{{{pic2|}}}
|Yes=<div style="float: left;"><div style="height: 200px; overflow: hidden;">[[Image:{{#external_value: {{{threadid|}}}username}}_2.jpg|x200px|Click here to upload portrait.]]</div></div> |}}<div class="chartempquotestatus" style="float: right; right: 240px !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>]</div>
|Yes=<div style="float: left;"><div style="height: 200px; overflow: hidden;">[[Image:{{#external_value: {{{threadid|}}}username}}_2.jpg|x200px|Click here to upload portrait.]]</div></div> |}}<div class="chartempquotestatus" style="float: right; right: 240px !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>]</div>
Line 60: Line 72:
</div>|<div style="height: 30px; width: 200px; float: right; background: rgba(0,0,0,.5); text-align: center;">
</div>|<div style="height: 30px; width: 200px; float: right; background: rgba(0,0,0,.5); text-align: center;">
<html><a href="http://nwod.org/forum/member.php?</html>{{#external_value: {{{threadid|}}}mainid }}<html>"></html>Created By {{#external_value: {{{threadid|}}}mainname }}<html></a></html>
<html><a href="http://nwod.org/forum/member.php?</html>{{#external_value: {{{threadid|}}}mainid }}<html>"></html>Created By {{#external_value: {{{threadid|}}}mainname }}<html></a></html>
-
</div>}}{{TOC left}}{{#if: {{#external_value: {{{threadid|}}}ppic }} |<div style="width: 200px; margin-top: -20px; float: right;"><html>
+
</div>}}{{TOC left}}{{#if: {{#external_value: {{{threadid|}}}ppic }} |<div style="width: 200px; float: right; margin-top: -20px;"><html>
<a href="http://nwod.org/forum/member.php?</html>{{#external_value: {{{threadid|}}}forumid }}<html>"><img src="http://nwod.org/forum/image.php?u=</html>{{#external_value: {{{threadid|}}}forumid }}<html>&type=profile" title="View Forum Profile Page" alt="View Forum Profile Page" style="width: 200px;" /></a>
<a href="http://nwod.org/forum/member.php?</html>{{#external_value: {{{threadid|}}}forumid }}<html>"><img src="http://nwod.org/forum/image.php?u=</html>{{#external_value: {{{threadid|}}}forumid }}<html>&type=profile" title="View Forum Profile Page" alt="View Forum Profile Page" style="width: 200px;" /></a>
</html></div>|}}
</html></div>|}}
Line 78: Line 90:
{{#if:{{{Quote|}}}
{{#if:{{{Quote|}}}
|<div class="center font150 italic" style="">{{{Quote|}}}</div>
|<div class="center font150 italic" style="">{{{Quote|}}}</div>
-
|<div class="center font150" style="">{{#external_value: {{{threadid|}}}usertitle}}</div>
+
|{{#if:{{#external_value: {{{threadid|}}}orgtitle}}
 +
|<div class="center font150 italic" style="">{{#external_value: {{{threadid|}}}orgtitle}}</div>
 +
|<div class="center font150" style="">{{#external_value: {{{threadid|}}}usertitle}}</div>
 +
}}
}}
}}
<div style="text-align: center;">{{#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 class="char_rankimage" src="http://nwod.org/forum/</html>{{{{{{threadid|}}}rankimage}}}<html>" /></a></html></div> }}
<div style="text-align: center;">{{#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 class="char_rankimage" src="http://nwod.org/forum/</html>{{{{{{threadid|}}}rankimage}}}<html>" /></a></html></div> }}
Line 120: Line 135:
</tr>
</tr>
<tr style="text-transform: uppercase; font-weight: bold;">
<tr style="text-transform: uppercase; font-weight: bold;">
-
<td>Cunning</td>
+
<td>[[Cunning]]</td>
-
<td>Glory</td>
+
<td>[[Glory]]</td>
-
<td>Honor</td>
+
<td>[[Honor]]</td>
-
<td>Purity</td>
+
<td>[[Purity]]</td>
-
<td>Wisdom</td>
+
<td>[[Wisdom Renown|Wisdom]]</td>
</tr>
</tr>
<tr>
<tr>

Latest revision as of 14:43, 12 July 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