Running into a pickle here. So many of us know that the Rate module does not smoothly integrate with Panels.

I discovered out a way to get the voting widget to show using a custom content with the following PHP code:

<?php
if (arg(0) == 'node' && is_numeric(arg(1)) && ($node = node_load(arg(1)))) {
   print rate_embed($node, 'bias', RATE_FULL);
}
?>

Has anyone had any luck with doing something similar to display only the vote results? (i.e. display total percent of that vote)

I'm not a PHP wiz but cant seem to get this to work. I think there is way by doing something like:

<?php
if (arg(0) == 'node' && is_numeric(arg(1)) && ($node = node_load(arg(1)))) {
   print get_rate_resluts($node, 'bias', RATE_FULL);
}
?>

But end up getting either blank pages or some fatal database errors. Thoughts?

Comments

ivnish’s picture

Issue summary: View changes
Status: Active » Closed (outdated)
Issue tags: -panels

Drupal 7 is EOL. Issue will be closed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.