1

I've installed the Rate Module in order to add a simple thumbs up/down rating system on nodes. By default it displays the average percentage (see below) but all I want is to display a simple counter of up/down votes.

enter image description here

Any ideas?

3

Copy the file:

rate-template-thumbs-up-down.tpl.php

that you find in the module rate/templates/thums-up-down to your theme's template folder.

Then change these two lines that print out the percentage:

<div class="percent"><?php print $results['up_percent'] . '%'; ?></div>
...
<div class="percent"><?php print $results['down_percent'] . '%'; ?></div>

to this:

<div class="percent"><?php print $results['up']; ?></div>
...
<div class="percent"><?php print $results['down']; ?></div>
| improve this answer | |
  • 1
    Cheers buddy, works perfectly :) – SlightlyClever Sep 6 '14 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.