Hi,
This is a feature request for the Wordpress Plugin.
Sorry if this is not directly relevant, but I thought if I could post it anywhere, it would have to be here.
Basically, right now the plugin will display multiple EVB buttons both in the index page (i.e where the teasers are) as well as in the full display of the blog entry.
My feature request is to add a new settings option in the plugin: to display in 1) Full view (default), 2) Index view, or 3) Both.
Why? because many wordpress bloggers may want to display the EVB only in the full view of their post. Rather than displaying 10-20 EVBs on the index page. And this would save a LOT of load on our Drigg sites, because each additional EVB display is an additional request, and slows everything down.
I looked at the code of the Wordpress plugin (I'm not a coder), and by the looks of it, it's relatively simple and clean, and anybody who can code in php can easily get this new setting done.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | upload_drigg.zip | 3.68 KB | unmicdrac |
| #10 | Drigg-Drigg_17.zip | 3.87 KB | drupalina |
Comments
Comment #1
PGiro commentedAnyone care to do this ? unmicdrac ?
Comment #2
unmicdrac commentedI think it can be done, but I do not have too much time on my hands these days. The Xmas is coming and I am working in a industry which is very busy this time of year, something like 12 to 14 hours a day. I will look into it and come with an estimate term for it sometime this next week hopefully.
PGiro, I asked you in the other thread if I can test that improved version of yours? Please, do not forget me on that.
Comment #3
PGiro commented@unmicdrac : I haven't forgotten you ! There are two parts to what I have done :
- one is to change how the IFRAME loads and that's broken so I can't release it. It's actually really complicated
- two is something only you can do (cannot be "released") and which can benefit from now : replace the drupal_add_css() and drupal_add_js() in you button templates with exactly what you need for the vote button you need. For the Extra Voting Forums button replace HEAD by
Make sure you change the path to the extra_voting_forms_all.css file on your server
Comment #4
drupalina commented@unmicdrac and @PGiro -- I'm gonna try to get this feature request back to it's oreginal topic. I'm wondering if any of you would be kind enough to look into the Wordpress plugin that Unmicrac provided. The problem is that it displays the EVBs not only in full view of worpress blog entries, but also in the wordpress teasers. Which is not only annoying, but also hits the Drigg site pretty severely if each time it is requesting 10-20 EVBs.
To be able to offer people a working Wordpress plugin (instead of a javascript) would be awesome, because everyone knows how to install Wordpress plugins. So please PLEASE try to look into this.
The original wordpress plugin was attached by Unmicdrac here: http://drupal.org/node/337186#comment-1124850
My original feature request above was to insert a piece of code inside that plugin that would enable people to decide whether they want the EVB to be displayed in
A) Full view only [default]
B) in Teasers
C) Both in Full view and in Teasers
Thank you for your kindness.
Comment #5
PGiro commentedI have no knowledge of wordpress but if you find me the web pages describing the API for this specific part, I can probably come up with something. But to be honest, it has to be a job < 5 minutes because I don't have the time right now...
Comment #6
drupalina commentedHi PGiro,
Thanks for the response.
I googled for the Wordpress API, it looks like there is loads of API information on Wordpress, and all very well documented. I just don't know which exactly keys do you need. But it is very easy to get hold of if you just google for it.
BUT, I have gone one step further and discovered a very cool WP plugin called Digg-Digg. It brings EVBs from Digg, Reddit, Dzone and Yahoo Buzz. And it lets the bloggers select where exactly they want to display he EVB and, importantly, on which pages, and what size EVB (Large or Compact, which I'm sure many people will also value). In short, it's an excellent plugin and very-very user firendly.
I tried to rewrite it by removing all Reddit, Dzone and Yahoo Buzz related code, and by renaming everything related to "Digg" to the name of my Drigg site. The whole thing just took me about 5 minutes, and I reduced it to about 200 lines of code. But when it came to inserting the necessary code for my 5x Drigg EVB, that's where I must have messed up, so I couldn't get it to work.
I wonder if you would be kind enough to give it a shot?
You can download the "Digg-Digg" plugin here http://downloads.wordpress.org/plugin/digg-digg.1.6.zip
I don't think you need any APIs for this, cause all the code and options are inside the plugin code. You just need to delete everything related to Reddit, Dzone and Yahoo-Buzz and rename all "Digg" words to "Drigg". And then where it says "iframe" I think you need to insert the code that calls the Digg EVB... and that's it.
I'm sure for someone like you it won't take more than 10 minutes, but if the Drigg community would have such a WP plugin, I'm sure it will make a lot of people happy.
What do you think?
Comment #7
PGiro commented@drupalina : great, I will take a look asap and provide the ZIP. Can you also attach the stuff you already changed ?
Comment #8
unmicdrac commentedSorry I didn't provided as promised. You have to understand that my main job is very demanding and it is not related too much with the internet. I succeded in modifying a plugin which is being used right now by many people which submit stories on blogoree.ro, the website I am in charge of. The drawback is that right now it is translated in Romanian.
If I manage to get a free half an hour this weekend, and I think I will, I will translate it in English and provide a simple readme on how to customize it for your drupal instalation. It does not if it is drupal 5 or 6, btw.
//laterz
I think I can do it tonight.
Comment #9
drupalina commented@PGiro - I don't have a saved file, because I could't get it to work (maybe I hacked and slashed it too much). All I did was remove Reddit, Yahoo etc and only leave Digg bits, and then mass-rename every "Digg" bit to "Drigg" (so as to make it into a generic name for Drigg community to modify as they wish). The whole process takes about 10 minutes. Anyway, I'll do it again, and post here for you to have a look.
BTW, there is a new version of that plugin 1.7 http://downloads.wordpress.org/plugin/digg-digg.1.7.zip
@unmicrac -- does your new version have an option not to display the EVB for each teaser in the index.php ??? Because that's my main reason for turning to Digg-Digg plugin. If yes, I'm certainly looking forward to your new version of the WP plugin.
Comment #10
drupalina commentedHi,
An Update: I've just hacked and slashed the latest Digg-Digg 1.7 plugin, as promissed. I took out all the Reddit, Dzone and Yahoo bits and left only Digg. Then I renamed everything "Digg" into "Drigg". Of course, I left the URL digg.com for the plugin to still work at least as a demo.
See the attachment!
Now it's over to you PGiro.
All you need to do is to replace the Digg javascript calling code in iFrame with a generic Drigg address, but in a way that would still make it work.
Also, it would help immensely if you could make the first option "home page" un-cheked by default!
Another super great thing about this plubin is that it lets the end user choose which size EVB they want (Large, Complact or Icon). It would be great if all these would be incorporated here in one plugin.
You may also want to refer to the original Digg-Digg_1.7 plugin, in case Drigg EVB is not supporting an iFrame, because the Yahoo Buzz code wasn't supporting it either.
I can't wait to see both of these WP plugins to work with Drigg EVB.
anyway... see the attached .zip file below...
Comment #11
unmicdrac commentedHere goes my plugin. All you have to do is change some things in the php life. For example the url of the drigg instalation, blogoree.ro in my case, the complete path to the js file and the link love provided. I do not have the time right now to make a full readme, but ask and I shall try to answer asap.