You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

Difference between revisions of "Template:PostsToPages"

From MafiaWiki
Jump to: navigation, search
(how is it even possible to have ParserFunctions and not have basic rounding tools like trunc and floor)
 
(yay)
 
Line 1: Line 1:
<includeonly>{{#expr:({{{1|0}}}-({{{1|0}}} mod 25))/25}} pages{{#ifeq:{{{1|0}}}|0||, {{#expr:{{{1|0}}} mod 25}} posts}}</includeonly><noinclude>==Usage==
+
{{#expr:trunc({{{1|0}}}/25)}} pages{{#ifeq:{{{1|0}}}|0||, {{#expr:{{{1|0}}} mod 25}} posts}}<noinclude>
 +
==Usage==
  
 
Converts a number of posts into the format "X pages, Y posts". Assumes pagesize of 25.
 
Converts a number of posts into the format "X pages, Y posts". Assumes pagesize of 25.
  
 
<code><nowiki>{{PostsToPages|postcount}}</nowiki></code></noinclude>
 
<code><nowiki>{{PostsToPages|postcount}}</nowiki></code></noinclude>

Latest revision as of 14:52, 22 June 2014

0 pages

Usage

Converts a number of posts into the format "X pages, Y posts". Assumes pagesize of 25.

{{PostsToPages|postcount}}