Results 1 to 7 of 7

Thread: Remove Captions from Lightbox

  1. #1
    Join Date
    Apr 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Remove Captions from Lightbox

    1) Script Title: PHP Photo Album script

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

    3) Describe problem:
    I have combined the PHP Photob Album script with Lytebox, but want to remove the captions that show up above the [Image # of #] caption when the lytebox has been activated. But I am not sure were to take out that part of the code... anyone have any suggestions?

    You can find my page here (the site uses iframes, so follow the directions below to get to the correct page):
    {website taken off for personal reasons}
    Click on - 'Check out our Media Gallery' at the bottom
    Then click on any one of those links to get to the photo album
    Last edited by sjbohlman; 09-30-2008 at 02:12 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    In your code find:
    Code:
    tempcontainer+='<img src="'+imagepath+galleryarray[i][0]+'" title="'+galleryarray[i][0]+' ['+galleryarray[i][1]+']" />'
    And replace it with:
    Code:
    tempcontainer+='<img src="'+imagepath+galleryarray[i][0]+'" />'
    Jeremy | jfein.net

  3. #3
    Join Date
    Apr 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much for getting back to me... but that change didn't work for me.

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    In getpics.php replace:
    Code:
     echo 'galleryarray[' . $curimage .']=["' . $file . '", "'.$filedate.'"];' . "\n";
    With:
    Code:
     echo "";
    Jeremy | jfein.net

  5. #5
    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

    None of that will work. Lightbox gets its captions from the title attributes of the links, not the images, that's why Nile's first idea doesn't work. The second suggestion is worse, there will be no images. Instead, edit this line:

    Code:
    document.write('<a title="'+galleryarray[i_tem][0].replace(/^.*\/|\.[^\.]+$/g, '')+'" href="'+targetlinkdir+galleryarray[i_tem][0]+'" rel="lyteshow[vacation]"></a>');
    to:

    Code:
    document.write('<a title="" href="'+targetlinkdir+galleryarray[i_tem][0]+'" rel="lyteshow[vacation]"></a>');
    Added Later:

    In an unrelated matter - You are also going to want to replace the (in lytebox.js near the top):

    Code:
    Array.prototype.removeDuplicates = function () { for (var i = 1; i < this.length; i++) { if (this[i][0] == this[i-1][0]) { this.splice(i,1); } } }
    with:

    Code:
    Array.prototype.removeDuplicates = function () {for(var i = 0; i < this.length; ++i)for(var j = this.length-1; j > i; --j)if(this[i][0] == this[j][0])this.splice(j,1);};
    Otherwise you will have dupes that could cause problems.
    Last edited by jscheuer1; 09-26-2008 at 04:16 AM. Reason: add info
    - John
    ________________________

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

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Nile (09-25-2008)

  7. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Thanks for the save there John.
    Jeremy | jfein.net

  8. #7
    Join Date
    Apr 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Perfect! Thanks so much!!

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
  •