CMS IMAGES

6 posts by 2 authors in: Forums > CMS Builder
Last Post: May 2, 2008   (RSS)

By jaurday - April 25, 2008

Is there a way to output the filepath for images so that I can plug them into a dhtml script that defines photos in a slideshow. Is it as simple as moving the right fields around from the viewerpage.php into the script's definitions?

//define images.

photos[0]="photo1.jpg"
photos[1]="photo2.jpg"
photos[2]="photo3.jpg"

The full script I would like to use with the images from my viewerpage can be found here:

http://www.dynamicdrive.com/dynamicindex14/dhtmlslide.htm

Re: [jaurday] CMS IMAGES

By Dave - April 25, 2008

Hi jaurday, welcome to the forum! :)

Yes, you're right. It's just as simple as moving the fields around. You'll see some code like this that displays the images:

<?php foreach (getUploads(...) as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>

<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>

<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

<?php endif ?>
<?php endforeach; ?>


Just replace that with this:

<?php foreach (getUploads(...) as $upload): ?>
photos.push("<?php echo $upload['urlPath'] ?>");
<?php endforeach; ?>


And that will produce code like this:

photos.push("/full/path/to/photo1.jpg");
photos.push("/full/path/to/photo2.jpg");
photos.push("/full/path/to/photo3.jpg");

I just used push instead of [number] to add the photos to the javascript array. It does the same thing.

Let me know if that works for you or if you need any more help with it! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] CMS IMAGES

By jaurday - April 25, 2008

It works like a charm, thank you.

Re: [Dave] CMS IMAGES

By jaurday - April 30, 2008

How can I get this script to work transitionless, meaning no effet between images. Here is the url:

http://www.dynamicdrive.com/dynamicindex14/dhtmlslide.htm[/#333366]

It's a "hybridized" question, I know it's not your arena but I thought maybe you could help since I was able to use it with my cms produced images (yes!).

Re: [jaurday] CMS IMAGES

By Dave - May 1, 2008 - edited: May 1, 2008

I haven't used that script, so this is just a educated guess, but I'd try modifying the transition functions to return right away without doing anything. Find these lines and add the red text:



function applyeffect(){ return;
...

function playeffect(){ return;
...


Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com