Posts: 2
Threads: 1
Joined: Mar 2012
I keep getting the error messages: "You cannot vote for your own comment!", "You have already voted for this comment", "You cannot report your own comment!" when testing on the application with multiple users on the same network.
All users have the same public IP address... Is there a setting I am missing that stop the IP address checking?
BTW, great app! the install was flawless, and the first tests were great, except for this issue.
Please help.
Posts: 2,894
Threads: 59
Joined: Jun 2010
Hi,
You can open /comments/vote.php and comment out the following code, like this:
PHP Code:
<?php
/*
//check if user is voting own comment
$query = mysql_query("SELECT ip_address FROM `".$mysql_table_prefix."comments` WHERE id = '$id' and ip_address = '$ip_address'");
$count = mysql_num_rows($query);
if ($count > 0) {
echo "<script language='javascript' type='text/javascript'>alert('" . CMTX_VOTE_OWN_COMMENT . "');</script>";
$issue = true;
}
//check if user has already voted
$query = mysql_query("SELECT ip_address FROM `".$mysql_table_prefix."voters` WHERE comment_id = '$id' and ip_address = '$ip_address'");
$count = mysql_num_rows($query);
if ($count > 0) {
echo "<script language='javascript' type='text/javascript'>alert('" . CMTX_VOTE_ALREADY_VOTED . "');</script>";
$issue = true;
}
*/
Similarly, in /comments/flag.php, comment out this part:
PHP Code:
<?php
/*
//check if user is reporting own comment
$query = mysql_query("SELECT ip_address FROM `".$mysql_table_prefix."comments` WHERE id = '$id' and ip_address = '$ip_address'");
$count = mysql_num_rows($query);
if ($count > 0) {
echo "<script language='javascript' type='text/javascript'>alert('" . CMTX_FLAG_OWN_COMMENT . "');</script>";
die();
}
*/