Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [Demolitioncrew] How can I do an "if" statement with AdvertPRO?: Edit Log

Here is the list of edits for this post
Re: [Demolitioncrew] How can I do an "if" statement with AdvertPRO?
I don't use the plugin myself, but looking at the line in your previous post I assume a region is assigned by the plugin when LSQL makes the call for a banner.
Code:
<%Plugins::AdvertPRO::display_category_region('Which_Region')%>
What you'd do is setup a new default region within AdvertPro and set the 'panic' banner to a 1x1 pixel image, maybe call it nobanner or something.

When LSQL calls the plugin have it check the value of Which_Region and if there is no value push the default region name into it, i.e.; nobanner

Then it will either display a banner (found a value in Which_Region), or else the default nobanner region would be called and display the 1x1 pixel banner.

I'm also assuming you'd need to change the plugin a little to 'check' and insert the default name. Maybe something along the lines of:
Code:
if $Which_Region eq '' {$Which_Region = "nobanner"};
... but since I don't have the plugin I'm not sure what the variables are called or where you'd put the 'check'.

Does this make any sense?

I realise that you'd really wanted a method of not using the plugin if no region was assigned, but this way you'd have the advantage of being able to update your 'default' whenever you wanted, maybe you might decide to run some PPC ads in the default spaces later and with this solution you'd just create a new banner to run in the nobanner region Smile

All the best
Shaun

Last edited by:

qango: Oct 10, 2002, 1:16 AM

Edit Log: