Quote:
Originally Posted by MikeF
I've been driven nuts. All I want to do is output $random_number using rand(1,99999) and I'm stuck.. why have they made this insanely difficult?
|
It actually does make sense, although I'll admit it's not obvious why. What have you tried? You should be able to do something like in a plugin:
Code:
$random_number = rand(1,99999);
vB_Template::preRegister('template_name',array('random_number' => $random_number));
hook location
parse_templates is probably a good choice. Of course you need to change template_name to the actual name of the template you want to use the random number in.
Then in the template put
HTML Code:
{vb:raw random_number}