GD Star Rating can rate only if a form is filed (3 posts)

  1. Louis_Dea
    Posted 3 years ago #

    Hi community,

    I would like to know if there's a way to disable the rating functionnality from GD Star Rating if a certain input field from a form isn't filled.

    For example, a visitor would be forced to fill a certain field with his name to be able to vote. (And then received the name data somewhere)

    Thank you very much for your help,
    I really appreciate your time!

  2. Septs
    Posted 3 years ago #

    I also need help with the GD Star Rating, did you find an answer Louis_dea?

  3. Louis_Dea
    Posted 3 years ago #

    Ok, I found out that you can do a condition like that :

    <?php if ( current_user_can( 'edit_posts' ) || ($comment->comment_approved == '0') || ($comment->comment_approved == '1')) { ?>

    And then insert the code to display the rating system :

    <?php wp_gdsr_render_multi($multi_set_id=0, $template_id=45, $read_only=false, $post_id=0, $stars_set="oxygen", $stars_size=16, $stars_set_ie6="", $avg_stars_set="", $avg_stars_size=16, $avg_stars_set_ie6="oxygen_gif", $echo=true); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic