1
stelian
How do i remove the footer from redirection page?
  • 2006/1/17 12:46

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


How do i remove the footer and header from redirection page (If the page does not automatically reload, please click here
)?
Becouse, as i remember, a few days ago it didn't apear. Or it was on XOOPS 2.0.13?

I only want a simple page and the message.

Or it was on XOOPS 2.0.13?
Please help.

Regards,
Stelian P.

2
bluenova
Re: How do i remove the footer from redirection page?

You need to edit the 'System ¦ system_redirect.html' template from the admin area in 'System ¦ Templates'. If you havn't already done so, you need to clone the templates first, and then edit the cloned template set.

Once you have done that goto 'System ¦ Preferences ¦ General Settings' and change the 'default template set' from the default to your new template set.

3
stelian
Re: How do i remove the footer from redirection page?
  • 2006/1/17 13:36

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


What should i edit in here?
<div style="text-align:center; background-color: transparent; border-top: 0px solid #FFFFFF; border-left: 0px solid #FFFFFF; border-right: 0px solid #AAAAAA; border-bottom: 0px solid #AAAAAA; font-weight : bold;">
  <
h4><{$message}></h4>
  <
p><{$lang_ifnotreload}></p>
</
div>

Becouse i don't see any functions to call footer or header.

Anyway, after i cloned, selected the new template and push the submit button i receive this errors:

This page cannot be displayed due to an internal error.

If you are the administrator of this site, please visit the XOOPS Troubleshooting Page for assistance.

Helpful infomation you should provide while asking for assistance:

Notice [PHP]: Undefined variable: template_set in file modules/system/admin/preferences/main.php line 314
Notice [PHP]: Undefined variable: template_set in file modules/system/admin/preferences/main.php line 315
Error [Xoops]: Smarty error: [in db:sitemap_block_show.html line 74]: syntax error: mismatched tag {/if}. (Smarty_Compiler.class.php, line 2232) in file class/smarty/Smarty.class.php line 1084


Well, i made some tests and yes, in XOOPS 2.0.13 the footer and header is not displayed. Only in 2.2.3 the version i'm using.

Please excuse my spelling mistakes.

4
stelian
Re: How do i remove the footer from redirection page?
  • 2006/1/19 20:28

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


bluenova, please, can you lock this topic and unlock the other one in here?https://xoops.org/modules/newbb/viewtopic.php?topic_id=46027&forum=20&post_id=202091#forumpost202091
Becouse this is posted in "Beginers corner" and i don't think this problem is verry simple.

After i made some test i observed that the footer and header appear only in XOOPS 2.2 (and it doesn't in XOOPS 2.0.13).

Do i have to downgrade? :(


Code from 2.2.3
/*
* Function to redirect a user to certain pages
*/
function redirect_header($url$time 3$message ''$addredirect true)
{
    global 
$xoopsConfig$xoopsLogger$xTheme$xoopsOption$xoopsModule$xoopsUser$xoopsTpl;
    if ( 
preg_match"/[\0-\31]|about:|script:/i"$url) ) {
        if (!
preg_match('/^b(java)?script:([s]*)history.go(-[0-9]*)([s]*[;]*[s]*)$/si'$url) ) {
            
$url XOOPS_URL;
        }
    }
    
//$xTheme->tplEngine->assign('xoops_showrblock', 1);

    
$xTheme->tplEngine->assign('time'intval($time));
    if (
$addredirect && strstr($url'user.php')) {
        if (!
strstr($url'?')) {
            
$url .= '?xoops_redirect='.urlencode($_SERVER['REQUEST_URI']);
        } else {
            
$url .= '&amp;xoops_redirect='.urlencode($_SERVER['REQUEST_URI']);
        }
    }
    if (
defined('SID') && (! isset($_COOKIE[session_name()]) || ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']])))) {
        if (!
strstr($url'?')) {
            
$url .= '?' SID;
        } else {
            
$url .= '&amp;'.SID;
        }
    }
    
$url preg_replace("/&amp;/i"'&'htmlspecialchars($urlENT_QUOTES));
    
$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';
    include 
XOOPS_ROOT_PATH."/footer.php";
    exit();
}

function 
xoops_getenv($key)
{
    return isset(
$_SERVER[$key]) ? $_SERVER[$key] : (isset($_ENV[$key]) ? $_ENV[$key] : null);
}


Code from 2.0.13
/*
* Function to redirect a user to certain pages
*/
function redirect_header($url$time 3$message ''$addredirect true)
{
    global 
$xoopsConfig$xoopsRequestUri$xoopsLogger$xoopsUserIsAdmin;
    if ( 
preg_match"/[\0-\31]|about:|script:/i"$url) ) {
        
$url XOOPS_URL;
    }
    if (
defined('XOOPS_CPFUNC_LOADED')) {
        
$theme 'default';
    } else {
        
$theme $xoopsConfig['theme_set'];
    }
    require_once 
XOOPS_ROOT_PATH.'/class/template.php';
    
$xoopsTpl = new XoopsTpl();
    
$xoopsTpl->assign(array('xoops_theme' => $theme'xoops_imageurl' => XOOPS_THEME_URL.'/'.$theme.'/''xoops_themecss'=> xoops_getcss($theme), 'xoops_requesturi' => htmlspecialchars($GLOBALS['xoopsRequestUri'], ENT_QUOTES), 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
    if (
$xoopsConfig['debug_mode'] == && $xoopsUserIsAdmin) {
        
$xoopsTpl->assign('time'300);
        
$xoopsTpl->assign('xoops_logdump'$xoopsLogger->dumpAll());
    } else {
        
$xoopsTpl->assign('time'intval($time));
    }
    if (
$addredirect && strstr($url'user.php')) {
        if (!
strstr($url'?')) {
            
$url .= '?xoops_redirect='.urlencode($xoopsRequestUri);
        } else {
            
$url .= '&amp;xoops_redirect='.urlencode($xoopsRequestUri);
        }
    }
    if (
defined('SID') && (! isset($_COOKIE[session_name()]) || ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']])))) {
        if (!
strstr($url'?')) {
            
$url .= '?' SID;
        } else {
            
$url .= '&amp;'.SID;
        }
    }
    
$url preg_replace("/&amp;/i"'&'htmlspecialchars($urlENT_QUOTES));
    
$xoopsTpl->assign('url'$url);
    
$message trim($message) != '' $message _TAKINGBACK;
    
$xoopsTpl->assign('message'$message);
    
$xoopsTpl->assign('lang_ifnotreload'sprintf(_IFNOTRELOAD$url));
    
$xoopsTpl->display('db:system_redirect.html');
    exit();
}


I have to modify the function.php, but i don't know exactly what line. Any ideea?

Please help. Thanks in advance.

5
stelian
Re: How do i remove the footer from redirection page?
  • 2006/2/11 1:01

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


I've made a downgrade to 2.0.13. That's solved my problem

Login

Who's Online

109 user(s) are online (60 user(s) are browsing Support Forums)


Members: 0


Guests: 109


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits