AstonishMe Digg Plugin

9th Feb 2007 Danny

Once the plugin is installed you can add a Digg.com button to your posts using the Digg renderer checkbox. If you want all posts to have the button, just set the renderer to 'always' in the plugin settings. You can also change the button size and position in the plugin settings.

Settings

Digg button size: There are two different button sizes, as described here. Normal will look like the buttons on Digg.com. Compact is a smaller version.

Digg button placement: Do you want the button floated left at the top of your post, at the bottom or your post or manually placed with a skintag?

Customization

This is optional and for more advanced users. The plugin can place a Digg button at the top or bottom of a post with no need for you to edit your skin. If you want more control, set the placement to Manual and put this skintag in your skin's _main.php file inside the post loop:

PHP:

<?php $Plugins->call_by_code'am_digg'array() ); ?>
You can customize it further with these parameters:
  • 'before' => Code to be displayed before the button
  • 'after' => Code to be displayed after the button
  • 'bgcolor' => Background color for the digg button iframe
  • 'button' => compact or normal This will override the backoffice setting

Troubleshooting

If you make changes to the plugin settings and don't see the changes on your blog, you may need to delete the pre-renderered item cache. To do this, go to the Tools tab, choose the Main tab, then click on "Delete pre-renderered item cache."

Contents
  1. Introduction
  2. Installation (v1.8+)
  3. Usage and customization
 
 
 
 

24 comments

Comment from: Max
Wow! It is exactly the feature that I was looking for. Thanks!
 
02/15/07 @ 18:48
Comment from: Max
if post is not published (draft) I get this error


Fatal error: Call to a member function on a non-object in /home/buyaj/public_html/blog/plugins/am_digg_plugin/_am_digg.plugin.php on line 112

 
02/15/07 @ 22:03
Comment from: Bill O
Example of passing additional parameters:
call_by_code( 'am_digg', array(bgcolor=>'#669900', button=>'normal') ); ?>

Thanks for the Plugin!
 
03/10/07 @ 15:34
Very nice. Seeing some issues with placement on some skins, but the overall design is very flexible. Thanks for saving me the work of creating this myself.
 
03/14/07 @ 13:41
I have a fix for the following error:

Fatal Error: Call to a member function on a non-object in .../plugins/am_digg_plugin/_am_digg.plugin.php on line 112


I am not a great php hacker, but I placed a check around the method details that will have it ignore rendering the digg plugin when $Item is not set

I detailed it on the b2evolution site. Basically you can enclose the method with a if($Item) structure and the plugin won't render when the global $Item has not been set.
 
03/14/07 @ 14:12
Would it be possible to integrate this wonderful plugin with the RichTags one?
http://forums.b2evolution.net//viewtopic.php?p=53561#53561

I'm thinking we should keep all the social bookmarking tags on a single plugin and then be able to choose what buttons we would want to appear on our blogs. Otherwise, the layout will get very tricky once we try to align all the different plugin/buttons.

Thoughts?

p.s. I tried adding it to my site, but the layout just looked weird. I have to go back and play around with my skin. I removed it for now.

 
04/11/07 @ 04:42
Comment from: Danny
E.I.,
Thanks for the idea. The digg button has different information and functionality from other buttons, so it needs to take up a little more space. With the settings and the skintag or our plugin, you should have several options for size and location of the Digg button.
 
04/11/07 @ 13:36
Comment from: Ares
Brilliant tool! Very useful!
 
05/07/07 @ 07:08
Thank you for updating this!
 
12/22/07 @ 06:06
Just installed in 2.2. I am seeing this error:

Fatal error: Call to a member function on a non-object in /home/preci11/public_html/blogs/plugins/am_digg_plugin/_am_digg.plugin.php on line 115


Mark
 
12/22/07 @ 06:45
Comment from: Danny
Mark,

Which placement setting are you using? If you're using manual, make sure that you call the plugin somewhere inside the post loop.

Danny
 
12/22/07 @ 13:41
Comment from: Vin
Same error as Mark on December update

Call to a member function get_permanent_url() on a non-object in /blah/blah/_am_digg.plugin.php on line 115

I am not using manual, using "top".

This error occurs when I click on the name of the post in the admin dasboard(not when I click on "edit")
so the link is: http://mysite/news/admin.php?ctrl=items&blog=1&p=81

It doesn't happen on ALL news items, but most - whether they are published or deprecated.


 
12/22/07 @ 16:44
Comment from: Danny
Ok, so this is only happening in the backoffice? Let me see what I can do.
 
12/22/07 @ 18:29
Comment from: Vin
Danny, thanks for the fix. So I tried to test it out, clicked "DIG",
when to my Digg account and got from the Digg site:

"This submission cannot be verified at this time (#128)
Whoa! Something blew up. If you think you reached this error in error please don't hesitate to contact us"

Tried a couple of times...any idea what that means?

Thanks

 
12/22/07 @ 22:43
Comment from: Danny
Vin,
Can you enable clean urls on your site? The urls will be nicer and it will fix this Digg problem. It looks like the render hook I'm using is changing the & in your url to &. I'll work on fixing that, but using clean urls would be the quickest and best solution for you. Another option would be to try manual placement if you can't fix your urls.

Danny
 
12/22/07 @ 23:08
Comment from: Danny
I've got this bug fixed now. Grab the new file from SF.
 
12/23/07 @ 01:34
Works great now. Thanks!
Mark
 
12/24/07 @ 04:54
Comment from: Chriso
Thanks mate.
Keep up the good work.
 
12/27/07 @ 09:14
I am seeing a new problem. Suddenly, the plugin is not populating the did fields like it was yesterday. You can see this here: http://www.goodbullblog.com/aggie-sports/aggie-football/aggies-paterno-s-casket-comment-is-not-g Whenever I hit "DIG IT", the Title and Desc are not filled in automatically on the Digg site. Did I break something?
 
12/29/07 @ 04:54
Also, looks to me like the story was dug once, but that count is not showing up in the digg icon on the post.
 
12/29/07 @ 04:58
when ever i click save in the settings page, i get a sql error:

MySQL error!

Table 'a4at_bvlt1.T_items__prerendering' doesn't exist(Errno=1146)

Your query:

DELETE
FROM T_items__prerendering
WHERE 1=1


what's up here?
 
01/10/08 @ 19:27
I've downloaded and installed as usual, but I am not getting anything within my blog. The plugin is showing active withing the global settings, however it is not changing anything within my blog?
 
05/19/08 @ 00:25
I also get an error when trying to save, like PPNSteve.

MySQL error!

Table 'b2evolution.T_items__prerendering' doesn't exist(Errno=1146)

Your query:

DELETE
FROM T_items__prerendering
WHERE 1=1
 
08/14/08 @ 15:06
Follow up: to get rid of the error, I just went to the plugins/am_digg_plugin/_am_digg.plugin.php and commented out the lines 146 and 147, like so:

function PluginSettingsUpdateAction()
{
global $DB, $Messages;
//$DB->query('DELETE FROM T_items__prerendering WHERE 1=1');
//$Messages->add( sprintf( T_('Removed %d cached entries.'), $DB->rows_affected ), 'success' );
}

Everything else seems to be working fine.
 
08/14/08 @ 15:12

Comments are closed for this post.

 

B.O.P.I.T