Results 1 to 6 of 6

Thread: photos in a folder displayed in a page

  1. #1
    Join Date
    Jul 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default photos in a folder displayed in a page

    I just want a script that takes pictures from a folder on the server, resizes them to thumbnails, displays the thumbnails on a page, and obviously makes each thumbnail a link to a full-res photo. I want this so my client can just upload her photos to this folder and keep her photos up-to-date. any extras such as photo titles included under the thumbnails could be helpful but are not necessary

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,009
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    This Dynamic Drive script sounds like it might work well for your client: http://www.dynamicdrive.com/dynamici...photoalbum.htm - it automatically populates the gallery from all images in a folder, so as and when your client uploads more images, they will automatically be included without any extra coding intervention.

    I would suggest making the thumbnails square (same height and width dimensions) to account for landscape and portrait ratios.

    Hope that helps

    Beverley

  3. #3
    Join Date
    Jul 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    can i get the script to crop/resize instead of just resize? I would like to prevent image distortion from skewing the aspect ratio.

  4. #4
    Join Date
    Jul 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default gettin there....

    Okay the script is working almost flawlessly on my site now. I am having one problem. It's coming up with a scrollbar and I'm trying to avoid that. I've done a lot of extra work on this website just to make sure there are no scrollbars. If anyone wants to take a look at the source and let me know if there's anything I can do here is the link:

    http://www.jelizabethphotos.com

    NOTE: when the Twitter login comes up, just hit cancel. The client has her twitter set to only allow who follows her to view her updates. I'm trying to get her to get another twitter for this site or just suck it up and allow everyone to see her twits like everyone else in the world. The rest of the page will load after you hit cancel and the "portfolio" is the page with the gallery script. Thank you for your help forum users!!!

  5. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 517 Times in 503 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by bryantewell View Post
    Okay the script is working almost flawlessly on my site now. I am having one problem. It's coming up with a scrollbar and I'm trying to avoid that...
    you mean the vertical scrollbars? the only way to solve that is to make the page shorter. You have "var dimension" set to 4x15; adjust it to have fewer rows. However, when I look at the page, it's the twitter messages that make the page too tall for my window.
    Quote Originally Posted by bryantewell View Post
    just...allow everyone to see her twits like everyone else in the world.
    hmm.. sounds wrong..

  6. #6
    Join Date
    Oct 2009
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I've been using this script for several years. I change the file name of the images to 1.jpg, 2.jpg..etc. Is there a way I can change this script to use wildcards to read the files in a specific directory? Also, I change the variable - NUMBER_OF_IMAGES to reflect how many images are in the directory. I know this can be done in PHP, but I would like to see if it can be done with what I have so far.

    Thanks for your help.

    <script language="JavaScript"><!--
    which_image_loaded = 0;
    NUMBER_OF_IMAGES = 8;

    ImageNames = new Array;
    ImageNames.length = NUMBER_OF_IMAGES - 1;

    for (counter = 0; counter < NUMBER_OF_IMAGES; counter++){
    file_number = counter + 1;
    filename = (file_number + ".jpg");
    ImageNames[counter] = filename;
    }

    function changeImage(direction) {
    which_image_loaded += direction;
    if (which_image_loaded < 0)
    which_image_loaded = NUMBER_OF_IMAGES - 1;
    var jim = which_image_loaded;
    if (which_image_loaded == NUMBER_OF_IMAGES)
    which_image_loaded = 0;
    document.jobimage.src = ImageNames[which_image_loaded];
    }
    //--></script>

    <td><form>
    <div align="center">
    <input type="button" value="&nbsp;&nbsp;&nbsp;Next&nbsp;&nbsp;&nbsp;" SIZE=30 onClick='changeImage(1);'>
    <input type="button" value="Previous" onClick='changeImage(-1);'>
    </div>

Bookmarks

Posting Permissions

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