Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Banner CMS

 

 


Berkowitz
User

Feb 19, 2008, 7:46 AM

Post #1 of 14 (1078 views)
Shortcut
Banner CMS Can't Post

Hi,

My page contains banners which I use to put ads in. What i want to do is to be able to put my banner pic in my page through CMS but I also need to be able to position them in different div tags on different pages. Because my ads will be different form page to page. Now i've done it with multiple fiels in my content. ex: AD1 :Banner1 (pic), Banner2(empty), Banner3(empty) ; AD2:
Banner1 (empty), Banner2(pic), Banner3(empty) ; ...


so my code could be


Code
  <?php echo $record['Banner1'] ?>  
<?php echo $record['Banner2'] ?>
<?php echo $record['Banner3'] ?> (but for my first page I don't need banner 3, so a delete it in my code.)



And now I have to leave out the one's I don't need or don't put anything in them in my CSM but what i really want is to have only one
<?php echo $record['Banner'] ?>
so i mean:

ad1: Banner
ad2: Banner
ad3: Banner

But all three bannerfields contain different pic's. So my PageViewer reads


Code
 <?php echo $record['Banner'] ?>

i want to become that in my html i can do


Code
  <div id="ad1"><?php echo $record['Banner'] ?></div>  
<div id="ad2"><?php echo $record['Banner'] ?></div>
...

but every Banner should contain another pic instead of showing the same one.
Do you know what i mean?

Thans in advance like always
Berkowitz


(This post was edited by Berkowitz on Feb 19, 2008, 7:48 AM)


Dave
Staff / Moderator


Feb 19, 2008, 9:05 AM

Post #2 of 14 (1072 views)
Shortcut
Re: [Berkowitz] Banner CMS [In reply to] Can't Post

So, you have multiple banner fields. And some of the fields are filled out and some are blank. And you want a way to display all the banner fields that are not blank with a single variables and have them wrapped in div tags?

Is that right? If not give me some more detail and I'll keep trying! :)

Some questions: Are they text fields or upload fields? And are they extra fields in your content (eg: news, articles) or do you have a separate section editor for banners?

Dave Edis - Senior Developer
interactivetools.com


Berkowitz
User

Feb 19, 2008, 10:41 AM

Post #3 of 14 (1063 views)
Shortcut
Re: [Dave] Banner CMS [In reply to] Can't Post

To answer your questions. It are wysiwyg fields. And i have an seperate section where al my banners are.

i've put screenshots as attachment.

As you can see in my content.jpg attachment I just want to use 1 field for all my banners, but in every ad there's another pic.
Do you get what want? :). If not just keep asking the information you can use :).

Again thanks for all you're trouble your doing.


(This post was edited by Berkowitz on Feb 19, 2008, 11:02 AM)
Attachments: ads.jpg (87.7 KB)
  Content.jpg (221 KB)


Dave
Staff / Moderator


Feb 19, 2008, 1:04 PM

Post #4 of 14 (1052 views)
Shortcut
Re: [Berkowitz] Banner CMS [In reply to] Can't Post

Ok, I'm still not sure I understand completely. What about this, where it shows which ever banner is first defined?


Code
<?php  
if ($record['Banner1']) { echo $record['Banner1']; }
else if ($record['Banner2']) { echo $record['Banner2']; }
else if ($record['Banner3']) { echo $record['Banner3']; }
else { echo "No banner available"; }
?>


That way you could use that code and it will always show the first banner that is available in one of those 3 fields.

Is that guess closer?

Dave Edis - Senior Developer
interactivetools.com


Berkowitz
User

Feb 19, 2008, 1:17 PM

Post #5 of 14 (1049 views)
Shortcut
Re: [Dave] Banner CMS [In reply to] Can't Post

no what i want is to replace banner1, banner2, ... by just Banner.

So in my ads I wanna have
Title
Banner
Content

but in every ad, banner is another pic. So now if I use my php code from de php generator


Code
<?php echo $record['banner'] ?>


It would show my banners one by one underneath or next to each other, right?

But what I want is to position every banner in a div tag. Because I have 2 or more ads on a page.


Dave
Staff / Moderator


Feb 19, 2008, 2:17 PM

Post #6 of 14 (1043 views)
Shortcut
Re: [Berkowitz] Banner CMS [In reply to] Can't Post

Ok, I'm still not totally clear. Maybe if we could break it down into smaller steps.

So you want:

1) All banners printed out (except blank ones)
2) Banners printer beside each other in the HTML
3) Banners to have divs around them
4) Banners to all be in one variable

Is that right?

Here's some code that puts all the banners in one variable with divs around them:


Code
<?php 
$banners = "";
if ($record['Banner1']) { $banners .= "<div id='ad1'>{$record['Banner1']}</div>"; }
if ($record['Banner2']) { $banners .= "<div id='ad2'>{$record['Banner2']}</div>"; }
if ($record['Banner3']) { $banners .= "<div id='ad3'>{$record['Banner3']}</div>"; }
?>


Then you could show all banners like this:


Code
<?php echo $banners; ?>


Am I any closer? I'm really trying here... :)

Dave Edis - Senior Developer
interactivetools.com


