View Single Post
  #5  
Old 11-20-2005, 08:01 AM
gldtn gldtn is offline
Senior Member
 
Join Date: Oct 2005
Location: Massachusetts, USA
Posts: 122
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder 
Default

The only way I got gab to redirect correctly under CMPS(outside from forum dir.) to work was by adding a variable to gab_class_core.php:

Under this code:
Code:
$sql=" SELECT ad.id,ad.url, ad.img imgpath,c.track_views, c.track_hits, ad.max_views, ad.width, ad.height, ad.views, ad.template, ad.frequency,
	                                c.template cat_template
	                                FROM " . TABLE_PREFIX . "GAB_ads ad
	                                INNER JOIN " . TABLE_PREFIX . "GAB_cats c ON ad.catid=c.id
	                                WHERE ad.isactive = 1 AND ((ad.startdate<1) or (ad.startdate<" . TIMENOW . ")) and ((ad.enddate<1) or (ad.enddate>" . TIMENOW . "))
	                                $forumsx $adtype
	                                AND c.scripts like '%," . $scriptname . ",%' $limitids ORDER BY RAND() LIMIT $bannercount ";
	                            //echo($sql); exit;
I Added:
Code:
$redirectpg="/forum/";
And Changed:
Code:
$gab_urls.="'./" . $this->settings['redirectpage'] . "?id=$ad[id]&amp;$redirect_url',";
To this:
Code:
$gab_urls.="'$redirectpg" . $this->settings['redirectpage'] . "?id=$ad[id]&amp;$redirect_url',";
These changes were necessary in order to call gab_redirect.php correctly due to the ./ dir you set in the code and users were unable to set where gab_redirect.php resides on the server(full dir).

Makes sense?

Perhaps you can add this as an default?

Thanks
__________________
http://www.braziltourism.org/

Last edited by gldtn; 11-20-2005 at 08:08 AM..
Reply With Quote