WordPress.org

Ready to get started?Download WordPress

Forums

BP Group Reviews
Presentation of the Ratings (2 posts)

  1. Robmcclel
    Member
    Posted 1 year ago #

    Boone and Team,

    I have installed your plugin on a site under development at http://thedigitalcomic.com My site is a book based site and we use our plugin to provide book ratings.

    My question is how can we change the location of the star rating (perhaps use a shortcode?), how to make the star rating linkable so a reader can click on it and go to the review panel, and how to put the number of ratings on a separate line than the star rating -- so it appears below the stars, for example (we currently have it disabled to protect the aesthetics, but I'd love to have it back).

    Thanks for the great plugin -- it really does solve a number of problems for us and I hope we can iron these last few issues out before we go live.

    Sincerely,
    Rob
    ThirdScribe

    http://wordpress.org/extend/plugins/bp-group-reviews/

  2. Boone Gorges
    Moderator
    Plugin Author

    Posted 1 year ago #

    Hi Robmcclel -

    The way the plugin is currently constructed, the best way to modify the appearance of the review as it appears in the group header is to unhook the BPGR functions and provide your own versions. In bp-group-reviews/includes/templatetags.php, you'll see an add_action() call right near the top. Unhook that in your own plugin/theme:

    remove_action( 'bp_group_header_meta', 'bpgr_render_review' );

    Then, copy the following functions into your theme, and add an additional prefix to them to make sure that there's no conflict:
    - bpgr_render_review()
    - bpgr_review_html()
    - bpgr_get_plugin_rating_html()

    In each of the copied functions, change references to the other copied functions accordingly. Eg,

    function digitalcomic_bpgr_render_review() {
        // etc etc etc
        ?>
        <span class="rating"><?php echo digitalcomic_bpgr_review_html() ?></span>
    }

    Then, make all of your necessary changes in your version of bpgr_get_plugin_rating_html(), which is the function responsible for building the markup.

    Finally, hook your function back where my function used to be:

    add_action( 'bp_group_header_meta', 'digitalcomic_bpgr_render_review' );

    Hope that helps!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.