Web Analytics Made Easy -
StatCounter PHP code request--gallery/popup - CodingForum

Announcement

Collapse
No announcement yet.

PHP code request--gallery/popup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP code request--gallery/popup

    PHP code request:

    I am building a website that contains several different image galleries--reptiles, birds, and mammals etc. Being graphic heavy I am displaying thumbnails of each picture. I would like the viewer to be able to click on the thumbnail to view the larger image in a popup window. I would rather not have to type the name of every large photo for every new window.

    I got help with this using Javascript but cross browser issues are a pain. IE worked great -- Netscape humm

    I use the same naming convention for all my photos. Large image = "image.jpg" and thumbnails = "image_thumb.jpg"

    Example:
    dragonfly.jpg
    dragonfly_thumb.jpg

    What I would like is the user to be able to click on the thumbnails, "dragonfly_thumb.jpg" etc., and a have a popup window display the larger image, "dragonfly.jpg"

    Basically I need a PHP code that that I can place around my thumbnail html that will strip out the "_thumb" and opens a popup window.

    Desired Popup window characteristics:

    Fits to the size of the large image.
    Disabled right mouse click
    Disables IE 6 galleryimg
    Has "close window" underneath image to close window.


    My images directories that code would be pulling from

    Root: pictures/envior_pics/

    Different galleries folders found under envior_pics:
    birds, frogs, insects, lizards, mamals, plants, snakes


    I wish I could do this my self but I'm only a graphics guy.
    Thanks in advance for the help you might be able to give.

    Togo

  • #2
    There are a few image gallery systems available for PHP - try a
    search on google.

    I'm running one up myself - will not be at beta release for about
    another week though and uses GD libs to buildrender the thumbs.

    I've an old javascript popup version at this url

    If that does what you want (it's not NS4 compat), just yell and I'll
    let you know what to change to get it working for your thumbs.

    Note: the GD'n'PHP one is much better
    ضkii - formerly pootergeist
    teckis - take your time and it'll save you time.

    Comment


    • #3
      Couple of notes - that js version places a trans gif over the big
      image, making it harder to save properly - I partly wrote it to play
      with cutting strings in defined places (ie every 30 characters or
      prior space - it even truncates descriptions that are too long and
      adds a hyphen to any word that would take more than one line).
      The window sizes to the picture automatically - basically a div
      image is replaced by a small gif, the size of that is tested until it
      is under 80px high, then it's replaced by the big image, then the
      size of that is tested until properly returned - the window is then
      sized according to that.
      The table is rendered automatically - mainly all you need do is
      write the descriptions and make sure the max images is exactly
      divisible by the columsn.

      Notes on PHP: that nice language can easily scan a directory and
      build a page bsaed on the files found in it - ie, you could just put
      a script in the directory and it would sniff out the images and write
      a page based upon what it found. It can also read the dimensions
      of images quite easily - and can (well GD libs can) read the embe-
      dded thumbnail in any jpeg or tiff file as well as SOOOOOO much
      more
      ضkii - formerly pootergeist
      teckis - take your time and it'll save you time.

      Comment


      • #4
        Originally posted by ضkii

        Notes on PHP: that nice language can easily scan a directory and
        build a page bsaed on the files found in it - ie, you could just put
        a script in the directory and it would sniff out the images and write
        a page based upon what it found. It can also read the dimensions
        of images quite easily - and can (well GD libs can) read the embe-
        dded thumbnail in any jpeg or tiff file as well as SOOOOOO much
        more
        I understrand PHP can build a page from the files found in it. However the HTML pages with the thumbnails have already been built. My gallery is already in place. All I need is code that can be added to each thumbnail found on the HTML credited pages so a popup will open with the larger image.

        --
        Togo

        Comment


        • #5
          So why do you even need PHP?

          This should be in the JS forums
          Offtone.com - In the works...

          Comment


          • #6
            im after the same thing basically only i need it for php.

            Comment

            Working...
            X