Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Demolitioncrew] How can I do an "if" statement with AdvertPRO?

Quote Reply
Re: [Demolitioncrew] How can I do an "if" statement with AdvertPRO? In reply to
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
Subject Author Views Date
Thread How can I do an "if" statement with AdvertPRO? Demolitioncrew 2790 Oct 7, 2002, 5:41 PM
Thread Re: [Demolitioncrew] How can I do an "if" statement with AdvertPRO?
Andy 2713 Oct 8, 2002, 1:31 AM
Thread Re: [Andy] How can I do an "if" statement with AdvertPRO?
Demolitioncrew 2723 Oct 8, 2002, 6:35 AM
Thread Re: [Demolitioncrew] How can I do an "if" statement with AdvertPRO?
Andy 2732 Oct 8, 2002, 6:41 AM
Thread Re: [Andy] How can I do an "if" statement with AdvertPRO?
Demolitioncrew 2699 Oct 8, 2002, 6:44 AM
Thread Re: [Demolitioncrew] How can I do an "if" statement with AdvertPRO?
qango 2720 Oct 8, 2002, 8:39 AM
Thread Re: [qango] How can I do an "if" statement with AdvertPRO?
Demolitioncrew 2709 Oct 9, 2002, 8:23 PM
Post Re: [Demolitioncrew] How can I do an "if" statement with AdvertPRO?
qango 2680 Oct 10, 2002, 1:11 AM