Changeset 1222 for branches/1.2
- Timestamp:
- 02/23/10 12:08:52 (3 years ago)
- Location:
- branches/1.2/content/plugins/comments
- Files:
-
- 4 edited
-
comments.php (modified) (5 diffs)
-
languages/comments_language.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
templates/comment_form.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/content/plugins/comments/comments.php
r1200 r1222 3 3 * name: Comments 4 4 * description: Enables logged-in users to comment on posts 5 * version: 1. 45 * version: 1.5 6 6 * folder: comments 7 7 * class: Comments … … 158 158 $h->comment->thisForm = $h->comment->formStatus($h, 'select'); // returns 'open' or 'closed' 159 159 160 if ( ($h->page Name == 'comments')160 if ( ($h->pageType == 'post') 161 161 && ($h->comment->thisForm == 'open') 162 162 && ($h->comment->allForms == 'checked')) { … … 202 202 if ($can_comment == 'mod') { $safe = true; $h->comment->status = 'pending'; } 203 203 204 $result = array(); // holds results from addComment function 205 204 206 // Okay, safe to add the comment... 205 207 if ($safe) { 206 208 // A user can unsubscribe by submitting an empty comment, so... 207 209 if ($h->comment->content != '') { 208 $ h->comment->addComment($h);210 $result = $h->comment->addComment($h); 209 211 210 212 // notify chosen mods of new comment by email if enabled and UserFunctions file exists … … 223 225 //comment empty so just check subscribe box: 224 226 $h->comment->updateSubscribe($h, $h->comment->postId); 227 $h->messages[$h->lang['comment_moderation_unsubscribed']] = 'green'; 225 228 } 229 } 230 231 if ($result['exceeded_daily_limit']) { 232 $h->messages[$h->lang['comment_moderation_exceeded_daily_limit']] = 'green'; 233 } elseif ($result['exceeded_url_limit']) { 234 $h->messages[$h->lang['comment_moderation_exceeded_url_limit']] = 'green'; 235 } elseif ($result['not_enough_comments']) { 236 $h->messages[$h->lang['comment_moderation_not_enough_comments']] = 'green'; 226 237 } 227 238 } … … 238 249 } 239 250 251 if ($h->comment->status == 'pending') { 252 return false; 253 } 254 240 255 header("Location: " . $h->url(array('page'=>$h->comment->postId))); // Go to the post 241 256 die(); -
branches/1.2/content/plugins/comments/languages/comments_language.php
r1152 r1222 53 53 $lang['comments_form_delete'] = "Delete this and responses"; 54 54 $lang['comments_form_moderation_on'] = "<b>Note</b>: <span style='color: red;'>All comments are moderated</span>."; 55 56 /* Comment Submission */ 57 $lang['comment_moderation_unsubscribed'] = "You have unsubscribed from this thread."; 58 $lang['comment_moderation_exceeded_daily_limit'] = "You've exceeded the daily comment limit. This and any further comments will need approval."; 59 $lang['comment_moderation_exceeded_url_limit'] = "You used too many URLs so your comment will need approval."; 60 $lang['comment_moderation_not_enough_comments'] = "Your comment is awaiting approval."; 55 61 56 62 /* All Comments */ -
branches/1.2/content/plugins/comments/readme.txt
r1187 r1222 5 5 Description 6 6 ----------- 7 Enable your registered users to comment on each post. Supports avatars (e.g. Gravatar plugin), replies, unlimited nesting, editing, HTML tags (chosen by the Admin) and comment subscription.7 Enable your registered users to comment on each post. Supports avatars (e.g. Gravatar plugin), replies, unlimited nesting, editing, HTML tags (chosen by the Admin), pagination and comment subscription. 8 8 9 9 Instructions … … 15 15 Changelog 16 16 --------- 17 v.1.5 2009/02/23 - Nick - Shows messages for moderated comments: "Awaiting approval", "Exceeded Daily Limit", etc. 17 18 v.1.4 2009/02/09 - Nick - Option to hide comments after X down votes, plus pagination code changes 18 19 v.1.3 2009/01/17 - Nick - Added option for avatar size -
branches/1.2/content/plugins/comments/templates/comment_form.php
r885 r1222 35 35 <?php } // JavaScript changes this form! See comments.js ?> 36 36 37 <form name='comment_form' action='<?php echo BASEURL; ?>index.php?page=comments' method='post'>37 <form name='comment_form' action='<?php echo $h->url(array('page' => $h->post->id)); ?>' method='post'> 38 38 <textarea name="comment_content" id="comment_content_<?php echo $h->comment->id; ?>" rows="6" cols="50"></textarea><br /> 39 39 <div class="comment_instructions"><?php echo $h->lang['comments_form_allowable_tags']; ?><?php echo htmlentities($h->comment->allowableTags); ?></div>
Note: See TracChangeset
for help on using the changeset viewer.