For web marketing training, presentations and workshops visit Pacifica Training. If you wish to ask questions about website marketing please head over and register free at the website marketing forum, a knowledge base and community driven discussion group.
Movable Type Digg Tag
Published: September 23, 2006
I wanted a plugin for Movable Type, which is the tool that runs this website, that allowed me to add a Digg link at the foot of every post. There's one at Majordojo but it doesn't validate and comes with a load of other stuff which I really didn't need. Since it needed to be hacked to validate I may as well write my own that does the job I want it to.
A semantic, validated Movable Type tag that adds a Digg link to your blog.
To install and run, follow the instructions below:
Download the script at http://blog.tn38.net/dev/diggit/DiggIt.pl
Upload the script to your plugins directory.
Open the individual archives template or whichever template powers your posts.
Add the following code where appropriate:
<p>Useful? Then <a href="<$MTDiggIt$>">Digg It</a>.</p>The output will be:
Useful? Then <a href="**correctly encoded url**" rel="external">Digg It</a>.Rebuild archives if necessary then validate.
Useful?
Assistance?
Comments
Byrne Reese says:
vijay says:
Thanks for the plugin. It works like a charm.
Michael Heraghty says:
Thanks for this Ed, but I had the same problem as I had when trying to install PromoteThis - a Smarty error - unrecognized tag 'MTDiggIt'.
My knowledge of things like Smarty is dim. Any suggestions?
Michael Heraghty says:
Ed, thanks for the response. Yes, the System Overview > Plugins screen tells me that it is correctly installed.
I have my blog set to build dynamically so, yeah, I guess this is the problem. If you find a workaround, be sure to let me know, thanks.
FYI - Promote This! has been updated to encode URL's properly.
Of course encoding ampersands as you have done is only "valid" for some HTML schemas, not all of them.