Forum:From a 1 digit number to 3 digit number

Im currently categorizing certain pages of items and sorting them by their level using the sortkey eg. option in category function that it will be use when the Dynamic Page List 2 is available here. But just notice that for a level 100 its sort it out with bellow the 1 so later when i want to use DPL2 it will display the list like 1,15,151,2,24,3,31,4,etc. So I want to know if there is a way to automatically make a conversion from the input of the users number 1 be convert by the template to number 001 or from 10 to 010. --Cizagna (Talk) 18:36, 26 January 2007 (UTC)
 * I don't know a way of doing that. However, you could ask someone to make a bot that will do that.  --Leon  (talk ) 21:36, 26 January 2007 (UTC)
 * In theory, there is both a padleft format number function and a #pad string function. The padleft format isn't installed until version 1.8, and the #pad requires the string functions to work (which they should be...) If you are really interested I could probably write you a replacement template for the padleft, just give me a ping. Tjoneslo 13:39, 27 January 2007 (UTC)


 * If that function is added, the pages that contains that template must be edited once more, to "refresh" the category (for example, making a Null edit), so if the number of pages affected are small it could be more effective to edit manually each page and add the zeros to the template variable. --Ciencia Al Poder ¿Algo que decir? 14:23, 27 January 2007 (UTC)
 * Shouldn't the job queue sort that out? --Leon  (talk ) 23:07, 27 January 2007 (UTC)


 * Yes. I've done exactly this (add a category to a template which is used on many pages). At first the category only shows the visited pages until the job queue can catch up (for me it was a few hours). Then the category was correct. Tjoneslo 12:38, 28 January 2007 (UTC)