1
I couldnt find any relevant posts regarding this problem, so i'm hoping this post will shed some light on whats going wrong.
I've installed the module Multi-Menu 1.3 with no problem. Everything runs good until i "Edit" a multimenu block. I can add as many links as i want and it will show up. But as soon as i edit the block to rename it, or change the pages it shows up on, it disappears and i get the following error msg:
Notice [PHP]: Undefined offset: 1 in file modules/multiMenu/blocks/multimenu.php line 8
Heres the contents of multimenu.php:
function multimenu_show($options) {
global $xoopsDB,$xoopsUser;
$myts =& MyTextSanitizer::getInstance();
$block = array();
$group = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
$result = $xoopsDB->query("SELECT groups, link, title, target, imageurl FROM ".$xoopsDB->prefix("multimenu").$options[1]." WHERE hide=0 ORDER BY weight ASC");
while ( $myrow = $xoopsDB->fetchArray($result) ) {
$title = $myts->makeTboxData4Show($myrow["title"]);
if ( !XOOPS_USE_MULTIBYTES ) {
if (strlen($myrow['title']) >= $options[0]) {
$title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[0]-1)))."...";
}
}
$groups = explode(" ",$myrow['groups']);
if (count(array_intersect($group,$groups)) > 0) {
$imenu['title'] = $title;
$imenu['target'] = $myrow['target'];
$imenu['link'] = $myrow['link'];
$imenu['imageurl'] = $myrow['imageurl'];
if (eregi("^[([a-z0-9]+)]$", $myrow['link'], $moduledir)) {
$module_handler = & xoops_gethandler( 'module' );
$module =& $module_handler->getByDirname($moduledir[1]);
if ( is_object( $module ) && $module->getVar( 'isactive' ) ) {
$imenu['link'] = XOOPS_URL."/modules/".$moduledir[1];
}
}
$block['contents'][] = $imenu;
}
}
return $block;
}
function multimenu_edit($options) {
$form = _BM_MULTIMENU_CHARS." .$options[0]."' /> "._BM_MULTIMENU_LENGTH."";
return $form;
}
?>
I think all i really have to do is click on the "Edit" link and not even change anything, and it breaks.
I've been successfull at installing other modules today, so i've ruled out bad uploads.
Any of you have an idea of what could be going wrong?
On:
RHE 3
PHP 4.3.4
XOOPS 2.0.6