WordPress.org

Ready to get started?Download WordPress

Forums

GD Star Rating Comments Integration (7 posts)

  1. thisislizz
    Member
    Posted 4 years ago #

    I am running GD Star Rating 1.7.5, WP 2.8.6, the Starscape theme, and PHP5.

    I am having some trouble getting a user's submitted rating to show up again on their posted comment.

    I followed the tutorial on comments integration on gdstarrating.com, and I was able to allow a commenter to submit a rating with his comment by adding the following code to comments_new.php:

    <?php if (defined("STARRATING_INSTALLED")) : ?>
    <p><?php wp_gdsr_comment_integrate_standard_rating(); ?>
    <label for="url"><small>Please Rate This Post</small></label>
    </p><?php endif; ?>

    Then to get the commenter's rating to show up alongside his comment, I changed the code in comments_walker.php just below the function start_el to look like this:

    <<?php echo $tag ?> <?php comment_class() ?> id="comment-<?php comment_ID() ?>">
    <?php if ( 'ul' == $args['style'] ) : ?>
    <div id="div-comment-<?php comment_ID() ?>">
    <div style="float: right">
    <?php
    wp_gdsr_comment_integrate_standard_result(get_comment_ID()); ?>
    </div>
    <?php endif; ?>

    But the commenter's rating does not show up. I don't know if the rating hadn't been stored to begin with or if my code is wrong.

    Thanks so much for any help!

  2. matrym
    Member
    Posted 4 years ago #

    Has anyone solved this yet?

  3. thisislizz
    Member
    Posted 3 years ago #

    Not solved yet, any help would be appreciated.

  4. kristi1981
    Member
    Posted 3 years ago #

    I am having the same exact problem. The star rating shows up in the comment box, but then it does not register that they have voted and the rating does not show up after they press submit.

    If you come up with any solution I would love to hear it. My issue is I am not even using the starscape theme and so the whole comment walker thing doesn't seem to be compatible.

  5. Derek Perkins
    Member
    Posted 3 years ago #

    Has anyone figured this out yet?

  6. Milan Petrovic
    Member
    Posted 3 years ago #

    This works just fine. Tutorial on plugin website is enough to make it work. I am doing few integrations each month specifically for this with different themes and it works.

  7. Derek Perkins
    Member
    Posted 3 years ago #

    There are four people on this thread that have used the tutorial on the website and it isn't working. Since the only other option is to pay $100 Euros for access to your support forum, I've decided to roll my own plugin from scratch. I do appreciate the work that you've done however.

Topic Closed

This topic has been closed to new replies.

About this Topic