Hi, thanks for this module!

There's just one thing I would really love. One of the coolest features of pligg is its external vote modules. They let others put vote buttons on their own websites or blogs(ala "digg this"). It would be really great if this came to drigg sometime.

CommentFileSizeAuthor
#59 drigg_external.zip16.32 KBPGiro
#12 evb_patch.tar_.zip4.7 KBPGiro
#5 evb.zip20.69 KBlhd333

Comments

mercmobily’s picture

Hi,

I absolutely agree.
I will ask Anthony how that would possibly work - the module should allow it without too many problems!

Merc.

amccann’s picture

Version: » 5.x-1.x-dev

I Drigg this UP!

anilrgowda’s picture

that inclusion will be gr8

trzl’s picture

Yea, I like the sound of that

lhd333’s picture

StatusFileSize
new20.69 KB

Attached are the External Vote Button files ("evb") that Pligg uses.

I'm no coder, but I think this might push us in the right direction. See also this pligg thread: http://forums.pligg.com/pligg-mods/178-external-vote-button-evb.html with particular attention to this reply in that thread: http://forums.pligg.com/pligg-mods/178-external-vote-button-evb-2.html#p...

Calling all coders!

:)

mercmobily’s picture

Hi,

I am not sure Pligg's voting buttons are at all relevant for Drigg. The two pieces of software are so different, it's not even funny...

Merc.

silvanov’s picture

Any updates on progress with the external vote button? I'm sure everyone is anxiously awaiting this feature. Thanks again for all your hard work Merc.

Silvano

mercmobily’s picture

Hi,

It's in the pipeline, but right now I am working on other things (in order to pay my bills!)

Not sure when it will be ready.

Merc.

drupalina’s picture

+1 Drigg
(subscribing)

PGiro’s picture

Hi, I've hacked one up myself. I will post a patch later today.

I have added a button.js file which document.write() an IFRAME to a URL hosted in the drigg.module. If a URL is specified it is passed as a query parameter
The drigg.module hook then writes an HTML file with the jquery, drigg & extra_voting_form javascript includes and calls the extra_voting_show_form function with the same parameters as on the site. I have added the P3P content headers for the cross domain cookie IE shit.
If no URL is provided, it uses the referer_url which makes it easy for people which place the button on a single page rather than on recaps : example here http://www.bulle-immobiliere.fr/boursopap.html
Using good blogging platforms, users can change their template to inject the permalink so the button can be displayed on lists, see example here : http://pressecrackimmo.canalblog.com/
The site hosting the button is : http://www.crise-2008.fr/

I'm not really satisfied with it because it hits the server VERY VERY hard on pages with a lot of buttons so I will add some caching and write a PHP page that doesn't go through Drupals bootstrap. This will remove the possibility of seeing whether the user has already voted up or down and the current total but I don't see any other way of scaling. I am already seeing duplicate entries in my watchdog related to inserting the session id in the session table and I have virtually no traffic for the moment !

If anyone has any ideas, please contribute back.

BTW, you have done an aswesome piece of work by yourself, congrats !

mercmobily’s picture

Hi,

How do I say this...

*** I LOVE YOU ***

This is one of the features that is a little bit beyond me. It's _fantastic_ that you're working on it.
Really. I can't express it.

I will be happy to work on the caching side of things.

But! I have the feeling this should be an "extra_voting_forns" thing, more than a Drigg thing. Are you absolutely sure that Drigg is/should be at all involved?

I am really excited about this development. This is a "must have" feature that we need to roll out before porting it to D6...

Bye,

Merc.

PGiro’s picture

StatusFileSize
new4.7 KB

Hi merc,

