blogthis!
devbobo
Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
I have been thinking about doing this for awhile, so I went and did it...wrote a very quick interface to Blogspot....
Could be some bugs, kinda late here
David
addEvent(window, "load", addBlogLinks()); function addBlogLinks() { var sClassName = document.body.className; var re1 = /singleImage /; var re2 = /loggedIn /; if (re1.test(sClassName) && re2.test(sClassName)) { var objParent = document.getElementById('imageInfo'); var objChild = document.createElement("a"); var objText = document.createTextNode("blogthis!"); objParent.appendChild(objChild); objChild.appendChild(objText); objChild.setAttribute("href", "javascript:BlogThis();") } } function BlogThis() { var imageLink = ""; var imageHead = ""; imageLink = "<img border=0 src=\"" + document.getElementById('mainPhoto').src + "\"/>"; imageHead = document.getElementById('caption_top').firstChild.nodeValue; x=document; y=window; popw = y.open('http://www.blogger.com/blog_this.pyra?t=' + escape(imageLink) + '&u=' + '&n=' + escape(imageHead),'bloggerForm','scrollbars=no,width=475,height=300,top=175,left=75,status=yes,resizable=yes'); void(0); }So when you are logged in and displaying a singleImage page, a blogthis! link should appear in the ImageInfo box. Automatically picks up the image url (currently being view small,medium, large) and the image caption...probably won't work for pro accounts yet.
Could be some bugs, kinda late here
David
0
Comments
Hey, interesting. Why would't it work for pro accounts?
And, how about Wordpress?
Portfolio • Workshops • Facebook • Twitter
Andy,
it's not a matter of it never working, but I haven't added to got to grab the copyprotected url.
yeah, i might look at Wordpress. This was a very quick hack, more proof of concept and would be better suited if I wrote it from scratch and didn't use blogger's pop-up window.
David
SmugMug API Developer
My Photos