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
- PHP5 (should come with SimpleXML natively, but if not, you need this)
- 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)
- Upload “relative_digg.php” to your /wp-content/plugins/ folder
- In admin panel, go to: Plugins -> Relative Digg Stories -> Activate
- Switch over to Presentation -> Theme Editor -> (edit) Single Post
- 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');
- Note: you can hardcode the tag using
- 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







Nude video gs February 16th
Good job and great design!
Iacovos May 17th
interesting
Agapios May 17th
Interesting…
Photios June 5th
Interesting…
Add Yours
YOU