Quote:
Originally Posted by Lynne
I am pretty sure that $array is a reserved word and you may not use it as a variable name.
And then I think you want to do something more along this line:
PHP Code:
$yourarray = array('var1' => $var1, 'var2' => $var2);
Then you may use {vb:raw var1} and {vb:raw var2} in the template.
|
Ah, thank you. I was unaware keys were necessary. I'm new to PHP and never have had the occasion to use a key value pair. Good to know! Also, $array works as a variable. Bad practice though.
Quote:
Originally Posted by consolegaming
And the plugin needs to be assigned to the parse_templates hook I believe or at least the global hook wouldn't work for me.
|
Hm. I'm using the forumhome_start hook which is working fine for me. I'll keep that in mind though if/when I make a plugin that needs to be used on more than one template. Thanks