The Entrepreneur Network, Perfect Business, is running a competition to win $1000 in business seed money. You do not need to be a member to vote and you can vote once per day. If you vote for me and I win the competition, you will have a chance to win $250 in cash.

Thanks for your support!

Vote for Me!


New WordPress Plugin - digg Integrator

As an experiment on this site, I’ve installed the digg Integrator WordPress plugin provided by Bill2Me.com. After seeing this plugin in use over at Gary Lee’s site, I decided it would be worth a try here.

Installation
The installation of the plugin was a breeze. After downloading the code, I simply dropped the diggIntegrator folder into my plugins directory and enabled the plugin. On the “Options” page, which for some reason is listed on the “Plugins” toolbar as opposed to the “Options” toolbar like most plugins, I adjusted the default settings to suit my style.

For the time being, I have opted to display the button on the main index page and on the single post page. In order to get the plugin to display, you need to add a little code snippet to the page. To avoid problems if the plugin is deactivated, I added an initial check to make sure the function exists before making the call. Here is the code snippet:

if(function_exists("wjt_diggThisPost"))
wjt_diggThisPost();

This code snippet must be placed inside the loop that displays each post. In my case, I have opted to display the plugin below the title information and set it to float to the left of the post content.

Problems
On Gary’s site, I’ve noticed a “Request-URI Too Large” error occurs from time to time with this plugin. From my initial look at the plugin, I would imagine this is because it includes the bodytext of your post in the URL to digg. Digging (sorry, no pun intended) into the code a little more, one of the functions that renders the “digg” button is limiting the bodytext to 340 characters but the other method does not truncate the bodytext at all.

If I had to guess, Gary is calling the “wjt_diJavaButton” or “wjt_diCheck” function to display the digg button. As you can guess, those are the functions that do not limit the length of the bodytext. In my case, I am calling the “wjt_diggThisPost” function and that does truncate the length of the bodytext so I do not believe I will experience the “Request-URI Too Large” error.

Okay, I just checked the site and realized that this error is occurring on my site as well so I will need to debug this script a little bit to resolve the issue.

Feedback
Please let me know if you encounter any odd behavior with the site now that this plugin is enabled. I’ll be trying to resolve the issue with the error message mentioned above in the meantime.

I’d be very interested to hear your thoughts on this new plugin. What do you think about the placement within the post? Do you think it will increase the “digg-ability” of any posts versus just having the “digg” link in the list of social bookmarks at the end of each post?

*Update* I confirmed the error was being caused by the bodytext not being truncated properly. The “wjt_diJavaButton” function requires a modification to limit the length of the bodytext. However, I am experiencing odd behavior with the bodytext when it includes HTML tags in the body. I tried to add the strip_tags method in PHP but that did not completely resolve the issues. For the time being, I have modified the diggIntegrator plugin to remove the bodytext parameter from the link as I think it is too buggy to be suitable for use.

del.icio.us Digg Netscape StumbleUpon Technorati


RSS feed| Trackback URI

3 Comments»

Comment by Zedd Subscribed to comments via email
2007-06-24 03:47:55
MyAvatars 0.2

I modified line 289 to:
‘digg_bodytext = “‘.urlencode(get_the_content(),0,340).’”;’;

There was no limit before and I was getting the same error. As soon as it limited to 340 characters, the error went away.

Just my 2 cents.

Comment by derek
2007-06-25 10:30:44
MyAvatars 0.2

Thanks for sharing your fix. For the time being I have dropped the plugin in favor of the simple text link at the bottom of each post.

It was getting a little disheartening to see each post with the big “0″ for the digg plugin. :lol:

 
 
Comment by kamyonet
2007-11-19 07:35:53
MyAvatars 0.2

Thanks so much four sharing.It’s very usefull.

 
Note: This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage. Keyword only entries will have the link removed.

Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line=""> in your comment.