Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Checkbox class

edited November 2007 in Vanilla 1.0 Help
looking at settings_category_edit.php we have the Category roles checkbox group. Instead of using the Get() function of the checkbox class mark reinvents the wheel using this
$sRoles = ''; $OptionCount = count($this->CategoryRoles->aOptions); for ($i = 0; $i < $OptionCount ; $i++) { $sRoles .= '<li> <p> <span>'.GetDynamicCheckBox($this->CategoryRoles->Name, $this->CategoryRoles->aOptions[$i]['IdValue'], $this->CategoryRoles->aOptions[$i]['Checked'], '', $this->CategoryRoles->aOptions[$i]['DisplayValue'], '', 'RoleID_'.$this->CategoryRoles->aOptions[$i]['IdValue']) .'</span> </p> </li>'; } echo $sRoles;
same is true for page manager and category filters which don't even use the checkbox class and code it from scratch.
Part of the reason can be that checkbox class doesn't do what they want it to do. Mark didn't use the Get() function cause he wants dynamic checkboxes which the checkbox class doesn't output. Other reason could be the markup. All three examples mentioned above use the following markup because thats where the scss styles are pointing to
<li><p><span><label></label><input /></span></p></li>
It also doesn't have any functions to remove checkboxes or create checkboxes from an associative array.

Should I work on this and add the needed changes, It won't break anything cause hardly anyone uses it :P
This discussion has been closed.