Announcement

Collapse
No announcement yet.

PHP Gallery

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

  • PHP Gallery

    Hi there,

    can anyone help me with creating a photogallery in PHP?
    I have several folders with pictures uploaded on my server and now I want to create an album for every folder.

    Preferably clickable thumbs...

    Thx!

    - cundor
    I don't know how to put this but I'm kind of a big deal...

  • #2
    http://www.gallery2.org
    USA WORLD CHAMPS

    Comment


    • #3
      I had trouble with this myself.

      I considered a script to read from a database the location of an image and print it into a table, I could do that for one per row but I don't know how to do... 4 on a row, start a new row, add another 4, etc.

      Comment


      • #4
        http://www.slooze.com/ is ok. I integrated it into my php wiki easily but it's a little too simple for my tastes.

        Google Picasa web albums turned out nicer for me.

        Comment


        • #5
          I recommend talking to Foreign of Eragon about this. They are the people coding the TW Gallery for me. (Or just do whatever distort does)

          Comment


          • #6
            Eragon prolly will help you out he is very nice and good with PHP and other things!1one!!eleven1!1
            (Paradise)>dj sage
            (HELLZNO!)>is he good, ive never heard his music
            1: Dynasty> LOL
            1:vue> LOL
            1:Cap> LOOL

            Comment


            • #7
              no u

              Comment


              • #8
                I recently switched to DAlbum, it's really amazing. Check the Demo to see for yourself.
                Maverick
                Retired SSCU Trench Wars Super Moderator
                Retired SSCU Trench Wars Bot Coordinator
                Retired Trench Wars Core Administrator
                Subspace Statistics Administrator
                Former Mervbot plugin developer

                Comment


                • #9
                  if you want a certain number per row use a loop and the modulus (%) operator...

                  for left-to-right, top-to-bottom
                  Code:
                  $output = "<table><tr>";
                  
                  for ($i = 0; $i < $numberofphotos; $i++)
                  {
                    if($count % $numberofcolumns == 0)
                    {
                      if(stripos($output, "/") > 0)
                      {
                        $output .= "</tr><tr>";
                      }
                    }
                  
                    $output .= "<td>$image</td>";
                    $count++;
                  }
                  
                  $output .= "</tr></table>";
                  
                  echo $output;
                  or if you want to display them top-to-bottom, left-to-right
                  Code:
                  $magicnumber = ceil($numberofphotos/($numberofcolumns * 1.0));
                  
                  $output = "<table><tr><td>";
                  
                  for ($i = 0; $i < $numberofphotos; $i++)
                  {
                    if($count % $magicnumber == 0)
                    {
                      if(stripos($output, "/") > 0)
                      {
                        $output .= "</td><td>";
                      }
                    }
                  
                    $output .=  "$image<br>";
                  }
                  
                  $output .= "</td></tr></table>";
                  
                  echo $output;
                  That ought to get you headed in the right direction, anyway. Oddly enough i just got done writing a piece of code similar to these.
                  -Dave

                  Comment


                  • #10
                    Thx for the help guys!
                    I'm using Coppermine and it works out just great!

                    CUndor
                    I don't know how to put this but I'm kind of a big deal...

                    Comment

                    Working...
                    X