From bb736bb631788574137742f60dfaa2a808573af8 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sun, 7 Dec 2008 17:11:22 -0500 Subject: Moved pingbacks to a seperate table Because pingbacks just aren't comments, they shouldn't be stored in the comments table. So, a new table has been created for them and the blog post view pages have been accomodated to show them at the bottom just like the related posts are shown. --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/functions.php') diff --git a/includes/functions.php b/includes/functions.php index 3e9382a..ee19391 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -166,12 +166,12 @@ function recalcPop($id) $popularity += ($getpost3['views']*2); $popularity += ($getpost3['rating']*5); - $getcomments = "SELECT COUNT(*) FROM comments WHERE page_id = \"updates-" . $id . "\" AND username <> \"Pingback\""; + $getcomments = "SELECT COUNT(*) FROM comments WHERE page_id = \"updates-" . $id . "\""; $getcomments2 = mysql_query($getcomments); $getcomments3 = mysql_fetch_array($getcomments2); $popularity += ($getcomments3[0] * 10); - $getpings = "SELECT COUNT(*) FROM comments WHERE page_id = \"updates-" . $id . "\" AND username = \"Pingback\""; + $getpings = "SELECT COUNT(*) FROM pingbacks WHERE post_id = " . $id; $getpings2 = mysql_query($getpings); $getpings3 = mysql_fetch_array($getpings2); $popularity += ($getpings3[0] * 25); -- cgit 1.4.1