Display Rate module results via Panels 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:

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


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 wizard, but I think there is way by doing something like the following.

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


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

Update:
I think I figured out that I need to create a custom content to print the output after reading it here. Tried this:

$block['content'] = rate_get_results('bias', $nid, $widget_id) $output['rating'];


But it looks like it does not do anything which is better then seeing a blank page.
print rate_embed($node, 'NAME', RATE_FULL);


Replace NAME with the machine name of the widget; the view mode can be RATE_FULL, RATE_COMPACT, RATE_DISABLED, RATE_CLOSED, RATE_COMPACT_DISABLED.