oh i still can't get it to work. See this is all what I had done:-
1. I created a setting
$vbulletin->options['vin_mysetting'], Free datatype, with the following option code:-
Code:
" . eval('$options="";
$fritems = array(
"option1" => "First Radio",
"option2" => "Second Radio",
"option3" => "Third Radio",
);
foreach($fritems AS $fritem_id => $fritem_name)
{
$options .= "\\t\\t<label for=\\"setting[$setting[varname]]$fritem_id\\" title=\\"item id: $fritem_id\\"><input type=\\"checkbox\\" tabindex=\\"1\\" name=\\"setting[$setting[varname]]"."[]\\" id=\\"setting[$setting[varname]][$fritem_id]\\" value=\\"$fritem_id\\"" . iif(strpos(",$setting[value],", ",$fritem_id,") !== false, \' checked="checked"\') . iif($vbulletin->debug, " title=\\"name="setting[$setting[varname]]"\\"") . " />$fritem_name</label><br />\\n";
}
return "<span class=\\"smallfont\\">\\n$options\\t</span>";') . "<input type=\"hidden\" name=\"setting[$setting[varname]][]\" value=\"-1\" />
2. Then I created a hook at
admin_options_processing with the following code:-
PHP Code:
if (is_array($settings['vin_mysetting']))
{
$settings['vin_mysetting'] = implode(',', $settings['vin_mysetting']);
}
3. Then in my file.php I did this (taking just "option1" for now.) :-
PHP Code:
$radioboxesToShow = explode(',', $vbulletin->options['vin_mysetting']);
if(isset($radioboxesToShow['option1'])) {
$show['option1'] = true;
}
4. Then at atlast, in the associated template, I did this:-
HTML Code:
<if condition="$show['option1']">
<input type="radio" name="radiotype" value="0"/>My First Radio<br />
</if>
It never shows up now, whether checked or unchecked !
Thank you