This is a guest post from Omar Shahine. When we voiced an inner beta of a new Publish API a couple of months ago he jumped right upon it as well as inside of a couple of days built his Smugmug plug-in. If you’re a Photo Gallery user which additionally happens to make make make make make make make make use of of of of of of of of Smugmug to share photos AND videos, afterwards this plug-in is for you! Check out a plug-ins download page (more plug-ins have been entrance soon). Anyway, suffer Omar’s perspective. –Michael Palermiti
Hi There! My name is Omar Shahine as well as I’m a Program Manager upon a Hotmail team. we additionally occur to be a photography fan as well as prolonged time reader of this blog. The Photo Gallery group asked if I’d blog about my knowledge bureau building a Publish Plug-in for SmugMug, my print pity make make make make make make make use of of of of of of of of choice. [download Publish upon SmugMug]
Let me begin out by observant which I’ve already authored an uploader for SmugMug called Send to SmugMug. This is a .NET module which we wrote most years behind to facilitate as well as streamline uploading cinema from a Windows Shell to SmugMug. It’s gotten renouned over a years as well as I’ve combined lots of features. Send to SmugMug was creatively combined for Windows XP, which seems similar to a prolonged time ago for me.
Why writer a Plug-in?
When Windows Live Photo Gallery was expelled final year we proposed to make make make make make make make make use of of of of of of of of it for all my print management. Both my mother as well as we feel it’s a easiest product to tag, rate, as well as classify a photos. We have over 30,000 cinema right right divided as well as given carrying a initial kid roughly 2 years ago we take a LOT of cinema as well as upload to them to SmugMug to share with a friends as well as family. In fact, we’ve grown an engaging workflow. My mother as well as we rate all a photos as well as anything with a 3 star or aloft rating gets uploaded. Things with 2 star ratings we keep, though don’t share or fool around by a slideshow screensaver upon a TV powered by Windows Media Center.
Our elementary truth upon ratings is to make make make make make make make make use of of of of of of of of a pyramid complement (where there have been unequivocally couple of 5 star, as well as unequivocally most 3 as well as 2 star):
- 1 star: chuck divided
- 2 star: keep, though don’t share
- 3 star: great picture, this is a infancy of a ratings
- 4 star: analog print manuscript peculiarity
- 5 star: great sufficient to put in a design await in a residence or office. we have unequivocally couple of of these
Why am we revelation we this? Well Photo Gallery lets we simply perspective as well as filter by rating so uploading cinema with 3 stars or aloft is as elementary as clicking a symbol to filter as well as afterwards publishing, something not probable in a Windows Shell.
Since we make make make make make make make make use of of of of of of of of Photo Gallery a lot, it got to be untimely for us to keep carrying to make make make make make make make make use of of of of of of of of a Windows Shell as well as Send to SmugMug to upload a photos. So when a Publish Plug-in SDK was sent my approach a couple of months ago, we can suppose how vehement we was to begin essay a little formula .
Authoring a Plug-in
You competence consternation how prolonged it took me to write a Publish upon SmugMug Plug-in. Not long. All in all we would contend we outlayed 3 days operative upon a plug-in. The initial day was especially downloading as well as examining a Sample Flickr Plug-in as well as environment up my plan in Visual Studio 2008. we outlayed a subsequent day essay formula as well as formulating a installer. On a third day we combined an auto-update underline as well as combined a web pages as well as such to horde my Plug-in.
Of march a single thing which helped me tremendously was which we already had a garland of formula which talked to SmugMug regulating their API. If we have been starting from blemish as well as have no formula during all to speak to a edition make make make make make make make use of of of of of of of it could take longer.
What Publish upon SmugMug does
It’s flattering elementary really. Much easier than a Flickr Plug-in (due to a differences in between Flickr an SmugMug).
1. You name a photo, or video, or multiple of any series of them.
2. You afterwards name Publish upon SmugMug… from a Publish Menu
3. You have been asked for your username as well as cue for SmugMug
4. You afterwards name a Gallery to upload to, or emanate a brand brand brand new one:
5. You afterwards click Publish
You can afterwards click View to be taken to a uploaded Photo or Gallery.
How we wrote Publish upon SmugMug
If we have been similar to me, afterwards there is usually a single thing we need to figure this out. Just download a Sample Flickr Plug-in as well as begin messing around! we didn’t review any of a SDK docs, nonetheless they have been there if we need them. The overview doc is a great place to get an bargain of what we need to know if we have to see upsurge diagrams prior to seeking during representation code.
The elementary thought for any Publish plug-in is starting to be:
- Collect a user certification as well as record in to a make make make make make make make use of of of of of of of
- Create a “container” for a uploaded equipment or concede preference of an existent “container”. In this box a enclosure can be an Album, Gallery, Folder etc
- Upload a comparison equipment in Photo Gallery provision any required meta interpretation to a make make make make make make make use of of of of of of of (I yield Caption, Keywords, as well as People Tags).
- Handle swell as well as errors
- Supply a URL a user can make make make make make make make make use of of of of of of of of to revisit a site when a upload is finish
What we did was:
- Create my own registry entries for my Plug-in
- Reviewed a Flickr Plug-in to get an thought of how a call upsurge worked
- Figured out what tools of a Plug-in we indispensable to slice out as well as reinstate with my own formula
- Replace a UX in a Sample with my own dialogs as well as screens regulating a default ones as a starting point.
- Stubbed out a functions which we would need to speak to SmugMug
- Replaced which formula with formula from my SmugMug API (which we referred to we already wrote previously). If we have been articulate to a brand brand brand new Publish make make make make make make make use of of of of of of of we would suggest essay a category living room to hoop all a API proof
- Create a brand brand brand new installer regulating a built in Visual Studio Setup plan as well as supplement a required registry entries to register a Publish Plug-in.
The usually engaging issues we ran in to essay my plug-in were:
- The API expects which we will be traffic with record streams. we had to cgange my API to await flitting a record tide rsther than than only a trail to a photo.
- The SessionXml is where state is stored, as well as we cannot pretence which any state in your formula will be persisted as Photo Gallery will plead your formula with any photo. So don’t store things in immobile variables awaiting them to be there upon any call. You can endure whatever we wish in a SessionXml object.
- If we need to store things opposite sessions similar to username as well as alternative report we can make make make make make make make make use of of of of of of of of PersistXml. we already store my things in a Registry so we had no make make make make make make make make use of of of of of of of of for this.
- If we wish to embody People Tags with a tags in a print upon upload we contingency categorically get them from SessionXml
That’s it! we goal we suffer Publish upon SmugMug or formulating your own Publish Plug-in.
Omar Shahine, Lead Program Manager upon Hotmail