Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Thanked 0 Times in 0 Posts

    Help with slide show .ph

    I am not a coder but just try to use cut & paste code
    I am trying to use code from Dynamic PHP Picture Viewer (version 1.0),


    The code works But I would like to modify as follows:
    1..Resize the photos so all have the same width (height can float)
    2..Auto show rather than click on list,... or mouse click to advance to next photo
    3..Position the phpto in the same location each time ie center of screen

    This link show what is working now: http://www.knottydog.com/photo_table.htm

    Application is showing 10,000+ photos in our web site that are in various directories. I want to make a index to the various directories.

    2nd problem is the .php code is required to be in each directory. That is fine BUT I need to change the location of where it puts the echo so that my sub directories are found. If the .php is NOT in the same root no pictures are returned.

    I assume changing one of the paths in the .php text below will point to where the java code is but I do not know how to do that.

    Thanks for any help

    Larry Hemmerich

    this is the .php code added to each dir where the photos exist..

    Header("content-type: application/x-javascript");
    $locationstring="http://" . $_SERVER['HTTP_HOST'].$pathstring['dirname'] . "/";

    function returnimages($dirname=".") {
    $files = array();
    if($handle = opendir($dirname)) {
    while(false !== ($file = readdir($handle))){
    if(eregi($pattern, $file)){
    echo 'picsarray[' . $curimage .']="' . $file . '";';


    echo 'var locationstring="' . $locationstring . '";';
    echo 'var picsarray=new Array();';
    Last edited by lhemmerich; 02-18-2007 at 09:59 PM. Reason: spelling


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts