4 Responses to “Human factor problems”

  1. Marco

    February 23, 2009
    at 7:54 PM

    What i can say…great job with this plugin.
    I’ve only a question,and i think it could be a usefull response to all guys havin such a mind problem…
    What happen if…
    I rate a post,then i delete the cookie and trying to tove again?

    Looking at the source code,the check_vote function do the trick,
    and if a user is not logged in you check if that IP has voted for that POST.

    Now,my IP is not fixed so,is is possible that another guy getting my IP in the next future cannot rate for this post???
    Or again,what if I’m behind an office with multiple users having the same IP?

    Thanks in advance
    Marco

    GD Star Rating
    loading...
  2. Marco

    February 23, 2009
    at 9:28 PM

    This is my solution,i would like to have your opinion:
    The idea is checking if within a time period a user with the same IP has rated(legged or not),then if no results are coming from this checking if the logged user has rated.
    So i was thinking to modify this:

    if ($user > 0)
    $votes_sql = sprintf(“SELECT * FROM %s WHERE vote_type = ‘%s’ and multi_id = %s and id = %s and user_id = %s”,
    $table_prefix.$table, $type, $set, $id, $user
    );
    else
    $votes_sql = sprintf(“SELECT * FROM %s WHERE vote_type = ‘%s’ and multi_id = %s and id = %s and ip = ‘%s’”,
    $table_prefix.$table, $type, $set, $id, $ip
    );

    into this:

    $votes_sql = sprintf(“SELECT * FROM %s”,$table_prefix.$table);
    $votes_sql .= sprintf(“WHERE vote_type = ‘%s’ and multi_id = %s and id = %s and ip = ‘%s’ and timestamp 0)
    {
    $votes_sql .= sprintf(“OR WHERE vote_type = ‘%s’ and multi_id = %s and id = %s and user_id = %s”,
    $type, $set, $id, $user
    );

    }

    By this way you can also avoid users that rated previously to rate again when they are logged.
    I would like to know what do you think about this.

    Marco

    GD Star Rating
    loading...
  3. Marco

    February 23, 2009
    at 9:31 PM

    Sorry but wordpress cutted off some rows of my comment.
    Contact me if you can.

    GD Star Rating
    loading...
    • MillaN

      February 23, 2009
      at 9:38 PM

      They can’t vote again because both IP or cookies will prevent it. I am not sure about timestamp in your code.

      GD Star Rating
      loading...

Comments are closed.

Social Networks

Subscribe via Feedburner Flickr Images

Feedburner updatesFeedburner

Sign up to receive all latest news about GD Star Rating directly to your email.