Difference between revisions of "Template:RP Logs"

From Fate's Harvest
Jump to: navigation, search
(Created page with "{{#switch: comparison string | case = result | case = result | ... | case = result | #default = default result }} <includeonly>{{#switch: {{{order}}} | descending = <dp...")
 
 
(47 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#switch: comparison string
+
<css>
| case = result
+
.rp-log ul {
| case = result
+
    list-style: none; /* Remove list bullets */
| ...
+
    padding: 0;
| case = result
+
    margin: 0;
| #default = default result
+
}
}}
+
  
 +
.rp-log li {
 +
    padding-left: 16px;
 +
}
  
<includeonly>{{#switch: {{{order}}} | descending =
+
.rp-log li:before {
<dpl>
+
    content: "•"; /* Insert content that looks like bullets */
namespace=Logs
+
    padding-right: 8px;
category=RP Logs
+
    color: black; /* Or a color you prefer */
linksto={{BASEPAGENAME}}
+
}
includematch=/\{{!}}\s*gamedate\s*=\s*\d{4}\.\d{2}\.\d{2}/si
+
</css><includeonly>{{#switch: {{{order}}} | descending =
include={Log}:gamedate:[[%PAGE%|%TITLE%]]
+
{{ #dpl:
format= ,\n* (%gamedate%) [[%PAGE%|%TITLE%]],,
+
| category=RP Logs
ordermethod=sortkey
+
| linksto={{BASEPAGENAME}}
order=descending
+
| includematch=/\{{!}}\s*gamedate\s*=\s*\d{4}\.\d{2}\.\d{2}/si
table=,-,
+
| replaceintitle=/Log:/,
tablesortcol=1
+
| include={Log}:gamedate:[[%PAGE%|%TITLE%]]
tablerow=\n* (%%),%%
+
| order=descending
columns={{{columns|2}}}
+
| table=class="table infobox rp-log",-,
rowcolformat=width=100%
+
| tablerow=\n* (%%),%%
noresultsheader=''No logs have been posted yet.''
+
| columns={{{columns|2}}}
</dpl>
+
| noresultsheader=''No logs have been posted yet.''
 +
}}
 
| #default =
 
| #default =
<dpl>
+
{{ #dpl:
namespace=Logs
+
| category=RP Logs
category=RP Logs
+
| linksto={{BASEPAGENAME}}
linksto={{{name|{{BASEPAGENAME}} }}}
+
| includematch=/\{{!}}\s*gamedate\s*=\s*\d{4}\.\d{2}\.\d{2}/si
includematch=/\{{!}}\s*gamedate\s*=\s*\d{4}\.\d{2}\.\d{2}/si
+
| replaceintitle=/Log:/,
include={Log}:gamedate:[[%PAGE%|%TITLE%]]
+
| include={Log}:gamedate:[[%PAGE%|%TITLE%]]
format= ,\n* (%gamedate%) [[%PAGE%|%TITLE%]],,
+
| ordermethod=sortkey
ordermethod=sortkey
+
| order=ascending
order=ascending
+
| table=class="table infobox rp-log",-,
table=,-,
+
| tablerow=\n* (%%),%%
tablesortcol=1
+
| columns={{{columns|2}}}
tablerow=\n* (%%),%%
+
| noresultsheader=''No logs have been posted yet.''
columns={{{columns|2}}}
+
}}
rowcolformat=width=100%
+
}}</includeonly>
noresultsheader=''No logs have been posted yet.''
+
<noinclude>
</dpl>
+
==How to include a dynamic log list in your page:==
}}</includeonly><noinclude>
+
<pre>
{|
+
! How to include a dynamic log list in your page:
+
|-
+
| <pre>
+
 
{{ RP Logs | columns = 2 | order = ascending }}
 
{{ RP Logs | columns = 2 | order = ascending }}
 
</pre>
 
</pre>
  
 
Please insert the above into your character page to populate RP logs. This template will automatically pull all logs that link to your character page. Input the number of columns you want to appear, and "ascending" or "descending" to control if the logs appear oldest first, or newest first.
 
Please insert the above into your character page to populate RP logs. This template will automatically pull all logs that link to your character page. Input the number of columns you want to appear, and "ascending" or "descending" to control if the logs appear oldest first, or newest first.
|}
 
 
</noinclude>
 
</noinclude>

Latest revision as of 21:03, 21 March 2017


How to include a dynamic log list in your page:

{{ RP Logs | columns = 2 | order = ascending }}

Please insert the above into your character page to populate RP logs. This template will automatically pull all logs that link to your character page. Input the number of columns you want to appear, and "ascending" or "descending" to control if the logs appear oldest first, or newest first.