Ok, the pnbanner display function is fine and dandy. You have it turned on and some banners set up, it shows em. If not, they don't show.
I'm working on a theme where I have a whole new table displayed if there are banners, not just an empty spot that can be filled. I want to incorporate some logic into the theme, where I can check if the banners exist in the first place, and based on that, decide whether or not to load the tables and run pnBannerDisplay.
something along the lines of "if there are banners, then show this code, run pnBannerdisplay. else, just ignore the whole damn thing and move on"
What variable(s) and value(s) should I check for in order to accomplish this?[/code]
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- nestormateo responded to »Fillters in Clip« 06:33 AM
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 03:19 AM
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
- mesteele101 responded to »Problem in Database Connection« 21. May
- Herr.Vorragend responded to »Clip Documentation and Doubt« 19. May
- mazdev responded to »zikula 1.3.3. and IE9« 19. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
PnBannerDisplay and Theme Logic
-
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
Hi there,
This is only theory, but you can give it a try (you will need to make sure there are no banners with an ID type <= 1).
Code
if (pnConfigGetVar('banners') <= 1) {
//code
} else {
//code
}
Hope this helps
Kindest regards
Lobos
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
- Rank: Senior
- Registered: Sep 22, 2003
- Last visit: Oct 21, 2009
- Posts: 2774
Actually, I think that will just check to see if you have banner's configured on your website, not if there is a banner to be displayed (some banners might expire in certain zones, etc...).
You could try something like:
Code
Where "x" in the function call is the number of the zone for the banner in question (or blank if no zones).
--
Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods
Cape Cod Travel Info... -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
nate_02631
Actually, I think that will just check to see if you have banner's configured on your website, not if there is a banner to be displayed (some banners might expire in certain zones, etc...).
You could try something like:
Code
Where "x" in the function call is the number of the zone for the banner in question (or blank if no zones).
Yes this looks more promising, Thanks Nate!
Regards
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment
- Moderated by:
- Support
