PDA

View Full Version : Showing Poll results in Percentages


munazip
11-04-2007, 09:57 AM
How do you show poll results in percentages? I want the results to be dis[lyed as percentages not numbers.

Micha
11-05-2007, 08:43 AM
Go to your templates\xhtml\box\plugin_poll.tpl and find this line of code:

<vte:value select="{answer.vote}" />
should be around line 33
and replace with this:
<vte:value select="{answer.get_percent}" /> %

That way you'll have percents instead of number of votes.

IrishGuinea
03-18-2008, 04:22 PM
There are two lines of this, not just one. Do I replace both or just one? I replaced both and it seems to work fine, just want to make sure thats what I should do...

<vte:value select="{answer.vote}" />


Also, view all polls still shows number voted. Can we make that show %'s too?

Micha
03-18-2008, 04:42 PM
There are two lines of this, not just one. Do I replace both or just one? I replaced both and it seems to work fine, just want to make sure thats what I should do...

Yes, both of them.

Also, view all polls still shows number voted. Can we make that show %'s too?

Go to your templates\xhtml\plugin\poll.tpl and change the same value somewhere around line 23.

Also you can remove <vte:value select="{LNG_PLUGIN_POLL_NUMBER_VOTES}" /> if you don't want "votes" word to appear.

IrishGuinea
03-18-2008, 04:48 PM
Thank you.

IrishGuinea
03-26-2008, 08:15 PM
All polls page is showing active and pending polls. Is there a way to just show active polls?

Thanks

TheLastMen
06-27-2008, 04:01 PM
display both numbers of votes and percents in the same line, how to

Micha
06-27-2008, 04:40 PM
Try like this:

<vte:value select="{answer.vote}" /> <vte:value select="{answer.get_percent}" /> %

TheLastMen
06-27-2008, 06:04 PM
good, another thing, how to display the total of vote in poll box