smughack: bulk zoom thumbnail (super deluxe version)
devbobo
Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
[UPDATED March 14th, 2011]
With recent infrastructure updates, we have removed an endpoint the BZT depended on. Effective immediately current implementations will no longer work. We apologize for the last minute notice.
- SmugMug
With recent infrastructure updates, we have removed an endpoint the BZT depended on. Effective immediately current implementations will no longer work. We apologize for the last minute notice.
- SmugMug
0
This discussion has been closed.
Comments
I got to alpha test this. Nice work, David. There are way MORE than a few folks on Dgrin who should be sending you nice thank-you boxes from Jack Stack's BarBQ Ribs
Portfolio • Workshops • Facebook • Twitter
SmugMug API Developer
My Photos
except....
EEEK! Tables for layout. If I get a chance I'll see if I can't modify it a smidge
http://photos.mikelanestudios.com/
thanks Mike.....well complain to smugmug, i hacked up their code
No probs, modify it.....just post it so I can update the files.
SmugMug API Developer
My Photos
ShutterGlass.com
OnlyBegotten.com
Swim for Them | WellmanHouse.net | AlbumFetcher | SmugShowBuilder
sure Gary....
css.txt contents -> CSS block
javascript.txt contents -> Javascript block
header.txt contents -> Header or Footer block
The Javascript code has function that automatically loads ....
addEvent(window, "load", addBulkThumbnail);
addBulkThumbnail checks to see if you're loggedIn and on a Traditional gallery page, if not it does nothing.
So basically there is nothing to implement, apart from adding the code.
Hope this helps,
David
</pre>
SmugMug API Developer
My Photos
Thank-you Greg.
I think it might have been your request for this feature that actually inspired me to write this.
Cheers,
David
SmugMug API Developer
My Photos
you're so new age.
i agree about tables for layout...but sometimes if it works....
You know, I have only been a smugmug member for a little over a month, and I didn't even know about the zoom thumbnail feature.
But I must say that your tool is neat. I'll have to try it on my site later on, and crop my thumbnails...
For some reason, people on this site tend to use the most gratuitous emoticons...
Thanks. I guess I didn't make myself clear though. What I mean is, even though it's a very clever tool, it's a tool that is of no use to anybody except the site owner, so dumping that much custom code into every page on the site just to implement a tool that is only used by one person and only rarely, makes no sense to me. Or am I missing something? I really, really, really think this should be implemented by SM.
ShutterGlass.com
OnlyBegotten.com
:nono :nah :puke
http://photos.mikelanestudios.com/
allow me to re-phrase:
But ... but...
you can use it now
and, it's FREE
and you're not executing it on every page, are you?
Portfolio • Workshops • Facebook • Twitter
if ur that worried about some custom code being loaded, you could load the script file dynamically if required.
SmugMug API Developer
My Photos
ShutterGlass.com
OnlyBegotten.com
Hi Gary. Ouch - I can see you are upset. Maybe step back a minute - and appreciate the value of the hacker community here that's come up with a pretty neat hack.
JT and Onethumb have desires to have this tool in place in the SmugMug system, but there's no promise on if/when - so, why not enjoy the ride for a while?
Portfolio • Workshops • Facebook • Twitter
Hey Dude,
Listen... you obviously have a bee in your bonnet about this, take it up with support.
I am not forcing you to use this hack, so take it or leave it...doesn't bother me.
David
SmugMug API Developer
My Photos
Excellent! I definitely second that emotion.
ShutterGlass.com
OnlyBegotten.com
So i got to thinking....why do we care what the server response is? Why cant we just fire off a bunch of requests to the server and let it do it's thing?
A little trial and error and zoom zoom.
By aborting the ajax request after it's sent to the server, we eliminate the need to wait for a response and can immediately submit another request. It effectively works the same as the bulk rotate function where it does all the work in the background while you do other things. Be aware though, that since we are aborting the query, we no longer have confirmation that the server recieved our request, so in that sense Dave's original is more reliable. That being said, i've processed over a thousand images with 100% success using this script as it exists now. There is a timer variable in the source that can be increased to allow the server a longer time to process before we abort.
To use, just replace the original script with the attached.
you will also need to add the following to your javascript section (sorry for the multiple things, but it's the only way around the attachment size limit).
I could have sworn I saw a post of andy's in here
Gotta love this sharing.
Someone needs to setup a smugmug hacker community
David
SmugMug API Developer
My Photos
no worky
http://andydemo.smugmug.com
Portfolio • Workshops • Facebook • Twitter
Me neither. Maybe I haven't waited long enough? I re-thumbed about 80 photos about 10 minutes ago. Would 80 requests take that long to process? Could be, I suppose...
Swim for Them | WellmanHouse.net | AlbumFetcher | SmugShowBuilder
also, go into the code and turn the confirmation on, that will at least tell you if the code ran all the way through.
I can't tell you anything about Firefox at the moment, as I'm at work and the man has his foot on the back of anyone desiring a browser other than IE. If the issue is still open, I'll be happy to check things out at home this evening.
Sorry to be pretty much useless for the time being...
Swim for Them | WellmanHouse.net | AlbumFetcher | SmugShowBuilder
turns out that i'm apparently exploiting a firefox bug with the abort method.
this wont work in anything other than firefox on windows.
but it works great if you use ffx/win to do your site management!
Andy Tested and Approved
Portfolio • Workshops • Facebook • Twitter
devbobo, let me reiterate my thanks for the great work. BWG, think of your revision as making use of a feature.
Swim for Them | WellmanHouse.net | AlbumFetcher | SmugShowBuilder
ok, attempt #2. the abort method and i ended up not working out, so we're on a break.
the thing that slows down the original hack is that it waits for one request to finish before sending another one. This version sends all the requests at once (more or less) and then handles the responses as they come back in. I was able to cut the processing time in half with this change.
the bottleneck however, is that browsers are limited to a specified number of connections at any given time. For example, firefox is set to 2 concurrent connections per server. that means if we have 16 thumbnails to process, we can only do 2 at a time.
check out these links on how to modify these settings.
firefox
IE
using those settings, i was able to cut the processing time by another 60% because we can send all the requests at once.
original: approx 2min for 16 thumbnails
modified: ~1min
browser settings: ~20sec
note: used to be that messing with those settings could cause issues w/older web servers and proxy servers....i personally dont notice any problems.
save the attached file and copy the guts into your javascript block. use devbobo's original css and html.
any mac ppl care to chime in?