2006-05-01, 07:18 PM
Afaik the settings.php don't use the adminfunctions.php.
You can change it to something like this:
So it looks then in settings.php:
I only noticed this because the yes / no text isn't labeled.
You can change it to something like this:
function makeyesnocode($title, $name, $value="yes", $output = true)
{
global $lang;
$bgcolor = getaltbg();
if($value == "no") {
$nocheck = "checked=\"checked\"";
} else {
$yescheck = "checked=\"checked\"";
}
if ($output) {
echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\" width=\"60%\"><label><input type=\"radio\" name=\"$name\" value=\"yes\" $yescheck /> $lang->yes</label> <label><input type=\"radio\" name=\"$name\" value=\"no\" $nocheck /> $lang->no</label></td>\n</tr>\n";
} else {
return "<label><input type=\"radio\" name=\"$name\" value=\"yes\" $yescheck /> $lang->yes</label> <label><input type=\"radio\" name=\"$name\" value=\"no\" $nocheck /> $lang->no</label>\n";
}
}
So it looks then in settings.php:
else if($type[0] == "yesno") {
$settingcode = makeyesnocode("xxx", "upsetting[$setting[sid]]", $setting['value'], false);
I only noticed this because the yes / no text isn't labeled.