Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: PHP Photo Album script

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

    Default PHP Photo Album script

    1) Script Title: PHP Photo Album script
    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...photoalbum.htm

    3) Describe problem:
    So here's the deal: this script works perfectly when i use it on firefox and opera. however, on ie6 (and i think safari), it does not display some of the images. it is set to show them 2x2 per page, but on ie it only shows it as a 2 columns, 1 row, and the other pictures do not go to another page, they just don't get displayed. i hope this makes sense.

    Can anybody here take a look at this script on my page and tell me what the problem is? go here: http://radiojeffersonga.com/gallery.shtml

    thank you.

    Matt

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,134
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    It's working fine in IE too. There is just something about your layout and/or styles that doesn't allow those images to be seen. They are there on the page.
    - John
    ________________________

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

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,134
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    I played around with your page locally, and adding this to the script (red):

    Code:
     . . . urimage=0
    for (y=0; y<dimension.split("x")[1]; y++){
    for (x=0; x<dimension.split("x")[0]; x++){
    if (curimage<galleryarray.length)
    document.write('<div id="slide'+curimage+'" class="slideshow">'+buildimage(curimage)+'</div>')
    curimage++
    }
    document.write('&nbsp;<br style="clear: left" />')
    }
    
    function popuplinkfunc(imgsrc){
    if (popupsetting[0]==1){
    var popwin=open(imgsrc.href, "popwin", popupsetting[1])
    popwin.focus()
    return false
    }
    else
    return true
    }
    
    </script>
    seems to fix the problem.
    - John
    ________________________

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

  4. #4
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow

    First of all Thnks for such a wonderful album script...I needed a light weight and easy script for integrating into Joomla and it did perfectly..

    I was thinking of customising it even more,but even if i do even a slight change in the code the images arnt being displayed,maybe because am totally new to programming...

    Anywayz the problem is "when I click on the images in the album I want them to open in a new window which should contain some other content also..."

    Like If I click on a image in the album it should open in a new window n show the full image and also some other instruction's or description...I tried adding my custom text to this function

    function popuplinkfunc(imgsrc){
    if (popupsetting[0]==1){
    var popwin=open(imgsrc.href, "popwin", popupsetting[1])
    popwin.focus()
    return false


    i replace the imgsrc.href with html..But it doesnt work..Wat shall i do to make it workk...???

    Thanks in Advance..

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

    Default

    i appreciate the help. i'll have to try it out on another day, as i am away from my server all weekend.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,134
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    I don't like pop up windows for this for several reasons. I will offer an alternative, but first I will answer your question anyway:

    Code:
    function popuplinkfunc(imgsrc){
    if (popupsetting[0]==1){
    var popwin=open("", "popwin", popupsetting[1])
    popwin.document.write('<img src="'+imgsrc.href+'"><br>Some other stuff');
    popwin.document.close();
    popwin.focus()
    return false
    }
    else
    return true
    }
    I like using a DHTML pop up instead though, as explained here:

    http://www.dynamicdrive.com/forums/s...34&postcount=4
    Last edited by jscheuer1; 06-02-2007 at 02:31 PM. Reason: correct code
    - John
    ________________________

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

  7. #7
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That was so excellent,i never thought in that way...

    As u mentioned DHTML window ,cant we use the DHTML window widget as the POP up..??

    http://www.dynamicdrive.com/dynamici...ndow/index.htm
    I tried using this in the PHP foto album script..


    Code:
    var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" onClick="return dhtmlwindow.open("googlebox", "div", "somediv", "Custom title", "width=700px,height=450px,resize=1,scrolling=1,center=1", "recal")">'
    It doesnt work and how to display the image in it..??using imgsrc.href again..??

    Hope it doesnt turn out to be simple again...

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,134
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    Due to the way nested quotes must be treated inside of quoted strings, it would be more like so:

    Code:
    var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" onclick="return dhtmlwindow.open(\'googlebox\', \'iframe\', this.href, \'Custom title\', \'width=700px,height=450px,resize=1,scrolling=1,center=1\', \'recal\');return false;">'
    I chose iframe, as it seems the best of the available widget methods to use for this. I added the return false, as this is required to prevent the default action of the link.
    - John
    ________________________

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

  9. #9
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow

    That worked like a charm...jscheuer1 dude u really rock..
    I tried using some more creativity and used the DIV function of the DHTMl Window widget..But the images arent been displayed...

    I used this code..

    Code:
    function popuplinkfunc(imgsrc){
    if (popupsetting[0]==1){
    '<div id="somediv" style="display:none">
    <p style="height: 400px">This is some content within a DIV, shown inside this window instead</p>
    
    <img src="'+imgsrc.href+'">
    </div>'
     dhtmlwindow.open('divbox', 'div', 'somediv', '#4: DIV Window Title', 'width=450px,height=300px,left=200px,top=150px,resize=1,scrolling=1'); 
    
    return false
    }
    else
    return true
    }

    is it correct????

  10. #10
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb

    I want to include another javascript into the popup window...But it doesnt work..I tried including it directly..

    Code:
    function popuplinkfunc(imgsrc){
    if (popupsetting[0]==1){
    var popwin=open("", "popwin", popupsetting[1])
    popwin.document.write('<img src="'+imgsrc.href+'"><br>Some other stuff<script type="text/javascript" src="..."></script>');
    popwin.document.close();
    popwin.focus()
    return false
    }
    else
    return true
    }



    The script in the red..Any way of doing this...??

    I tried using this <SCRIPT LANGUAGE=\"Javascript\" SRC=\"..."></SCRIPT> also..

    The script is of displaying Ad's..

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
  •