Quote:
Originally Posted by Michael_Morris
Try this. In PHPINCLUDE_START place this in by itself
Later on you can add forums to the list of adless forums by adding to the second conditional.
Meanwhile, back in whatever template is getting this ad simply put
HTML Code:
<if conditional="$display_ad">ad</if>
Footnote, the f=# you see on the top bar isn't a variable, but it is contained in one; $_GET. You shouldn't go calling $_GET inside your templates though - it might leave your setup vulnerable to certain hacks.
|
Thanks for the help. I see that I might have been closer if I had remembered to put the $ in front of my variable names. I like your solution better. I did go ahead and make my PHPINCLUDE_START code like this:
PHP Code:
$display_ad = FALSE;
if (THIS_SCRIPT == 'showthread' || THIS_SCRIPT == 'forumdisplay')
{
if ($foruminfo['forumid']<>'6' AND $foruminfo['forumid']<>'7')
{$display_ad = true;}
}
The way you had it still had the ads showing on other pages, like during a reply or new thread.
On a side note - You had me pulling my hair out trying to get your code to work. Looked like it should have worked great. Problem was that the ad was showing on EVERY page not even all forum diplay pages. Turns out that in you code above you put "conditionAL". That made it look like $display_ad was true every time.

Once I cleared out the AL it worked great. Thanks again.
basil