In this example, I’m going to use the site name as the Tumblr-requested name, and the article title as the Tumblr-requested description. You can, if you wish, use the article excerpt for the description, but as that’s an optional component you may not have it. As before with Facebook and Twitter, there are edits to be made to the archive page. Also as before, make backups of your files and database – this how-to is a simple copy + paste operation, but backups are always a good idea.
Here’s how your page will look with the Tumblr button enabled:
Copy and paste the archive page contents into your text editor of choice and look for the <div role=”complementary”> to locate the block of code that populates the sidebar. In my case, I’ve modded the code in sidebar so many times that Textpattern probably hates me. I’ve trimmed back the external links and put an <h4> after my feeds. This is the code you need for a Tumblr button:
<a href="http://www.tumblr.com/share/link?url=<?php echo urlencode(<txp:permlink />) ?>&name=<?php echo urlencode(<txp:title />) ?>&description=<?php echo urlencode(<txp:site_name />) ?>" title="Share on Tumblr" style="display:inline-block; text-indent:-9999px; overflow:hidden; width:81px; height:20px; background:url('http://platform.tumblr.com/v1/share_1.png') top left no-repeat transparent;">Share on Tumblr</a>
Next time: a Google Plus button. I spoil you, really I do.