I propose that the slideshow folder (sites/all/themes/danland/images/slideshow) be pointed to for the slideshow, and to not use specific file names. The benefit would be that page.tpl.php would not have to be edited, and so when updating the theme, nothing would be overridden. It would also be very easy to just ftp files to the slideshow folder and be done.

Does anyone else think this would be a nice feature? If so, I will figure out how to do it.

Comments

KirstenLangholz’s picture

Hello Branjawn,

I am absolutely with you, especially as I am planning to change those pictures on a regular basis. If you could figure it out I would really appreciate your commitment to this issue.

Kirsten

danpros’s picture

Hi,

That is a great idea :) if the solutions is great I will adding it in next release.

Dan

ebenfarnworth’s picture

Version: 7.x-1.0 » 6.x-2.1

Like this

Branjawn’s picture

Version: 6.x-2.1 » 7.x-1.0

Why did you change the version?

Brainwrap’s picture

Yep, I love the theme, but it'd be very nice to be able to swap out the home page slideshow images, display order, etc. via a simple web-based interface instead of by having to manually upload them and changing the raw page.tpl.php code.

Branjawn’s picture

Well, here is what i have so far. It works by itself, but not when I try to integrate it.

<?php
$filePath = $directory . "/images/slideshows";
$dir = opendir($filePath);
while ($file = readdir($dir)) {	  
	  echo "<img src=\"$directory . $file\" width=\"950\" height=\"355\" >\n";             
  }
?>
tar_gawan’s picture

Please try this to automatically get all files from the slideshows directory:

<div class="slideshow">
<?php
$myDir = $directory . "/images/slideshows/";
  if ($myReadDir = opendir($myDir)) {
    while (false !== ($myFileName = readdir($myReadDir))) {
      if ($myFileName != "." && $myFileName != "..") {
	echo "<img src='" . $myDir . $myFileName. "' width='950' height='355' alt='" . $myFileName."'/>";
      }
    }
    closedir($myReadDir);
  }
?>
</div>