[CJ] Randomize is a vB5 plugin to create random integers, chars and strings to use it on the template.
Tested with 5.6.4 but should work with all other versions.
Because there is no built in syntax to generate random numbers in the templates, you could use this tiny plugin to get this done.
Examples are also available to activate on the admincp template-hook list. You could view the examples result on your footer after activating the template-hook.
To install the plugin, just put the unzipped folder into core/packages/
It will be installed automatically.
Examples
Tested with 5.6.4 but should work with all other versions.
Because there is no built in syntax to generate random numbers in the templates, you could use this tiny plugin to get this done.
Examples are also available to activate on the admincp template-hook list. You could view the examples result on your footer after activating the template-hook.
To install the plugin, just put the unzipped folder into core/packages/
It will be installed automatically.
Examples
HTML:
Test a quick random number (0 to 9) without any variables. <br />
{vb:data randnr, delirandomize:delirand, randomNo}
{vb:raw randnr}
<br /> <br />
Test a 3digit random number without 0 (1 to 999). <br />
{vb:data randnr, delirandomize:delirand, randomNo, 1, 999}
{vb:raw randnr}
<br /> <br />
Test a 3digit random number only with 2 to 4 numbers. <br />
{vb:data randnr, delirandomize:delirand, randomNo, 2, 4, 3}
{vb:raw randnr}
<br /> <br /> Test a quick Letter upper case Letter. (A-Z) <br />
{vb:data randaz, delirandomize:delirand, randomAZ}
{vb:raw randaz}
<br /> <br />
Test 2 lowercase Letters. (A-Z) <br />
{vb:data randaz, delirandomize:delirand, randomAZ, 2, 1}
{vb:raw randaz}
<br /> <br />
Test a random string with given chars. <br />
{vb:data randstring, delirandomize:delirand, randomString, 'aAbBcCäÄüÜ*', 45}
{vb:raw randstring}