I use the Rating module. I need to get bayesian rating value for every entry but not simply average summ. Is it possible?

The part of my template (this is standard example for Rating module usage):

{exp:rating:rank collection="Book Reviews" orderby="bayesian:overall" limit="10" paginate="bottom" dynamic="off"}
    <div class="entries">
       <h4>{exp:rating:stats collection="Book Reviews" entry_id="{entry_id}" precision="1"}<span style="float:right;">{stars_overall_avg} ({overall_avg}/5, based on {overall_count} review{if overall_count !="1"}s{/if})</span>{/exp:rating:stats}
       <a href="{url_title_path='rating_main/entry'}">{title}</a></h4>
       <p>Author: <a href="{path='rating_main/author_profile'}/{author_id}/">{author}</a></p>
       <p>Description: {if summary}{summary}{if:else}{body}{/if}</p>
   {if rating_no_results}<p>No results.</p>{/if}
       <hr />
      <p>Page {current_page} of {total_pages} pages &nbsp; {pagination_links}</p>

enter image description here

Best regards, Aleksey

  • Can you please update your question with your template code, specifically the tags you're using from Rating and the variables inside. Dec 6, 2013 at 13:29

1 Answer 1


I think you would need to write a custom plugin for this. It should be simple enough to pass an entry ID to a plugin, and then from the plugin query for the needed rating data and follow an algorithm to calculate the rating you need.

  • Yes, that's right. But I use Rating module which already contains entries ordering by this algorithm. Rating of each entry calculates by bayesian algorithm. But I can't receive the results of those calculations in such important place.
    – Alur
    Dec 6, 2013 at 5:20
  • Unfortunately built-in Bayesian value display isn't available in Rating. Calculating this value using PHP would be the way to go, as suggested in this answer. I recommend submitting this as a Feature Request under the specific add-on category. It'll also give other users the option to vote up the feature request, and help us prioritize features to add in upcoming versions of this add-on. support.solspace.com/support/discussions
    – Solspace
    Dec 9, 2013 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.