• Resolved Martin

    (@golobm)


    Hello,

    reviewing the features and functionality of your plugin, I really need to say it’s awesome. Most of the stuff I defined for my project is there. You really did a great job, the plugin is outstanding!

    The only thing were I’m not sure if my specifications could be reached via the API are 2 things:

    -First: I want to use wp-types as a base for the project. I need to sort a custom post type by it’s overall ratings. The only meta data field I see is mr_rating_results, but it is not a single value. So do you think I can get my score by an automated process which I run once a day to create my own custom field, which I use to sort by then?

    -Second: I want to auto approve all rating above a specific value, and only moderate these which are not that good, and review them first. Do you think on of the hooks can be used to reach this? So the process could be: review them all, but set approved if better than X.

    thanks for your help, and have a nice day.

    regards
    martin

    https://ww.wp.xz.cn/plugins/multi-rating/

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

    (@dpowney)

    Hi, thanks for the kind words.

    #1 The Pro version stores ratings a bit differently. The Pro version stores all ratings (and variations e.g. overall raitng for a post, ratings for specific items, ratings across multiple rating forms and posts etc…) in a custom table. There are also actions to add logic whenever a rating is deleted and saved
    e.g. do_action( ‘mrp_save_rating_result’, $rating_result, $params );
    So you could hook into this and store an overall ratings as a single value in a custom field if you need.

    This also allows you to join tables with the WP Query so you can sort. See here under Sort WP Loop http://danielpowney.com/docs/code-snippets-api-samples/.

    The free version will catch up in future releases to store ratings the same way as the Pro version.

    #2 There’s no filter currently but I really like this idea and would be happy to add a filter in the core plugin so you can override the settings with custom logic. I can add this in the next couple of days and make it available.

    Cheers,
    Daniel

    Daniel

    Thread Starter Martin

    (@golobm)

    Hi Daniel,

    thanks a lot for your detailed answer.

    I just took the pro version, and would be happy to see and also test the filter dependent auto-approve.

    Do you think you can make it this week?

    Thank you very much, for this great plugin.

    Best Martin

    Plugin Author dpowney

    (@dpowney)

    Hi Martin,

    Please contact me here http://danielpowney.com/contact and I will provide you with the latest version before releasing publicly.

    The filter will be in the class-rating-form.php file as follows:

    $automatically_approve_ratings = apply_filters( 'mrp_automatically_approve_ratings',
    						$moderation_settings[MRP_Multi_Rating::AUTOMATICALLY_APPROVE_RATINGS], $post_id,
    						$rating_form_id, $sequence, $rating_entry_id, $rating_items );

    Thanks,
    Daniel

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Pro Version question and API’ is closed to new replies.