Return to Support

Integrate GD Star Rating into comments form

Home Forums Graphene WordPress theme Support Integrate GD Star Rating into comments form

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1976
    KevinN
    Member

    I’m trying to integrate a rating option into my comments form. I have GD Star Rating added as a working plugin, but I want users/visitors to be able to enter their own review to the post via the comments field.

    To do this I need to add the following code to the comments form…

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

    which i got from this post:

    http://www.gdstarrating.com/2009/05/27/comments-integration-1/

    But i’m not finding where to put this code. I’ve looked at the using a chile and the functions.php but it is not clear where I would put this. It would be great to have this display just above or below the text field in the form.

    #22109

    Okay, this looks cool if you can get it to work.

    I would use a Graphene action hook widget area. To learn how to do this, start with this tutorial:

    http://blog.kjodle.net/2011/11/04/graphene-action-hook-widgets-an-easy-way-to-modify-your-blog/

    I would suggest using the “graphene_before_commentform” widget area in comments.php.

    Because you are trying to insert php code, you will also need to install the PHP widget; instructions are in the tutorial.

    Give it a shot and let us know if you run into problems or if you get it working.

    Ken

    (Code between backticks, please. I’ve fixed this for you.)

    #22110
    KevinN
    Member

    Thanks so much for the quick response and excellent advice. worked as advertised!

    I really do appreciate it.

    KN

    #22111

    I’m glad it worked. Post a link sometime. I’d love to see this in action.

    #22112
    KevinN
    Member

    The review block is rendered and works as I had hoped, but the display isn’t ideal. I would love it if i could get it to display after the ‘leave a reply’ text. You can see an example on my site here…

    http://www.portlandbrewpubs.com/testcomment/

    My next hurdle is to tackle getting the ratings to display in each comment. There is another post about this

    http://www.gdstarrating.com/2009/05/28/comments-integration-2/

    but it does not offer much information and I’m stumped…

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.