summary refs log tree commit diff stats
path: root/includes/functions.php
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-12-07 17:11:22 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-12-07 17:11:22 -0500
commitbb736bb631788574137742f60dfaa2a808573af8 (patch)
treee840a6a4c24866c33e8a0bf51ff6044d4fb2adbf /includes/functions.php
parenta930e827048acf17d04a6af06c1616a72dee714a (diff)
downloadfourisland-bb736bb631788574137742f60dfaa2a808573af8.tar.gz
fourisland-bb736bb631788574137742f60dfaa2a808573af8.tar.bz2
fourisland-bb736bb631788574137742f60dfaa2a808573af8.zip
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.
Diffstat (limited to 'includes/functions.php')
-rwxr-xr-xincludes/functions.php4
1 files changed, 2 insertions, 2 deletions
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)
166 $popularity += ($getpost3['views']*2); 166 $popularity += ($getpost3['views']*2);
167 $popularity += ($getpost3['rating']*5); 167 $popularity += ($getpost3['rating']*5);
168 168
169 $getcomments = "SELECT COUNT(*) FROM comments WHERE page_id = \"updates-" . $id . "\" AND username <> \"Pingback\""; 169 $getcomments = "SELECT COUNT(*) FROM comments WHERE page_id = \"updates-" . $id . "\"";
170 $getcomments2 = mysql_query($getcomments); 170 $getcomments2 = mysql_query($getcomments);
171 $getcomments3 = mysql_fetch_array($getcomments2); 171 $getcomments3 = mysql_fetch_array($getcomments2);
172 $popularity += ($getcomments3[0] * 10); 172 $popularity += ($getcomments3[0] * 10);
173 173
174 $getpings = "SELECT COUNT(*) FROM comments WHERE page_id = \"updates-" . $id . "\" AND username = \"Pingback\""; 174 $getpings = "SELECT COUNT(*) FROM pingbacks WHERE post_id = " . $id;
175 $getpings2 = mysql_query($getpings); 175 $getpings2 = mysql_query($getpings);
176 $getpings3 = mysql_fetch_array($getpings2); 176 $getpings3 = mysql_fetch_array($getpings2);
177 $popularity += ($getpings3[0] * 25); 177 $popularity += ($getpings3[0] * 25);