New Item
6 posts by 3 authors in: Forums > CMS Builder
Last Post: April 21, 2008 (RSS)
By dunlap - April 17, 2008
Just a thought
Re: [dunlap] New Item
By Dave - April 17, 2008
You could definitely do that with CMS Builder. How many images did you want to have?
interactivetools.com
Re: [Dave] New Item
By dunlap - April 17, 2008
I would probably add no more than 10 ads to the rotation.
Jim
Re: [dunlap] New Item
By Dave - April 17, 2008
If that's the case I'm thinking a "single page" section editor with just a upload field, and then create a "page viewer" that shows all the images.
Once you get that far (do that first) you'll want some code like this to randomize the images and show just the first one:
<?php
$uploads = getUploads(...your settings here...);
shuffle($uploads); // randomize
foreach ($uploads as $upload): ?>
?>
<img src="<?php echo $upload['thumbUrlPath'] ?>"
width="<?php echo $upload['thumbWidth'] ?>"
height="<?php echo $upload['thumbHeight'] ?>"
alt="" /><br/>
<?php break; ?>
<?php endforeach ?>
Hope that helps. Let me know if you get stuck along the way.
interactivetools.com
Re: [Dave] New Item
By grauchut - April 18, 2008 - edited: April 18, 2008
http://www.colonialparkfire.org/
Thanks Glenn
Re: [grauchut] New Item
By Dave - April 21, 2008
http://www.jeroenwijering.com/?item=jw_image_rotator
The first step is to figure out how to get it working with regular HTML. Once you get it working with regular HTML, then you can get CMS Builder to automatically output the same type of HTML so it's all dynamic.
Hope that helps!
interactivetools.com