Adding "post to" links for, digg, and ma.gnolia in Textpattern

Here’s how to add “post to” links for, digg, and ma.gnolia to individual articles in Textpattern.

Update: Fixed it so the links add urlencoded titles to the output. It’s a bit ugly, but seems to work ok. And I’m having some issues with displaying the PHP code properly, so bear with me.

post to <a href="<txp:permlink />&amp;title=<txp:php>$a = title (array ());echo urlencode($a);</txp:php>">


post to <a href=";url=<txp:permlink />">digg</a>


post to <a href="<txp:permlink />&amp;title=<txp:php>$a = title (array ());echo urlencode($a);</txp:php>">ma.gnolia</a>

Clicking one of the those links will automatically post a permanent link for an article and, in the case of and ma.gnolia, the title to one of the above services.