Here is my patch against *.20 as per my previous post. Included are
- button.js which works as described above
- drigg.module which has
* translations to French (I'm new to Drupal... I know, I know now...) which you should just ignore
* a new URL hook definition and handler for the new URL
If you have any problems with the patch, just go and find the extra lines and don't bother with it...

I see your point in making remote working work with EVF only however I can't see how you can make it work outside of drigg since you need to figure out the node id from the URL. Of course, you could ask users to provide the node id but in my experience with this already simple way of doing it, it would be a recipe for disaster. Plus, I am setting up RSS feeds to automatically populate the database of users who have added the button to their site !

Disclaimer : in no way is this complete. Like I said, it needs big-time caching. It's great if you can add it onto it. It also needs to be smarter on how the IFRAMEs get loaded : on some pages I have 10 or so buttons : that's 10 simulatneous connections to the site and my hosting currently limits me at 5 connections in parallel to the DB... I'm pretty sure something can be done about that with jQuery. Any ideas ?

Cheers
Philippe

mercmobily’s picture

Hi,

I saw your patch.
This is really troubling me...!
I really, really, really want to add this feature to extra_voting_forms, and not Drigg. Up until now, drigg is _completely_ independent to any kind of voting widget used. People have used fivestar for example.

I am working on this one. I _know_ there is a neat solution - it's just a matter of finding it.

Merc.

mercmobily’s picture

Hi,

I think I have an idea. It makes things more configurable as well... I think it might work.
However, the cache issue is there. But that can be sorted out later.

Bye,

Merc.

PGiro’s picture

Yes, I understand how you've modularized everything. However, I believe that since Drigg is "independent" of voting scheme then the EVB should also be. If I use fivestar voting I want it as a EVB.
Furthermore, I will be putting the EVB on articles that should be ALREADY on the drigg site and if they are not it should give me a way to ADD them to the site (a nice DIV overlay popup would be great). So I think it's really Drigg functionnality.

I do see your point however with putting stuff that belongs in EVF there... For example, if login is required to vote, it should be handled by EVF (a DIV overlay would be absolutly fantastic in order not to break a user's navigation)

What do you think ?

mercmobily’s picture

Hi,

I agree that it's a Drigg issue, definitely.
However, it needs to be done so that:

1) It's independent of the voting widget
2) It works right if the user is not logged in

It will be tricky, but I think it's possible.

Merc.

mercmobily’s picture

Assigned: Unassigned » mercmobily
jfoo’s picture

will getting payed speed up the dev process of this button?

mercmobily’s picture

Hi,

I am having a 3 day holiday (the first one since 2006 -- the 4 weeks I had off from Drigg were just so that I could catch up with other work).

Money right now would be extremely welcome. I am working on a big contract, which pays me $60/hour, and that obviously gets absolute priority.

How much are you able to offer?

Merc.

jfoo’s picture

heh i guess its a no go then, I was thinking about 200€ for the thing. I know its worth much much more, but thats about as far as i can stretch atm. I apologize if it sounds offending.

drupalina’s picture

If it's of any help Webdevel is prepared to pay for EVB and Bury modules. see http://drupal.org/node/205510

mercmobily’s picture

Hi,

E200 would be a very good start.
Let's see if Webdevel is able to chip in as well.

jfoo: I wasn't offended at all. Thank you for your offer!

Merc.

jfoo’s picture

ok, let's keep talking about this :)

jfoo’s picture

how much "chipping in" is expected to get it going?

mercmobily’s picture

Jfoo,

I basically have to:

* Implement some extra autovoting features (paid work)
* Fix the issues which are assigned to me

I will then have a look at the _important_ EVB. The 200 euros will be _most_ welcome. All this should happen before the 25th of May, at which point I will be travelling around the world (!).

So... let's see what happens. It really depends on how nasty the EVB will be. It could be dead easy, or impossible to finish on time. IF I do finish it on time, then the 200 euros will be great :-D

Bye,

Merc.

jfoo’s picture

ok great, looking forward to it :)

consultneeded’s picture

Any updates on this issue? Great software, can't wait for what's to come!

- John

mercmobily’s picture

Hi,

We are about to start porting Drugg to Drupal 6. However, sincee this would be a different module, it shoudn't be too much of a problem working on it.

Now... I can still work on the EVB. Thing is, I am just about to leave Australia (home) for a few months, and am in the process of saying goodbye to people etc.

So... I will _try_, and this _is_ the next thing I will work on. But... maybe I won't make it before this week :-D

Merc.

consultneeded’s picture

If you can, that would be great. If not, no worries. I can always implement it later. Thanks so much for all the great hard work you have been putting into this project. It is much appreciated.

mercmobily’s picture

Hi,

Thank you for the kind words :-D

Merc.

dutsi’s picture

I am willing to pitch in as well to get the EVB.
I really need it. Please send me an email if you want to talk.

mercmobily’s picture

Hi,

