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. --- pages/blog.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'pages') diff --git a/pages/blog.php b/pages/blog.php index c3f656b..ab198a0 100755 --- a/pages/blog.php +++ b/pages/blog.php @@ -105,6 +105,27 @@ if (isset($_GET['post'])) { $template->display(); } + + $getpings = "SELECT * FROM pingbacks WHERE post_id = " . $getpost3['id']; + $getpings2 = mysql_query($getpings); + $i=0; + while ($getpings3[$i] = mysql_fetch_array($getpings2)) + { + if ($i==0) + { + $template = new FITemplate('pingbacks'); + } + + $template->adds_block('PINGBACK', array( 'TITLE' => $getpings3[$i]['title'], + 'URL' => $getpings3[$i]['url'], + 'DATE' => date('F d<\S\U\P>S Y', strtotime($getpings3[$i]['pubDate'])))); + $i++; + } + + if ($i > 0) + { + $template->display(); + } } else { generateError('404'); } -- cgit 1.4.1