How can I fix that?
The Reggae Album
Theme.html
Insert this 8 lines into the top of your theme.html
<{php}>
if( ! empty( $_SESSION['redirect_message'] ) ) {
if( empty( $this->_tpl_vars['xoops_lblocks'] ) ) $this->_tpl_vars['xoops_lblocks'] = array() ;
array_unshift( $this->_tpl_vars['xoops_lblocks'] , array( 'title' => 'Message' , 'content' => $_SESSION['redirect_message'] , 'weight' => 0 ) ) ;
$this->_tpl_vars['xoops_showlblock'] = 1 ;
unset( $_SESSION['redirect_message'] ) ;
}
<{/php}>
If you use XOOPS 2.2.x, also insert them into themeadmin.html
------------------------------------------------
If using XOOPS 2.0.13a-JP.
Edit line 423 in include/functions.php
$xoopsTpl->assign('url', $url);
$message = trim($message) != '' ? $message : _TAKINGBACK;
$xoopsTpl->assign('message', $message);
$xoopsTpl->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));
$GLOBALS['xoopsModuleUpdate'] = 1;
// start
if( ! headers_sent() ) {
$_SESSION['redirect_message'] = $message ;
header( "Location: ".strtr(preg_replace('/[&]amp;/i','&',$url),"\r\n\0"," ") ) ;
exit ;
}
// end
$xoopsTpl->display('db:system_redirect.html');
exit();
} else {
$url = preg_replace("/& amp;/i", '&', htmlspecialchars($url, ENT_QUOTES));
// start
if( ! headers_sent() ) {
$_SESSION['redirect_message'] = $message ;
header( "Location: ".strtr(preg_replace('/[&]amp;/i','&',$url),"\r\n\0"," ") ) ;
exit ;
}
// end
echo '
<html>
<head>
line 128 in include/cp_functions.php
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='2%' valign='top' class='bg5' background='".XOOPS_URL."/modules/system/images/bg_menu.gif' align='center'></td>
<td width='15%' valign='top' class='bg5' align='center'><img src='".XOOPS_URL."/modules/system/images/menu.gif' /><br />
<table border='0' cellpadding='4' cellspacing='0' width='100%'>";
// start
if( ! empty( $_SESSION['redirect_message'] ) ) {
echo "<tr><td>".htmlspecialchars($_SESSION['redirect_message'],ENT_QUOTES)."</td></tr>\n" ;
unset( $_SESSION['redirect_message'] ) ;
}
// end
foreach ( $admin_mids as $adm ) {
if ( !empty($xoops_admin_menu_ft[$adm]) ) {
echo "<tr><td align='center'>".$xoops_admin_menu_ft[$adm]."</td></tr>";
}
}
--------------------------------------------------
If using XOOPS 2.0.x
line 404 in include/functions.php
$xoopsTpl->assign('url', $url);
$message = trim($message) != '' ? $message : _TAKINGBACK;
$xoopsTpl->assign('message', $message);
$xoopsTpl->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));
// start
if( ! headers_sent() ) {
$_SESSION['redirect_message'] = $message ;
header( "Location: ".strtr(preg_replace('/[&]amp;/i','&',$url),"\r\n\0"," ") ) ;
exit ;
}
// end
$xoopsTpl->display('db:system_redirect.html');
exit();
}
line 141 in include/cp_functions.php
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='2%' valign='top' class='bg5' background='".XOOPS_URL."/m
odules/system/images/bg_menu.gif' align='center'></td>
<td width='15%' valign='top' class='bg5' align='center'><img src='".
XOOPS_URL."/modules/system/images/menu.gif' /><br />
<table border='0' cellpadding='4' cellspacing='0' width='100%'>";
// start
if( ! empty( $_SESSION['redirect_message'] ) ) {
echo "<tr><td>".htmlspecialchars($_SESSION['redirect_message'],ENT_QUOTES)."</td></tr>\n" ;
unset( $_SESSION['redirect_message'] ) ;
}
// end
foreach ( array_keys($xoops_admin_menu_ft) as $adm ) {
if ( in_array($adm, $admin_mids) ) {
echo "<tr><td align='center'>".$xoops_admin_menu_ft[$adm]."</td>
</tr>";
}
}
-------------------------------------------------
If using XOOPS 2.2.3 final
line 424 in include/functions.php
$xTheme->tplEngine->assign('url', $url);
$message = trim($message) != '' ? $message : _TAKINGBACK;
$xTheme->tplEngine->assign('message', $message);
$xTheme->tplEngine->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));
$xTheme->tplEngine->assign('xoops_module_header', '<meta http-equiv="Refresh" content="2; url='.$url.'" />');
$xoopsOption['template_main'] = 'system_redirect.html';
// start
if( ! headers_sent() ) {
$_SESSION['redirect_message'] = $message ;
header( "Location: ".strtr(preg_replace('/[&]amp;/i','&',$url),"\r\n\0"," ") ) ;
exit ;
}
// end
include XOOPS_ROOT_PATH."/footer.php";
exit();
}
<{php}>
if( ! empty( $_SESSION['redirect_message'] ) ) {
if( empty( $this->_tpl_vars['xoops_ccblocks'] ) ) $this->_tpl_vars['xoops_ccblocks'] = array() ;
array_unshift( $this->_tpl_vars['xoops_ccblocks'] , array( 'title' => 'Message' , 'content' => $_SESSION['redirect_message'] , 'weight' => 0 ) ) ;
$this->_tpl_vars['xoops_showcblock'] = 1 ;
unset( $_SESSION['redirect_message'] ) ;
}
<{/php}>
Fatal error: Call to a member function getVar() on a non-object in /home/icinc/public_html/index.php on line 48
<?php
include "mainfile.php";
//check if start page is defined
if ( isset($xoopsConfig['startpage']) && $xoopsConfig['startpage'] != "" && $xoopsConfig['startpage'] != "--" ) {
header('Location: '.XOOPS_URL.'/modules/'.$xoopsConfig['startpage'].'/');
exit();
} else {
$xoopsOption['show_cblock'] =1;
include "header.php";
$xoopsTpl->assign( 'is_homepage',true);
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
$gperm_handler =& xoops_gethandler('groupperm');
if ($gperm_handler->checkRight('news_submit', 0, $groups, $xoopsModule->getVar('mid'))) {
$perm = 1;
} else {
$perm = 0;
}
$xoopsTpl->assign('perm', $perm);
include "footer.php";
}
?>