No need to talk, thereeis obviously a great need for the EVB, and will give it priority.
However, I would prefer a reward system, rather than bounty: I will make it as soon as possible, and then you decide what to chip in when it's done.

Merc.

dutsi’s picture

Thank you for that, I will drop by and give you some green when it happens.

dutsi

mercmobily’s picture

Hi,

OK, just arrived to Rome!

Merc.

Richard_’s picture

Hi everyone, I wish to use EVB too and I am also willing to chip-in. I guess there will be many more...
Will track this thread and once it is finished let us now how and where to contribute for this module work...

Thank you for your effort.

drupalina’s picture

Just a small question: is Drigg EVB going to do the same thing as what "Digg This" drupal module is doing for Digg.com??? I mean an externally displayed karma form which will display the actual current karma number with up/down buttons for that link (and in case if it has not been submitted yet, then something like "Submit to Drigg-site.com")

mercmobily’s picture

Hi,

Drupalina: that's the idea.

Merc.

dutsi’s picture

Hey
I am not being impatient. Just wanted to check how things are going on this one.

Thanks
dutsi

mercmobily’s picture

Hi,

Well, I settled in Rome. I am still looking for a bigger monitor for my eeePC. I should be able to get one today.

I should be able to start working on things again very soon.

Merc,

unmicdrac’s picture

I do not want to be impacient or bug you too much, but there is any news on this?

mercmobily’s picture

Hi,

I am travelling. I am working a little less on Drigg. I should be able to concentrate more when I get to Panama. However, right now I am doing what I need to do in order to earn my crust, AND fixing bugs.

Bye,

Merc.

designbump’s picture

Being that Merc is incredibly busy, is there anyone else who might be willing to put together some code for this? The need is definitely there.

If I had the ability I would give it a shot, but I am still trying to perfect the art of CSS and Design.

Thanks for any help.

Regards,

John

http://www.designbump.com

zwaldowski’s picture

