Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
mta_digg_it
I happened across the fact that Digg has implemented a new ‘smart’ digg buttons on the 6th. The biggest new feature here is that you no longer have to first ‘submit’ an article to get its “digg url” to use with the “Digg This” buttons and can now just reference the article’s permalink instead.
With that, it means you no longer have to manually submit articles to Digg, copy the digg URL into a custom field in Textpattern, and have the “Digg This” button pull the URL from said custom field (or, worst case, paste the JavaScript into each and every article manually).
With this in mind, I decided it was finally feasible to write a plug-in to do this (I almost did it for the digg-url-in-a-custom-field solution). So, here’s version 0.1 of mta_digg_it
: mta_digg_it-0.1.txt (full description here).
Let me know what you think.
Last edited by morgant (2007-02-26 02:43:46)
Morgan Aldridge
http://www.makkintosshu.com/
Offline
Re: mta_digg_it
There seems to be a problem with the link: http://www.makkintosshu.com/file_download/11 goes to an archive page instead of the plugin contents. Could you please check that? (Perhaps I’m missing something and the link is elsewhere ;)
Well I can get the ‘a’. But how do I put the circle around it?
Offline
Re: mta_digg_it
It appears that when the URL is rewritten (by my domain registrar) an extra ‘/’ gets stuck in there and Textpattern doesn’t like that. http://makkintosshu.dyndns.org:81/file_download/11 will work until I get switched over to a static IP & direct DNS mappings.
Morgan Aldridge
http://www.makkintosshu.com/
Offline
Re: mta_digg_it
mta_digg_it has been updated to version 0.2, including the following fixes:
- Correctly escapes apostrophes, quotes, backslashes, etc., when used in the
title
orbodytext
attributes (pulled from the article title by default). - Prevents cross-pollination of variables when multiple “Digg This” buttons appear on a single page.
Follow the above links for more information or grab the direct download here: mta_digg_it-0.2.txt
Morgan Aldridge
http://www.makkintosshu.com/
Offline
Re: mta_digg_it
Hello Morgan, first of all: great idea to supply such a plugin.
Second i just installed it on txp 4.0.5 and happen to have problems:
When mta tag is inserted into article body, then the body content dissappears on the site leaving no more, than the digg it button and the comments.
Any idea what i done wrong?
EDIT: I had at first used a sort of excerpt text in the bodytext attribute of the tag.
after i have now replaced this with <code><txp:excerpt /></code> the dugg button shows.
It should be noted, though, that the bodytext attribute should be the last in the row, as otherwise following attributes are not interpreted by the tag and instead shown in clear text.
Even in that working order now there is still a
<code> “ /> </code>
left in clear text. That indicates, that the excape of quotes within then bodystring tag might not work. In any case
<code> bodytext=”<txp:excerpt />” </code>
produces this entry
<code> digg_bodytext = ‘’; </code>
in teh resulting javascript.
Uhm. Now i am not sure if the tag delivers the bodytext attribute to digg at all. Any clues?
Thank you!
Last edited by jayrope (2007-11-08 10:34:51)
A hole turned upside down is a dome, when there’s also gravity.
Offline
Re: mta_digg_it
I believe this is due to the way Textpattern handles nested tags… or doesn’t, yet. Give asy_wondertag a try and see if that solves the issue.
If that doesn’t work, let me know because I had been considering changing the ‘bodytext’ attribute to be simple options such as “none”, or “overview” and it’d be easy to implement.
Last edited by morgant (2007-11-08 13:58:34)
Morgan Aldridge
http://www.makkintosshu.com/
Offline
Re: mta_digg_it
I don’t know how many people actually use this or care, but I’ve released another version (0.3) of my mta_digg_it plug-in today.
This release includes updated skin support (you can now use full-size, compact, or icon) and the ability to use the article excerpt as the body text submitted to Digg. Also, some minor updates to the documentation.
Download here:
Last edited by morgant (2008-05-19 11:20:40)
Morgan Aldridge
http://www.makkintosshu.com/
Offline
Pages: 1