autant pour moi, j'ai pas été clair dans la modif
include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
//on teste si la classe n'existe pas deja
// on utilise un nom de class propre a cumulus
if (!class_exists("XoopsCumulusBlockForm")){
class XoopsCumulusBlockForm extends XoopsForm
{
/**
* create HTML to output the form as a table
*
* @return string
*/
function render()
{
$ele_name = $this->getName();
$ret = "
<div>
";
$hidden = '';
foreach ( $this->getElements() as $ele ) {
if (!is_object($ele)) {
$ret .= $ele;
} elseif ( !$ele->isHidden() ) {
if ( ($caption = $ele->getCaption()) != '' ) {
$ret .=
"<div class='xoops-form-element-caption" . ($ele->isRequired() ? "-required" : "" ) . "'>".
"<span class='caption-text'>{$caption}</span>".
"<span class='caption-marker'>*</span>".
"</div>";
}
$ret .= "<div style='margin:5px 0 8px 0; '>".$ele->render()."</div>n";
} else {
$hidden .= $ele->render();
}
}
$ret .= "</div>";
$ret .= $this->renderValidationJS( true );
return $ret;
}
}
} //on ferme le test & définition de class cumulus
// on utilise la classe cumulus en lieu et place de XoopsBlockForm stantdard
$form = new XoopsCumulusBlockForm ("","","");
$form->addElement(new XoopsFormText(TAG_MB_ITEMS, "options[0]", 25, 25,$options[0]));
$form->addElement(new XoopsFormText(TAG_MB_TIME_DURATION, "options[1]", 25, 25,$options[1]));
$form->addElement(new XoopsFormText(TAG_MB_FONTSIZE_MAX, "options[2]", 25, 25,$options[2]));
$form->addElement(new XoopsFormText(TAG_MB_FONTSIZE_MIN, "options[3]", 25, 25,$options[3]));
$form->addElement(new XoopsFormText(TAG_MB_FLASH_WIDTH, "options[4]", 25, 25,$options[4]));
$form->addElement(new XoopsFormText(TAG_MB_FLASH_HEIGHT, "options[5]", 25, 25,$options[5]));
$form->addElement(new XoopsFormColorPicker(TAG_MB_FLASH_TRANSPARENCY,"options[6]",$options[6]));