Extension:NumerAlpha

The NumerAlpha extension provides This is an incremental tag... it counts how many tag you insert in the page source. You can reset the count at any moment or begin to a specified number.

You have three forms:
 * a zero(s) padded number. (you can configure in the source code the length of your zero padded number. (0 = no zero padding)
 * Roman numeral (i, ii, iii, iv, etc.)
 * alphabetic (a,b,...,z,aa,ab,...,zz,...)

tags:

Why this extension?
First, it was for the Semantic Forms to add a table numbered when you use the multiple option... But you can use it in templates, using the magic word... and can be really useful.

You can reset it using the parameter reset, and restart the count with the parameter begin
 * example:

That will be render like

i ii iii iv v vi vii viii ix

i ii iii iv v

a b c

x xi xii xiii

So it's easy to list the alphabet:

abcdefghijklmnopqrstuvwxyz

Usage
hello world goodbye world jupiter jazz

hello world goodbye world</in> jupiter</in> jazz</in>

<ir>hello</ir> <ir>world</ir> goodbye</ir> <ir>world</ir> jupiter</ir> <ir>jazz</ir>

Installation
You can install it by


 * copying the following php code:
 * save it with the NumerAlpha.php filename.
 * copy it into your extensions directory
 * and add the inclusion in your [localsettings.php] file. &rarr; require_once("$IP/extensions/NumerAlpha.php");

Code

 * NumerAlpha.php