fixed phpdoc, added common method to generate onclick handler, added tumblr support