Though I'm not really using Drigg anymore, I think it might be pertinent to mention that reinventing the wheel won't be needed. An external widget system is being developed (possibly for eventual core inclusion) as a SoC 2008 project. This would infinitely lighten the load for the EVB project... all you need is auto-generated. node (e.g., http://www.site.com/drupal/title-of-scoop/voting) or block to vote on something.

http://drupal.org/project/embed_widgets

mercmobily’s picture

Hi,

Thanks!

Merc.

PGiro’s picture

Hi, I posted into that project about what they are doing. It seems they are not exactly doing what we want.

For those interested, I have bettered my previous button.js widget by making the IFRAMEs defer loading by 1s each incrementally.
So the first gets called after 1 s of the script being run, the second 2s, etc... Helps to alleviate the load on the server, espacially when the number of concurrent connections to the database is limited.
Works on FF2 & IE6 on windows and Safari on a mac at least

if (typeof C2008!="function"){function C2008(counter,divId,fullUrl) {frames[divId].location.href=fullUrl+'&destination='+escape(fullUrl); }}
if (!window.url_site) var url_site=""; if(!window.c2008_i) var c2008_i=0;
c2008_i=c2008_i+1; var full_url='http://www.crise-2008.fr/drigg/external_button?url='+escape(url_site);var div_id='C2008-'+c2008_i;document.write('<iframe scrolling="no" allowTransparency="true" name="'+div_id+'" id="'+div_id+'" src="" frameborder="0" style="border-color:gray;border-style:solid;border-width:1px;" scrolling="0" width="80" height="110"></iframe>');
var callString="C2008("+c2008_i+",'"+div_id+"','"+full_url+"')";setTimeout(callString,1000*c2008_i);

Hope you find it useful. Will cross-post to Drigg.

mercmobily’s picture

Hi

Guys, this got put on the backburner... sorry.
We are working on the D6 port of the module. We will then work on other smaller feature requests.
Unless there's a bounty, this feature will have to come last because it's quite big.

Merc.

designbump’s picture

In case anyone is still following this, a bounty has been opened up to get this feature completed. Merc said he will give it his full attention for $400 dollars total.

There has already been $90 pledged.

So if anyone else wants this done as much as I do feel free to go here: http://www.drigg-code.org/node/481 and chip in.

Every little bit brings us that much closer.

Best,

John

http://www.designbump.com

mercmobily’s picture

Hi,

Thanks designbump.
I don't mean to be stingy about this one. It's just that it's a quite involved feature, and I am insanely busy right now (but I am still working on Drigg!).

We are preparing for the next big release. The first bug-free version of Drigg!

Merc.

Richard_’s picture

Chip-in $50 there...
Total as of now is $200

Who's next? The goal is very close :)

designbump’s picture

Don't know if anyone is still following this but we are only 60 bucks away from having this thing built and implemented. Every little bit helps. Even 5 bucks will give us a boost. We are very close.

See here: http://www.drigg-code.org/node/481

Best,

John

satyavel’s picture

I have just chipped in $30 (under the username arjunan). Need it urgently,.. Others please contribute for this very important feature.

PGiro’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Assigned: mercmobily » PGiro

Just discussed this with Merc and I will be submitting a module to do this shortly. I've got the principle working on a hacked D5 installation (see #12 and #45) and need to package it cleanly on D6. Merc has made some suggestions on my code that I will be taking into account too. Merc will backport to D5 once D6 is out.

To the people who offered up the bounties : I have no idea how this bounty thing works but if you do pay the bounty, I would like you to give 75% to Merc. Merc and I have an agreement over this.

mercmobily’s picture

Hi,

Pgiro: as I said before in a private email, if you do the work (and it looks like you will), you will get the vast majority of the bounty money. I will do the collecting and will forward you a lump sum via Paypal.

I think you are the right man for this. I will definitely look after the code, and make sure that it's 1000% OK and functional.

Bye!

Merc

alliax’s picture

I don't know how you're planning to manage the database workload, but please try to reduce this at a minimum and do you think the evb feature will be suitable on a shared hosting package? Drigg can already run several thousands unique visitors a day without creating mayhem in sharing hosting (with cache enabled of course) but do you think that evb will add a high load on server ressources?

PGiro’s picture

alliax, yes it will add load to the server and how much depends on the number of page views of sites that have your EVB on their pages.

I am doing some javascript magic to spread the load : if your site is displaying multiple EVB on the same page, each button will be loaded with a 1 second delay.

I have tried doing it so that it doesn't go through the whole drupal bootstrap but then I cannot make it configurable enough for you to template the button & change the actual widget.

I have one last bug to fix and I can pre-release it.

mercmobily’s picture

Hi,

Go PGiro go!

Please send me the codee before pre-releasing it :-D

Bye!

Merc.

taqwa’s picture

Hi PGiro!

Thanks for working on this! If I may ask, do you have any sort of timeline for when you think you might be ready to share your code with the rest of us? Particularly, I'm interested in the Drupal 5 version.

PGiro’s picture

D6 will be today for pre-release [adding is broken, only extra voting forms button and no config (you need to change 1 file yourself)].
D5 will be backported by Merc and I expect it will be quick, I think the only thing to change will be how the module is defined and installed (it changed between D5 and D6)

PGiro’s picture

StatusFileSize
new16.32 KB

Here is the pre-release : download and unzip in sites/all/modules as usual.
Read README.txt, there is one file to edit. This is for Drupal 6.

I have tested with firefox and IE, everything should work including using a different vote button and adding.
Let me know how to it goes.

I have requested a CVS account to make this a full-blown module so I can maintain it easily. Hopefully I will get it tomorrow.
I will be adding a blogroll to this module.

mercmobily’s picture

Hi,

pgiro, rather than creating a different module, it would make a lot more sense if I gave you CVS access to Drigg and make you a co-maintainer.

Would you be into that?

Merc.

mercmobily’s picture

Hi,

PGiro, are you still here?
I have a few people who are _dying_ to get the EVB to work, and send you $400 :-D

Did you get CVS access? If so, I can give you write access to Drigg!

Merc.

PGiro’s picture

Hi Merc, yes I got it today. It took a week !
I will try to put it up tonight. If not, I'll do it tomorrow :)

PGiro’s picture

Status: Active » Fixed

I have created the project "drigg_external", see http://www.drupal.org/project/drigg_external

I have created a development release you can test, see http://drupal.org/node/336566/release. Because of the Drupal build system, it should be available in the next 12 hours. If you can't wait, you can get it from CVS

I am closing this issue. Please open any issues with the EVB at http://www.drupal.org/project/issues/drigg_external

mercmobily’s picture

Hi,

Great PGiro!
I will put a link to your module from Drigg's home page.

Bye,

Merc.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.