 |

jaurday
New User
Apr 25, 2008, 3:58 PM
Post #1 of 6
(464 views)
Shortcut
|
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
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 25, 2008, 4:29 PM
Post #2 of 6
(463 views)
Shortcut
|
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
|
|
|  |
 |

jaurday
New User
Apr 25, 2008, 5:54 PM
Post #3 of 6
(460 views)
Shortcut
|
It works like a charm, thank you.
|
|
|  |
 |

jaurday
New User
Apr 30, 2008, 3:45 PM
Post #4 of 6
(397 views)
Shortcut
|
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 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!).
|
|
|  |
 |

Dave
Staff
/ Moderator

May 1, 2008, 10:25 AM
Post #5 of 6
(358 views)
Shortcut
|
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
(This post was edited by Dave on May 1, 2008, 10:25 AM)
|
|
|  |
 |

jaurday
New User
May 2, 2008, 9:45 PM
Post #6 of 6
(300 views)
Shortcut
|
Thanks, decided to comment out those lines and so far so good, if anything arises, I'll try the nifty return; thing. Very stoked that it works with cms builder.
|
|
|  |
|