WordPress.org

Ready to get started?Download WordPress

Forums

GD Star Rating
How to display only individual user rating? (18 posts)

  1. Landapixel
    Member
    Posted 1 year ago #

    Hello,

    Is there any way to only show the rating for each individual user as they are voting?

    I don't want users seeing other users ratings.

    For example, if I go and rate a post with a 4 star out of 5, the rating result should show a 4 star. I want this same post to show as if nobody has rated it for the next user, and if they rate it a 5 star, I want the post to show 5 stars for that user, and so on...

    I will really appreciate any help I can get with this.

    Thank you in advance.

    http://wordpress.org/extend/plugins/gd-star-rating/

  2. widecast
    Member
    Posted 8 months ago #

    I'm also looking for this functionality. Has anyone figured this out? I'd be willing to pay for someone to customize the plugin if necessary...

  3. bhbilbao
    Member
    Posted 8 months ago #

    +1
    I asked for that 3 threads before.
    I think GD star rating works stupidily, too much options and code to make the same things.

  4. widecast
    Member
    Posted 8 months ago #

    I've figured out how to display the overall rating as text, like this:

    if (function_exists('wp_gdsr_render_article')) {
    	$gp_gdsr = wp_gdsr_rating_article();
    	$text_rating = $gp_gdsr->rating; //get the post's rating
    	if ($text_rating != 0) {
    		echo '<span>' . $text_rating . '/5.0' . '</span> - ';
    	}
    }

    If you can find a way to show blank stars to the user until they have personally voted, this would be resolved.

  5. bhbilbao
    Member
    Posted 8 months ago #

    @widecast, i dont know the way you are asking for.

    The way I said before is to modift the functionality of this:
    <?php wp_gdsr_render_comment() ?>
    1. only the user can vote himself in comments.
    2 then, we echo the result from database.

  6. widecast
    Member
    Posted 8 months ago #

    @bhbilbao, wp_gdsr_render_comment only works in the comment loop and I'm trying to use this functionality in the regular post loop.

  7. bhbilbao
    Member
    Posted 8 months ago #

    I know what you are looking for. There is a function that list the ratings of all users, but it takes the ratings of the commets loop, not the regular rating from the post loop.
    For that I suggest not to modify the regular post fuctionality.
    Modify the comment loop:
    1. only the user can vote himself in comments(with stars, the thumbs remains same).
    2 then, we echo the result from database.

  8. widecast
    Member
    Posted 8 months ago #

    I'm actually just trying to have the stars at the top of the post (not in comments) display as if there were no votes until they vote. Then the stars render with their vote.

    Maybe I'm not understanding your suggestion.

  9. bhbilbao
    Member
    Posted 8 months ago #

    The way Im telling you, in comments, we have the THUMBS to vote users. And the STARS that is the user rating for the article. (This is a vote that the user made himself and only one time).

    The we can echo the vote of that specific user in his comment, or list all votes in top of the page.

  10. bhbilbao
    Member
    Posted 8 months ago #

    The actual problem is that Thumbs and Stars makes the same thing in comments!
    I suggest to modify the stars function(mod it!). Then you can echo the result in comments or on top of the article.
    I think is better in comment because you see who is the person, his vote and his avatar.

  11. widecast
    Member
    Posted 8 months ago #

    I really want the vote at the top, not in comments. The functionality I want is exactly like this:

    http://www.imdb.com/title/tt1671513/?ref_=fn_al_tt_1

    Display the overall rating (7.5) and then next to that, "Your rating:" with blank stars next to it.

    I don't think I have the technical skills to mod the stars function so much. If you're available for freelance work, maybe you can do it for me.

  12. bhbilbao
    Member
    Posted 8 months ago #

    Yeah, i saw it. But is the same i said before. The users are who make the ratings, but in that page the vote system is on top of the page not in the comments.

    I will look for it, give me some days.

  13. bhbilbao
    Member
    Posted 8 months ago #

    Now I am looking the code, and the first problem is that the user MUST make a comment in order to vote stars appear.
    I think the way is to create a function code in top with empty stars that creates and empty(hidden) comment when the user vote in top.

    Tomorrow I will look for it.

  14. bhbilbao
    Member
    Posted 8 months ago #

    after <h1><?php the_title(); ?></h1> place this in top:

    
    
    <?php
    if (function_exists(wp_gdsr_new_comment_review)) {
    echo '<label>imdb Rating</label>';
    wp_gdsr_new_comment_review();
    ?>
    <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>">
    	<p class="form-submit">
    		<input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="IMDB RATING<?php echo esc_attr( $args['label_submit'] ); ?>" />
    		<?php comment_id_fields( $post_id ); ?>
    	</p>
    	<?php do_action( 'comment_form2', $post_id ); ?>
    </form>
    <?php
    }
    ?>

    In comments-template.php line about 1500
    function comment_form( $args = array(), $post_id = null ) { ..
    You must create a new comment_form2 based in that code for the imdb button avoiding to introduce a comment.(Making a comment is a MUST, for that, I suggest an empty-hide comment only for the vote).

  15. bhbilbao
    Member
    Posted 8 months ago #

    My apologies to the plugin´s author, Millan. The pluging works well.
    I finally see the code that prints the particular vote.
    In comment loop:

    <php wp_gdsr_show_comment_review($comment_id = 0, $zero_render = false, $size = 16, $style = "soft", $echo = true); ?>
    

    And then, just before the submit button(comments-template.php):

    
    <?php
    if (function_exists(wp_gdsr_new_comment_review)) {
    echo '<label>Your Rating</label>';
    wp_gdsr_new_comment_review();
    }
    ?>
    

    I dont know why nobody helped me ¿?

  16. widecast
    Member
    Posted 8 months ago #

    Thanks, bhbilbao. I will try this out!

  17. ivan_vl
    Member
    Posted 7 months ago #

    did it work? i tried to but did not understand where to put what kind of code

  18. realpros
    Member
    Posted 7 months ago #

    This message is for bhbilbao I want review and rating like zillow or trulia can you help and how much Sirous@realprosdc.com
    see example
    *******- Highly likely to recommend
    11/01/2013 - elena Agent
    Bought a Townhouse home in 2013 for approximately $550K in Vienna, VA.

    Local knowledge:*****
    Process expertise:*****
    Responsiveness:****
    Negotiation skills:*****

    Comments Area .......

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic