Main changes:
- Multiaxis rating support
- Average rating in node block
- Added short text description of rating, like "3/5" (readed as 3 stars of 5)
- Integration with karma to display "View all reviews", refer to: http://drupal.org/node/211803
- Fivestar tables restructure

Demo site: http://develcuy.elblog.de/review/

Attached source code.

Blessings!

Comments

Anonymous’s picture

Thanks for this. I got it working as advertised.

Is there anyway to get the 'full review' to be displayed as the 'comment' to the node as opposed to having to click read more to see the full review and to see the ratings per axis?

Also, is there a way to have the votes round up to the nearest .5 in order to prevent votes like 2.7/4?

TIA,

txcrew

develcuy’s picture

Status: Active » Postponed (maintainer needs more info)

txcrew, they are nice suggestions but have to add a bit of code. Would you like to collaborate with me? I'm sure we can successfully bring it new stuff if we work together, and lots more. Invitation is open for everybody.
Blessings!

Anonymous’s picture

I would be more than happy to do so, that is, if I knew how to develop myself. My area of expertise has been on the theming side of things. So unfortunately I can't really help you there.

How do you intend to build out this module? Is it going to be functionality that you eventually hope to be incorporated into the fivestar project or will it be an entirely new module?

txcrew

develcuy’s picture

I hope to incorporate everything, but this is not my module ;), so, (once I get free time) I'm going to work on incorporate as much as posible and then provide a new module named fivestar-extensions, just like and experimental release.

I thank your nice feedback, your suggestions have been annotated into my TODO list for coming patch.

Blessings!

Anonymous’s picture

For what its worth, maybe you should try to integrate this functionality into the Simple Review module, http://drupal.org/project/simple_review (which also relies on fivestar)

Nikkita’s picture

Hello develCuy
thanks for your modified fivestar module
but maybe you can explain, how can I add multiaxis rating to my content type like you did it on
http://develcuy.elblog.de/review/fivestar/view_all/1 ?
All that I've done till this moment is: I downloaded your version of fivestar module; on the edit page of my content type I checked "Enable Fivestar rating" checkbox, and added axis definitions like

return array (
  0 => 'vote_atmosf',
  1 => 'vote_salary',
  2 => 'vote_projects',
  3 => 'vote_career',
  4 => 'vote_boss'
);

what else should I do?

P.S. Sorry for my bad English...

takimberly’s picture

I'm attempting to set up the same thing for my site right now. I'm a complete newb to Drupal, php, plus this is the first time in 10 years I've tried doing anything serious with a computer. It looks like your project is exactly what I need for my goal. I want to have a handful of fivestar rating criteria that are averaged for one primary rating. I'm just completely lost right now as to how to implement that.

develcuy’s picture

Sorry for the delay, those are very busy days. I'm preparing fresh installation and annotations to provide you detailed instructions. I appreciate your feedback a lot.
Blessings!

develcuy’s picture

StatusFileSize
new189.29 KB

This is a new version of fivestar multiaxis with some bugs fixing.
Blessings!

quicksketch’s picture

Status: Postponed (maintainer needs more info) » Needs work

Hmmm, this issue seems to have gotten out of hand a bit. None of these features can be implemented into Fivestar unless they are broken down into separate issues. Multi-axis rating already has a start here: http://drupal.org/node/185074. Each change should be submitted as a separate issue and as a patch (http://drupal.org/patch/create) to help me review and test the code.

develcuy’s picture

I've uploaded an screencast with instructions to:
http://develcuy.blip.tv/#781382
and
http://develcuy.elblog.de/files/node_media/fivestar_multiaxis.avi

There is no audio, keep attention on pointer ;)

Blessings!

lpjames’s picture

develCuy, thanks for this. I downloaded the gz files and tried to install everything including VotingApi 1.5 and the latest version of multiaxis. I ran into some issues and suspected the database. So I looked at the fivestar.install file and found to create table statements for the exact same table (fivestar_comment). My database update script won't run because it tries to create the fivestar_comment table which is created already. The first create table is different than the second table.

What are the proper tables that should be created for multiaxis?

Thanks

develcuy’s picture

lpjames, I thank you a lot, you discovered the problem. SO
FROM NOW, when installing fivestar-multiaxis, PLEASE:
- DELETE ANY previous fivestar table from your database.
- INSTALL fivestar-multiaxis AND DON'T RUN ANY UPDATE.

And to check if you have the right table structure, it is:

CREATE TABLE {fivestar_comment} (
fc_comment_id int(11) NOT NULL,
fc_delta tinyint(1) unsigned NOT NULL,
fc_value tinyint(1) unsigned NOT NULL,
PRIMARY KEY (fc_comment_id,fc_delta),
UNIQUE KEY idx_comment_delta (fc_comment_id,fc_delta)
)

Blessings!

lpjames’s picture

develCuy, Thanks for the clarification on the table structure. Now there is a new problem. When I enable the settings on a particular content type, rate a piece of content, and save, I am not able to view the content again. I get a page not redirecting properly error. Also, when I try to create a new piece of content or go to the content type admin page, I see multiple lines of "Don't try to be funny, you already posted a review." I have no clue why this is happening. Can you help?

Thanks

zzemm’s picture

develCry, thanks a lot for such great modification of fivestar. As it is quite easy to generate rating list with average rating, but how is could be possible to create a View with particular axis?

lpjames, I also had such problem with "Don't try to be funny, you already posted a review." Also in some cases it genarate inifite loop.

My solution: in fivestar_comment.inc in function fivestar_comment_form_alter
after:

drupal_set_message("Don't try to be funny, you already posted a review",'warning');

comment (or just delete) these two lines:

drupal_goto('node/'.$form['nid']['#value']);
die();

syl’s picture

that really a great contribution, hope it will be integrer to fivestar soon.

Can't wait to use it.

zzemm’s picture

As I solved my request: create list of each axis
Here I put how I did it (probably it will be helpfull for someone).

1. I created Content type (Page) for each axis
2. Evey page included the code, which create listing of Top10:
`fnc_delta` - is the number of axis - 0,1,2,3,4, or 5
===================================================

$query_string = 'SELECT `title`, `nid`,`fnc_value`
FROM `node` INNER JOIN `fivestar_node_cache`
ON `node`.`nid`=`fivestar_node_cache`.`fnc_node_id`
WHERE `fnc_delta`=0
ORDER BY `fnc_value` DESC , `fnc_reviews` DESC';
$result_id=mysql_query($query_string);
$column_count=mysql_num_fields($result_id);

Print("<table border=0><TR><td>##</td><td>Node Title</td><td>Fivestar Rating</td></tr>\n");
$rank=1;
while ($row = mysql_fetch_row($result_id))
{
	print ("<TR align=left  valign=top>");
        print("<td>$rank  </td>\n");
	print("<td><a href=$base_root?q=node/$row[1]>$row[0]</a></td>\n");
        $tempv=$row[2]/20;
	print("<td>$tempv</td>\n");
	print("</tr>\n");
        $rank++;
        if ($rank>10) break;
}
print ("</table>\n");

============================================================
cheers

stenik09’s picture

Hi, I want to make sure I understand this correctly. Does 'multi-axis' mean the updated module will allow me to place more than one rating widget (say I want users to be able to rate a page based on how good the content is, and how good the included image are) on a page? If so, I'm having trouble getting it to work; I've provided axis labels, but I still only see one rating widget (and no label for it).

Thanks in advance!
_Nik

develcuy’s picture

@stenik09, please put special attention on the screencast I've posted above, if problem persist, install Devel module and clear your cache. And finally, I would love to debug it, feel free to contact me at http://drupal.org/user/125473/contact.

Blessings!

stenik09’s picture

@develCuy, thanks for the video! I've managed to get multi-axis rating to work, but only when posting a comment. Is there any way to allow users to vote on multiple axes directly from the node (without posting a comment)?

_Nik

develcuy’s picture

There is a work in progress using cck #185074: Let users rate on multiple axis, not sure if that is what your are looking for.

Blessings!

quicksketch’s picture

Using CCK, you're already allowed to rate on multiple access. Greg Harvey was nice enough to write up a killer handbook page on using it: http://drupal.org/node/234681.

The link above included is largely a duplicate effort of what's included in this thread.

@develCuy, if you're wanted to get these features into Fivestar now is the best time to include them. But I simply can't review code that isn't a patch. The new version of Fivestar already supports a color picker, better positioning of rollover text, vote saved confirmation, and several bug fixes.

I would strongly discourage anyone from using this forked version of the module unless the features can be broken down into patches and included in the main version.

develcuy’s picture

StatusFileSize
new41.51 KB
new35.82 KB

@quicksketch I'm still too busy but will try to submit patches as you ever requested.

CCK method looks wonderful!!! but depends on NodeComment, so is using heavy modules(from my point of view) I prefer the lightweight one (my further work I hope).

Priority #1: There is a big deal with my forked version because it uses different database structure (check images attached), I'm going to re-study Voting API & Fivestar for suggest a new structure.

Blessings!

Encarte’s picture

Subscribing.

develcuy’s picture

@quicksketch, about your comment at #185074: Let users rate on multiple axis, If you are going to remove the comments functionality from fivestar then there is no reason for me to work on patches to integrate my forked version. And if NodeReview empowers drupalmodules.com, I will redirect my patches there because is more relevant to what I did.

So, please close this thread if I understood well.

Blessings!

quicksketch’s picture

Status: Needs work » Closed (duplicate)

I'm not going to remove comment support, I'm just going to move it to a separate module so you can turn off the comment rating ability. If you're using nodereview for example, you don't want to have Fivestar comment reviews confusing your site admins.

Anyway, I'll close this up because I think the other patch gets us started in the right direction. We can work on multi-axis rating in a single thread.

paul kim consulting’s picture

Is there a way to get fivestar_static average across only 1 axis? I see it's available as an field option in views, but I don't think this is working. What parameters do I pass into the function to get this fivestar average rating for 1 axis?

Fanaile’s picture

So far this is brilliant :)

Thank you so much for contributing this. I've been searching for these capabilities for almost 2 years - I just wish I had found this earlier. I can't switch to using the nodecomment method of achieving multi-axis rating. When I installed nodecomment to try to set it up our site stopped showing the hundreds of thousands of comments already there. This works perfectly without hindering the other comments.

Since there's no version for this in Drupal 6, I've placed this on my main site at progressiveu.org, and after following zzemm's instructions to delete those two lines, so far this is working exactly the way we need it. I'm sorry if I'm a bit overzealous, but I'm very excited.

Are there any plans to make this an official release or to upgrade this for use with Drupal 6? I don't know a lot about php and even less about writing modules, but I would be willing to help where I can and learn to do more if someone's willing to help me with this. I am a fast learner... :)

Thanks again!