Quest for Method to Handle Galleries by Year

largelylivinlargelylivin 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?
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.

Comments

  • darryldarryl Registered Users Posts: 997 Major grins
    edited February 15, 2008
    Well, the problem I see is trying to programatically figure out what galleries go in what year.

    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.
  • largelylivinlargelylivin Registered Users Posts: 561 Major grins
    edited February 15, 2008
    darryl wrote:
    Well, the problem I see is trying to programatically figure out what galleries go in what year.

    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.
    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.
  • largelylivinlargelylivin Registered Users Posts: 561 Major grins
    edited February 15, 2008
    Maybe an easier approach:
    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.
    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.
  • largelylivinlargelylivin Registered Users Posts: 561 Major grins
    edited February 18, 2008
    bump
    bump
    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.
Sign In or Register to comment.