Difference between revisions of "Template:LogList"

From Masq
m
m
Line 1: Line 1:
<includeonly>{{#fornumargs: startkey
+
<includeonly>{{#vardefine: the_date|{{#ifeq:{{uc:{{{date_style}}}}}|RL|RL|IC}}}}
 +
{{#ifeq:{{{explain_date}}}|yes|<center>''~*Dates are {{#var:the_date}}*~''</center>|}}{{#fornumargs: startkey
 
|startvalue
 
|startvalue
 
|{{#vardefine:key|{{#explode:{{#var:startvalue}}|~|0}}}}{{#vardefine:value|{{#explode:{{#var:startvalue}}|~|1}}}}
 
|{{#vardefine:key|{{#explode:{{#var:startvalue}}|~|0}}}}{{#vardefine:value|{{#explode:{{#var:startvalue}}|~|1}}}}
Line 16: Line 17:
 
| replaceintitle=/^.*?\s-\s/,
 
| replaceintitle=/^.*?\s-\s/,
 
| category=Log
 
| category=Log
| include={log}:rl_date
+
| include={{#ifeq:{{#var:the_date}}|RL|{log}:rl_date|{log}:ic_date}}
 
| format= ,,: [[%PAGE%|{{#ifeq:{{#var:the_title}}|None.|%TITLE%|{{#var:the_title}}}}]]<br />,<div style="padding-left: 2.75em; margin-top:-.5em; font-style:italic;">\n{{#var:the_desc}}\n</div>
 
| format= ,,: [[%PAGE%|{{#ifeq:{{#var:the_title}}|None.|%TITLE%|{{#var:the_title}}}}]]<br />,<div style="padding-left: 2.75em; margin-top:-.5em; font-style:italic;">\n{{#var:the_desc}}\n</div>
 
| secseparators=
 
| secseparators=
 
| noresultsheader=Nothing to see here.
 
| noresultsheader=Nothing to see here.
}}
+
}}{{#vardefine: the_date|{{#ifeq:{{uc:{{{date_style}}}}}|RL|RL|IC}}}}
 
}}
 
}}
 
}}{{#vardefine:logLevel|Adv}}
 
}}{{#vardefine:logLevel|Adv}}
Line 26: Line 27:
 
<pre>
 
<pre>
 
{{LogList
 
{{LogList
 +
|date_style=RL/IC
 +
|explain_date=yes/no
 +
|-------------------
 
|the_log~Link to page name
 
|the_log~Link to page name
 
|my_title~Title you'd prefer to use, if not the default
 
|my_title~Title you'd prefer to use, if not the default
Line 37: Line 41:
 
<pre>
 
<pre>
 
{{LogList
 
{{LogList
 +
|the_log~[[Jai - Sugar Lumps]]
 +
|description~When you party with the party prince, you get two complimentary after-dinner mints.
 
|the_log~[[Jai - Fork In The Road]]
 
|the_log~[[Jai - Fork In The Road]]
 
|description~In which Petra presents Jai with a '''decent''' proposal, for a change.
 
|description~In which Petra presents Jai with a '''decent''' proposal, for a change.
Line 43: Line 49:
 
The basic use, giving you:
 
The basic use, giving you:
 
{{LogList
 
{{LogList
 +
|the_log~[[Jai - Sugar Lumps]]
 +
|description~When you party with the party prince, you get two complimentary after-dinner mints.
 
|the_log~[[Jai - Fork In The Road]]
 
|the_log~[[Jai - Fork In The Road]]
 
|description~In which Petra presents Jai with a '''decent''' proposal, for a change.
 
|description~In which Petra presents Jai with a '''decent''' proposal, for a change.
 
}}
 
}}
 
+
The optional elements include 'my_title', which should be inserted only for each log whose title you want to change on your page, and two special options above the line, 'date_style' and 'explain_date'.
If you're fine with the default title, leave the 'my_title' line out entirely.
+
  
 
<pre>
 
<pre>
 
{{LogList
 
{{LogList
 +
|date_style=RL
 +
|explain_date=yes
 +
|-------------------
 +
|the_log~[[Jai - Sugar Lumps]]
 +
|description~When you party with the party prince, you get two complimentary after-dinner mints.
 
|the_log~[[Jai - Fork In The Road]]
 
|the_log~[[Jai - Fork In The Road]]
 
|my_title~This Is The Title I Prefer
 
|my_title~This Is The Title I Prefer
Line 57: Line 69:
 
</pre>
 
</pre>
  
Including it is the second option, giving you:
+
 
 
{{LogList
 
{{LogList
 +
|date_style=RL
 +
|explain_date=yes
 +
|-------------------
 +
|the_log~[[Jai - Sugar Lumps]]
 +
|description~When you party with the party prince, you get two complimentary after-dinner mints.
 
|the_log~[[Jai - Fork In The Road]]
 
|the_log~[[Jai - Fork In The Road]]
 
|my_title~This Is The Title I Prefer
 
|my_title~This Is The Title I Prefer
Line 64: Line 81:
 
}}
 
}}
  
This template is slightly trickier to use than most.  You only need one instance of this template, with a "the_log", a optional "my_title", and a "description" for each log you list.  They need to be in order (the_log, my_title if used, description) and please note that the parameters are set off by a ~, '''not''' a =.  If you don't do it this way, it won't work!  Using a ~ in any of your log names/titles/description will also not work as expected. If you find yourself confused, check (but don't change) [[Jai/AdvLog]], where you can see this in use.
+
This template is slightly trickier to use than most.  You only need one instance of this template in your AdvLog page.  with a "the_log", a optional "my_title", and a "description" for each log you list.  They need to be in order (the_log, my_title if used, description) and please note that the repeated parameters are set off by a ~, '''not''' a =.  If you don't do it this way, it won't work!  Using a ~ in any of your log names/titles/description will also not work as expected. The parameters above the dashed line '''DO''' use an equals sign, however.  If you find yourself confused, check (but don't change) [[Jai/AdvLog]], where you can see this in use.
 
[[Category: Templates]]</noinclude>
 
[[Category: Templates]]</noinclude>

Revision as of 05:38, 12 February 2013

Usage

{{LogList
|date_style=RL/IC
|explain_date=yes/no
|-------------------
|the_log~Link to page name
|my_title~Title you'd prefer to use, if not the default
|description~Your description of the scene.
}}

This is a helper template to format AdvLog pages.

Examples

{{LogList
|the_log~[[Jai - Sugar Lumps]]
|description~When you party with the party prince, you get two complimentary after-dinner mints.
|the_log~[[Jai - Fork In The Road]]
|description~In which Petra presents Jai with a '''decent''' proposal, for a change.
}}

The basic use, giving you:

01/23/2008 01/23/2008: Sugar Lumps
When you party with the party prince, you get two complimentary after-dinner mints.
09/12/2009 09/12/2009: Fork In The Road
In which Petra presents Jai with a decent proposal, for a change.

The optional elements include 'my_title', which should be inserted only for each log whose title you want to change on your page, and two special options above the line, 'date_style' and 'explain_date'.

{{LogList
|date_style=RL
|explain_date=yes
|-------------------
|the_log~[[Jai - Sugar Lumps]]
|description~When you party with the party prince, you get two complimentary after-dinner mints.
|the_log~[[Jai - Fork In The Road]]
|my_title~This Is The Title I Prefer
|description~In which Petra presents Jai with a '''decent''' proposal, for a change.
}}


-= Dates are RL =-
10/21/2010 10/21/2010: Sugar Lumps
When you party with the party prince, you get two complimentary after-dinner mints.
11/23/2011 11/23/2011: This Is The Title I Prefer
In which Petra presents Jai with a decent proposal, for a change.


This template is slightly trickier to use than most. You only need one instance of this template in your AdvLog page. with a "the_log", a optional "my_title", and a "description" for each log you list. They need to be in order (the_log, my_title if used, description) and please note that the repeated parameters are set off by a ~, not a =. If you don't do it this way, it won't work! Using a ~ in any of your log names/titles/description will also not work as expected. The parameters above the dashed line DO use an equals sign, however. If you find yourself confused, check (but don't change) Jai/AdvLog, where you can see this in use.