51
stelian
Re: Remove redirection within Xoops
  • 2006/1/27 13:45

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


Hi all.

I want my redirection page to looks like in XOOPS 2.0.13 (a plain page and the message) without the header and footer like in XOOPS 2.2.3. I am using XOOPS 2.2.3 . Please help me.

How can i change this code?

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($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);
}


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'] == && $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($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 don't think it's something verry complicated, but i can't figure it out what could it be.


Best regards,
Stelian.



52
stelian
Re: CBB date display
  • 2006/1/27 0:56

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


i have the same problem, but only when i switch to romanian language. I used newbb and update it to cbb. Can someone help us? please



53
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.



54
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($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);
}


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'] == && $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($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 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.



55
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.



56
stelian
How can I remove header and footer from Redirecting page?
  • 2006/1/19 11:15

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


How can I remove header and footer from the page within XOOPS that says :"If the page does not automatically reload, please click here" ?

This is on XOOPS 2.2.3 and it is not present in XOOPS 2.0.13.
Do i have to downgrade?

I have to remove this footer becouse in there i have 5 .gif linked to web directories and it takes up to 10 seconds until this page load, and only after that the redirection takes place.

Please help me with this and excuse my english.

Best regards,
Stelian.

::Topic locked - Topic exists here Please 'bump' an existing topic - Bluenova::



57
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.



58
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.



59
stelian
Re: sitemap google
  • 2006/1/14 23:49

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


mine is:

XML Parsing Error: xml declaration not at start of external entity
Location:http://buzaulive.ro/xml_google.php
Line Number 4, Column 1:<?xml version="1.0" encoding="UTF-8"?>
^

It appeas only with Firefox. If i select "<?xml version="1.0" encoding="UTF-8"?>
^" and i view source i get this: <sourcetext xmlns="http://www.mozilla.org/newlayout/xml/parsererror.xml"><?xml version="1.0" encoding="UTF-8"?>
^</sourcetext>

In IE everything is ok.

Is it ok to rename xml_google.com from the root folder?



60
stelian
Re: MyLatinSoulmate - A new latin dating site
  • 2006/1/12 0:08

  • stelian

  • Just popping in

  • Posts: 87

  • Since: 2005/12/17


verry nice, but it is not working under XOOPS 2.2.3




TopTop
« 1 ... 3 4 5 (6) 7 »



Login

Who's Online

146 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 146


more...

Donat-O-Meter

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

Latest GitHub Commits