
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 '
line 128 in include/cp_functions.php
";
// start
if( ! empty( $_SESSION['redirect_message'] ) ) {
echo "\n" ; ".htmlspecialchars($_SESSION['redirect_message'],ENT_QUOTES)."
unset( $_SESSION['redirect_message'] ) ;
}
// end
foreach ( $admin_mids as $adm ) {
if ( !empty($xoops_admin_menu_ft[$adm]) ) {
echo ""; ".$xoops_admin_menu_ft[$adm]."
}
}
--------------------------------------------------
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
";
// start
if( ! empty( $_SESSION['redirect_message'] ) ) {
echo "\n" ; ".htmlspecialchars($_SESSION['redirect_message'],ENT_QUOTES)."
unset( $_SESSION['redirect_message'] ) ;
}
// end
foreach ( array_keys($xoops_admin_menu_ft) as $adm ) {
if ( in_array($adm, $admin_mids) ) {
echo ""; ".$xoops_admin_menu_ft[$adm]."
}
}
-------------------------------------------------
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', '');
$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();
}
I wanted the message to display in the center so I used
Quote:
<{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}>
What I can't figure to do is add a style to the message like . I'd like to make it stand out with red. Can anyone suggest?
EDIT: Apparently this hack was originall done by Peak Xoops
http://xoops.peak.ne.jp/md/news/index.php?page=article&storyid=70There's nothing but science....
The Reggae Album
63
![]()
trabis, it works perfectly... thanks. I should have given thought to applying it to the news/index.php.There's nothing but science....
The Reggae Album
64
![]()
trabis the method you suggest is exactly what I need however when I apply it I get the following error
Quote:
Fatal error: Call to a member function getVar() on a non-object in /home/icinc/public_html/index.php on line 48
The strange thing is that all subsequent pages work fine.
This is how my index.php file is writteninclude "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";
}
?>There's nothing but science....
The Reggae Album
65
![]()
I don't use the XOOPS main menu block and I want the News module submit link to display at the top of the news pages and visible only for each group permitted to submit(just as it functions now in the main menu).
I searched the site for an hour and didn't find any post with a solution. Does anyone have a solution for this?There's nothing but science....
The Reggae Album
67
![]()
Does anyone know of a shopping cart module? I looked at Kshop but it lacked payment and shipping plugins and no means of placing checkout under an SSL.There's nothing but science....
The Reggae Album
68
![]()
goatboy
I agree with you. Even if there was no issue, if you move to another cms just do it without announcing here. This need only be known to those associated with your site.There's nothing but science....
The Reggae Album
70
![]()
This seems more like a database issue than file permission. Check user table of your DB to see if the admin was added during setup.
If your localhost is just for testing you may find either ApacheTriad http://apache2triad.net/
or Xamp
http://www.apachefriends.org/en/xampp-windows.html
much less effort.There's nothing but science....
The Reggae Album
Login
Search
Recent Posts
Who's Online
Donat-O-Meter
Latest GitHub Commits