Quest for Method to Handle Galleries by Year
largelylivin
Registered Users Posts: 561 Major grins
Still looking for a way to have a user 2007/2008/All switch that operates on the gallery level.
Is there information available about the smugmug database so that I can "build" a category or subcategory using JS? Is this a practical approach? Where can I find that info?
Is there information available about the smugmug database so that I can "build" a category or subcategory using JS? Is this a practical approach? Where can I find that info?
Brad Newby
http://blue-dog.smugmug.com
http://smile-123.smugmug.com
http://vintage-photos.blogspot.com/
Canon 7D, 100-400L, Mongoose 3.5, hoping for a 500L real soon.
http://blue-dog.smugmug.com
http://smile-123.smugmug.com
http://vintage-photos.blogspot.com/
Canon 7D, 100-400L, Mongoose 3.5, hoping for a 500L real soon.
0
Comments
The foo.smugmug.com/date thing only works at the photo level, not gallery level.
Part of the problem, of course, is that the only date that SmugMug galleries have associated with them is LastUpdated.
So even if there was a way to request albums for a certain year, it wouldn't be quite accurate. (Say you deleted a photo from a 2005 album -- whoops, now it's a 2008 album.)
I suppose you could fudge it by grabbing the EXIF info from one of the images within an album, but man, that's a lot of querying for a dynamic nav.
I can solve that problem by a simple naming convention: beginning the gallery title with "2007" or "2008". Further, I can ignore non-compliant file names for my webpage and HTML galleries.
If I took this approach I intend to only build unique category/subcategory structures and only rebuild them when something charges, which will be limited to a couple times a week for the 2008 galleries and probably only once for the 2007 galleries.
http://blue-dog.smugmug.com
http://smile-123.smugmug.com
http://vintage-photos.blogspot.com/
Canon 7D, 100-400L, Mongoose 3.5, hoping for a 500L real soon.
1. create some CSS classes like "Year2007" and "Year2008" and attach one to every galleryPage(?) and contain the "display" element with an initial value of display: display. meaning the intial state is "display all" (natch I'd default to Year2008 for all new galleries)
2. Trigger a JS routine when the user selects the 2007, 2008 or "all"
3. Set the classes display: none JS routine for the non-selected year or set them all to display: display when all is selected.
(Does that make sense? My terminology is weak as is my understanding of how smugmug's mechanics work.)
From what I understand of CSS and JS this would seem possible.
The advantage of this method is that I can continue to use my exising cat/subcat design with no impact to the remaining CSS and existing HTML.
However, the remaining problem is "popular photos" and virtual galleries that use keywords, but I think those would be fairly easy to work around.
http://blue-dog.smugmug.com
http://smile-123.smugmug.com
http://vintage-photos.blogspot.com/
Canon 7D, 100-400L, Mongoose 3.5, hoping for a 500L real soon.
bump
http://blue-dog.smugmug.com
http://smile-123.smugmug.com
http://vintage-photos.blogspot.com/
Canon 7D, 100-400L, Mongoose 3.5, hoping for a 500L real soon.