• Resolved sirol81

    (@sirol81)


    Feature request:

    Can you add an option ?for?TS_Poll_Result?shortcode to sort results in order of % (the winner is the first row)
    Something like [TS_Poll_Result id=”1″ type=”bar” sort=”asc”]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author totalsoft

    (@totalsoft)

    Hello, dear sirol81.

    Thank you for contacting us. Our team is always ready to help you.

    Sorry, but right now we don’t have юthat option right now.

    But now our team is working on a plugin survey. We are making big changes. Added many features, options and themes. In the new version and as a poll, you can use the plugin.

    Customer satisfaction is our priority and we do our best to make your experience even better.

    Enjoy the plugin and in the meantime feel free to open a new thread if you have further questions.

    Thank you very much.??</img>

    Thread Starter sirol81

    (@sirol81)

    if anybody needs this hack to sort results by number of votes, you can edit your file

    /includes/class-ts_poll-function.php

    around line 3509 change the UKSORT function with this new USORT one:

    usort(
    $ts_poll_answers_columned,
    function($a, $b) {
    return strcmp($b["Answer_Votes"], $a["Answer_Votes"]);
    }
    );

    • This reply was modified 1 year, 9 months ago by sirol81.
    • This reply was modified 1 year, 9 months ago by sirol81.
    • This reply was modified 1 year, 9 months ago by sirol81.
    • This reply was modified 1 year, 9 months ago by sirol81.
    Thread Starter sirol81

    (@sirol81)

    the function to edit is called tsp_get_sorted_answers

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sort Results’ is closed to new replies.