
1. add global $xoopsModule; at the start
2. use if ($xoopsModule->dirname() == "oledrion") instead of if ($xoopsModule->name() == "oledrion")
Thanks


defined('XOOPS_ROOT_PATH') or die('Restricted access');
xoops_load('XoopsForm');
xoops_load('XoopsThemeForm');
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 = '. $ele_name . '" id="' . $ele_name . '" action="' . $this->getAction() . '" method="' . $this->getMethod() . '" onsubmit="return xoopsFormValidate_' . $ele_name . '();"' . $this->getExtra() . '>' . $this->getTitle() . '
';
$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 . '' . NWLINE;
$ret .= $this->renderValidationJS(true);
return $ret;
}
}
?>
$sform = new XoopsThemeForm(_OLEDRION_PLEASE_ENTER, "informationfrm", OLEDRION_URL.'checkout.php', 'post');
$sform = new OledrionThemeForm(_OLEDRION_PLEASE_ENTER, "informationfrm", OLEDRION_URL.'checkout.php', 'post');
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 = '. $ele_name . '" id="' . $ele_name . '" action="' . $this->getAction() . '" method="' . $this->getMethod() . '" onsubmit="return xoopsFormValidate_' . $ele_name . '();"' . $this->getExtra() . '>' . $this->getTitle() . '
';
$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 . '' . NWLINE;
$ret .= $this->renderValidationJS(true);
return $ret;
}
}
$sform = new XoopsThemeForm(adherents_utils::getModuleName().' - '._ADHERENTS_SEARCHFOR, 'productsSearchForm', ADHERENTS_URL.'search.php','post');
$sform = new OledrionThemeForm(adherents_utils::getModuleName().' - '._ADHERENTS_SEARCHFOR, 'productsSearchForm', ADHERENTS_URL.'search.php','post');
require_once OLEDRION_PATH.'class/themeform.php';
require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
// addition
require_once OLEDRION_PATH.'class/themeform.php';
// end
require_once OLEDRION_PATH.'class/tree.php';