Options

Trying to show new galleries on separate blog

SystemSystem Registered Users Posts: 8,186 moderator
I'm trying to find a simple way to get gallery thumbnails with links to individual smugmug galleries on my separate blog.

See here for details.

I thought RSS would be the best option, but I can't get just the images because I can't separate them from the description text.

Is there an API solution to this? I looked at the smugmug version of flickrbox, but that's more than I really need. I just want new gallery thumbs that will point back to my galleries. It seems so simple, yet I'm baffled on how to accomplish this.

Comments

  • Options
    darryldarryl Registered Users Posts: 997 Major grins
    edited December 3, 2007
    rubinblog wrote:
    I'm trying to find a simple way to get gallery thumbnails with links to individual smugmug galleries on my separate blog.

    See here for details.

    I thought RSS would be the best option, but I can't get just the images because I can't separate them from the description text.

    Sure you can get the images separated from the description text. You just need a regular expression like:

    s/^.+src="(.*?)" .*/$1/
  • Options
    SystemSystem Registered Users Posts: 8,186 moderator
    edited December 3, 2007
    darryl wrote:
    Sure you can get the images separated from the description text. You just need a regular expression like:

    s/^.+src="(.*?)" .*/$1/


    I suppose I could use something like Yahoo Pipes for that?
  • Options
    SystemSystem Registered Users Posts: 8,186 moderator
    edited December 3, 2007
    darryl wrote:
    s/^.+src="(.*?)" .*/$1/

    Sorry I'm a regular expression neophyte.

    Pipes allows you to use regular expressions, but it is setup like this:

    In item.description replace x with y

    Where a regular expression would go in each variable (x & y). How would your example statement fit into that setup?
  • Options
    darryldarryl Registered Users Posts: 997 Major grins
    edited December 5, 2007
    rubinblog wrote:
    Sorry I'm a regular expression neophyte.

    Pipes allows you to use regular expressions, but it is setup like this:

    In item.description replace x with y

    Where a regular expression would go in each variable (x & y). How would your example statement fit into that setup?

    x = ^.+src="(.*?)" .*
    This means match from the beginning ^ of the string, match all characters (at least one) up to 'src="'. When you find src=", capture everything up to the next " mark. Then continue matching.

    y = $1
    This is a reference to the data captured in parentheses during the match

    There's a nice tutorial on Pipes and Regex here: http://theytookmystapler.blogspot.com/2007/09/yahoo-pipes-case-study-of-using-regex.html
  • Options
    SystemSystem Registered Users Posts: 8,186 moderator
    edited December 5, 2007
    Darryl is the MAN
    Thank you, thank you, thank you!

    The implementation of my smugmug page has been held up by this single feature. Enjoy your day today knowing that you are someone's hero.

    I'll bookmark that tutorial. Pipes (with regex) is a pretty powerful tool when you understand it. I'll post this in all my related topics later today to assist anyone else looking for similar functionality in the future.

    Again, your assistance is GREATLY appreciated darryl.
    darryl wrote:
    x = ^.+src="(.*?)" .*
    This means match from the beginning ^ of the string, match all characters (at least one) up to 'src="'. When you find src=", capture everything up to the next " mark. Then continue matching.

    y = $1
    This is a reference to the data captured in parentheses during the match

    There's a nice tutorial on Pipes and Regex here: http://theytookmystapler.blogspot.com/2007/09/yahoo-pipes-case-study-of-using-regex.html
  • Options
    darryldarryl Registered Users Posts: 997 Major grins
    edited December 5, 2007
    rubinblog wrote:
    Thank you, thank you, thank you!

    The implementation of my smugmug page has been held up by this single feature. Enjoy your day today knowing that you are someone's hero.

    I'll bookmark that tutorial. Pipes (with regex) is a pretty powerful tool when you understand it. I'll post this in all my related topics later today to assist anyone else looking for similar functionality in the future.

    Again, your assistance is GREATLY appreciated darryl.

    Hey, glad I could help. Oh, looking at your blog, here's one other regexp I used that might come in handy:

    Replace this:
    (.*-)Th(-\d+)?(\.\w+)
    

    With this:
    $1Ti$2$3
    

    The RSS description contains the Thumbnail-sized version of each gallery image. This regexp simply replaces the Th with Ti. It assumes that you've already stripped the Description down to just the URL of the image.

    Although I'm not sure if Zooming Thumbnails to square (like those I see in your blog) will also zoom the Tiny versions of the images as well. Seems like it should... Guess you'll have to try it.
  • Options
    SystemSystem Registered Users Posts: 8,186 moderator
    edited December 5, 2007
    Once again, you come to the rescue. I was going to ask about that very thing, but I figured beggers can't be choosy.

    If you want to see the temporary replacement page, until I make the full switch, look here

    I even switched out my flickr feed with the smugmug email feed using the same pipes/regex script.

    I can't thank you enough.

    I would love square thumbnails, but I'm going to have to go with ease of use over a minor appearance enhancement for now. Maybe someday, smugmug will offer a default square thumbnail option... until then, I'll take the 90% solution.
  • Options
    darryldarryl Registered Users Posts: 997 Major grins
    edited December 6, 2007
    rubinblog wrote:
    Once again, you come to the rescue. I was going to ask about that very thing, but I figured beggers can't be choosy.

    If you want to see the temporary replacement page, until I make the full switch, look here

    I even switched out my flickr feed with the smugmug email feed using the same pipes/regex script.

    I can't thank you enough.

    I would love square thumbnails, but I'm going to have to go with ease of use over a minor appearance enhancement for now. Maybe someday, smugmug will offer a default square thumbnail option... until then, I'll take the 90% solution.

    That stuff looks great... is it Jason? What platform is it built on? I haven't used pipes, and I don't think they'll work for the main SmugMug site I work on because we have a site-wide password, so all of the feeds come up blank unless you're logged in.

    You do know that SmugMug offers a square thumbnail option of you do the zooming? (They don't want to presume that they know what part of a 2x3 or 3x4 image should be 1x1.) Here's the details:

    http://www.smugmug.com/help/digital-photos

    And if you wanted to get fancy, and have paid for a Power User account, you can add some custom Javascript to do all of them on one page:

    http://smugmug.jot.com/WikiHome/Bulk%20Zoom%20Thumbnail%20(Super%20Delux%20Version)

    Have fun!
  • Options
    SystemSystem Registered Users Posts: 8,186 moderator
    edited December 9, 2007
    Thanks a lot darryl. The blog is built on Expression Engine. I run a professional website on the full paid version, but my personal blog is all using the free "core" version. I'm a big fan. WordPress has a much larger community, but I really like how I can tweak anything I want with EE.

    I'm aware of the square thumbnail option, but I've yet to get the Bulk javascript to work (I'm a power user). I like the square look, but I want it easy enough that my wife can upload albums and not have to mess with any advanced settings. So I'll probably wind up sticking with it as-is. By the way, I've flipped the switch and my SM galleries are in full effect.

    I've only played with Pipes a little bit, but it can really do some amazing things. If you are a RSS junky (like me) it can streamline a lot of stuff. I've only scratched the surface, but it is pretty neat. I totally drink the Google kool-aid, but this is one thing Yahoo got right.

    Thanks again,

    Jason
    darryl wrote:
    That stuff looks great... is it Jason? What platform is it built on? I haven't used pipes, and I don't think they'll work for the main SmugMug site I work on because we have a site-wide password, so all of the feeds come up blank unless you're logged in.

    You do know that SmugMug offers a square thumbnail option of you do the zooming? (They don't want to presume that they know what part of a 2x3 or 3x4 image should be 1x1.) Here's the details:

    http://www.smugmug.com/help/digital-photos

    And if you wanted to get fancy, and have paid for a Power User account, you can add some custom Javascript to do all of them on one page:

    http://smugmug.jot.com/WikiHome/Bulk%20Zoom%20Thumbnail%20(Super%20Delux%20Version)

    Have fun!
Sign In or Register to comment.