1
stelian
White page and only the message on redirection page. HOW?
  • 2006/1/24 19:25

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


Hi all. In my redirection page, where it says: Thank you for log in.... and other messages, also appears the top banner, the header, footer, search box.... I want all of this to disapear, like in XOOPS 2.0.13. Now i'm using XOOPS 2.2.3. What do i have to change in function.php?

XOOPS 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 .= '&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 .= '&'.SID;
        }
    }
    
$url = preg_replace("/&/i", '&', htmlspecialchars($url, ENT_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);
}

XOOPS 2.0.13.2
/*
* 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'] == 2 && $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 .= '&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 .= '&'.SID;
        }
    }
    
$url = preg_replace("/&/i", '&', htmlspecialchars($url, ENT_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 don't think it's something verry complicated, but i can't figure it out what could it be.

bluenova, please leave this topic becouse it suits perfectly to my needs. Thnaks in advance!

Best regards,
Stelian.

2
stelian
Re: White page and only the message on redirection page. HOW?
  • 2006/1/26 16:25

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


PLEASE, HELP! Nobody knows? It can't be so hard.

Login

Donat-O-Meter

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