Trying to show new galleries on separate blog
System
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.
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.
0
Comments
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?
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
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:
With this:
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.
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!
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