Changeset 374 for trunk/b2-include/b2template.functions.php
- Timestamp:
- 09/20/2003 12:03:21 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/b2-include/b2template.functions.php
r363 r374 1158 1158 1159 1159 function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') { 1160 global $id, $b2commentspopupfile, $b2commentsjavascript, $post, $wpdb, $tablecomments ;1160 global $id, $b2commentspopupfile, $b2commentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS; 1161 1161 global $querystring_start, $querystring_equal, $querystring_separator, $siteurl; 1162 1162 $number = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_post_ID = $id"); … … 1165 1165 return; 1166 1166 } else { 1167 echo "<a href=\"$siteurl/"; 1168 if ($b2commentsjavascript) { 1169 echo $b2commentspopupfile.$querystring_start.'p'.$querystring_equal.$id.$querystring_separator.'c'.$querystring_equal.'1'; 1170 echo '" onclick="b2open(this.href); return false"'; 1171 } else { 1172 // if comments_popup_script() is not in the template, display simple comment link 1173 comments_link(); 1174 echo '"'; 1175 } 1176 if (!empty($CSSclass)) { 1177 echo ' class="'.$CSSclass.'"'; 1178 } 1179 echo '>'; 1180 comments_number($zero, $one, $more); 1181 echo '</a>'; 1182 } 1167 if (!empty($post->post_password)) { // if there's a password 1168 if ($HTTP_COOKIE_VARS['wp-postpass'] != $post->post_password) { // and it doesn't match the cookie 1169 echo("Enter your password to view comments"); 1170 return; 1171 } 1172 } 1173 echo "<a href=\"$siteurl/"; 1174 if ($b2commentsjavascript) { 1175 echo $b2commentspopupfile.$querystring_start.'p'.$querystring_equal.$id.$querystring_separator.'c'.$querystring_equal.'1'; 1176 echo '" onclick="b2open(this.href); return false"'; 1177 } else { 1178 // if comments_popup_script() is not in the template, display simple comment link 1179 comments_link(); 1180 echo '"'; 1181 } 1182 if (!empty($CSSclass)) { 1183 echo ' class="'.$CSSclass.'"'; 1184 } 1185 echo '>'; 1186 comments_number($zero, $one, $more); 1187 echo '</a>'; 1188 } 1189 1183 1190 } 1184 1191
Note: See TracChangeset
for help on using the changeset viewer.