7
hi'
This hack is too difficult for me, I'm not able to implement it (blank pages...)
What I have done :
1. Add a specific class for Oledrion in class/xoopsform/themeform.phple="color: #000000"><?php class OledrionThemeForm extends XoopsThemeForm { function insertBreak($extra = '', $class = '') { $class = ($class != '') ? " class='" . preg_replace('/[^A-Za-z0-9ss_-]/i', '', $class) . "'" : ''; if ($extra) { $extra = '' . $class . '' . $extra . ''; $this->addElement($extra); } else { $extra = '' . $class . ''; $this->addElement($extra); } } function render() { $ele_name = $this->getName(); $ret = '<form name="' . $ele_name . '" id="' . $ele_name . '" action="' . $this->getAction() . '" method="' . $this->getMethod() . '" onsubmit="return xoopsFormValidate_' . $ele_name . '();"' . $this->getExtra() . '><div class="header-form">' . $this->getTitle() . '</div>'; $hidden = ''; $class = ''; foreach ($this->getElements() as $ele) { if (!is_object($ele)) { $ret .= $ele; } else if (!$ele->isHidden()) { if (!$ele->getNocolspan()) { $ret .= ''; if (($caption = $ele->getCaption()) != '') { $ret .= ''; $ret .= '' . $caption . ''; $ret .= ''; $ret .= ''; } if (($desc = $ele->getDescription()) != '') { $ret .= '' . $desc . ''; } $ret .= '' . $ele->render() . '' . NWLINE; } else { $ret .= ''; if (($caption = $ele->getCaption()) != '') { $ret .= ''; $ret .= '' . $caption . ''; $ret .= ''; $ret .= ''; } $ret .= '' . $ele->render() . ''; } } else { $hidden .= $ele->render(); } } $ret .= '' . NWLINE . ' ' . $hidden . '</form>' . NWLINE; $ret .= $this->renderValidationJS(true); return $ret; } }
2. Modify call to form class in one single file oledrion/include/product_search_form.phple="color: #000000"><?php $sform = new XoopsThemeForm(adherents_utils::getModuleName().' - '._ADHERENTS_SEARCHFOR, 'productsSearchForm', ADHERENTS_URL.'search.php','post');
... replaced by
le="color: #000000"><?php $sform = new OledrionThemeForm(adherents_utils::getModuleName().' - '._ADHERENTS_SEARCHFOR, 'productsSearchForm', ADHERENTS_URL.'search.php','post');
... not sure that's a great improvment for Xoops

, but it works :
- oledrion search form is displayed as I want
- other oledrion forms are not modified
Still learning CSS and... english