Difference between revisions of "Template:RP Logs"

From From The Ashes Wiki
Jump to: navigation, search
(test....)
(Hrm/)
Line 69: Line 69:
 
| resultsheader={{#ifeq: {{#dplvar:logLevel}} | Adv | <center>'''Also:'''</center> \n| }}
 
| resultsheader={{#ifeq: {{#dplvar:logLevel}} | Adv | <center>'''Also:'''</center> \n| }}
 
}}|/(\d{10}.+\^)/U|`}}|/\^/|}}|`|sort=asc}}
 
}}|/(\d{10}.+\^)/U|`}}|/\^/|}}|`|sort=asc}}
<div class="loglist {{#if:{{{cols|}}}|cols|}}">{{#ifeq:{{#dplvar:useDates}}|true|<div|<ul}} class="listedlogs" id="Block1">{{#arrayprint:loglist||@@@@|{{#arraydefine:log|@@@@|~}}{{#ifeq:{{{years}}}|yes|{{#ifeq:{{#vardefineecho:newyear|{{#regex:{{#arrayindex:log|1}}|/\d{4}/}}}}|{{#var:year}}||<h2>{{#vardefineecho:year|{{#var:newyear}}}}</h2>}}|}}<span class="log">{{#ifeq:{{#dplvar:useDates}}|true|{{#arrayindex:log|1}}:|<li>}} [[{{#arrayindex:log|4}}|<span title="{{#regex:{{#regex:{{#regex:{{#arrayindex:log|3}}|/\[\[(.+)\x7C(.+)\]\]/|$2}}|/\[\[(.+)\]\]/|$1}}|/"/|&quot;}}">{{#arrayindex:log|5}}</span>]]</span>{{#vardefine:lognum|{{#expr:{{#var:lognum}}+1}}}}{{#ifexpr:{{#var:lognum}}>{{#var:rows}}|{{#vardefine:lognum|1}}<div class="pager">{{#ifeq:{{#var:block}}|1||<span class="less">[[#Block{{#expr:{{#var:block}}-1}}|[less]]]</span>}}<span class="total">{{#expr:({{#var:block}}-1)*{{#var:rows}}+1}}-{{#expr:{{#var:block}}*{{#var:rows}}}} of {{#vardefineecho:total|{{#arraysize:loglist}}}}</span><span class="more">[[#Block{{#vardefineecho:block|{{#expr:{{#var:block}}+1}}}}|[more]]]</span></div>{{#ifeq:{{#dplvar:useDates}}|true|</div><div|</ul><ul}} class="listedlogs" id="Block{{#var:block}}">|<br/>}}}}{{#ifeq:{{#var:block}}|1||<div class="pager"><span class="less">[[#Block{{#expr:{{#var:block}}-1}}|[less]]]</span><span class="total">{{#expr:({{#var:block}}-1)*{{#var:rows}}+1}}-{{#var:total}} of {{#var:total}}</span></div>}}{{#ifeq:{{#dplvar:useDates}}|true|</div>|</ul>}}</div></includeonly>
+
<div class="loglist {{#if:{{{cols|}}}|cols|}}">{{#ifeq:{{#dplvar:useDates}}|true|<div|<ul}} class="listedlogs" id="Block1">{{#arrayprint:loglist||@@@@|{{#arraydefine:log|@@@@|~}}{{#ifeq:{{{years}}}|yes|{{#ifeq:{{#vardefineecho:newyear|{{#regex:{{#arrayindex:log|1}}|/\d{4}/}}}}|{{#var:year}}||<h2>{{#vardefineecho:year|{{#var:newyear}}}}</h2>}}|}}<div class="log">{{#ifeq:{{#dplvar:useDates}}|true|{{#arrayindex:log|1}}:|<li>}} [[{{#arrayindex:log|4}}|<span title="{{#regex:{{#regex:{{#regex:{{#arrayindex:log|3}}|/\[\[(.+)\x7C(.+)\]\]/|$2}}|/\[\[(.+)\]\]/|$1}}|/"/|&quot;}}">{{#arrayindex:log|5}}</span>]]</div>{{#vardefine:lognum|{{#expr:{{#var:lognum}}+1}}}}{{#ifexpr:{{#var:lognum}}>{{#var:rows}}|{{#vardefine:lognum|1}}<div class="pager">{{#ifeq:{{#var:block}}|1||<span class="less">[[#Block{{#expr:{{#var:block}}-1}}|[less]]]</span>}}<span class="total">{{#expr:({{#var:block}}-1)*{{#var:rows}}+1}}-{{#expr:{{#var:block}}*{{#var:rows}}}} of {{#vardefineecho:total|{{#arraysize:loglist}}}}</span><span class="more">[[#Block{{#vardefineecho:block|{{#expr:{{#var:block}}+1}}}}|[more]]]</span></div>{{#ifeq:{{#dplvar:useDates}}|true|</div><div|</ul><ul}} class="listedlogs" id="Block{{#var:block}}">|}}}}{{#ifeq:{{#var:block}}|1||<div class="pager"><span class="less">[[#Block{{#expr:{{#var:block}}-1}}|[less]]]</span><span class="total">{{#expr:({{#var:block}}-1)*{{#var:rows}}+1}}-{{#var:total}} of {{#var:total}}</span></div>}}{{#ifeq:{{#dplvar:useDates}}|true|</div>|</ul>}}</div></includeonly>

Revision as of 01:56, 22 January 2018

Usage

{{ RP_Logs<|date> }}

This template will automagically generate a list of all logs which link to the name of the page, in order from oldest to newest.

This is an adjustment of the similar template from Masquerade, which was itself based on the idea and a version of code from Haunted Memories.


Examples

{{ RP_Logs }}

The basic, default list. Bulleted, no date shown.


{{ RP_Logs|date }}

No bullet, date shown.


Advanced Usage

Some people prefer to put descriptions of the logs, or otherwise adjust the way they're displayed. If you wish to do this, create a page called YourName/AdvLog (i.e., if you're Bob, it would be Bob/AdvLog) and put your version there. Examples will be forthcoming. Any log to which you link on your AdvLog page will be removed from the automatic list, so that you'll get a list beneath your edited version of only any logs you're in, but haven't yet added to your edited list.