summary refs log tree commit diff stats
path: root/includes
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-11-20 22:43:21 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-11-20 22:43:21 -0500
commit3796eb62b5a6a959d1a45697e08998adf7fd78a3 (patch)
tree071fbe2bca43664e4b303774ca0b1280398dd7f8 /includes
parent550d9853e19179d961b2f803c1fba72716a9da4c (diff)
downloadfourisland-3796eb62b5a6a959d1a45697e08998adf7fd78a3.tar.gz
fourisland-3796eb62b5a6a959d1a45697e08998adf7fd78a3.tar.bz2
fourisland-3796eb62b5a6a959d1a45697e08998adf7fd78a3.zip
Added commenting to Quotes module
Diffstat (limited to 'includes')
-rwxr-xr-xincludes/footer.php33
1 files changed, 24 insertions, 9 deletions
diff --git a/includes/footer.php b/includes/footer.php index e4c88c8..09be74f 100755 --- a/includes/footer.php +++ b/includes/footer.php
@@ -79,15 +79,11 @@ if (!isset($noRightbar))
79 $i++; 79 $i++;
80 } 80 }
81 81
82 $getcomments = "SELECT * FROM comments WHERE page_id LIKE \"updates-%\" ORDER BY id DESC LIMIT 0,5"; 82 $getcomments = "SELECT * FROM comments WHERE page_id LIKE \"updates-%\" OR page_id LIKE \"quote-%\" ORDER BY id DESC LIMIT 0,5";
83 $getcomments2 = mysql_query($getcomments); 83 $getcomments2 = mysql_query($getcomments);
84 $i=0; 84 $i=0;
85 while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) 85 while ($getcomments3[$i] = mysql_fetch_array($getcomments2))
86 { 86 {
87 $getpost = "SELECT * FROM updates WHERE id = " . substr($getcomments3[$i]['page_id'],strpos($getcomments3[$i]['page_id'],'-')+1);
88 $getpost2 = mysql_query($getpost);
89 $getpost3 = mysql_fetch_array($getpost2);
90
91 $getuser = "SELECT * FROM users WHERE username = \"" . $getcomments3[$i]['username'] . "\""; 87 $getuser = "SELECT * FROM users WHERE username = \"" . $getcomments3[$i]['username'] . "\"";
92 $getuser2 = mysql_query($getuser); 88 $getuser2 = mysql_query($getuser);
93 $getuser3 = mysql_fetch_array($getuser2); 89 $getuser3 = mysql_fetch_array($getuser2);
@@ -109,10 +105,29 @@ if (!isset($noRightbar))
109 } 105 }
110 106
111 107
112 $template->adds_block('COMMENTS', array( 'CODED' => $getpost3['slug'], 108 if (strpos($getcomments3[$i]['page_id'], 'updates') !== FALSE)
113 'TITLE' => stripslashes($getpost3['title']), 109 {
114 'AUTHOR' => (($website != '') ? '<A HREF="http://' . $website . '">' . $username . '</A>' : $username))); 110 $getpost = "SELECT * FROM updates WHERE id = " . substr($getcomments3[$i]['page_id'],strpos($getcomments3[$i]['page_id'],'-')+1);
115 $i++; 111 $getpost2 = mysql_query($getpost);
112 $getpost3 = mysql_fetch_array($getpost2);
113
114 $template->adds_block('COMMENTS', array( 'AREA' => 'blog',
115 'CODED' => $getpost3['slug'],
116 'ENDING' => '/',
117 'TITLE' => stripslashes($getpost3['title']),
118 'AUTHOR' => (($website != '') ? '<A HREF="http://' . $website . '">' . $username . '</A>' : $username)));
119 $i++;
120 } else if (strpos($getcomments3[$i]['page_id'], 'quote') !== FALSE)
121 {
122 $num = substr($getcomments3[$i]['page_id'],strpos($getcomments3[$i]['page_id'],'-')+1);
123
124 $template->adds_block('COMMENTS', array( 'AREA' => 'quotes',
125 'CODED' => $num,
126 'ENDING' => '.php',
127 'TITLE' => 'Quote #' . $num,
128 'AUTHOR' => (($website != '') ? '<A HREF="http://' . $website . '">' . $username . '</A>' : $username)));
129 $i++;
130 }
116 } 131 }
117 132
118 $getusers = "SELECT DISTINCT username FROM comments"; 133 $getusers = "SELECT DISTINCT username FROM comments";