Uploading Images onto a web page and resizing automatically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • robbiebrown34
    New Member
    • Nov 2006
    • 3

    Uploading Images onto a web page and resizing automatically

    Hello,

    I have searched everywhere and found no "basic answers" for this (also,i apologise if it is in the wrong page, i ust heard that PHP might work), i have neen searching around the internet for something that will allow me to put all of my images into one folder on my server, and then they are automatically resized and shows on a particular page, without me having to resize the pictures one by one myself and add them to my website? I hope you understand what i mean. This would really be a useful tool, and i would be willing to pay also.

    Thanks for your time.

    RobbieBrown34
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Have a look at the free class Gallery Generator
    What it does:
    Originally posted by Gallery Generator
    This class can be used to generate a gallery of pictures from image files contained in a given server folder.

    It scans a given folder to list the files with GIF, PNG, JPEG and BMP extensions. Then it outputs HTML pages showing thumbnails of the images that were found. The full size images are opened in pop-up windows.

    The width of the gallery pages, the number of images per row and the number of images per page are configurable.

    The gallery shows buttons to advance to the next or previous pages.
    Ronald :cool:

    Comment

    • robbiebrown34
      New Member
      • Nov 2006
      • 3

      #3
      Hello,

      Many thanks for the very fast reply and suggestions.
      Now, the next question i have is...how do i get it to work? because in thge downloaded ZIP file, there is no README or anything like that.
      Please understand that i am a Basic PHP user, i have no problems editing the code, but its just making it to work with my page?

      Thanks

      RobbieBrown34

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        In the gallery.php file you'll find everything you need.
        Originally posted by Gallery Generator documentation
        // 1 : param = folder where to find the images
        // 2 : param = width of the gallery
        // 3 : param = nbr thumbnails images per page
        // 4 : param = nbr thumbnails images per line
        // 5 : param = width of the thumbnail pictures
        // 6 : param = height of the thumbnail pictures
        // 7 : param = max width of the picture to display
        // 8 : param = max height of the picture to display
        // 9 : param = verbose mode
        // to use it just insert the number you want...
        // example : if I want the name and the file size so I set "13"
        // example : if I just want the name I just put "1"
        // example : if I want the name, the name of the folder and the file size I put "123"
        // example : if I want the name, the folder and the name again I put "121"
        // 0 = no verbose mode
        // 1 = display name
        // 2 = display the name of the folder
        // 3 = display the file size in Ko
        // 4 = display the width and the height of the file
        // 10 : param = display the border of the gallery or not
        // warning that the thumbnails image are $width pix long
        // so the param number 4 should be less or equal than param 2 / $width
        Code:
        $gal->InitGallery($folder, 600, 25, 5, $width, $height, $maxwidth, $maxheight, $verbose, $bd);
        Pay attention to $folder = "./img/" which defines in what folder where your images are, respective to the folder in which you run gallery.php.
        Adapt gallery.php to your requirements/wishes and just run it.

        Ronald :cool:

        Comment

        • cassbiz
          New Member
          • Oct 2006
          • 202

          #5
          On line 15 of gallery.php you define the directory of where it has to search.

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            Originally posted by cassbiz
            On line 15 of gallery.php you define the directory of where it has to search.
            Mine is line 14 but, as I said:
            Pay attention to $folder = "./img/" which defines in what folder your images are, respective to the folder in which you run gallery.php.
            Ronald :cool:

            Comment

            • robbiebrown34
              New Member
              • Nov 2006
              • 3

              #7
              Hello Again,

              Sorry to keep bothering you like this, but is there anyway i can embed the Gallery into an existing page on my site?

              Thanks

              Comment

              • ronverdonk
                Recognized Expert Specialist
                • Jul 2006
                • 4259

                #8
                Good place to start is looking in the DisplayGallery function in the class file. Maybe cassbiz has done that already.

                Ronald :cool:

                Comment

                Working...