4 Replies Latest reply: Sep 11, 2011 9:04 AM by TCarp RSS

    Help on approach to design/layout of a gallery of images

    TCarp Community Member

      I'm a non-professional web hobbiest.  Have pretty good html skills and have done a bit of PHP with MySQL.

       

      We have a project that will make local map images available online.  There will be quite a few (hundreds) so I've found using a table approach is quickly becoming a pain because of the file name, etc. embedded in the html.

       

      I'm looking for some ideas on the approach to designing for a site where users are presented with thumbs along with some text.  I'll do something like a hover to expand a map for viewing.  Multiple downloadable version of the map will be available (probably JPG (300dpi) and PDF (300 and 700dpi).

       

      As I see it, there are two parts to the design.  One is how to get the web page(s) displayed and the other is how to store the download files.  For the latter, I'm simply storing the image on the site just as files.  I thought about using a db but don't see much advantage.

       

      It's the former (web pages of images) I'm wondering about.  One thought was to have a file (excel-like) that simply stored the map names and then I could code some simple PHP to generate the pages.  If there was a way to maintain image names in a spreadsheet (already doing that for config control) and easily get that to the site so PHP can use it, things might be pretty easy.

       

      I'm assuming the need for pages like these is quite common (catalogs, etc.).  Someone has to have figured out an easy approach.

       

      Am I way off in my thinking about how to approach this?

       

      Thanks

       

      Tom

        • 1. Re: Help on approach to design/layout of a gallery of images
          Lon Winters Community Member

          When you see the word gallery in a topic, you start thinking of the various web galleries that are out there. However, after readin ghte post, I think a database solution would serve you better. Whether it be in MySQL or Excel spreadsheet, they are both tables. The table records would contain info about each item, including the filename of the related images. Each record has a unique ID which allows for further functionality. In addition, you would allow the user the ability to search, and sort results as desired. The downside is that you may have to create all associated images and and thumbnails by hand, which can be quite time consuming. For this tho, Photoshop macros can come in real handy with batch processing large groups of images. For administration, you canmeither create admin pages or maintain an offline excel file that can easily be imported into MYSQL.

          • 2. Re: Help on approach to design/layout of a gallery of images
            TCarp Community Member

            Thanks for the reply.  I'd like to make sure I understand.  Are you agreeing that using a file (MySQL, Excel) with records for each map would be input to a PHP file used to generate the "gallery" pages?  The only reason I'd lean toward Excel is to keep the design accessible.  Updating an Excel file is easier for most than updating a MySQL file.  I'll do some homework on how to design a site that accesses an Excel file.

             

            The images are high-quality local maps.  Each will end up being generated by GIS software (ArcMap in this case) so the effort to produce each one will be unavoidable.  The good news is we're designing a lot of "reuse" into the mapping.

             

            Each map will have a 72dpi thumb image used for display on the site pages which could be stored in a site folder or possibly a MySQL db.  You're correct that sort (or filtering) requests from users would be good.  Not sure how to decide on final design.

             

            Breaking it down to something as simple as sorting, how do sites that display tables with the ability to sort (usually clicking on column headers) pull it off?

             

            Sorry if my questions are not yet focused.  I'm a bit lost in the detail.

             

            Tom

            • 3. Re: Help on approach to design/layout of a gallery of images
              Lon Winters Community Member

              Based on how you describe it, I would answer yes. More specifically, the data from MYSQL would not actually generate the page, but it would populate the page with content from the database. We're basically talking about a typical Master/Detail page set  but with a few enhancements. If you are unfamiliar with how this works, there are plenty of easy to follow tutorials out there that don't take much time to get through or understand.

               

              The master page displays each item in a table format and each column in a row can display images, text, text links and image links. The concept is that the actual data, or values that determine what specifically is shown in each column  is provided by the database. For example, to display a thumbnail, the database value for the thumbnail column would simply contain the filename of the image, or sometimes the entire path' such as "images/thumbs/thumb1.jpg". (without quotes). On the page itself, you insert an image placeholder, size it to the correct dimensions, and use a dynamic value from the recorder as the image source.


              The other columns may contain values to the other images. The text link on the master page would normally link to a specific page and pass a parameter that tells that page where and which image to use to display. The same concept can be applied to use a roll over or some other action.   I apologize if this seems confusing, m not sure of your level of expertise with databases, record sets, etc.  But the back end data can be maintained by maintaining an offline Excel file and importing that into MYSQL to replace the existing table. Or, you can create administration pages that allow you to view, enter, modify and delete data in the database. As far as I know, you can't just upload an Excel file and have that drive the data in your pages.  However, you may be able to convert to XML, which is a completely different way to do it than the MySQL route, and one that I'm less familiar with.  You may want to pose the question in the Application development form and get some opinions. If you decide to go the MySQL route, I'd be happy to help you along the way, but it shold go in that forum.

              • 4. Re: Help on approach to design/layout of a gallery of images
                TCarp Community Member

                Thanks.  I'll do some homework and will also move to the Application Development forum.

                 

                Tom