Results 1 to 5 of 5

Thread: PHP Photo Album Script

  1. #1
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP Photo Album Script

    Script: PHP Photo Album Script
    http://www.dynamicdrive.com/dynamici...photoalbum.htm

    My test page:
    http://www.reallivinginteriors.com.a...lExternal.html

    I have just two problems:
    I have modified it so that on click it loads the large image in an iframe. This works well except in IE 6 where I get a white margin around the image.
    Is there some way I can specify the margins and padding to 0?

    Second problem:
    Also I would like to have an ON state and HOVER state for the thumbs.

    Help much appreciated!

    steph

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

    Default

    I suppose you change:
    Code:
    .slideshow img{ /*CSS for each image tag*/
    border: 0;
    width: 200px;
    height: 106px;
    }
    To:
    Code:
    .slideshow img{ /*CSS for each image tag*/
    border: 0;
    width: 200px;
    height: 106px;
    margin: 0;
    padding: 0;
    }
    Jeremy | jfein.net

  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

    Code:
    </div>
    <div id="imageA"><iframe frameborder="0" marginHeight=0 marginWidth=0 id="iframe" width="350" height="350" scrolling="no" name="iframe" src="iframes/solutions_InternalExternal_Iframe.html"></iframe></div>
    - John
    ________________________

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

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

    Default

    Thanks so much!

    Any ideas about the thumbnail hover/on state?

  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

    You will have to adjust your layout and/or these styles to get this to line up/look good, but to give you a rough idea, replace the on page styles with:

    Code:
    #thumbs {
    	margin: 2px -8px -8px 8px;
    }
    
    .slideshow a img { /*CSS for each image tag*/
    	margin: 6px 4px 0 0;
    	border-width: 2px;
    	border-style: solid;
    	border-color: #000;
    }
    
    .slideshow a:hover img { /*CSS for each image tag*/
    	border-color: #aaa;
    }
    
    .slideshow a.on img {
    	border-color: #fff!important;
    }
    If you have other definitions for .on in your main stylesheet, these should be removed.

    You will also need to have a way to get the on class to the a tag when clicked, while at the same time removing it from the others (if any) that have it.

    For that, replace your:

    Code:
    function popuplinkfunc(imgsrc){
    if (popupsetting[0]==1){
    var popwin=open(imgsrc.href, "popwin", popupsetting[1])
    popwin.focus()
    return false
    }
    else
    return true
    }
    with:

    Code:
    function popuplinkfunc(imgsrc){
    var popwin=open(imgsrc.href, imgsrc.target),
    t = document.getElementById('thumbs').getElementsByTagName('a');
    for (var i = t.length - 1; i > -1; --i)
    t[i].className = '';
    imgsrc.className = 'on';
    return false;
    }
    Last edited by jscheuer1; 02-02-2009 at 06:49 PM. Reason: tweak modified function and styles
    - 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
  •