Results 1 to 4 of 4

Thread: PHP Album - Changing pop up background colors/colours, tile bar, path etc

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

    Talking PHP Album - Changing pop up background colors/colours, tile bar, path etc

    1) Script Title: PHP Photo Album script

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

    3) Describe problem: I want to be able to do several things and as i am a complete newbie with php i need some sage advice...

    This is the site i'm testing it out on

    http://elvisontour.co.uk/test/newgallery.htm

    1. I would like to control the background colour of the popup page.

    2. I would like to remove the path and title bar if possible.

    Managed to change the colors of the links without too much trouble but i am struggling with this. BTW, thats not me in the Elvis outfit!!

    Cheers All

    Kev

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,957
    Thanks
    43
    Thanked 3,195 Times in 3,157 Posts
    Blog Entries
    12

    Default

    Although this script uses PHP to gather the images it displays from a directory, the rest of the script is coded in javascript. There is no pop up page, that is the image itself you are viewing. Virtually all modern browsers do not permit displaying a pop up without the title bar, and if the address bar is not displayed, the path is displayed either in the title bar (most browsers) or in a proprietary information bar (Opera, perhaps others).

    Modifications can be made to the javascript to pop up something other than the image itself, even something other than a pop up window.
    - John
    ________________________

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

  3. #3
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok cheers, what about chaning the bacground colour and fixing margins?

    Kev

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,957
    Thanks
    43
    Thanked 3,195 Times in 3,157 Posts
    Blog Entries
    12

    Default

    The background color of what? The margins of what? An image displayed by itself in a browser pop up window has neither of these.

    A popular modification to this script is to use it with lightbox 2.03:

    http://www.dynamicdrive.com/dynamici...box2/index.htm

    To do so, install the lightbox files as instructed on the demo page. Then add this to the PHP Photo Album script (additions red):

    Code:
    if (gsortorder=="asc" || gsortorder=="desc")
    galleryarray.sort(sortbydate)
    
    function buildbox(){
    for (var i = 0; i < galleryarray.length; i++){
    var imagecompletepath=(targetlinkdir!="")? targetlinkdir+galleryarray[i][0] : imagepath+galleryarray[i][0];
    document.write('<a style="display:none;" title="Elvis Detail" href="'+imagecompletepath+'" rel="lightbox[joe]"><\/a>')
    }
    }
    buildbox();
    
    var totalslots=dimension.split("x")[0]*dimension.split("x")[1]
    
    function buildimage(i){
    var imagecompletepath=(targetlinkdir!="")? targetlinkdir+galleryarray[i][0] : imagepath+galleryarray[i][0]
    var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" rel="lightbox[joe]" onClick="return popuplinkfunc(this)">'
    tempcontainer+='<img src="'+imagepath+galleryarray[i][0]+'" title="'+galleryarray[i][0]+' ['+galleryarray[i][1]+']" />'
    tempcontainer+='</a><br />'
    tempcontainer+=(descriptionprefix[0]==1)? descriptionprefix[1]+(i+1) : ""
    return tempcontainer
    }
    and change this in the PHP Photo Album script:

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

    Code:
    function popuplinkfunc(imgsrc){
    myLightbox.start(imgsrc); return false;
    }
    - 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
  •