Difference between revisions of "Template:RPLogs"

From Lantern Hill
Jump to: navigation, search
(Created page with "<css> #content table.wikitable{ border: 0; margin: -1.1em 0 0 -12px; } #content table.wikitable th, #content table.wikitable td { border: 0; background: transparent; } table.w...")
 
(Undo revision 1163 by Admin (talk))
 
(7 intermediate revisions by one user not shown)
Line 1: Line 1:
<css>
+
<includeonly>{{#ifeq: {{{ordermethod}}} | gamedate |
#content table.wikitable{
+
border: 0;
+
margin: -1.1em 0 0 -12px;
+
}
+
#content table.wikitable th, #content table.wikitable td {
+
border: 0;
+
background: transparent;
+
}
+
table.wikitable ul {
+
margin-top: 0;
+
}
+
</css><includeonly>{{#ifeq: {{{ordermethod}}} | gamedate |
+
 
{{ #dpl:
 
{{ #dpl:
 
| namespace=Log
 
| namespace=Log
| category=Logs
+
| linksto={{{name|{{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
+
| include={Log}:gamedate
| include={Log}:gamedate:[[%PAGE%|%TITLE%]]
+
| format= ,\n* (gamedate) [[%PAGE%|%TITLE%]],,
| format= ,\n* (%gamedate%) [[%PAGE%|%TITLE%]] ,,
+
| order=ascending
| ordermethod=sortkey
+
| order=descending
+
 
| table=,-,
 
| table=,-,
| tablesortcol=0
+
| tablesortcol=1
 
| tablerow=\n* (%%),%%
 
| tablerow=\n* (%%),%%
 
| columns={{{columns|3}}}
 
| columns={{{columns|3}}}
 
| rowcolformat=width=100%
 
| rowcolformat=width=100%
 
| noresultsheader=''No logs have been posted yet.''
 
| noresultsheader=''No logs have been posted yet.''
| dplcache={{BASEPAGENAME}}
 
| dplcacheperiod=900
 
 
}}
 
}}
 
|
 
|
 
{{ #dpl:  
 
{{ #dpl:  
| userdateformat=(y-m-d)
+
| userdateformat=(m.d.y)
 
| namespace=Log
 
| namespace=Log
| linksto={{{name|{{BASEPAGENAME}} }}}
+
| linksto={{{name|{{BASEPAGENAME}}}}}
 
| ordermethod=firstedit
 
| ordermethod=firstedit
 
| addeditdate=true
 
| addeditdate=true
 
| shownamespace=false
 
| shownamespace=false
| columns={{{columns|3}}}
+
| columns={{{columns|1}}}
 
| rowcolformat=width=100%
 
| rowcolformat=width=100%
 
| noresultsheader=''No logs have been posted yet.''
 
| noresultsheader=''No logs have been posted yet.''
| dplcache={{BASEPAGENAME}}
 
| dplcacheperiod=900
 
 
}}
 
}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
{|
+
===== How to include a dynamic log list in your page: =====
! How to include a dynamic log list in your page:
+
<pre>
|-
+
{{ RPlogs | name = Cat| ordermethod = date }}
| <pre>
+
{{ RPLogs | name = {{BASEPAGENAME}} | columns = 3 | ordermethod = gamedate  }}
+
 
</pre>
 
</pre>
  
The name, column and ordermethod parameters are optional. Name will default to the title of the page and columns will default to three. Ordermethod is less self-explanatory. It takes the values "date" and "gamedate" and determines whether the logs will be sorted by date of posting or the date of the IC events stipulated in the log. Logs without a proper gamedate value will not show up if the latter option is selected. If ordermethod malformed or unspecified, the logs will be automatically organized by the date of posting.
+
The name, column and ordermethod parameters are optional. Name will default to the title of the page and columns will default to three. Ordermethod is less self-explanatory. It takes the values "date" and "gamedate" and determines whether the logs will be sorted by date of posting or the date of the IC events. Logs without a gamedate value will not show up if the latter option is selected. If ordermethod malformed or unspecified, the logs will be automatically organized by the date of posting.
|}
+
</noinclude>
[[Category:Templates]]</noinclude>
+

Latest revision as of 09:31, 3 November 2013

How to include a dynamic log list in your page:
{{ RPlogs | name = Cat| ordermethod = date }}

The name, column and ordermethod parameters are optional. Name will default to the title of the page and columns will default to three. Ordermethod is less self-explanatory. It takes the values "date" and "gamedate" and determines whether the logs will be sorted by date of posting or the date of the IC events. Logs without a gamedate value will not show up if the latter option is selected. If ordermethod malformed or unspecified, the logs will be automatically organized by the date of posting.