summary refs log tree commit diff stats
path: root/includes
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-12-07 17:27:58 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-12-07 17:27:58 -0500
commit07aae7e8f8b752e6b37b338783a6d6fef290ee10 (patch)
tree1072b9822f7e52e7d28e92979c4e88a3e261ec55 /includes
parentbb736bb631788574137742f60dfaa2a808573af8 (diff)
downloadfourisland-07aae7e8f8b752e6b37b338783a6d6fef290ee10.tar.gz
fourisland-07aae7e8f8b752e6b37b338783a6d6fef290ee10.tar.bz2
fourisland-07aae7e8f8b752e6b37b338783a6d6fef290ee10.zip
Removed comment rating system
Diffstat (limited to 'includes')
-rwxr-xr-xincludes/comments.php10
-rwxr-xr-xincludes/functions.php26
2 files changed, 1 insertions, 35 deletions
diff --git a/includes/comments.php b/includes/comments.php index 682aa0e..ca5528e 100755 --- a/includes/comments.php +++ b/includes/comments.php
@@ -68,19 +68,11 @@ while ($getcomments3[$i] = mysql_fetch_array($getcomments2))
68 68
69 if (isset($username)) 69 if (isset($username))
70 { 70 {
71 if ($getcomments3[$i]['rating'] > -2)
72 {
73 $text = parseBBCode($getcomments3[$i]['comment']);
74 } else {
75 $text = 'This comment has been rated down below the threshold for public viewing (-1), suggesting that it may contain inappropriate or off topic content. (Or it may have been flame bait, or simply bad!)';
76 }
77
78 $template->add_ref($curID, 'COMMENTS', array( 'CODEDEMAIL' => md5(strtolower($email)), 71 $template->add_ref($curID, 'COMMENTS', array( 'CODEDEMAIL' => md5(strtolower($email)),
79 'USERNAME' => (($website != '') ? '<A HREF="http://' . $website . '">' . $username . '</A>' : $username), 72 'USERNAME' => (($website != '') ? '<A HREF="http://' . $website . '">' . $username . '</A>' : $username),
80 'DATE' => date("F dS Y \a\\t g:i:s a",strtotime($getcomments3[$i]['posttime'])), 73 'DATE' => date("F dS Y \a\\t g:i:s a",strtotime($getcomments3[$i]['posttime'])),
81 'RATING' => $getcomments3[$i]['rating'],
82 'ID' => $getcomments3[$i]['id'], 74 'ID' => $getcomments3[$i]['id'],
83 'TEXT' => $text)); 75 'TEXT' => parseBBCode($getcomments3[$i]['comment'])));
84 } 76 }
85 $i++; 77 $i++;
86} 78}
diff --git a/includes/functions.php b/includes/functions.php index ee19391..c71e69f 100755 --- a/includes/functions.php +++ b/includes/functions.php
@@ -215,30 +215,4 @@ function verifyUser($username, $password)
215 return (($_POST['username'] != '') && ($getuser3['username'] == $_POST['username'])); 215 return (($_POST['username'] != '') && ($getuser3['username'] == $_POST['username']));
216} 216}
217 217
218function updateCommentPop($id, $plus=1)
219{
220 $gettrack = "SELECT * FROM tracking_comments WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\"";
221 $gettrack2 = mysql_query($gettrack);
222 $gettrack3 = mysql_fetch_array($gettrack2);
223
224 $trackArr = explode(',',$gettrack3['comment_id']);
225
226 if (($gettrack3['ip'] != $_SERVER['REMOTE_ADDR']) || (array_search($id,$trackArr) === FALSE))
227 {
228 $setcomment = "UPDATE comments SET rating = rating+" . $plus . " WHERE id = " . $id;
229 $setcomment2 = mysql_query($setcomment);
230
231 if ($gettrack3['ip'] == $_SERVER['REMOTE_ADDR'])
232 {
233 $settrack = "UPDATE tracking SET rating = \"" . $gettrack3['comment_id'] . "," . $id . "\" WHERE id = " . $gettrack3['id'];
234 } else {
235 $settrack = "INSERT INTO tracking (ip,rating) VALUES (\"" . $_SERVER['REMOTE_ADDR'] . "\",\"" . $id . "\")";
236 }
237 $settrack2 = mysql_query($settrack) or die($settrack);
238 return 1;
239 } else {
240 return 0;
241 }
242}
243
244?> 218?>