Upgrade for drupal5?

mishhh - March 24, 2007 - 17:39
Project:mediumvote
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Do you intend to make this module compatible with drupal5?

It seems to be a very nice module, but it is compatible only to 4.7 version...

#1

joachim - February 2, 2009 - 17:31
Status:active» needs work

I don't know if anyone would be interested in this any more -- fivestar does the trick if you need stars.
However, I had need of a very simple +1 voting module that I could take and customize and this was the simplest code to start from.

Here's what I've done with this to get it to D5.

- update all hooks
- move load of css and js
- remove _mediumvote_get_modes -- the bare strings were getting stored in the DB. Voting wasn't working at all. Changed from constatns to the string values votingAPI expects
- added a voting permission
- separated theming functions into data and presentation: added get_WHATEVER functions that build the data then call the theme function.
- overhauled the ajax to use jquery. Based heavily on flag.module
- added a throbber. Again, flag module.
- combined the regular and ajax callbacks. Guess who? flag module
- theming function for the text returned by ajax.

TO DO
- I've not carried through ANY of the new theming to percentage voting! I don't need this at all right now and don't have time. The code is commented out and it shouldn't be too hard to adapt the theming stuff.
- Comments are currently disabled. Same thing!
- After voting with ajax, the widget is replaced with plain text. Ideally, the widget would get updated so you see the score and so you can change your vote, but I've not figured out how to reattach the jquery behaviour.

AttachmentSize
D5 conversion mediumvote.zip 8.35 KB
 
 

Drupal is a registered trademark of Dries Buytaert.