Results 1 to 4 of 4

Thread: PHP Photo Album - file name appear in popup?

  1. #1
    Join Date
    Sep 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP Photo Album - file name appear in popup?

    1) Script Title: DD PHP Photo Album script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...album.htm#note

    3) Describe problem: increased functionality question


    Hi, I posted once before and got a great response on how to change the script to where the photo file name appears beneath the photo, which allows you to do a brief description of the photo as the file name and it appears. This seemed like a logical and simple way to get an description of the photo

    Please go to http://anne.swva.net/earrings.htm for my page in the works (note I haven't changed the file names to descriptions yet.)

    My question is this: instead of having the file name appear on the main thumbs page, can the script be altered to have the file name appear on the enabled popup window? This allows much more room and gives more white space on the thumbs page.

    THANKS in advance for help and assistance!

    - AV

    PS - Can anyone explain what this part of the original script does? I havent figured it out yet:

    //Toggle image description: descriptionprefix[0 or 1, "Text to show" (if 1)]
    var descriptionprefix=[1, "Photo "]

  2. #2
    Join Date
    Nov 2007
    Posts
    39
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    //Toggle image description: descriptionprefix[0 or 1, "Text to show" (if 1)]
    var descriptionprefix=[1, "Photo "]
    It appends a number starting from one to "Photo" which is displayed below each pic.
    [] [] []
    Photo1 Photo 2 Photo 3


    I changed mine to Screenshot and removed the 1.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You may want to look at this thread:

    http://www.dynamicdrive.com/forums/s...d.php?p=116523
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    More specifically, try substituting this:

    Code:
    function popuplinkfunc(imgsrc){
    if (popupsetting[0]==1){
    var desc=imgsrc.href.replace(/^.*\/([^\.]+)\..*/,'$1');
    var popwin=open('', "popwin", popupsetting[1]);
    popwin.document.write('<title>'+desc+
    '<\/title><body style="margin:0;padding:0;font:85% sans-serif;text-align:'+
    'center;overflow:auto;background-color:#0d576d;color:white;"><img title="'+
    desc+'" alt="Larger Image" style="margin:2px 0;" src="'+imgsrc.href+'"><br>'+desc);
    popwin.document.close();
    popwin.focus();
    return false;
    }
    else
    return true;
    }
    for the existing popuplinkfunc(imgsrc) function.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •