1
Hi All,
I am attempting to wirte a module and have become stuck on the module config options.
In xoops_version.php I have the following :
$modversion['config'][1]['name'] = 'pics';
$modversion['config'][1]['title'] = '_MI_PED_PICS';
$modversion['config'][1]['description'] = '_MI_PED_PICS_DESC';
$modversion['config'][1]['formtype'] = 'yesno';
$modversion['config'][1]['valuetype'] = 'int';
$modversion['config'][1]['default'] = 0;
(shows up nicely in the admin side)
in my index.php I check for the value and assign it to the template :
$pic = $xoopsModuleConfig['pics'];
$xoopsTpl->assign("pics", $pic);
"Smarty debug" shows me the value for "pics" is always 1. But I can see it is 0 in the database (prefix_config).
I can change the value on the admin side (yes or no) but it stays the same (value:1) once it reaches the template.
"Echo"ing $pic does not show any value at all.
I have also tried Herve's "getmoduleoption"-snippet with exactly the same results.
Does anyone know what is going on here ???
How do I get admin variables (yes/no in my case) into my template ??
Kind regards,
A confused Highlander