Discussions
Activity
Sign In
How it works
Newscoop Support
debate plugin results problem
Vote Up
0
Vote Down
Tomasz Rondio
July 2012
Posts: 63
Member
I need some help with
debates
plugin.
I have a
debate
here:
http://liberali.lab.sourcefabric.org/en/portal/news/117/Do-You-find-Tomek-attractive-[
debate
].htm
with vote form done like this:
{{debate_form template="poll.tpl" submit_button=false}}
...
I created poll.tpl but the form still goes to article page (but this is fine). I can see votes in admin panel but
debate
results are empty on article page.
I list results with this code:
{{ list_debates length="1" item="article"}}
<div class="poll_data overflow_hidden space_top_10">
{{ list_debate_answers order="bynumber asc" length="2"}}
<div class="answer_{{$gimme->current_list->index}}" style="width:
{{ $gimme->debateanswer->percentage|string_format:"%d" }}
%;"><span class="inner">
{{ $gimme->debateanswer->percentage|string_format:"%d" }}
%</span></div>
{{ /list_debate_answers }}
</div>
<div class="answers overflow_hidden">
{{ list_debate_answers order="bynumber asc" length="2"}}
{{if $gimme->current_list->index==1}}
<span class="answer float_left">{{$gimme->debateanswer->answer}}</span>
{{else}}
<span class="answer float_right">{{$gimme->debateanswer->answer}}</span>
{{/if}}
{{ /list_debate_answers }}
</div>
{{ /list_debates }}
Do You have any idea what is wrong?
2 Comments
sorted by
Votes
Date Added
Vote Up
0
Vote Down
Holman Romero
July 2012
Posts: 261
Member
Hey,
Try this:
{{ math equation="round(x)" x=$gimme->debateanswer->percentage format="%d" }}%
instead of:
{{ $gimme->debateanswer->percentage|string_format:"%d" }}%
That might make the trick. If not, then please attach the entire template file so that I can have a look and test it locally.
All Best,
Vote Up
0
Vote Down
Tomasz Rondio
July 2012
Posts: 63
Member
didn't help
sidebar-debate.tpl
3K
Add a Comment
Start a New Discussion
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
8,397
Sourcefabric
↳
Announcements
25
Newscoop
↳
Newscoop Support
2,189
↳
Newscoop Development
722
↳
Newscoop Security
13
↳
Newscoop Documentation
17
↳
Newscoop Themes
69
Airtime
↳
Airtime Support
3,139
↳
Airtime Development
1,286
↳
Airtime Français
146
↳
Airtime Documentation
14
↳
Airtime Hacks
102
↳
Promote your station!
37
↳
Airtime Security
11
Booktype
↳
Booktype Support
277
↳
Booktype Development
55
↳
Booktype Documentation
7
Superdesk
↳
Superdesk Development
264
↳
Web Publisher
21
Poll
No poll attached to this discussion.
Top Posters
Albert FR
1978
Martin Konecny
1860
Andrey Podshivalov
1526
Voisses Tech
1423
John Chewter
899
Daniel James
844
Roger Wilco
784
hoerich
627
Paul Baranowski
389
Cliff Wang
339