1. add global $xoopsModule; at the start
2. use if ($xoopsModule->dirname() == "oledrion") instead of if ($xoopsModule->name() == "oledrion")
Thanks
Undefined variable: xoopsModule dans le fichier /class/xoopsform/themeform.php - ligne 52
<?php
defined('XOOPS_ROOT_PATH') or die('Restricted access');
xoops_load('XoopsForm');
class XoopsThemeForm extends XoopsForm
{
function insertBreak($extra = '', $class = '')
{
if ($xoopsModule->name() == 'oledrion')
{
$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);
}
}
else
{
$class = ($class != '') ? " class='" . preg_replace('/[^A-Za-z0-9ss_-]/i', '', $class) . "'" : '';
if ($extra) {
$extra = '<tr><td colspan="2" ' . $class . '>' . $extra . '</td></tr>';
$this->addElement($extra);
} else {
$extra = '<tr><td colspan="2" ' . $class . '> </td></tr>';
$this->addElement($extra);
}
}
}
function render()
{
if ($xoopsModule->name() == 'oledrion')
{
$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;
}
else
{
$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() . '>
<table width="100%" class="outer" cellspacing="1">
<tr><th colspan="2">' . $this->getTitle() . '</th></tr>
';
$hidden = '';
$class = 'even';
foreach ($this->getElements() as $ele) {
if (!is_object($ele)) {
$ret .= $ele;
} else if (!$ele->isHidden()) {
if (!$ele->getNocolspan()) {
$ret .= '<tr valign="top" align="left"><td class="head">';
if (($caption = $ele->getCaption()) != '') {
$ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">';
$ret .= '<span class="caption-text">' . $caption . '</span>';
$ret .= '<span class="caption-marker">*</span>';
$ret .= '</div>';
}
if (($desc = $ele->getDescription()) != '') {
$ret .= '<div class="xoops-form-element-help">' . $desc . '</div>';
}
$ret .= '</td><td class="' . $class . '">' . $ele->render() . '</td></tr>' . NWLINE;
} else {
$ret .= '<tr valign="top" align="left"><td class="head" colspan="2">';
if (($caption = $ele->getCaption()) != '') {
$ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">';
$ret .= '<span class="caption-text">' . $caption . '</span>';
$ret .= '<span class="caption-marker">*</span>';
$ret .= '</div>';
}
$ret .= '</td></tr><tr valign="top" align="left"><td class="' . $class . '" colspan="2">' . $ele->render() . '</td></tr>';
}
} else {
$hidden .= $ele->render();
}
}
$ret .= '</table>' . NWLINE . ' ' . $hidden . '</form>' . NWLINE;
$ret .= $this->renderValidationJS(true);
return $ret;
}
}
}
?>
<!-- Created by Instant Zero (http://www.instant-zero.com) -->
<{$breadcrumb}>
<br />
<{if $global_advert != ''}>
<div align='center'><{$global_advert}></div>
<br />
<{/if}>
<{if $search_results}>
<h2><{$smarty.const._OLEDRION_SEARCHRESULTS}></h2>
<br />
<{foreach item=product from=$products}>
<img src='<{$smarty.const.OLEDRION_IMAGES_URL}>product.png' alt='' border='0' /> <b><a href="<{$product.link}>" title="<{$product.href_title}>"><{$product.title}></a></b><br />
<{/foreach}>
<{if $pagenav !=''}><div style="text-align: right; margin: 10px;"><{$pagenav}></div><{/if}>
<br />
<{/if}>
<{$search_form}>
/* smartsection tables */
div.itemText table tr td {
border: 1px solid #888 !important;
padding: 10px;
}
<div id="xo-content">
<{$xoops_contents}>
</div>
<div id="xo-content" class="<{$xoops_dirname}>">
<{$xoops_contents}>
</div>
/* smartsection tables */
table.i-want-a-black-border tr td {
border: 1px solid #888 !important;
padding: 10px;
}
#xo-content .smartsection table tr td {
border: 1px solid #888 !important;
padding: 10px;
}
<div class="itemText">
<{$item.maintext}>
</div>
<div class="itemText plus-border-for-my-tables">
<{$item.maintext}>
</div>
#xo-content .smartsection table tr td {
border: 1px solid #888 !important;
padding: 10px;
}
#xo-content .smartsection .plus-border-for-my-tables table tr td {
border: 1px solid #888 !important;
padding: 10px;
}
/* smartsection tables */
table.i-want-a-black-border tr td {
border: 1px solid #888 !important;
padding: 10px;
}
I can get the data to appear properly, but some of my tables are very big and they REALLY need the borders around the cells.