Digg Integrator Plugin Fix

The Digg Integrator plugin v1.1 for WordPress hasn’t been working correctly. The author, WildBil, has been working on a fix for the last week or so. I got tired of waiting for a fix lastnight and took it upon myself to create one.

In addition to the referring Digg URL not being detected, I think there’s also a problem when submitting a site to Digg that has a “Preferred Digg Topic” set. The preferred topic is never sent along to Digg because the variable containing the preferred topic isn’t being called correctly in diggIntegrator.php.

All of the fixes I mention here are to be made within the wjt_diggThisPost function inside diggIntegrator.php. That function starts on line 225.

Now, moving on. The problem with the referring digg URL not being captured is extremely simple, I think. The function that captures the referring digg URL is simply not being called correctly. Basically, it’s not being run when it needs to. Look at line 278 in diggIntegrator.php:

wjt_diDetect; // looks for incoming links from digg and helps this function continue appropriately

See, it’s calling the wjt_diDetect function, partially. I modified that line to look like this:

wjt_diDetect(); // looks for incoming links from digg and helps this function continue appropriately

Notice the added parentheses at the end of the wjt_diDetect function? Simply adding those parentheses will cause the referring Digg URL to be detected and inserted as meta data for the given post. Just as should happen.

Now for the preferred topic not being sent to Digg. This is a very simple fix as well. Take a look at line 298 in diggIntegrator.php:

'&topic='.diggTopic. //collect the topic (doesn't need encoding)

See the .diggTopic. part? Well, “diggTopic” isn’t a variable in diggIntegrator.php, obviously. However “$diggTopic” is. To get the plugin to send the preferred topic to Digg when digging a new URL, change line 298 to look like this:

'&topic='.$diggTopic. //collect the topic (doesn't need encoding)

Notice all that’s added is the dollar sign ($) to the front of “diggTopic”. Pretty simple.

If you’d like to download a fixed copy of diggIntegrator.php, you can get it from right here. I have only made the changes listed above to that script. I’m sure WildBil will release a more all-inclusive fix as there may be a few things I missed here. All I know is once I made the changes above, the incoming Digg URL was successfully detected and inserted. I tested on multiple URL’s of mine.

Let me know if this works for you guys or not.

UPDATE: WildBil posted version 1.2 of the Digg Integrator plugin. Instead of downloading that fixed diggIntegrator.php above, just head over to his site to get the newest version. Version 1.2 includes the fixes I mentioned here and a new feature that includes a sample of the button generated by wjt_diggThisPost. Go get it.

  • Pingback: digg Integrator v.1.2 » Return of the Whatzit()

  • Pingback: Wrapping Text Inside Pre Tags at T. Longren()

  • Pingback: WordPress Plugin: Digg This Reloaded at T. Longren()

  • Does anyone know the name of the wordpress plugin that creates a list of your posts in a category instead of just displaying them one after the other? I want it so that when someone clicks on a category they just get a list of posts from that category.

    I'm sure Ive seen one…and sifting through the WP site is a nightmare

  • What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?

  • how douo you fix a plugin that won`t initialize when you wan`t to watch video clips on the internet!!!!!!!!!!!!!!!!