HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
Is there a way to only show integer percentage but not float value?
-
Re: Is there a way to only show integer percentage but not float value?
Yes. like I said you could change the VIEW for this particular plugin if you don't want to modify the plugin itself. This is not a general technique for all plugins. changing the view "hiding" or overriding changes in the theme folder or changing a bootstrap function can get you in as much trouble or more than just forking… -
Re: Is there a way to only show integer percentage but not float value?
Do you see this line? https://github.com/hgtonight/Plugin-DiscussionPolls/blob/master/views/results.php#L45 $Percentage = ($Question->CountResponses == 0) ? '0.00' : number_format(($Option->CountVotes / $Question->CountResponses * 100), 2); the 2 at the end stands for number of decimal places. you would also probably want…
3 results