jquery slider
2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 31, 2011 (RSS)
I'm trying to use this jquery slideshow on a page I'm currently working on. The user wants to have the ability to add pictures w/ text on the overlay of the image. So in CMSBuilder I'm thinking that I will have to have an upload image field and a title field, where they can add the text they want to go along w/ the image. Here's the link...
http://www.serie3.info/s3slider/
Here's the HMTL
<div id="s3slider">
<ul id="s3sliderContent">
<li class="s3sliderImage">
<img src="#" />
<span>Your text comes here</span>
</li>
<li class="s3sliderImage">
<img src="#" />
<span>Your text comes here</span>
</li>
<div class="clear s3sliderImage"></div>
</ul>
</div>
Does anyone know how to get this to work w/ CMSBuilder? Any help would be appreciated.
http://www.serie3.info/s3slider/
Here's the HMTL
<div id="s3slider">
<ul id="s3sliderContent">
<li class="s3sliderImage">
<img src="#" />
<span>Your text comes here</span>
</li>
<li class="s3sliderImage">
<img src="#" />
<span>Your text comes here</span>
</li>
<div class="clear s3sliderImage"></div>
</ul>
</div>
Does anyone know how to get this to work w/ CMSBuilder? Any help would be appreciated.
John C. Morris
Interdimensional Designs
www.covdesigns.com
Interdimensional Designs
www.covdesigns.com
Re: [blind2uriz] jquery slider
Hi John,
You'll need a foreach loop for your images and in that loop why not use one of the info fields in the image upload for the text?
They are labeled "title" and "caption" by default in the upload field's "advanced options". Just delete the word "caption" and only a "title" will be asked for on upload. You can change the word "Title" to anything tat makes more sense for your label.
The code might look something like this:
At the top of your page:
and in the body for the s3slider:
Hope that works for you,
Jerry Kornbluth
You'll need a foreach loop for your images and in that loop why not use one of the info fields in the image upload for the text?
They are labeled "title" and "caption" by default in the upload field's "advanced options". Just delete the word "caption" and only a "title" will be asked for on upload. You can change the word "Title" to anything tat makes more sense for your label.
The code might look something like this:
At the top of your page:
<?php
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/server_path_from_code_generator/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records
list($your_slides_tableRecords, $your_slides_tableMetaData) = getRecords(array(
'tableName' => 'your_slides_table',
));
?>
and in the body for the s3slider:
<div id="s3slider">
<ul id="s3sliderContent">
<?php foreach ($your_slides_tableRecords as $record): ?>
<li class="s3sliderImage">
<img src="<?php echo $upload['urlPath'] ?>" />
<span><?php echo $upload['info1'] ?></span>
</li>
<?php endforeach ?>
<div class="clear s3sliderImage"></div>
</ul>
</div>
Hope that works for you,
Jerry Kornbluth
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php