1
Hi everybody!
I beautified makeMySelBox a bit. The standard XOOPS select boxes are a pain to use when you have a lot of module categories. This will give background colours to different category levels, instead of those dashes "--" we have now.
Edit class/xoopstree.php:
//makes a nicely ordered selection box
//$preset_id is used to specify a preselected item
//set $none to 1 to add a option with value 0
function makeMySelBox($title,$order="",$preset_id=0, $none=0, $sel_name="", $onchange="")
{
if ( $sel_name == "" ) {
$sel_name = $this->id;
}
$myts =& MyTextSanitizer::getInstance();
echo "n";
}
Edit xoops.css:
option.title {
background-color:#ddd;
color:#000;
}
option.title2 {
background-color:#F2F2F2;
color:#000;
}
Change colors and add subcategories to your liking!
I guess a similar thing can be done to makeSelBox in class/tree.php.