Wordpress Plugin for Relative Digg Content

MOVED: http://ubrio.us/plugins


Relative Digg Wordpress Plugin – Add related digg story links to the bottom of your post based on keywords

Note (5/13/07):
I just looked over this code and I made a lot of mistakes. Just use it as an example/reference or clean it up. I hacked it together pretty quick when I was bored at work, so use your judgement.

Well, as you can tell by the post dates on the past few articles, I’m being lazy. This all changed the other day when I was messing around in a project with PHP and XML. Normally I think XML/PHP is the devil, but I remembered the SimpleXML classes in PHP5. This pretty much inspired me to write a little plugin for wordpress – well, that and my love for digg – that will add relative digg stories to the bottom of each post depending on the keywords you provide.

Its still in Beta mode, but if you guys are savvy enough to get it working I would greatly appreciate some feedback.

What you need in order to run this, as of right now

  1. PHP5 (should come with SimpleXML natively, but if not, you need this)
  2. FOPEN (some servers don’t support this)

I will probably re-write this to use cURL in the future to get around the FOPEN problem, and maybe even to get around SimpleXML. Either way, this is just up here to test the waters on the idea and get some general feedback.

(Ps: If your server doesn’t run PHP5 or allow FOPEN, be a man and get in that shell and roll your own :)

How To Install (almost the exact same procedure as my YouTube PlugIn)

  1. Upload “relative_digg.php” to your /wp-content/plugins/ folder
  2. In admin panel, go to: Plugins -> Relative Digg Stories -> Activate
  3. Switch over to Presentation -> Theme Editor -> (edit) Single Post
  4. Somewhere in there add <?php relative_digg(); ?>
    • Note: you can hardcode the tag using relative_digg('tagname');
    • Note: param setup: relative_digg('tagname', number_of_results, story_age, 'title');
  5. In your new post, somewhere near the bottom add: <!--digg:TAG-->

Let me know whatsup – hopefully some of you find this useful. Its terribly slow also, so I will have to check into that. Feedback is appreciated, yadda, yadda, etc.

Thanks

-rob




Comments

  1. Nude video gs February 16th

    Comment Arrow

    Good job and great design!


  2. Iacovos May 17th

    Comment Arrow

    interesting


  3. Agapios May 17th

    Comment Arrow

    Interesting…


  4. Photios June 5th

    Comment Arrow

    Interesting…


Add Yours

  • Author Avatar

    YOU


Comment Arrow



About Author

Rob Hurring

Ruby, Rails, PHP, bash... oh my!