3
The banner URL looks like this:
https://xoops.org/banners.php?op=click&bid=22The banners.php file, click operation invokes the clickbanner($bid) function. That function looks like this:
function clickbanner($bid)
{
global $xoopsDB;
$bid = intval($bid);
if ($bid > 0) {
if (xoops_refcheck()) {
if ($bresult = $xoopsDB->query("select clickurl from ".$xoopsDB->prefix("banner")." where bid=$bid")) {
list($clickurl) = $xoopsDB->fetchRow($bresult);
$xoopsDB->queryF("update ".$xoopsDB->prefix("banner")." set clicks=clicks+1 where bid=$bid");
header ('Location: '.$clickurl);
}
}
}
exit();
}
As you can see, the browser is pointed to the new location using the
header ('Location: '.$clickurl); code. So, you'll have to change that, or look for a way to set the header location to use the same browser window as it is currently using.
Now I've found this tidbit of info, but it is for apache only:
Quote:
Issuing a Location: header with the Header() function tells the browser where to go. If you give an absolute location (e.g. http://www.whatever.com/gohereinstead/), Apache issues a 302 redirect. I suppose this creates a new window? -herko
However, if you use a relative location (e.g. /gohereinstead/), Apache politely returns a 200 (normal response) and serves up the content at the redirected
location. As far as the browser knows, it's getting what was at the original location - with no additional request to the new location.
I hope this helps.
Herko