debate plugin results problem
  • I need some help with debates plugin. 
    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
  • 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,