have slideshow block just spit out images?

Permalink
i'm trying to make slideshow just populate a div in my custom view with images based on the fileset the user selected to use... possible? just needs to be very basic like this:

<div class="slideshow">
<img src="/files/01.jpg" width="200" height="200" alt="">
<img src="/files/02.jpg" width="200" height="200" alt="">
<img src="/files/03.jpg" width="200" height="200" alt="">
</div>

the filenames, widths, and heights being whatever they are...

 
jhart replied on at Permalink Reply
got most of it... just having trouble grabbing the width...

<div class="slideshow"> 
   <?php  
   foreach($images as $imgInfo) {
      $f = File::getByID($imgInfo['fID']);
      $fp = new Permissions($f);
      if ($fp->canRead()) {
   ?>
   <img src="<?php echo $f->getRelativePath()?>" width="<?php echo intval($imgInfo['imgWidth'])?>" height="<?php echo intval($imgInfo['imgHeight'])?>" alt="" />
   <?php } 
   }
   ?>
</div>
agedman replied on at Permalink Reply
agedman
It looks like the array $images[] contains an associative array for each image that you're retrieving into the variable $imgInfo[]. But it's not clear to me from your snippet how the values for the keys 'imgWidth' and 'imgHeight' are getting set.

Anyway, to get the image dimensions you should be able to do something like this:
$fullPath = $f->getPath();
$size = @getimagesize($fullPath);