1
mauriciolima
Function redirect_header

Someone knows how to remove the redirection messages in XOOPS by changing the function "redirect_header" in the file /include/functions.php? That way you don't need to make hacks in every module to make it function...

2
sbkiller
Re: Function redirect_header
  • 2004/12/22 3:17

  • sbkiller

  • Just can't stay away

  • Posts: 461

  • Since: 2004/6/9 2


Try this:

function redirect_header($url$time 3$message ''$addredirect true)


to:

function redirect_header($url$time 0$message ''$addredirect false)

3
mauriciolima
Re: Function redirect_header

I tried it already, but not functioned here. Someone know another way?

4
Dave_L
Re: Function redirect_header
  • 2004/12/22 5:55

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


There's a recent existing topic about this:https://xoops.org/modules/newbb/viewtopic.php?topic_id=28346

5
mauriciolima
Re: Function redirect_header

Hack this function, replace functions for this:

function redirect_header($url$time 3$message ''$addredirect true)
{
    global 
$xoopsConfig$xoopsRequestUri;
    if (!
defined('XOOPS_CPFUNC_LOADED')) {
        
header("Location: $url");
        exit();
    } else {
        
$url preg_replace("/&/i"'&'htmlspecialchars($urlENT_QUOTES));
        echo 
'
        <html>
        <head>
        <title>'
.$xoopsConfig['sitename'].'</title>
        <meta http-equiv="Content-Type" content="text/html; charset='
._CHARSET.'" />
        <meta http-equiv="Refresh" content="'
.$time.'; url='.$url.'" />
        <style type="text/css">
                body {background-color : #fcfcfc; font-size: 12px; font-family: Trebuchet MS,Verdana, Arial, Helvetica, sans-serif; margin: 0px;}
                .redirect {width: 70%; margin: 110px; text-align: center; padding: 15px; border: #e0e0e0 1px solid; color: #666666; background-color: #f6f6f6;}
                .redirect a:link {color: #666666; text-decoration: none; font-weight: bold;}
                .redirect a:visited {color: #666666; text-decoration: none; font-weight: bold;}
                .redirect a:hover {color: #999999; text-decoration: underline; font-weight: bold;}
        </style>
        </head>
        <body>
        <div align="center">
        <div class="redirect">
          <span style="font-size: 16px; font-weight: bold;">'
.$message.'</span>
          <hr style="height: 3px; border: 3px #E18A00 solid; width: 95%;" />
          <p>'
.sprintf(_IFNOTRELOAD$url).'</p>
        </div>
        </div>
        </body>
        </html>'
;
    }
    exit();
}

Login

Who's Online

245 user(s) are online (160 user(s) are browsing Support Forums)


Members: 0


Guests: 245


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