Greetings!

My company has developed a 5-star rating widget that we think we'd like to share with the Drupal community. We started with vote_up_down.module and reworked it to use our 5 star system. You can see it in action at www.ustudio.com. (You must be logged in to actually vote...feel free to register to check it out.)

It wasn't written in such a way to keep the old vote-up-down widget at all, so it might make more sense to release it as a seperate module, but I thought I'd post here first to get ball rolling. Ultimately it seems like a general purpose voting widget would be great, allowing the users to select up/down vs. 5 stars vs. whatever else.

Ideas?

CommentFileSizeAuthor
#1 vote_stars.tgz5.67 KBdatura-1

Comments

datura-1’s picture

StatusFileSize
new5.67 KB

OK I finally got a chance to post these files.

Please realize that this is not ready for distribution, as it is basically a recoded vote_up_down.module.

At the very least it should have a different module name so that it can coexist with the original vote_up_down module; at best the two could be merged to allow voting up/down style or stars rating style.

Also, in your node template you'll likely want to wrap the widget like so:

<div class="controls">
<?php print $vote_up_down_widget ?>
</div>

and use the following css:

.main-content div.controls {
    float: right;
    margin-left: 3px;
    padding: 0;
    cursor: default;
}

Well that's a start anyway! Let me know if you try it and have problems.

Kudos to Andy (no drupal.org account yet) for doing the bulk of the work on this!

frjo’s picture

Interesting example but it's not code I easily can incorporate in to this project.

What I have been thinking about is to make the voting widget more modular, making it easier to add new ones.

senpai’s picture

Status: Active » Fixed

Marking this as fixed, since it won't be incorporated into vote-up_down, and if the community wants it, it can be checked into CVS as it's own project.

Interesting thoughts in this module though.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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