Berkowitz
User

Feb 19, 2008, 2:40 PM

Post #7 of 14 (1041 views)
Shortcut
Re: [Dave] Banner CMS [In reply to] Can't Post

no sorry that's not what i mean... :).

those blank fields are erased. I don't what to have blank fields.
the only fiels I have are
Title
Banner
Content

that's how it is made (see attachement).

But in every ad, the pic in banner is different.
there are 2 or more ads i want to show on my page's.

so, in every ad Bannerfield is different.
<?php $record['banner'] ?> this is what i want in a div.

but when i use this he just shows every bannerfield in every div i put my code in. But I just want 1 bannerfield / div tag.

So i need some kind of recognition of which ad he has to show the bannerfield, I think.

sorry for my difficult question ... :) but thanks in advance.
Berkowitz
Attachments: Content.jpg (166 KB)


Dave
Staff / Moderator


Feb 20, 2008, 9:49 AM

Post #8 of 14 (1027 views)
Shortcut
Re: [Berkowitz] Banner CMS [In reply to] Can't Post

Ok, I think I've got it. You let me know.

You have a "Section Editor" for all your banners and a different section editor for your articles or content. Is that right?

You want to show some random banners from your banner section on your content page.

If that's right, you'd do it with a list viewer and limit the perpage to 3 (or however many banners you wanted) and set the 'where' to match the type of banner you wanted.

Another way, say you had 3 different types of banners (top banners, side banners, and bottom banners). You would use 3 list viewers. One to load each type of banner, and limit it to perpage 1 to only return 1 of each type.

Does that make sense?

Dave Edis - Senior Developer
interactivetools.com


Berkowitz
User

Feb 20, 2008, 12:10 PM

Post #9 of 14 (1015 views)
Shortcut
Re: [Dave] Banner CMS [In reply to] Can't Post

I have a section editor for my Ads. In every ad are both my banner and my content.

With a ListViewer I want to show my banners ($record['banner']) in different div tags.

so $record['banner'] contains in every ad a different pic. When i do ListView now he just show every banner of every ad. but I want to be able to filter out so i can show one specific banner in one specific div tag.


Dave
Staff / Moderator


Feb 21, 2008, 1:15 PM

Post #10 of 14 (961 views)
Shortcut
Re: [Berkowitz] Banner CMS [In reply to] Can't Post

Ok, how do you want to filter the banner ads? Do you have another field? What is the rule for when a certain banner should go in a certain div tag?

Dave Edis - Senior Developer
interactivetools.com


Berkowitz
User

Feb 22, 2008, 12:56 AM

Post #11 of 14 (952 views)
Shortcut
Re: [Dave] Banner CMS [In reply to] Can't Post

People have to decide in the section editor from 2 listboxes. They choose for which page they're adding an ad and what position [left or right"] (Is this a good method or do you know/suggest something else?)

http://www.1id.be/test.php

it's about the div tags at the bottom where you see the 2pics. ["Starter" and the long one with the flowers on the right]

The meaning of all this is that people should be able to change the pic's without me having to change anything of code. Of course I'm setting restrictions for the width and height in my section editors Smile

Thanks for all your trouble concerning this thread Smile.
Berkowitz


Dave
Staff / Moderator


Feb 22, 2008, 8:52 AM

Post #12 of 14 (943 views)
Shortcut
Re: [Berkowitz] Banner CMS [In reply to] Can't Post

So in the banner editor, there is a field for "position" and a field for "page". Right? Perhaps also a field for "banner size" also? And you want to only show a banner that matches each of the: page, position, and size?

I guess "size" and "position" are the same since left is always a different size from right.

If that's close (fingers crossed) what you're going to need is a separate list viewer code for each banner. And in the 'where' option you'd set tell it to only load banners the match the page number (or name) and position. So you'd have something like:

$options['where'] = "pageNum = {$record['num']} AND position = 'left'"
$options['perPage'] = 1;
$options['pageNum'] = 1;

Another way to do it would be to have 3 list pulldowns in the page section. One for each banner type. And have those load their values from the banner section. You could either have 3 different banner sections (left banners, right banners, etc) and have each field load the banner num and name for that.

Then you'd have 3 fields like this for your record:

$record['banner1Num']
$record['banner2Num']
$record['banner3Num']

Then you could use some "page viewer" code to load just that banner.

Hope that makes sense. If you want me to login and take a look at your CMS setup you can email me login details to dave@interactivetools.com (don't post login details to forum).

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com


Berkowitz
User

Feb 26, 2008, 7:59 AM

Post #13 of 14 (891 views)
Shortcut
Re: [Dave] Banner CMS [In reply to] Can't Post

I'm pleased to inform you that now it works the way i want it to work Wink. Now it seems so simple (like all solutions when you figured it out Tongue)

Many thanks for all your trouble and your help. Truly a great piece of software en a super support squad.

Thank you
Berkowitz


Dave
Staff / Moderator


Feb 26, 2008, 8:51 AM

Post #14 of 14 (885 views)
Shortcut
Re: [Berkowitz] Banner CMS [In reply to] Can't Post

I'm _so_ glad to hear that! Thanks for posting back with an update. :)

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4