You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our community, at no cost, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is free, fast and simple, so please join our community today!
I'm writing up a little doo-dad that will let you put thumbnails of images stored in flickr in you sig here on NAM.
First off, if all you want to do is put a specific picture's thumbnail in your sig, that's easy... find the image in flickr, click on the "All Sizes" button on the images page, click on the "thumbnail" link, grab the URL from where it says "1. Grab the photo's URL:", and put it inside an [img] tag, so it looks like this:
That will put a specific image's thumbnail in your signature (or in a post, for that matter). Great.
But, what if you want your signature to always contain your most recent upload to flickr? Here's what you can do:
[img]http://joshwardell.com/snid/flickrSig.php5?u=username&n=number[/img]
where username is you flickr username, and number is how far back in your photostream to go - 0 is the most recent photo, 1 is the photo before that, etc - I think you can only go back to photo 9... trying 10 breaks things.
So, as an example, [img]http://joshwardell.com/snid/flickrSig.php5?u=snid&n=0[/img] would load my most recent flickr upload's thumbnail. Like this:
Doing a sig like this:
[img]http://joshwardell.com/snid/flickrSig.php5?u=snid&n=0[/img] [img]http://joshwardell.com/snid/flickrSig.php5?u=snid&n=1[/img] [img]http://joshwardell.com/snid/flickrSig.php5?u=snid&n=2[/img] [img]http://joshwardell.com/snid/flickrSig.php5?u=snid&n=3[/img] [img]http://joshwardell.com/snid/flickrSig.php5?u=snid&n=4[/img]
will display my five most recent uploads:
No we're getting somewhere... Josh said "how about a random photo?" Alright, use "r" for the number, and you'll get a random photo. Like this: [img]http://joshwardell.com/snid/flickrSig.php5?u=snid&n=r[/img]
Like this:
Unfortunately, if you try to put a bunch of random photos together, they all wind up being the same. Like this:
There might be a way to fix that, but it doesn't work right now.
Since Juan created the northamericanminiacs group in flickr, I decided it would only make sense to work with groups instead of users if you wanted to. So, you can make URLs like this:
[img]http://joshwardell.com/snid/flickrSig.php5?g=groupname&n=number[/img]
Notice the use of g instead pf u. For example, this will grab the most recent upload to the "northamericanminiacs" group:
[img]http://joshwardell.com/snid/flickrSig.php5?g=northamericanminiacs&n=0[/img]
Like this:
Or, a random picture from the group:
[img]http://joshwardell.com/snid/flickrSig.php5?g=northamericanminiacs&n=r[/img]
Like this:
but there's still the same problem with trying to get more than one different random picture at a time.
I'll probably add some more goodies in the future, like stuff to let you make the pictures be links to the picture in flickr.
The biggest problem with using this stuff as a signature here on NAM is that signatures are capped at 300 characters, and URLs are kinda long.
Nice work, guys! Couple of comments. Trying to retrieve multiple random images probably won't work until you add a parameter to the URL. I'm thinking that the browser just uses the first image returned every time it sees that URL. The browser (or at least smart ones) doesn't make 1,000 requests to nam.com every time MINIClo posts with 1,000 smilies, right? ;-)
2nd, you *could* use something like tinyurl.com to "compress" the URLs, thus getting around the 300 character space cap.
It's a shame I won't be able to see the fruits of your labors; I've got signatures turned off. :-)
Yup, that's the trick to different random photos - the URLs have to be different. Stick something like &1 on the end of the URL, but with a different number to make the URLs different, and you get different images. Like so:
What I was thinking is that, although it's cool to have the pictures there, they're awful small, and you've got no way to get to the image's page on Flickr. Wrapping them in a \[url\] block would be the way to go, in my opinion. It'd be tricky to do that, however, given the limitations of this (stupid) bulletin board software. Yes, I really do loathe vBulletin... :-)
One idea (persistence mechanism warning!) might be to keep track of the referrer (and possibly also use a cookie) so that you could do something like this:
Quote:
[url=http://example.com/flickrSigLink?n=r&u=blalor&ind=0][img]http://example.com/flickrSigImg?n=r&u=blalor&ind=0[/img][/url]
[url=http://example.com/flickrSigLink?n=r&u=blalor&ind=1][img]http://example.com/flickrSigImg?n=r&u=blalor&ind=1[/img][/url]
...
ad infinitum
2002 BRG/w MC. Sport package/sunroof. Yakima roof rack in the summer, Blizzaks in the winter. Motoring since July 2002 we've seen 120 temps, -20 temps, 5 accidents and 122,296+ miles.
Awesome job jason--I didn't realize you kept on working on it after you got it working.
Now for a request Add Set capability. So you can make a specific set of photos that you want to display in your signature. That's exactly what I do for the top of my MINI page.