Template:Char

From Edge of Darkness Wiki

Char
Jump to: navigation, search
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|}}}mask=COALESCE(uf1.field173, uf2.field173),
{{{threadid|}}}mask=COALESCE(uf1.field173, uf2.field173),
{{{threadid|}}}cunning=COALESCE(uf1.field168, uf2.field168),  
{{{threadid|}}}cunning=COALESCE(uf1.field168, uf2.field168),  
Line 12: Line 14:
{{{threadid|}}}statusorganization=COALESCE(uf1.field166, uf2.field166),  
{{{threadid|}}}statusorganization=COALESCE(uf1.field166, uf2.field166),  
{{{threadid|}}}statusfamily=COALESCE(uf1.field167, uf2.field167),  
{{{threadid|}}}statusfamily=COALESCE(uf1.field167, uf2.field167),  
-
{{{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),  
Line 35: Line 45:
|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

Revision as of 22:06, 30 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