Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-20 23:53:49

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

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)

Offline

#2 2007-02-21 21:34:57

tranglos
Member
From: Poland
Registered: 2005-08-21
Posts: 11
Website

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

#3 2007-02-21 22:09:01

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

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.

Offline

#4 2007-04-16 22:47:59

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

Re: mta_digg_it

mta_digg_it has been updated to version 0.2, including the following fixes:

  1. Correctly escapes apostrophes, quotes, backslashes, etc., when used in the title or bodytext attributes (pulled from the article title by default).
  2. 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

Offline

#5 2007-11-08 09:52:13

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

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

#6 2007-11-08 13:58:09

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

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)

Offline

#7 2008-05-18 12:26:46

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

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:

mta_digg_it-0.3.txt

Last edited by morgant (2008-05-19 11:20:40)

Offline

Board footer

Powered by FluxBB