Template:Char

From Edge of Darkness Wiki

Char
Jump to: navigation, search
Line 2: Line 2:
{{#get_db_data:db=nwod
{{#get_db_data:db=nwod
-
|from=characters
+
|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='36802'
+
|where=characters.threadid='{{{threadid|}}}'
-
|data={{{threadid|}}}venue=Venue,{{{threadid|}}}family=Family,
+
|data={{{threadid|}}}usertitle=COALESCE(u1.usertitle, u2.usertitle),
 +
{{{threadid|}}}mask=COALESCE(uf1.field173, uf2.field173),
 +
{{{threadid|}}}lastpost=COALESCE(u1.lastpost, u2.lastpost),
 +
{{{threadid|}}}lastvisit=COALESCE(u1.lastactivity, u2.lastactivity),
 +
{{{threadid|}}}joindate=COALESCE(u1.joindate, created, u2.joindate),
 +
{{{threadid|}}}statusvenue=COALESCE(uf1.field165, uf2.field165),
 +
{{{threadid|}}}statusorganization=COALESCE(uf1.field166, uf2.field166),
 +
{{{threadid|}}}statusfamily=COALESCE(uf1.field167, uf2.field167),
 +
{{{threadid|}}}lastpostid=COALESCE(u1.lastpostid, u2.lastpostid),
 +
{{{threadid|}}}usergroupid=COALESCE(u1.usergroupid, u2.usergroupid),
 +
{{{threadid|}}}oneaccount=CASE WHEN characters.userid = characters.char_userid THEN 'yes' ELSE 'no' END,
 +
{{{threadid|}}}posts=COALESCE(u1.posts, u2.posts),
 +
{{{threadid|}}}venue=Venue,
 +
{{{threadid|}}}family=Family,
 +
{{{threadid|}}}kith=Kith,
 +
{{{threadid|}}}dualkith=DualKith,
 +
{{{threadid|}}}organization=Organization,
 +
{{{threadid|}}}presence=Presence,
 +
{{{threadid|}}}adv=Power,
 +
{{{threadid|}}}username=characters.char_name,
 +
{{{threadid|}}}mainname=characters.username,
 +
{{{threadid|}}}mainid=characters.userid,
 +
{{{threadid|}}}forumid=char_userid,
 +
{{{threadid|}}}avatar=customavatar.visible,
 +
{{{threadid|}}}ppic=customprofilepic.visible,
 +
{{{threadid|}}}refinement=Refinement,
 +
{{{threadid|}}}status=CASE Status WHEN 'Active' THEN 'Active' WHEN 'Deceased' THEN 'Deceased' ELSE 'Inactive' 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
}}
}}

Revision as of 14:27, 23 January 2017

Personal tools
Namespaces
Variants
Actions
Navigation
games
Toolbox