Template:Char
From Edge of Darkness Wiki
Char
Line 1: | Line 1: | ||
<includeonly><!-- DB FOR USER INFO AND CHARACTER VARIABLES --> | <includeonly><!-- DB FOR USER INFO AND CHARACTER VARIABLES --> | ||
{{#get_db_data:db=nwod | {{#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|}}}' |
- | + | |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|}}}statusvenue=COALESCE(uf1.field166, uf2.field166), {{{threadid|}}}statusvenue=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|}}}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|}}}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) | |
- | |where=characters.threadid='{{{threadid|}}}' | + | |
- | + | ||
- | |data={{{threadid|}}}usertitle=COALESCE(u1.usertitle, u2.usertitle), | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
}} | }} | ||
- | <div class="{{#external_value: {{{threadid|}}}venue}}page chartempwrapper {{#external_value: {{{threadid|}}}venue}}back" style="min-width: 850px;"> | + | <div class="{{#external_value: {{{threadid|}}}venue}}page chartempwrapper {{#external_value: {{{threadid|}}}venue}}back" style="margin-top: 30px; min-width: 850px;"> |
<table class="charnewtable{{#external_value: {{{threadid|}}}venue}}" > | <table class="charnewtable{{#external_value: {{{threadid|}}}venue}}" > | ||
- | <tr> | + | <tr style="vertical-align: top;"> |
<td style="width: calc(50% - 100px);"> | <td style="width: calc(50% - 100px);"> | ||
</td> | </td> | ||
<td style="width: calc(50% - 100px);"> | <td style="width: calc(50% - 100px);"> | ||
+ | <div>{{#external_value: {{{threadid|}}}username}}</div> | ||
words n shit. | words n shit. | ||
</td> | </td> | ||
Line 61: | Line 23: | ||
- | + | {{#set: | |
+ | forumid={{#external_value: {{{forumid|}}}forumid }} | ||
+ | |oneaccount={{#external_value: {{{forumid|}}}oneaccount }} | ||
+ | |Posted={{#external_value: {{{forumid|}}}lastpost }} | ||
+ | |Online={{#external_value: {{{forumid|}}}lastvisit }} | ||
+ | |Last Post=[http://nwod.org/forum/showpost.php?p={{#external_value:{{{forumid|}}}lastpostid}} Last Post] | ||
+ | |Presence={{#external_value:{{{forumid|}}}presence}} | ||
+ | |Character Name={{#external_value: {{{threadid|}}}username}} | ||
+ | |Avatar={{#if: {{{Avatar|}}}|{{{Avatar|}}}|Unknown}} | ||
+ | |Lived In=Sacramento | ||
+ | |Sacramento Start={{#if: {{#external_value:{{{forumid|}}}joindate}}|{{#external_value:{{{forumid|}}}joindate}}|{{{Inception|}}}}} | ||
+ | |Sacramento End={{#if: {{#external_value:{{{forumid|}}}lastpost}}|{{#external_value:{{{forumid|}}}lastpost}}|{{{Departed|}}}}} | ||
+ | }} | ||
</includeonly>[[Category:Player Use Templates]] | </includeonly>[[Category:Player Use Templates]] |