Version Description
Download this release
Release Info
| Developer | markjaquith |
| Plugin | |
| Version | 2.0.6 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.4 to 2.0.6
- readme.html +0 -6
- readme.txt +5 -1
- subscribe-to-comments.php +146 -129
- subscribe-to-comments.pot +152 -110
readme.html
CHANGED
|
@@ -27,12 +27,6 @@
|
|
| 27 |
<li>Optional: If you would like to enable users to subscribe to comments without having to leave a comment, place this somewhere in your template, but make sure it is <strong>outside the comments form</strong>. A good place would be right after the ending <code></form></code> tag for the comments form: <code><?php show_manual_subscription_form(); ?></code></li>
|
| 28 |
</ol>
|
| 29 |
|
| 30 |
-
<h2>Change Log</h2>
|
| 31 |
-
<ul>
|
| 32 |
-
<li>2005-06-09 beta 1 released</li>
|
| 33 |
-
<li>Alpha development took place between March and June of 2005</li>
|
| 34 |
-
</ul>
|
| 35 |
-
|
| 36 |
<h2>Notes</h2>
|
| 37 |
<ul>
|
| 38 |
<li>The function >?php comment_subscription_status(); ?> can be used within the comments loop to determine if a comment's author is subscribed or not. e.g.
|
| 27 |
<li>Optional: If you would like to enable users to subscribe to comments without having to leave a comment, place this somewhere in your template, but make sure it is <strong>outside the comments form</strong>. A good place would be right after the ending <code></form></code> tag for the comments form: <code><?php show_manual_subscription_form(); ?></code></li>
|
| 28 |
</ol>
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
<h2>Notes</h2>
|
| 31 |
<ul>
|
| 32 |
<li>The function >?php comment_subscription_status(); ?> can be used within the comments loop to determine if a comment's author is subscribed or not. e.g.
|
readme.txt
CHANGED
|
@@ -23,4 +23,8 @@ Subscribe to Comments 2 is a WordPress plugin that allows commenters on an entry
|
|
| 23 |
|
| 24 |
= I'd like the subscription checkbox to be checked by default. Can I do that? =
|
| 25 |
|
| 26 |
-
By default, the "subscribe" checkbox is unchecked, but you can change that in the options (i.e. so that it is checked by default).
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
= I'd like the subscription checkbox to be checked by default. Can I do that? =
|
| 25 |
|
| 26 |
+
By default, the "subscribe" checkbox is unchecked, but you can change that in the options (i.e. so that it is checked by default).
|
| 27 |
+
|
| 28 |
+
= My subscription checkbox shows up in a strange place. How do I fix it? =
|
| 29 |
+
|
| 30 |
+
Try unchecking the CSS "clear" option.
|
subscribe-to-comments.php
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
Plugin Name: Subscribe To Comments
|
| 4 |
-
Version: 2.0.
|
| 5 |
Plugin URI: http://txfx.net/code/wordpress/subscribe-to-comments/
|
| 6 |
-
Description: Allows readers to recieve notifications of new comments that are posted to an entry
|
| 7 |
-
Author: Mark Jaquith
|
| 8 |
-
Author URI: http://
|
| 9 |
*/
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
/* -------------------------
|
| 18 |
What follows are the functions that display things in your comments form.
|
|
@@ -33,7 +33,7 @@ function show_subscription_checkbox ($id='0') {
|
|
| 33 |
<?php /* This is the text that is displayed for users who are NOT subscribed */ ?>
|
| 34 |
<?php /* ------------------------------------------------------------------- */ ?>
|
| 35 |
|
| 36 |
-
<p style="clear: both;" class="subscribe-to-comments">
|
| 37 |
<input type="checkbox" name="subscribe" id="subscribe" value="subscribe" style="width: auto;" <?php if ($sg_subscribe->default_subscribed) echo 'checked="checked" '; ?>/>
|
| 38 |
<label for="subscribe"><?php echo $sg_subscribe->not_subscribed_text; ?></label>
|
| 39 |
</p>
|
|
@@ -46,7 +46,7 @@ function show_subscription_checkbox ($id='0') {
|
|
| 46 |
<?php /* This is the text that is displayed for the author of the post */ ?>
|
| 47 |
<?php /* ------------------------------------------------------------- */ ?>
|
| 48 |
|
| 49 |
-
<p style="clear: both;" class="subscribe-to-comments">
|
| 50 |
<?php echo str_replace('[manager_link]', $sg_subscribe->manage_link($email, true, false), $sg_subscribe->author_text); ?>
|
| 51 |
</p>
|
| 52 |
|
|
@@ -56,7 +56,7 @@ function show_subscription_checkbox ($id='0') {
|
|
| 56 |
<?php /* This is the text that is displayed for users who ARE subscribed */ ?>
|
| 57 |
<?php /* --------------------------------------------------------------- */ ?>
|
| 58 |
|
| 59 |
-
<p style="clear: both;" class="subscribe-to-comments">
|
| 60 |
<?php echo str_replace('[manager_link]', $sg_subscribe->manage_link($email, true, false), $sg_subscribe->subscribed_text); ?>
|
| 61 |
</p>
|
| 62 |
|
|
@@ -126,9 +126,9 @@ return false;
|
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
|
| 133 |
class sg_subscribe_settings
|
| 134 |
{
|
|
@@ -145,6 +145,7 @@ class sg_subscribe_settings
|
|
| 145 |
echo '<li><label for="name">' . __('"From" name for notifications:', 'subscribe-to-comments') . ' <input type="text" size="40" id="name" name="sg_subscribe_settings[name]" value="' . sg_subscribe_settings::form_setting('name') . '" /></label></li>';
|
| 146 |
echo '<li><label for="email">' . __('"From" e-mail addresss for notifications:', 'subscribe-to-comments') . ' <input type="text" size="40" id="email" name="sg_subscribe_settings[email]" value="' . sg_subscribe_settings::form_setting('email') . '" /></label></li>';
|
| 147 |
echo '<li><label for="default_subscribed"><input type="checkbox" id="default_subscribed" name="sg_subscribe_settings[default_subscribed]" value="default_subscribed"' . sg_subscribe_settings::checkflag('default_subscribed') . ' /> ' . __('"Subscribe" box should be checked by default', 'subscribe-to-comments') . '</label></li>';
|
|
|
|
| 148 |
echo '</ul>';
|
| 149 |
|
| 150 |
echo '<fieldset><legend>' . __('Comment Form Text', 'subscribe-to-comments') . '</legend>';
|
|
@@ -185,32 +186,27 @@ class sg_subscribe_settings
|
|
| 185 |
echo '</fieldset>';
|
| 186 |
}
|
| 187 |
|
| 188 |
-
function checkflag($optname)
|
| 189 |
-
{
|
| 190 |
$options = get_settings('sg_subscribe_settings');
|
| 191 |
-
if($options[$optname] != $optname)
|
|
|
|
| 192 |
return ' checked="checked"';
|
| 193 |
}
|
| 194 |
|
| 195 |
-
function form_setting($optname)
|
| 196 |
-
{
|
| 197 |
$options = get_settings('sg_subscribe_settings');
|
| 198 |
return htmlspecialchars(stripslashes($options[$optname]), ENT_QUOTES);
|
| 199 |
}
|
| 200 |
|
| 201 |
-
function textarea_setting($optname)
|
| 202 |
-
{
|
| 203 |
$options = get_settings('sg_subscribe_settings');
|
| 204 |
return htmlspecialchars(stripslashes($options[$optname]));
|
| 205 |
}
|
| 206 |
|
| 207 |
-
function options_page()
|
| 208 |
-
{
|
| 209 |
/** Display "saved" notification on post **/
|
| 210 |
-
if(isset($_POST['sg_subscribe_settings_submit']))
|
| 211 |
-
{
|
| 212 |
echo '<div class="updated"><p><strong>' . __('Options saved.', 'SmallOptions') . '</strong></p></div>';
|
| 213 |
-
}
|
| 214 |
|
| 215 |
echo '<form method="post"><div class="wrap">';
|
| 216 |
|
|
@@ -230,8 +226,7 @@ class sg_subscribe_settings
|
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
-
class sg_subscribe
|
| 234 |
-
{
|
| 235 |
var $errors;
|
| 236 |
var $messages;
|
| 237 |
var $post_subscriptions;
|
|
@@ -246,6 +241,7 @@ class sg_subscribe
|
|
| 246 |
var $header;
|
| 247 |
var $sidebar;
|
| 248 |
var $footer;
|
|
|
|
| 249 |
var $before_manager;
|
| 250 |
var $after_manager;
|
| 251 |
var $email;
|
|
@@ -285,8 +281,8 @@ class sg_subscribe
|
|
| 285 |
|
| 286 |
function manager_init() {
|
| 287 |
$this->messages = '';
|
| 288 |
-
$this->use_wp_style = ($this->settings['use_custom_style'] == 'use_custom_style') ? false : true;
|
| 289 |
-
if( !$this->use_wp_style ) {
|
| 290 |
$this->header = str_replace('[theme_path]', get_template_directory(), stripslashes($this->settings['header']));
|
| 291 |
$this->sidebar = str_replace('[theme_path]', get_template_directory(), stripslashes($this->settings['sidebar']));
|
| 292 |
$this->footer = str_replace('[theme_path]', get_template_directory(), stripslashes($this->settings['footer']));
|
|
@@ -296,9 +292,10 @@ class sg_subscribe
|
|
| 296 |
|
| 297 |
foreach (array('email', 'key', 'ref', 'new_email') as $var) {
|
| 298 |
if ( isset($_REQUEST[$var]) && !empty($_REQUEST[$var]) )
|
| 299 |
-
|
| 300 |
-
|
| 301 |
}
|
|
|
|
|
|
|
| 302 |
}
|
| 303 |
|
| 304 |
|
|
@@ -309,11 +306,10 @@ class sg_subscribe
|
|
| 309 |
|
| 310 |
function show_errors($type='manager', $before_all='<div class="updated updated-error">', $after_all='</div>', $before_each='<p>', $after_each='</p>'){
|
| 311 |
if ( is_array($this->errors[$type]) ) {
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
echo $after_all;
|
| 317 |
}
|
| 318 |
unset($this->errors);
|
| 319 |
}
|
|
@@ -326,11 +322,10 @@ class sg_subscribe
|
|
| 326 |
|
| 327 |
function show_messages($before_all='', $after_all='', $before_each='<div class="updated"><p>', $after_each='</p></div>'){
|
| 328 |
if ( is_array($this->messages) ) {
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
echo $after_all;
|
| 334 |
}
|
| 335 |
unset($this->messages);
|
| 336 |
}
|
|
@@ -342,8 +337,8 @@ class sg_subscribe
|
|
| 342 |
$postid = (int) $postid;
|
| 343 |
$this->post_subscriptions = $wpdb->get_results("SELECT comment_author_email FROM $wpdb->comments WHERE comment_post_ID = '$postid' AND comment_subscribe='Y' AND comment_author_email != '' AND comment_approved = '1' GROUP BY LCASE(comment_author_email)");
|
| 344 |
$subscribed_without_comment = get_post_meta($postid, '_sg_subscribe-to-comments');
|
| 345 |
-
if( is_array($subscribed_without_comment) ) {
|
| 346 |
-
foreach ($subscribed_without_comment as $email)
|
| 347 |
$this->post_subscriptions[]->comment_author_email = $email;
|
| 348 |
}
|
| 349 |
return $this->post_subscriptions;
|
|
@@ -351,16 +346,18 @@ class sg_subscribe
|
|
| 351 |
|
| 352 |
|
| 353 |
function subscriptions_from_email($email='') {
|
| 354 |
-
if ( is_array($this->email_subscriptions) )
|
| 355 |
-
|
|
|
|
|
|
|
| 356 |
global $wpdb;
|
| 357 |
$email = $wpdb->escape(strtolower($email));
|
| 358 |
$i = 0;
|
| 359 |
$subscriptions = $wpdb->get_results("SELECT comment_post_ID FROM $wpdb->comments WHERE LCASE(comment_author_email) = '$email' AND comment_subscribe='Y' AND comment_approved = '1' GROUP BY comment_post_ID");
|
| 360 |
if ( is_array($subscriptions) ) {
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
}
|
| 365 |
}
|
| 366 |
$subscriptions = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_sg_subscribe-to-comments' AND LCASE(meta_value) = '$email' GROUP BY post_id");
|
|
@@ -370,10 +367,10 @@ class sg_subscribe
|
|
| 370 |
$i++;
|
| 371 |
}
|
| 372 |
}
|
| 373 |
-
if ($i > 0) {
|
| 374 |
sort($this->email_subscriptions, SORT_NUMERIC);
|
| 375 |
return $this->email_subscriptions;
|
| 376 |
-
|
| 377 |
// no subscriptions
|
| 378 |
return false;
|
| 379 |
}
|
|
@@ -391,7 +388,8 @@ class sg_subscribe
|
|
| 391 |
$this->add_error(__('Please provide a valid e-mail address.', 'subscribe-to-comments'),'solo_subscribe');
|
| 392 |
}
|
| 393 |
|
| 394 |
-
if ( ( $email == $this->site_email && is_email($this->site_email) ) || ( $email == get_settings('admin_email') && is_email(get_settings('admin_email')) ) )
|
|
|
|
| 395 |
|
| 396 |
if ( is_array($this->subscriptions_from_email($email)) )
|
| 397 |
if (in_array($postid, $this->subscriptions_from_email($email))) {
|
|
@@ -402,20 +400,21 @@ class sg_subscribe
|
|
| 402 |
$email = $wpdb->escape($email);
|
| 403 |
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = '$postid' AND comment_status <> 'closed' AND ( post_status = 'static' OR post_status = 'publish') LIMIT 1");
|
| 404 |
|
| 405 |
-
if(!$post
|
|
|
|
| 406 |
|
| 407 |
if ( empty($cache_userdata[$post->post_author]) && $post->post_author != 0) {
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
|
| 412 |
$post_author = $cache_userdata[$post->post_author];
|
| 413 |
|
| 414 |
-
if ( strtolower($post_author->user_email) == stripslashes($email) )
|
|
|
|
| 415 |
|
| 416 |
-
|
| 417 |
add_post_meta($postid, '_sg_subscribe-to-comments', stripslashes($email));
|
| 418 |
-
|
| 419 |
setcookie('comment_author_email_' . COOKIEHASH, stripslashes($email), time() + 30000000, COOKIEPATH);
|
| 420 |
$location = $this->manage_link(stripslashes($email), false, false) . '&subscribeid=' . $postid;
|
| 421 |
header("Location: $location");
|
|
@@ -427,37 +426,39 @@ class sg_subscribe
|
|
| 427 |
function add_subscriber($cid) {
|
| 428 |
global $wpdb;
|
| 429 |
$id = (int) $id;
|
| 430 |
-
|
| 431 |
$postid = $wpdb->get_var("SELECT comment_post_ID from $wpdb->comments WHERE comment_ID = '$cid'");
|
| 432 |
|
| 433 |
$previously_subscribed = ( $wpdb->get_var("SELECT comment_subscribe from $wpdb->comments WHERE comment_post_ID = '$postid' AND LCASE(comment_author_email) = '$email' AND comment_subscribe = 'Y' LIMIT 1") || in_array(stripslashes($email), get_post_meta($postid, '_sg_subscribe-to-comments')) ) ? true : false;
|
| 434 |
|
| 435 |
// If user wants to be notified or has previously subscribed, set the flag on this current comment
|
| 436 |
if (($_POST['subscribe'] == 'subscribe' && is_email($email)) || $previously_subscribed) {
|
| 437 |
-
|
| 438 |
-
|
| 439 |
}
|
| 440 |
-
|
| 441 |
}
|
| 442 |
|
| 443 |
|
| 444 |
function is_blocked($email='') {
|
| 445 |
global $wpdb;
|
| 446 |
-
if ( !is_email($email) )
|
| 447 |
-
|
|
|
|
|
|
|
| 448 |
$email = strtolower($email);
|
| 449 |
// add the option if it doesn't exist
|
| 450 |
add_option('do_not_mail', '');
|
| 451 |
$blocked = explode (' ', get_settings('do_not_mail'));
|
| 452 |
-
if ( in_array($email, $blocked) )
|
| 453 |
-
|
| 454 |
-
}
|
| 455 |
return false;
|
| 456 |
}
|
| 457 |
|
| 458 |
|
| 459 |
function add_block($email='') {
|
| 460 |
-
if ( !is_email($email) )
|
|
|
|
| 461 |
global $wpdb;
|
| 462 |
$email = strtolower($email);
|
| 463 |
|
|
@@ -476,7 +477,8 @@ class sg_subscribe
|
|
| 476 |
|
| 477 |
|
| 478 |
function remove_block($email='') {
|
| 479 |
-
if ( !is_email($email) )
|
|
|
|
| 480 |
global $wpdb;
|
| 481 |
$email = strtolower($email);
|
| 482 |
|
|
@@ -512,7 +514,6 @@ class sg_subscribe
|
|
| 512 |
$subscriber_emails[] = $comment->comment_author_email;
|
| 513 |
}
|
| 514 |
}
|
| 515 |
-
|
| 516 |
return $sg_subscribers;
|
| 517 |
}
|
| 518 |
|
|
@@ -533,6 +534,7 @@ class sg_subscribe
|
|
| 533 |
return md5(md5($this->settings['salt'] . $data));
|
| 534 |
}
|
| 535 |
|
|
|
|
| 536 |
function validate_key() {
|
| 537 |
if ( $this->key == $this->generate_key($this->email) )
|
| 538 |
$this->key_type = 'normal';
|
|
@@ -544,13 +546,11 @@ class sg_subscribe
|
|
| 544 |
$this->key_type = 'admin';
|
| 545 |
else
|
| 546 |
return false;
|
| 547 |
-
|
| 548 |
return true;
|
| 549 |
}
|
| 550 |
|
| 551 |
|
| 552 |
function determine_action() {
|
| 553 |
-
|
| 554 |
// rather than check it a bunch of times
|
| 555 |
$is_email = is_email($this->email);
|
| 556 |
|
|
@@ -570,7 +570,6 @@ class sg_subscribe
|
|
| 570 |
$this->action = 'block';
|
| 571 |
else
|
| 572 |
$this->action = 'none';
|
| 573 |
-
|
| 574 |
}
|
| 575 |
|
| 576 |
|
|
@@ -583,14 +582,15 @@ class sg_subscribe
|
|
| 583 |
return true;
|
| 584 |
else
|
| 585 |
return false;
|
| 586 |
-
}
|
| 587 |
|
| 588 |
|
| 589 |
function remove_subscriptions ($postids) {
|
| 590 |
global $wpdb;
|
| 591 |
$removed = 0;
|
| 592 |
for ($i = 0; $i < count($postids); $i++) {
|
| 593 |
-
|
|
|
|
| 594 |
}
|
| 595 |
return $removed;
|
| 596 |
}
|
|
@@ -602,37 +602,38 @@ class sg_subscribe
|
|
| 602 |
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$cid' LIMIT 1");
|
| 603 |
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
|
| 604 |
|
| 605 |
-
if ($comment->comment_approved == '1' && $comment->comment_type == '') {
|
| 606 |
-
|
| 607 |
-
|
| 608 |
-
|
| 609 |
-
|
| 610 |
-
|
| 611 |
-
|
| 612 |
-
|
| 613 |
-
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
return $cid;
|
| 631 |
}
|
| 632 |
|
| 633 |
|
| 634 |
function change_email_request() {
|
| 635 |
-
if ( $this->is_blocked() )
|
|
|
|
| 636 |
|
| 637 |
$subject = __('E-mail change confirmation', 'subscribe-to-comments');
|
| 638 |
$message = sprintf(__("You are receiving this message to confirm a change of e-mail address for your subscriptions at \"%s\"\n\n", 'subscribe-to-comments'), get_bloginfo('blogname'));
|
|
@@ -644,7 +645,8 @@ class sg_subscribe
|
|
| 644 |
|
| 645 |
|
| 646 |
function block_email_request($email) {
|
| 647 |
-
if($this->is_blocked($email))
|
|
|
|
| 648 |
$subject = __('E-mail block confirmation', 'subscribe-to-comments');
|
| 649 |
$message = sprintf(__("You are receiving this message to confirm that you no longer wish to receive e-mail comment notifications from \"%s\"\n\n", 'subscribe-to-comments'), get_bloginfo('name'));
|
| 650 |
$message .= __("To cancel all future notifications for this address, click this link:\n\n", 'subscribe-to-comments');
|
|
@@ -667,19 +669,21 @@ class sg_subscribe
|
|
| 667 |
$new_email = $wpdb->escape(strtolower($this->new_email));
|
| 668 |
$email = $wpdb->escape(strtolower($this->email));
|
| 669 |
if ( $wpdb->query("UPDATE $wpdb->comments SET comment_author_email = '$new_email' WHERE comment_author_email = '$email'") )
|
| 670 |
-
|
| 671 |
if ( $wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '$new_email' WHERE meta_value = '$email' AND meta_key = '_sg_subscribe-to-comments'") )
|
| 672 |
-
|
| 673 |
|
| 674 |
return $return;
|
| 675 |
}
|
| 676 |
|
| 677 |
|
| 678 |
function entry_link($postid, $uri='') {
|
| 679 |
-
if ( empty($uri) )
|
|
|
|
| 680 |
$postid = (int) $postid;
|
| 681 |
$title = get_the_title($postid);
|
| 682 |
-
if ( empty($title) )
|
|
|
|
| 683 |
$output = '<a href="'.$uri.'">'.$title.'</a>';
|
| 684 |
return $output;
|
| 685 |
}
|
|
@@ -704,14 +708,24 @@ class sg_subscribe
|
|
| 704 |
add_option('sg_subscribe_settings', array('use_custom_style' => '', 'email' => get_bloginfo('admin_email'), 'name' => get_bloginfo('name'), 'header' => '[theme_path]/header.php', 'sidebar' => '', 'footer' => '[theme_path]/footer.php', 'before_manager' => '<div id="content" class="widecolumn subscription-manager">', 'after_manager' => '</div>', 'default_subscribed' => '', 'not_subscribed_text' => __('Notify me of followup comments via e-mail', 'subscribe-to-comments'), 'subscribed_text' => __('You are subscribed to this entry. <a href="[manager_link]">Manage your subscriptions</a>.', 'subscribe-to-comments'), 'author_text' => __('You are the author of this entry. <a href="[manager_link]">Manage subscriptions</a>.', 'subscribe-to-comments')));
|
| 705 |
|
| 706 |
$settings = get_option('sg_subscribe_settings');
|
|
|
|
| 707 |
if ( !$settings['salt'] ) {
|
| 708 |
$settings['salt'] = md5(md5(uniqid(rand() . rand() . rand() . rand() . rand(), true))); // random MD5 hash
|
| 709 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 710 |
}
|
| 711 |
|
|
|
|
|
|
|
|
|
|
| 712 |
$column_name = 'comment_subscribe';
|
| 713 |
foreach ($wpdb->get_col("DESC $wpdb->comments", 0) as $column )
|
| 714 |
-
if ($column == $column_name)
|
|
|
|
| 715 |
|
| 716 |
// didn't find it... create it
|
| 717 |
$wpdb->query("ALTER TABLE $wpdb->comments ADD COLUMN comment_subscribe enum('Y','N') NOT NULL default 'N'");
|
|
@@ -721,20 +735,21 @@ class sg_subscribe
|
|
| 721 |
function current_viewer_subscription_status(){
|
| 722 |
global $wpdb, $post, $user_email;
|
| 723 |
|
| 724 |
-
$comment_author_email = (isset($_COOKIE['comment_author_email_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : '';
|
| 725 |
get_currentuserinfo();
|
| 726 |
|
| 727 |
-
if(is_email($user_email)) {
|
| 728 |
$email = strtolower($user_email);
|
| 729 |
$loggedin = true;
|
| 730 |
-
} elseif(is_email($comment_author_email)) {
|
| 731 |
$email = strtolower($comment_author_email);
|
| 732 |
} else {
|
| 733 |
-
|
| 734 |
}
|
| 735 |
|
| 736 |
$post_author = get_userdata($post->post_author);
|
| 737 |
-
if
|
|
|
|
| 738 |
|
| 739 |
|
| 740 |
if ( is_array($this->subscriptions_from_email($email)) )
|
|
@@ -745,9 +760,8 @@ class sg_subscribe
|
|
| 745 |
|
| 746 |
function manage_link($email='', $html=true, $echo=true) {
|
| 747 |
$link = get_bloginfo('wpurl') . '/wp-subscription-manager.php';
|
| 748 |
-
|
| 749 |
-
|
| 750 |
-
$link = add_query_arg('email', $email, $link);
|
| 751 |
$link = add_query_arg('key', $this->generate_key($email), $link);
|
| 752 |
}
|
| 753 |
$link = add_query_arg('ref', urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), $link);
|
|
@@ -760,26 +774,30 @@ class sg_subscribe
|
|
| 760 |
|
| 761 |
|
| 762 |
function add_admin_menu() {
|
| 763 |
-
|
| 764 |
|
| 765 |
-
|
| 766 |
-
|
| 767 |
-
|
| 768 |
-
|
| 769 |
}
|
| 770 |
|
| 771 |
|
| 772 |
} // class sg_subscribe
|
| 773 |
|
| 774 |
-
|
| 775 |
-
|
| 776 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 777 |
|
| 778 |
|
| 779 |
function sg_subscribe_start() {
|
| 780 |
global $sg_subscribe;
|
| 781 |
|
| 782 |
-
if (!$sg_subscribe) {
|
| 783 |
load_plugin_textdomain('subscribe-to-comments');
|
| 784 |
$sg_subscribe = new sg_subscribe();
|
| 785 |
}
|
|
@@ -805,10 +823,9 @@ add_action('admin_head', create_function('$a', 'global $sg_subscribe; sg_subscri
|
|
| 805 |
|
| 806 |
|
| 807 |
// detect "subscribe without commenting" attempts
|
| 808 |
-
add_action('init', create_function('$a',
|
| 809 |
-
'global $sg_subscribe;
|
| 810 |
-
if($_POST[\'solo-comment-subscribe\'] == \'solo-comment-subscribe\' && is_numeric($_POST[\'postid\']) ) {
|
| 811 |
sg_subscribe_start();
|
| 812 |
$sg_subscribe->solo_subscribe($_POST[\'email\'], $_POST[\'postid\']);
|
| 813 |
-
}')
|
|
|
|
| 814 |
?>
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
Plugin Name: Subscribe To Comments
|
| 4 |
+
Version: 2.0.6
|
| 5 |
Plugin URI: http://txfx.net/code/wordpress/subscribe-to-comments/
|
| 6 |
+
Description: Allows readers to recieve notifications of new comments that are posted to an entry. Based on version 1 from <a href="http://scriptygoddess.com/">Scriptygoddess</a>
|
| 7 |
+
Author: Mark Jaquith
|
| 8 |
+
Author URI: http://txfx.net/
|
| 9 |
*/
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
+
/* ================= */
|
| 14 |
+
/* Display Functions */
|
| 15 |
+
/* ================= */
|
| 16 |
|
| 17 |
/* -------------------------
|
| 18 |
What follows are the functions that display things in your comments form.
|
| 33 |
<?php /* This is the text that is displayed for users who are NOT subscribed */ ?>
|
| 34 |
<?php /* ------------------------------------------------------------------- */ ?>
|
| 35 |
|
| 36 |
+
<p <?php if ($sg_subscribe->clear_both) echo 'style="clear: both;" '; ?> class="subscribe-to-comments">
|
| 37 |
<input type="checkbox" name="subscribe" id="subscribe" value="subscribe" style="width: auto;" <?php if ($sg_subscribe->default_subscribed) echo 'checked="checked" '; ?>/>
|
| 38 |
<label for="subscribe"><?php echo $sg_subscribe->not_subscribed_text; ?></label>
|
| 39 |
</p>
|
| 46 |
<?php /* This is the text that is displayed for the author of the post */ ?>
|
| 47 |
<?php /* ------------------------------------------------------------- */ ?>
|
| 48 |
|
| 49 |
+
<p <?php if ($sg_subscribe->clear_both) echo 'style="clear: both;" '; ?> class="subscribe-to-comments">
|
| 50 |
<?php echo str_replace('[manager_link]', $sg_subscribe->manage_link($email, true, false), $sg_subscribe->author_text); ?>
|
| 51 |
</p>
|
| 52 |
|
| 56 |
<?php /* This is the text that is displayed for users who ARE subscribed */ ?>
|
| 57 |
<?php /* --------------------------------------------------------------- */ ?>
|
| 58 |
|
| 59 |
+
<p <?php if ($sg_subscribe->clear_both) echo 'style="clear: both;" '; ?> class="subscribe-to-comments">
|
| 60 |
<?php echo str_replace('[manager_link]', $sg_subscribe->manage_link($email, true, false), $sg_subscribe->subscribed_text); ?>
|
| 61 |
</p>
|
| 62 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
+
/* ============================= */
|
| 130 |
+
/* DO NOT MODIFY BELOW THIS LINE */
|
| 131 |
+
/* ============================= */
|
| 132 |
|
| 133 |
class sg_subscribe_settings
|
| 134 |
{
|
| 145 |
echo '<li><label for="name">' . __('"From" name for notifications:', 'subscribe-to-comments') . ' <input type="text" size="40" id="name" name="sg_subscribe_settings[name]" value="' . sg_subscribe_settings::form_setting('name') . '" /></label></li>';
|
| 146 |
echo '<li><label for="email">' . __('"From" e-mail addresss for notifications:', 'subscribe-to-comments') . ' <input type="text" size="40" id="email" name="sg_subscribe_settings[email]" value="' . sg_subscribe_settings::form_setting('email') . '" /></label></li>';
|
| 147 |
echo '<li><label for="default_subscribed"><input type="checkbox" id="default_subscribed" name="sg_subscribe_settings[default_subscribed]" value="default_subscribed"' . sg_subscribe_settings::checkflag('default_subscribed') . ' /> ' . __('"Subscribe" box should be checked by default', 'subscribe-to-comments') . '</label></li>';
|
| 148 |
+
echo '<li><label for="clear_both"><input type="checkbox" id="clear_both" name="sg_subscribe_settings[clear_both]" value="clear_both"' . sg_subscribe_settings::checkflag('clear_both') . ' /> ' . __('Do a CSS "clear" on the subscription checkbox/message (uncheck this if the checkbox/message appears in a strange location in your theme)', 'subscribe-to-comments') . '</label></li>';
|
| 149 |
echo '</ul>';
|
| 150 |
|
| 151 |
echo '<fieldset><legend>' . __('Comment Form Text', 'subscribe-to-comments') . '</legend>';
|
| 186 |
echo '</fieldset>';
|
| 187 |
}
|
| 188 |
|
| 189 |
+
function checkflag($optname) {
|
|
|
|
| 190 |
$options = get_settings('sg_subscribe_settings');
|
| 191 |
+
if ( $options[$optname] != $optname )
|
| 192 |
+
return;
|
| 193 |
return ' checked="checked"';
|
| 194 |
}
|
| 195 |
|
| 196 |
+
function form_setting($optname) {
|
|
|
|
| 197 |
$options = get_settings('sg_subscribe_settings');
|
| 198 |
return htmlspecialchars(stripslashes($options[$optname]), ENT_QUOTES);
|
| 199 |
}
|
| 200 |
|
| 201 |
+
function textarea_setting($optname) {
|
|
|
|
| 202 |
$options = get_settings('sg_subscribe_settings');
|
| 203 |
return htmlspecialchars(stripslashes($options[$optname]));
|
| 204 |
}
|
| 205 |
|
| 206 |
+
function options_page() {
|
|
|
|
| 207 |
/** Display "saved" notification on post **/
|
| 208 |
+
if ( isset($_POST['sg_subscribe_settings_submit']) )
|
|
|
|
| 209 |
echo '<div class="updated"><p><strong>' . __('Options saved.', 'SmallOptions') . '</strong></p></div>';
|
|
|
|
| 210 |
|
| 211 |
echo '<form method="post"><div class="wrap">';
|
| 212 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
+
class sg_subscribe {
|
|
|
|
| 230 |
var $errors;
|
| 231 |
var $messages;
|
| 232 |
var $post_subscriptions;
|
| 241 |
var $header;
|
| 242 |
var $sidebar;
|
| 243 |
var $footer;
|
| 244 |
+
var $clear_both;
|
| 245 |
var $before_manager;
|
| 246 |
var $after_manager;
|
| 247 |
var $email;
|
| 281 |
|
| 282 |
function manager_init() {
|
| 283 |
$this->messages = '';
|
| 284 |
+
$this->use_wp_style = ( $this->settings['use_custom_style'] == 'use_custom_style' ) ? false : true;
|
| 285 |
+
if ( !$this->use_wp_style ) {
|
| 286 |
$this->header = str_replace('[theme_path]', get_template_directory(), stripslashes($this->settings['header']));
|
| 287 |
$this->sidebar = str_replace('[theme_path]', get_template_directory(), stripslashes($this->settings['sidebar']));
|
| 288 |
$this->footer = str_replace('[theme_path]', get_template_directory(), stripslashes($this->settings['footer']));
|
| 292 |
|
| 293 |
foreach (array('email', 'key', 'ref', 'new_email') as $var) {
|
| 294 |
if ( isset($_REQUEST[$var]) && !empty($_REQUEST[$var]) )
|
| 295 |
+
$this->{$var} = trim($_REQUEST[$var]);
|
|
|
|
| 296 |
}
|
| 297 |
+
if ( !$this->key )
|
| 298 |
+
$this->key = 'unset';
|
| 299 |
}
|
| 300 |
|
| 301 |
|
| 306 |
|
| 307 |
function show_errors($type='manager', $before_all='<div class="updated updated-error">', $after_all='</div>', $before_each='<p>', $after_each='</p>'){
|
| 308 |
if ( is_array($this->errors[$type]) ) {
|
| 309 |
+
echo $before_all;
|
| 310 |
+
foreach ($this->errors[$type] as $error)
|
| 311 |
+
echo $before_each . $error . $after_each;
|
| 312 |
+
echo $after_all;
|
|
|
|
| 313 |
}
|
| 314 |
unset($this->errors);
|
| 315 |
}
|
| 322 |
|
| 323 |
function show_messages($before_all='', $after_all='', $before_each='<div class="updated"><p>', $after_each='</p></div>'){
|
| 324 |
if ( is_array($this->messages) ) {
|
| 325 |
+
echo $before_all;
|
| 326 |
+
foreach ($this->messages as $message)
|
| 327 |
+
echo $before_each . $message . $after_each;
|
| 328 |
+
echo $after_all;
|
|
|
|
| 329 |
}
|
| 330 |
unset($this->messages);
|
| 331 |
}
|
| 337 |
$postid = (int) $postid;
|
| 338 |
$this->post_subscriptions = $wpdb->get_results("SELECT comment_author_email FROM $wpdb->comments WHERE comment_post_ID = '$postid' AND comment_subscribe='Y' AND comment_author_email != '' AND comment_approved = '1' GROUP BY LCASE(comment_author_email)");
|
| 339 |
$subscribed_without_comment = get_post_meta($postid, '_sg_subscribe-to-comments');
|
| 340 |
+
if ( is_array($subscribed_without_comment) ) {
|
| 341 |
+
foreach ( $subscribed_without_comment as $email )
|
| 342 |
$this->post_subscriptions[]->comment_author_email = $email;
|
| 343 |
}
|
| 344 |
return $this->post_subscriptions;
|
| 346 |
|
| 347 |
|
| 348 |
function subscriptions_from_email($email='') {
|
| 349 |
+
if ( is_array($this->email_subscriptions) )
|
| 350 |
+
return $this->email_subscriptions;
|
| 351 |
+
if ( !is_email($email) )
|
| 352 |
+
$email = $this->email;
|
| 353 |
global $wpdb;
|
| 354 |
$email = $wpdb->escape(strtolower($email));
|
| 355 |
$i = 0;
|
| 356 |
$subscriptions = $wpdb->get_results("SELECT comment_post_ID FROM $wpdb->comments WHERE LCASE(comment_author_email) = '$email' AND comment_subscribe='Y' AND comment_approved = '1' GROUP BY comment_post_ID");
|
| 357 |
if ( is_array($subscriptions) ) {
|
| 358 |
+
foreach ( $subscriptions as $subscription ) {
|
| 359 |
+
$this->email_subscriptions[$i] = $subscription->comment_post_ID;
|
| 360 |
+
$i++;
|
| 361 |
}
|
| 362 |
}
|
| 363 |
$subscriptions = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_sg_subscribe-to-comments' AND LCASE(meta_value) = '$email' GROUP BY post_id");
|
| 367 |
$i++;
|
| 368 |
}
|
| 369 |
}
|
| 370 |
+
if ( $i > 0 ) {
|
| 371 |
sort($this->email_subscriptions, SORT_NUMERIC);
|
| 372 |
return $this->email_subscriptions;
|
| 373 |
+
}
|
| 374 |
// no subscriptions
|
| 375 |
return false;
|
| 376 |
}
|
| 388 |
$this->add_error(__('Please provide a valid e-mail address.', 'subscribe-to-comments'),'solo_subscribe');
|
| 389 |
}
|
| 390 |
|
| 391 |
+
if ( ( $email == $this->site_email && is_email($this->site_email) ) || ( $email == get_settings('admin_email') && is_email(get_settings('admin_email')) ) )
|
| 392 |
+
$this->add_error(__('This e-mail address may not be subscribed', 'subscribe-to-comments'),'solo_subscribe');
|
| 393 |
|
| 394 |
if ( is_array($this->subscriptions_from_email($email)) )
|
| 395 |
if (in_array($postid, $this->subscriptions_from_email($email))) {
|
| 400 |
$email = $wpdb->escape($email);
|
| 401 |
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = '$postid' AND comment_status <> 'closed' AND ( post_status = 'static' OR post_status = 'publish') LIMIT 1");
|
| 402 |
|
| 403 |
+
if ( !$post )
|
| 404 |
+
$this->add_error(__('Comments are not allowed on this entry.', 'subscribe-to-comments'),'solo_subscribe');
|
| 405 |
|
| 406 |
if ( empty($cache_userdata[$post->post_author]) && $post->post_author != 0) {
|
| 407 |
+
$cache_userdata[$post->post_author] = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = $post->post_author");
|
| 408 |
+
$cache_userdata[$cache_userdata[$post->post_author]->user_login] =& $cache_userdata[$post->post_author];
|
| 409 |
+
}
|
| 410 |
|
| 411 |
$post_author = $cache_userdata[$post->post_author];
|
| 412 |
|
| 413 |
+
if ( strtolower($post_author->user_email) == stripslashes($email) )
|
| 414 |
+
$this->add_error(__('You appear to be already subscribed to this entry.', 'subscribe-to-comments'),'solo_subscribe');
|
| 415 |
|
| 416 |
+
if ( !is_array($this->errors['solo_subscribe']) ) {
|
| 417 |
add_post_meta($postid, '_sg_subscribe-to-comments', stripslashes($email));
|
|
|
|
| 418 |
setcookie('comment_author_email_' . COOKIEHASH, stripslashes($email), time() + 30000000, COOKIEPATH);
|
| 419 |
$location = $this->manage_link(stripslashes($email), false, false) . '&subscribeid=' . $postid;
|
| 420 |
header("Location: $location");
|
| 426 |
function add_subscriber($cid) {
|
| 427 |
global $wpdb;
|
| 428 |
$id = (int) $id;
|
| 429 |
+
$email = $wpdb->escape(strtolower($wpdb->get_var("SELECT comment_author_email FROM $wpdb->comments WHERE comment_ID = '$cid'")));
|
| 430 |
$postid = $wpdb->get_var("SELECT comment_post_ID from $wpdb->comments WHERE comment_ID = '$cid'");
|
| 431 |
|
| 432 |
$previously_subscribed = ( $wpdb->get_var("SELECT comment_subscribe from $wpdb->comments WHERE comment_post_ID = '$postid' AND LCASE(comment_author_email) = '$email' AND comment_subscribe = 'Y' LIMIT 1") || in_array(stripslashes($email), get_post_meta($postid, '_sg_subscribe-to-comments')) ) ? true : false;
|
| 433 |
|
| 434 |
// If user wants to be notified or has previously subscribed, set the flag on this current comment
|
| 435 |
if (($_POST['subscribe'] == 'subscribe' && is_email($email)) || $previously_subscribed) {
|
| 436 |
+
delete_post_meta($postid, '_sg_subscribe-to-comments', stripslashes($email));
|
| 437 |
+
$wpdb->query("UPDATE $wpdb->comments SET comment_subscribe = 'Y' where comment_post_ID = '$postid' AND LCASE(comment_author_email) = '$email'");
|
| 438 |
}
|
| 439 |
+
return $cid;
|
| 440 |
}
|
| 441 |
|
| 442 |
|
| 443 |
function is_blocked($email='') {
|
| 444 |
global $wpdb;
|
| 445 |
+
if ( !is_email($email) )
|
| 446 |
+
$email = $this->email;
|
| 447 |
+
if ( empty($email) )
|
| 448 |
+
return false;
|
| 449 |
$email = strtolower($email);
|
| 450 |
// add the option if it doesn't exist
|
| 451 |
add_option('do_not_mail', '');
|
| 452 |
$blocked = explode (' ', get_settings('do_not_mail'));
|
| 453 |
+
if ( in_array($email, $blocked) )
|
| 454 |
+
return true;
|
|
|
|
| 455 |
return false;
|
| 456 |
}
|
| 457 |
|
| 458 |
|
| 459 |
function add_block($email='') {
|
| 460 |
+
if ( !is_email($email) )
|
| 461 |
+
$email = $this->email;
|
| 462 |
global $wpdb;
|
| 463 |
$email = strtolower($email);
|
| 464 |
|
| 477 |
|
| 478 |
|
| 479 |
function remove_block($email='') {
|
| 480 |
+
if ( !is_email($email) )
|
| 481 |
+
$email = $this->email;
|
| 482 |
global $wpdb;
|
| 483 |
$email = strtolower($email);
|
| 484 |
|
| 514 |
$subscriber_emails[] = $comment->comment_author_email;
|
| 515 |
}
|
| 516 |
}
|
|
|
|
| 517 |
return $sg_subscribers;
|
| 518 |
}
|
| 519 |
|
| 534 |
return md5(md5($this->settings['salt'] . $data));
|
| 535 |
}
|
| 536 |
|
| 537 |
+
|
| 538 |
function validate_key() {
|
| 539 |
if ( $this->key == $this->generate_key($this->email) )
|
| 540 |
$this->key_type = 'normal';
|
| 546 |
$this->key_type = 'admin';
|
| 547 |
else
|
| 548 |
return false;
|
|
|
|
| 549 |
return true;
|
| 550 |
}
|
| 551 |
|
| 552 |
|
| 553 |
function determine_action() {
|
|
|
|
| 554 |
// rather than check it a bunch of times
|
| 555 |
$is_email = is_email($this->email);
|
| 556 |
|
| 570 |
$this->action = 'block';
|
| 571 |
else
|
| 572 |
$this->action = 'none';
|
|
|
|
| 573 |
}
|
| 574 |
|
| 575 |
|
| 582 |
return true;
|
| 583 |
else
|
| 584 |
return false;
|
| 585 |
+
}
|
| 586 |
|
| 587 |
|
| 588 |
function remove_subscriptions ($postids) {
|
| 589 |
global $wpdb;
|
| 590 |
$removed = 0;
|
| 591 |
for ($i = 0; $i < count($postids); $i++) {
|
| 592 |
+
if ( $this->remove_subscriber($this->email, $postids[$i]) )
|
| 593 |
+
$removed++;
|
| 594 |
}
|
| 595 |
return $removed;
|
| 596 |
}
|
| 602 |
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$cid' LIMIT 1");
|
| 603 |
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
|
| 604 |
|
| 605 |
+
if ( $comment->comment_approved == '1' && $comment->comment_type == '' ) {
|
| 606 |
+
// Comment has been approved and isn't a trackback or a pingback, so we should send out notifications
|
| 607 |
+
|
| 608 |
+
$message = sprintf(__("There is a new comment on the post \"%s\"", 'subscribe-to-comments') . ". \n%s\n\n", stripslashes($post->post_title), get_permalink($comment->comment_post_ID));
|
| 609 |
+
$message .= sprintf(__("Author: %s\n", 'subscribe-to-comments'), $comment->comment_author);
|
| 610 |
+
$message .= __("Comment:\n", 'subscribe-to-comments') . stripslashes($comment->comment_content) . "\n\n";
|
| 611 |
+
$message .= __("See all comments on this post here:\n", 'subscribe-to-comments');
|
| 612 |
+
$message .= get_permalink($comment->comment_post_ID) . "#comments\n\n";
|
| 613 |
+
//add link to manage comment notifications
|
| 614 |
+
$message .= __("To manage your subscriptions or to block all notifications from this site, click the link below:\n", 'subscribe-to-comments');
|
| 615 |
+
$message .= get_settings('siteurl')."/wp-subscription-manager.php?email=[email]&key=[key]";
|
| 616 |
+
|
| 617 |
+
$subject = sprintf(__('New Comment On: %s', 'subscribe-to-comments'), stripslashes($post->post_title));
|
| 618 |
+
|
| 619 |
+
$subscriptions = $this->subscriptions_from_post($comment->comment_post_ID);
|
| 620 |
+
if ( is_array($subscriptions) ) {
|
| 621 |
+
foreach ( $subscriptions as $email ) {
|
| 622 |
+
if ( !$this->is_blocked($email->comment_author_email) && $email->comment_author_email != $comment->comment_author_email && is_email($email->comment_author_email) ) {
|
| 623 |
+
$message_final = str_replace('[email]', urlencode($email->comment_author_email), $message);
|
| 624 |
+
$message_final = str_replace('[key]', $this->generate_key($email->comment_author_email), $message_final);
|
| 625 |
+
$this->send_mail($email->comment_author_email, $subject, $message_final);
|
| 626 |
+
}
|
| 627 |
+
} // foreach subscription
|
| 628 |
+
} // if subscriptions
|
| 629 |
+
} // end if comment approved
|
| 630 |
return $cid;
|
| 631 |
}
|
| 632 |
|
| 633 |
|
| 634 |
function change_email_request() {
|
| 635 |
+
if ( $this->is_blocked() )
|
| 636 |
+
return false;
|
| 637 |
|
| 638 |
$subject = __('E-mail change confirmation', 'subscribe-to-comments');
|
| 639 |
$message = sprintf(__("You are receiving this message to confirm a change of e-mail address for your subscriptions at \"%s\"\n\n", 'subscribe-to-comments'), get_bloginfo('blogname'));
|
| 645 |
|
| 646 |
|
| 647 |
function block_email_request($email) {
|
| 648 |
+
if ( $this->is_blocked($email) )
|
| 649 |
+
return false;
|
| 650 |
$subject = __('E-mail block confirmation', 'subscribe-to-comments');
|
| 651 |
$message = sprintf(__("You are receiving this message to confirm that you no longer wish to receive e-mail comment notifications from \"%s\"\n\n", 'subscribe-to-comments'), get_bloginfo('name'));
|
| 652 |
$message .= __("To cancel all future notifications for this address, click this link:\n\n", 'subscribe-to-comments');
|
| 669 |
$new_email = $wpdb->escape(strtolower($this->new_email));
|
| 670 |
$email = $wpdb->escape(strtolower($this->email));
|
| 671 |
if ( $wpdb->query("UPDATE $wpdb->comments SET comment_author_email = '$new_email' WHERE comment_author_email = '$email'") )
|
| 672 |
+
$return = true;
|
| 673 |
if ( $wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '$new_email' WHERE meta_value = '$email' AND meta_key = '_sg_subscribe-to-comments'") )
|
| 674 |
+
$return = true;
|
| 675 |
|
| 676 |
return $return;
|
| 677 |
}
|
| 678 |
|
| 679 |
|
| 680 |
function entry_link($postid, $uri='') {
|
| 681 |
+
if ( empty($uri) )
|
| 682 |
+
$uri = get_permalink($postid);
|
| 683 |
$postid = (int) $postid;
|
| 684 |
$title = get_the_title($postid);
|
| 685 |
+
if ( empty($title) )
|
| 686 |
+
$title = __('click here', 'subscribe-to-comments');
|
| 687 |
$output = '<a href="'.$uri.'">'.$title.'</a>';
|
| 688 |
return $output;
|
| 689 |
}
|
| 708 |
add_option('sg_subscribe_settings', array('use_custom_style' => '', 'email' => get_bloginfo('admin_email'), 'name' => get_bloginfo('name'), 'header' => '[theme_path]/header.php', 'sidebar' => '', 'footer' => '[theme_path]/footer.php', 'before_manager' => '<div id="content" class="widecolumn subscription-manager">', 'after_manager' => '</div>', 'default_subscribed' => '', 'not_subscribed_text' => __('Notify me of followup comments via e-mail', 'subscribe-to-comments'), 'subscribed_text' => __('You are subscribed to this entry. <a href="[manager_link]">Manage your subscriptions</a>.', 'subscribe-to-comments'), 'author_text' => __('You are the author of this entry. <a href="[manager_link]">Manage subscriptions</a>.', 'subscribe-to-comments')));
|
| 709 |
|
| 710 |
$settings = get_option('sg_subscribe_settings');
|
| 711 |
+
|
| 712 |
if ( !$settings['salt'] ) {
|
| 713 |
$settings['salt'] = md5(md5(uniqid(rand() . rand() . rand() . rand() . rand(), true))); // random MD5 hash
|
| 714 |
+
$update = true;
|
| 715 |
+
}
|
| 716 |
+
|
| 717 |
+
if ( !$settings['clear_both'] ) {
|
| 718 |
+
$settings['clear_both'] = 'clear_both';
|
| 719 |
+
$update = true;
|
| 720 |
}
|
| 721 |
|
| 722 |
+
if ( $update )
|
| 723 |
+
update_option('sg_subscribe_settings', $settings);
|
| 724 |
+
|
| 725 |
$column_name = 'comment_subscribe';
|
| 726 |
foreach ($wpdb->get_col("DESC $wpdb->comments", 0) as $column )
|
| 727 |
+
if ($column == $column_name)
|
| 728 |
+
return true;
|
| 729 |
|
| 730 |
// didn't find it... create it
|
| 731 |
$wpdb->query("ALTER TABLE $wpdb->comments ADD COLUMN comment_subscribe enum('Y','N') NOT NULL default 'N'");
|
| 735 |
function current_viewer_subscription_status(){
|
| 736 |
global $wpdb, $post, $user_email;
|
| 737 |
|
| 738 |
+
$comment_author_email = ( isset($_COOKIE['comment_author_email_'. COOKIEHASH]) ) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : '';
|
| 739 |
get_currentuserinfo();
|
| 740 |
|
| 741 |
+
if ( is_email($user_email) ) {
|
| 742 |
$email = strtolower($user_email);
|
| 743 |
$loggedin = true;
|
| 744 |
+
} elseif ( is_email($comment_author_email) ) {
|
| 745 |
$email = strtolower($comment_author_email);
|
| 746 |
} else {
|
| 747 |
+
return false;
|
| 748 |
}
|
| 749 |
|
| 750 |
$post_author = get_userdata($post->post_author);
|
| 751 |
+
if ( strtolower($post_author->user_email) == $email && $loggedin )
|
| 752 |
+
return 'admin';
|
| 753 |
|
| 754 |
|
| 755 |
if ( is_array($this->subscriptions_from_email($email)) )
|
| 760 |
|
| 761 |
function manage_link($email='', $html=true, $echo=true) {
|
| 762 |
$link = get_bloginfo('wpurl') . '/wp-subscription-manager.php';
|
| 763 |
+
if ( $email != 'admin' ) {
|
| 764 |
+
$link = add_query_arg('email', urlencode($email), $link);
|
|
|
|
| 765 |
$link = add_query_arg('key', $this->generate_key($email), $link);
|
| 766 |
}
|
| 767 |
$link = add_query_arg('ref', urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), $link);
|
| 774 |
|
| 775 |
|
| 776 |
function add_admin_menu() {
|
| 777 |
+
add_management_page(__('Comment Subscription Manager', 'subscribe-to-comments'), __('Subscriptions', 'subscribe-to-comments'), 8, __FILE__, 'sg_subscribe_admin');
|
| 778 |
|
| 779 |
+
if ( class_exists('SmallOptions') )
|
| 780 |
+
add_action('small_options_page', array('sg_subscribe_settings', 'options_page_contents'));
|
| 781 |
+
else
|
| 782 |
+
add_options_page(__('Subscribe to Comments', 'subscribe-to-comments'), __('Subscribe to Comments', 'subscribe-to-comments'), 5, basename(__FILE__), array('sg_subscribe_settings', 'options_page'));
|
| 783 |
}
|
| 784 |
|
| 785 |
|
| 786 |
} // class sg_subscribe
|
| 787 |
|
| 788 |
+
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
|
| 792 |
+
|
| 793 |
+
|
| 794 |
+
|
| 795 |
|
| 796 |
|
| 797 |
function sg_subscribe_start() {
|
| 798 |
global $sg_subscribe;
|
| 799 |
|
| 800 |
+
if ( !$sg_subscribe ) {
|
| 801 |
load_plugin_textdomain('subscribe-to-comments');
|
| 802 |
$sg_subscribe = new sg_subscribe();
|
| 803 |
}
|
| 823 |
|
| 824 |
|
| 825 |
// detect "subscribe without commenting" attempts
|
| 826 |
+
add_action('init', create_function('$a','global $sg_subscribe; if ( $_POST[\'solo-comment-subscribe\'] == \'solo-comment-subscribe\' && is_numeric($_POST[\'postid\']) ) {
|
|
|
|
|
|
|
| 827 |
sg_subscribe_start();
|
| 828 |
$sg_subscribe->solo_subscribe($_POST[\'email\'], $_POST[\'postid\']);
|
| 829 |
+
}')
|
| 830 |
+
);
|
| 831 |
?>
|
subscribe-to-comments.pot
CHANGED
|
@@ -1,379 +1,421 @@
|
|
| 1 |
msgid ""
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: Subscribe to Comments 2.0\n"
|
| 4 |
-
"POT-Creation-Date: \n"
|
| 5 |
-
"PO-Revision-Date: 2005-07-11 18:42-0500\n"
|
| 6 |
"Last-Translator: Mark Jaquith <mark.i18n@txfx.net>\n"
|
| 7 |
"Language-Team: Mark Jaquith <mark.wordpress@txfx.net>\n"
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 11 |
-
"X-Poedit-Keywords: __,_e\n"
|
| 12 |
-
"X-Poedit-Basepath: .\n"
|
| 13 |
-
"X-Poedit-SearchPath-0: c:\\stc\n"
|
| 14 |
|
| 15 |
-
|
| 16 |
msgid "<strong>Error: </strong>"
|
| 17 |
msgstr ""
|
| 18 |
|
| 19 |
-
|
| 20 |
msgid "Subscribe without commenting"
|
| 21 |
msgstr ""
|
| 22 |
|
| 23 |
-
|
| 24 |
msgid "E-Mail:"
|
| 25 |
msgstr ""
|
| 26 |
|
| 27 |
-
|
| 28 |
msgid "Subscribe"
|
| 29 |
msgstr ""
|
| 30 |
|
| 31 |
-
|
| 32 |
msgid "\"From\" name for notifications:"
|
| 33 |
msgstr ""
|
| 34 |
|
| 35 |
-
|
| 36 |
msgid "\"From\" e-mail addresss for notifications:"
|
| 37 |
msgstr ""
|
| 38 |
|
| 39 |
-
|
| 40 |
msgid "\"Subscribe\" box should be checked by default"
|
| 41 |
msgstr ""
|
| 42 |
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
msgid "Comment Form Text"
|
| 45 |
msgstr ""
|
| 46 |
|
| 47 |
-
|
| 48 |
-
msgid "
|
|
|
|
|
|
|
| 49 |
msgstr ""
|
| 50 |
|
| 51 |
-
|
| 52 |
msgid "Not subscribed"
|
| 53 |
msgstr ""
|
| 54 |
|
| 55 |
-
|
| 56 |
msgid "Subscribed"
|
| 57 |
msgstr ""
|
| 58 |
|
| 59 |
-
|
| 60 |
msgid "Entry Author"
|
| 61 |
msgstr ""
|
| 62 |
|
| 63 |
-
|
| 64 |
msgid "Use custom style for Subscription Manager"
|
| 65 |
msgstr ""
|
| 66 |
|
| 67 |
-
|
| 68 |
-
msgid "
|
|
|
|
|
|
|
| 69 |
msgstr ""
|
| 70 |
|
| 71 |
-
|
| 72 |
msgid "Path to header:"
|
| 73 |
msgstr ""
|
| 74 |
|
| 75 |
-
|
| 76 |
msgid "Path to sidebar:"
|
| 77 |
msgstr ""
|
| 78 |
|
| 79 |
-
|
| 80 |
msgid "Path to footer:"
|
| 81 |
msgstr ""
|
| 82 |
|
| 83 |
-
|
| 84 |
msgid "HTML for before the subscription manager:"
|
| 85 |
msgstr ""
|
| 86 |
|
| 87 |
-
|
| 88 |
msgid "HTML for after the subscription manager:"
|
| 89 |
msgstr ""
|
| 90 |
|
| 91 |
-
|
| 92 |
msgid "Options saved."
|
| 93 |
msgstr ""
|
| 94 |
|
| 95 |
-
|
| 96 |
msgid "Update Options »"
|
| 97 |
msgstr ""
|
| 98 |
|
| 99 |
-
|
| 100 |
msgid "Please provide a valid e-mail address."
|
| 101 |
msgstr ""
|
| 102 |
|
| 103 |
-
|
| 104 |
msgid "This e-mail address may not be subscribed"
|
| 105 |
msgstr ""
|
| 106 |
|
| 107 |
-
|
| 108 |
-
# c:\stc/subscribe-to-comments.php:415
|
| 109 |
msgid "You appear to be already subscribed to this entry."
|
| 110 |
msgstr ""
|
| 111 |
|
| 112 |
-
|
| 113 |
msgid "Comments are not allowed on this entry."
|
| 114 |
msgstr ""
|
| 115 |
|
| 116 |
-
|
| 117 |
#, php-format
|
| 118 |
msgid "There is a new comment on the post \"%s\""
|
| 119 |
msgstr ""
|
| 120 |
|
| 121 |
-
|
| 122 |
#, php-format
|
| 123 |
msgid "Author: %s\n"
|
| 124 |
msgstr ""
|
| 125 |
|
| 126 |
-
|
| 127 |
msgid "Comment:\n"
|
| 128 |
msgstr ""
|
| 129 |
|
| 130 |
-
|
| 131 |
msgid "See all comments on this post here:\n"
|
| 132 |
msgstr ""
|
| 133 |
|
| 134 |
-
|
| 135 |
-
msgid "
|
|
|
|
|
|
|
| 136 |
msgstr ""
|
| 137 |
|
| 138 |
-
|
| 139 |
#, php-format
|
| 140 |
msgid "New Comment On: %s"
|
| 141 |
msgstr ""
|
| 142 |
|
| 143 |
-
|
| 144 |
msgid "E-mail change confirmation"
|
| 145 |
msgstr ""
|
| 146 |
|
| 147 |
-
|
| 148 |
#, php-format
|
| 149 |
msgid ""
|
| 150 |
-
"You are receiving this message to confirm a change of e-mail address for
|
|
|
|
| 151 |
"\n"
|
| 152 |
msgstr ""
|
| 153 |
|
| 154 |
-
|
| 155 |
#, php-format
|
| 156 |
msgid ""
|
| 157 |
"To change your e-mail address to %s, click this link:\n"
|
| 158 |
"\n"
|
| 159 |
msgstr ""
|
| 160 |
|
| 161 |
-
|
| 162 |
-
# c:\stc/subscribe-to-comments.php:621
|
| 163 |
msgid "If you did not request this action, please disregard this message."
|
| 164 |
msgstr ""
|
| 165 |
|
| 166 |
-
|
| 167 |
msgid "E-mail block confirmation"
|
| 168 |
msgstr ""
|
| 169 |
|
| 170 |
-
|
| 171 |
#, php-format
|
| 172 |
msgid ""
|
| 173 |
-
"You are receiving this message to confirm that you no longer wish to receive
|
|
|
|
| 174 |
"\n"
|
| 175 |
msgstr ""
|
| 176 |
|
| 177 |
-
|
| 178 |
msgid ""
|
| 179 |
"To cancel all future notifications for this address, click this link:\n"
|
| 180 |
"\n"
|
| 181 |
msgstr ""
|
| 182 |
|
| 183 |
-
|
| 184 |
msgid "click here"
|
| 185 |
msgstr ""
|
| 186 |
|
| 187 |
-
|
| 188 |
msgid "Notify me of followup comments via e-mail"
|
| 189 |
msgstr ""
|
| 190 |
|
| 191 |
-
|
| 192 |
-
msgid "
|
|
|
|
|
|
|
| 193 |
msgstr ""
|
| 194 |
|
| 195 |
-
|
| 196 |
-
msgid "
|
|
|
|
|
|
|
| 197 |
msgstr ""
|
| 198 |
|
| 199 |
-
|
| 200 |
-
# c:\stc/wp-subscription-manager.php:119
|
| 201 |
msgid "Comment Subscription Manager"
|
| 202 |
msgstr ""
|
| 203 |
|
| 204 |
-
|
| 205 |
-
# c:\stc/wp-subscription-manager.php:220
|
| 206 |
msgid "Subscriptions"
|
| 207 |
msgstr ""
|
| 208 |
|
| 209 |
-
|
| 210 |
msgid "Subscribe to Comments"
|
| 211 |
msgstr ""
|
| 212 |
|
| 213 |
-
|
| 214 |
-
msgid "
|
|
|
|
|
|
|
| 215 |
msgstr ""
|
| 216 |
|
| 217 |
-
|
| 218 |
msgid "You may not access this page without a valid key."
|
| 219 |
msgstr ""
|
| 220 |
|
| 221 |
-
|
| 222 |
#, php-format
|
| 223 |
-
msgid "
|
|
|
|
|
|
|
| 224 |
msgstr ""
|
| 225 |
|
| 226 |
-
|
| 227 |
#, php-format
|
| 228 |
msgid "<strong>%s</strong> %s removed successfully."
|
| 229 |
msgstr ""
|
| 230 |
|
| 231 |
-
|
| 232 |
msgid "subscriptions"
|
| 233 |
msgstr ""
|
| 234 |
|
| 235 |
-
|
| 236 |
msgid "subscription"
|
| 237 |
msgstr ""
|
| 238 |
|
| 239 |
-
|
| 240 |
#, php-format
|
| 241 |
msgid "The block on <strong>%s</strong> has been successfully removed."
|
| 242 |
msgstr ""
|
| 243 |
|
| 244 |
-
|
| 245 |
#, php-format
|
| 246 |
msgid "<strong>%s</strong> isn't blocked!"
|
| 247 |
msgstr ""
|
| 248 |
|
| 249 |
-
|
| 250 |
#, php-format
|
| 251 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
| 252 |
msgstr ""
|
| 253 |
|
| 254 |
-
|
| 255 |
#, php-format
|
| 256 |
-
msgid "
|
|
|
|
|
|
|
| 257 |
msgstr ""
|
| 258 |
|
| 259 |
-
|
| 260 |
#, php-format
|
| 261 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
| 262 |
msgstr ""
|
| 263 |
|
| 264 |
-
|
| 265 |
#, php-format
|
| 266 |
msgid "<strong>%s</strong> has been successfully subscribed to %s"
|
| 267 |
msgstr ""
|
| 268 |
|
| 269 |
-
|
| 270 |
#, php-format
|
| 271 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
msgstr ""
|
| 273 |
|
| 274 |
-
|
| 275 |
#, php-format
|
| 276 |
msgid "<strong>%s</strong> has already been blocked!"
|
| 277 |
msgstr ""
|
| 278 |
|
| 279 |
-
|
| 280 |
#, php-format
|
| 281 |
msgid "%s Comment Subscription Manager"
|
| 282 |
msgstr ""
|
| 283 |
|
| 284 |
-
|
| 285 |
#, php-format
|
| 286 |
msgid "Return to the page you were viewing: %s"
|
| 287 |
msgstr ""
|
| 288 |
|
| 289 |
-
|
| 290 |
msgid "Remove Block"
|
| 291 |
msgstr ""
|
| 292 |
|
| 293 |
-
|
| 294 |
#, php-format
|
| 295 |
-
msgid "
|
|
|
|
|
|
|
| 296 |
msgstr ""
|
| 297 |
|
| 298 |
-
|
| 299 |
msgid "Remove Block »"
|
| 300 |
msgstr ""
|
| 301 |
|
| 302 |
-
|
| 303 |
msgid "Blocked"
|
| 304 |
msgstr ""
|
| 305 |
|
| 306 |
-
|
| 307 |
#, php-format
|
| 308 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
msgstr ""
|
| 310 |
|
| 311 |
-
|
| 312 |
#, php-format
|
| 313 |
msgid "<strong>%s</strong> is not subscribed to any posts on this site."
|
| 314 |
msgstr ""
|
| 315 |
|
| 316 |
-
|
| 317 |
#, php-format
|
| 318 |
msgid "<strong>%s</strong> is not a valid e-mail address."
|
| 319 |
msgstr ""
|
| 320 |
|
| 321 |
-
|
| 322 |
msgid "Find Subscriptions"
|
| 323 |
msgstr ""
|
| 324 |
|
| 325 |
-
|
| 326 |
msgid "Enter an e-mail address to view its subscriptions or undo a block."
|
| 327 |
msgstr ""
|
| 328 |
|
| 329 |
-
|
| 330 |
msgid "Search »"
|
| 331 |
msgstr ""
|
| 332 |
|
| 333 |
-
|
| 334 |
#, php-format
|
| 335 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
| 336 |
msgstr ""
|
| 337 |
|
| 338 |
-
|
| 339 |
msgid "Invert Checkbox Selection"
|
| 340 |
msgstr ""
|
| 341 |
|
| 342 |
-
|
| 343 |
msgid "Remove Selected Subscription(s) »"
|
| 344 |
msgstr ""
|
| 345 |
|
| 346 |
-
|
| 347 |
msgid "Advanced Options"
|
| 348 |
msgstr ""
|
| 349 |
|
| 350 |
-
|
| 351 |
msgid "Block All Notifications"
|
| 352 |
msgstr ""
|
| 353 |
|
| 354 |
-
|
| 355 |
#, php-format
|
| 356 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
| 357 |
msgstr ""
|
| 358 |
|
| 359 |
-
|
| 360 |
msgid "Block Notifications »"
|
| 361 |
msgstr ""
|
| 362 |
|
| 363 |
-
|
| 364 |
msgid "Change E-mail Address"
|
| 365 |
msgstr ""
|
| 366 |
|
| 367 |
-
|
| 368 |
#, php-format
|
| 369 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
| 370 |
msgstr ""
|
| 371 |
|
| 372 |
-
|
| 373 |
msgid "New E-mail Address:"
|
| 374 |
msgstr ""
|
| 375 |
|
| 376 |
-
|
| 377 |
msgid "Change E-mail Address »"
|
| 378 |
msgstr ""
|
| 379 |
-
|
| 1 |
msgid ""
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: Subscribe to Comments 2.0\n"
|
| 4 |
+
"POT-Creation-Date: 2006-09-11 00:36-0400\n"
|
|
|
|
| 5 |
"Last-Translator: Mark Jaquith <mark.i18n@txfx.net>\n"
|
| 6 |
"Language-Team: Mark Jaquith <mark.wordpress@txfx.net>\n"
|
| 7 |
"MIME-Version: 1.0\n"
|
| 8 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 9 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
#: subscribe-to-comments.php:81
|
| 12 |
msgid "<strong>Error: </strong>"
|
| 13 |
msgstr ""
|
| 14 |
|
| 15 |
+
#: subscribe-to-comments.php:96
|
| 16 |
msgid "Subscribe without commenting"
|
| 17 |
msgstr ""
|
| 18 |
|
| 19 |
+
#: subscribe-to-comments.php:98
|
| 20 |
msgid "E-Mail:"
|
| 21 |
msgstr ""
|
| 22 |
|
| 23 |
+
#: subscribe-to-comments.php:100
|
| 24 |
msgid "Subscribe"
|
| 25 |
msgstr ""
|
| 26 |
|
| 27 |
+
#: subscribe-to-comments.php:145
|
| 28 |
msgid "\"From\" name for notifications:"
|
| 29 |
msgstr ""
|
| 30 |
|
| 31 |
+
#: subscribe-to-comments.php:146
|
| 32 |
msgid "\"From\" e-mail addresss for notifications:"
|
| 33 |
msgstr ""
|
| 34 |
|
| 35 |
+
#: subscribe-to-comments.php:147
|
| 36 |
msgid "\"Subscribe\" box should be checked by default"
|
| 37 |
msgstr ""
|
| 38 |
|
| 39 |
+
#: subscribe-to-comments.php:148
|
| 40 |
+
msgid ""
|
| 41 |
+
"Do a CSS \"clear\" on the subscription checkbox/message (uncheck this if the "
|
| 42 |
+
"checkbox/message appears in a strange location in your theme)"
|
| 43 |
+
msgstr ""
|
| 44 |
+
|
| 45 |
+
#: subscribe-to-comments.php:151
|
| 46 |
msgid "Comment Form Text"
|
| 47 |
msgstr ""
|
| 48 |
|
| 49 |
+
#: subscribe-to-comments.php:153
|
| 50 |
+
msgid ""
|
| 51 |
+
"Customize the messages shown to different people. Use <code>[manager_link]</"
|
| 52 |
+
"code> to insert the URI to the Subscription Manager."
|
| 53 |
msgstr ""
|
| 54 |
|
| 55 |
+
#: subscribe-to-comments.php:157
|
| 56 |
msgid "Not subscribed"
|
| 57 |
msgstr ""
|
| 58 |
|
| 59 |
+
#: subscribe-to-comments.php:159
|
| 60 |
msgid "Subscribed"
|
| 61 |
msgstr ""
|
| 62 |
|
| 63 |
+
#: subscribe-to-comments.php:161
|
| 64 |
msgid "Entry Author"
|
| 65 |
msgstr ""
|
| 66 |
|
| 67 |
+
#: subscribe-to-comments.php:173
|
| 68 |
msgid "Use custom style for Subscription Manager"
|
| 69 |
msgstr ""
|
| 70 |
|
| 71 |
+
#: subscribe-to-comments.php:175
|
| 72 |
+
msgid ""
|
| 73 |
+
"These settings only matter if you are using a custom style. <code>"
|
| 74 |
+
"[theme_path]</code> will be replaced with the path to your current theme."
|
| 75 |
msgstr ""
|
| 76 |
|
| 77 |
+
#: subscribe-to-comments.php:178
|
| 78 |
msgid "Path to header:"
|
| 79 |
msgstr ""
|
| 80 |
|
| 81 |
+
#: subscribe-to-comments.php:179
|
| 82 |
msgid "Path to sidebar:"
|
| 83 |
msgstr ""
|
| 84 |
|
| 85 |
+
#: subscribe-to-comments.php:180
|
| 86 |
msgid "Path to footer:"
|
| 87 |
msgstr ""
|
| 88 |
|
| 89 |
+
#: subscribe-to-comments.php:183
|
| 90 |
msgid "HTML for before the subscription manager:"
|
| 91 |
msgstr ""
|
| 92 |
|
| 93 |
+
#: subscribe-to-comments.php:184
|
| 94 |
msgid "HTML for after the subscription manager:"
|
| 95 |
msgstr ""
|
| 96 |
|
| 97 |
+
#: subscribe-to-comments.php:209
|
| 98 |
msgid "Options saved."
|
| 99 |
msgstr ""
|
| 100 |
|
| 101 |
+
#: subscribe-to-comments.php:216
|
| 102 |
msgid "Update Options »"
|
| 103 |
msgstr ""
|
| 104 |
|
| 105 |
+
#: subscribe-to-comments.php:388
|
| 106 |
msgid "Please provide a valid e-mail address."
|
| 107 |
msgstr ""
|
| 108 |
|
| 109 |
+
#: subscribe-to-comments.php:392
|
| 110 |
msgid "This e-mail address may not be subscribed"
|
| 111 |
msgstr ""
|
| 112 |
|
| 113 |
+
#: subscribe-to-comments.php:398 subscribe-to-comments.php:414
|
|
|
|
| 114 |
msgid "You appear to be already subscribed to this entry."
|
| 115 |
msgstr ""
|
| 116 |
|
| 117 |
+
#: subscribe-to-comments.php:404
|
| 118 |
msgid "Comments are not allowed on this entry."
|
| 119 |
msgstr ""
|
| 120 |
|
| 121 |
+
#: subscribe-to-comments.php:608
|
| 122 |
#, php-format
|
| 123 |
msgid "There is a new comment on the post \"%s\""
|
| 124 |
msgstr ""
|
| 125 |
|
| 126 |
+
#: subscribe-to-comments.php:609
|
| 127 |
#, php-format
|
| 128 |
msgid "Author: %s\n"
|
| 129 |
msgstr ""
|
| 130 |
|
| 131 |
+
#: subscribe-to-comments.php:610
|
| 132 |
msgid "Comment:\n"
|
| 133 |
msgstr ""
|
| 134 |
|
| 135 |
+
#: subscribe-to-comments.php:611
|
| 136 |
msgid "See all comments on this post here:\n"
|
| 137 |
msgstr ""
|
| 138 |
|
| 139 |
+
#: subscribe-to-comments.php:614
|
| 140 |
+
msgid ""
|
| 141 |
+
"To manage your subscriptions or to block all notifications from this site, "
|
| 142 |
+
"click the link below:\n"
|
| 143 |
msgstr ""
|
| 144 |
|
| 145 |
+
#: subscribe-to-comments.php:617
|
| 146 |
#, php-format
|
| 147 |
msgid "New Comment On: %s"
|
| 148 |
msgstr ""
|
| 149 |
|
| 150 |
+
#: subscribe-to-comments.php:638
|
| 151 |
msgid "E-mail change confirmation"
|
| 152 |
msgstr ""
|
| 153 |
|
| 154 |
+
#: subscribe-to-comments.php:639
|
| 155 |
#, php-format
|
| 156 |
msgid ""
|
| 157 |
+
"You are receiving this message to confirm a change of e-mail address for "
|
| 158 |
+
"your subscriptions at \"%s\"\n"
|
| 159 |
"\n"
|
| 160 |
msgstr ""
|
| 161 |
|
| 162 |
+
#: subscribe-to-comments.php:640
|
| 163 |
#, php-format
|
| 164 |
msgid ""
|
| 165 |
"To change your e-mail address to %s, click this link:\n"
|
| 166 |
"\n"
|
| 167 |
msgstr ""
|
| 168 |
|
| 169 |
+
#: subscribe-to-comments.php:642 subscribe-to-comments.php:654
|
|
|
|
| 170 |
msgid "If you did not request this action, please disregard this message."
|
| 171 |
msgstr ""
|
| 172 |
|
| 173 |
+
#: subscribe-to-comments.php:650
|
| 174 |
msgid "E-mail block confirmation"
|
| 175 |
msgstr ""
|
| 176 |
|
| 177 |
+
#: subscribe-to-comments.php:651
|
| 178 |
#, php-format
|
| 179 |
msgid ""
|
| 180 |
+
"You are receiving this message to confirm that you no longer wish to receive "
|
| 181 |
+
"e-mail comment notifications from \"%s\"\n"
|
| 182 |
"\n"
|
| 183 |
msgstr ""
|
| 184 |
|
| 185 |
+
#: subscribe-to-comments.php:652
|
| 186 |
msgid ""
|
| 187 |
"To cancel all future notifications for this address, click this link:\n"
|
| 188 |
"\n"
|
| 189 |
msgstr ""
|
| 190 |
|
| 191 |
+
#: subscribe-to-comments.php:686
|
| 192 |
msgid "click here"
|
| 193 |
msgstr ""
|
| 194 |
|
| 195 |
+
#: subscribe-to-comments.php:708
|
| 196 |
msgid "Notify me of followup comments via e-mail"
|
| 197 |
msgstr ""
|
| 198 |
|
| 199 |
+
#: subscribe-to-comments.php:708
|
| 200 |
+
msgid ""
|
| 201 |
+
"You are subscribed to this entry. <a href=\"[manager_link]\">Manage your "
|
| 202 |
+
"subscriptions</a>."
|
| 203 |
msgstr ""
|
| 204 |
|
| 205 |
+
#: subscribe-to-comments.php:708
|
| 206 |
+
msgid ""
|
| 207 |
+
"You are the author of this entry. <a href=\"[manager_link]\">Manage "
|
| 208 |
+
"subscriptions</a>."
|
| 209 |
msgstr ""
|
| 210 |
|
| 211 |
+
#: subscribe-to-comments.php:777 wp-subscription-manager.php:119
|
|
|
|
| 212 |
msgid "Comment Subscription Manager"
|
| 213 |
msgstr ""
|
| 214 |
|
| 215 |
+
#: subscribe-to-comments.php:777 wp-subscription-manager.php:220
|
|
|
|
| 216 |
msgid "Subscriptions"
|
| 217 |
msgstr ""
|
| 218 |
|
| 219 |
+
#: subscribe-to-comments.php:782
|
| 220 |
msgid "Subscribe to Comments"
|
| 221 |
msgstr ""
|
| 222 |
|
| 223 |
+
#: wp-subscription-manager.php:9
|
| 224 |
+
msgid ""
|
| 225 |
+
"You must activate the \"Subscribe to Comments\" plugin in the WordPress "
|
| 226 |
+
"admin panel"
|
| 227 |
msgstr ""
|
| 228 |
|
| 229 |
+
#: wp-subscription-manager.php:26
|
| 230 |
msgid "You may not access this page without a valid key."
|
| 231 |
msgstr ""
|
| 232 |
|
| 233 |
+
#: wp-subscription-manager.php:34
|
| 234 |
#, php-format
|
| 235 |
+
msgid ""
|
| 236 |
+
"All notifications that were formerly sent to <strong>%s</strong> will now be "
|
| 237 |
+
"sent to <strong>%s</strong>!"
|
| 238 |
msgstr ""
|
| 239 |
|
| 240 |
+
#: wp-subscription-manager.php:46
|
| 241 |
#, php-format
|
| 242 |
msgid "<strong>%s</strong> %s removed successfully."
|
| 243 |
msgstr ""
|
| 244 |
|
| 245 |
+
#: wp-subscription-manager.php:46
|
| 246 |
msgid "subscriptions"
|
| 247 |
msgstr ""
|
| 248 |
|
| 249 |
+
#: wp-subscription-manager.php:46
|
| 250 |
msgid "subscription"
|
| 251 |
msgstr ""
|
| 252 |
|
| 253 |
+
#: wp-subscription-manager.php:51
|
| 254 |
#, php-format
|
| 255 |
msgid "The block on <strong>%s</strong> has been successfully removed."
|
| 256 |
msgstr ""
|
| 257 |
|
| 258 |
+
#: wp-subscription-manager.php:53
|
| 259 |
#, php-format
|
| 260 |
msgid "<strong>%s</strong> isn't blocked!"
|
| 261 |
msgstr ""
|
| 262 |
|
| 263 |
+
#: wp-subscription-manager.php:58
|
| 264 |
#, php-format
|
| 265 |
+
msgid ""
|
| 266 |
+
"<strong>%s</strong> has been blocked from receiving notifications. You will "
|
| 267 |
+
"have to have the administrator remove the block before you will be able to "
|
| 268 |
+
"change your notification address."
|
| 269 |
msgstr ""
|
| 270 |
|
| 271 |
+
#: wp-subscription-manager.php:61
|
| 272 |
#, php-format
|
| 273 |
+
msgid ""
|
| 274 |
+
"Your change of e-mail request was successfully received. Please check your "
|
| 275 |
+
"old account (<strong>%s</strong>) in order to confirm the change."
|
| 276 |
msgstr ""
|
| 277 |
|
| 278 |
+
#: wp-subscription-manager.php:66
|
| 279 |
#, php-format
|
| 280 |
+
msgid ""
|
| 281 |
+
"Your request to block <strong>%s</strong> from receiving any further "
|
| 282 |
+
"notifications has been received. In order for you to complete the block, "
|
| 283 |
+
"please check your e-mail and click on the link in the message that has been "
|
| 284 |
+
"sent to you."
|
| 285 |
msgstr ""
|
| 286 |
|
| 287 |
+
#: wp-subscription-manager.php:70
|
| 288 |
#, php-format
|
| 289 |
msgid "<strong>%s</strong> has been successfully subscribed to %s"
|
| 290 |
msgstr ""
|
| 291 |
|
| 292 |
+
#: wp-subscription-manager.php:75
|
| 293 |
#, php-format
|
| 294 |
+
msgid ""
|
| 295 |
+
"<strong>%s</strong> has been added to the \"do not mail\" list. You will no "
|
| 296 |
+
"longer receive any notifications from this site. If this was done in error, "
|
| 297 |
+
"please contact the <a href=\"mailto:%s\">site administrator</a> to remove "
|
| 298 |
+
"this block."
|
| 299 |
msgstr ""
|
| 300 |
|
| 301 |
+
#: wp-subscription-manager.php:77
|
| 302 |
#, php-format
|
| 303 |
msgid "<strong>%s</strong> has already been blocked!"
|
| 304 |
msgstr ""
|
| 305 |
|
| 306 |
+
#: wp-subscription-manager.php:94
|
| 307 |
#, php-format
|
| 308 |
msgid "%s Comment Subscription Manager"
|
| 309 |
msgstr ""
|
| 310 |
|
| 311 |
+
#: wp-subscription-manager.php:122
|
| 312 |
#, php-format
|
| 313 |
msgid "Return to the page you were viewing: %s"
|
| 314 |
msgstr ""
|
| 315 |
|
| 316 |
+
#: wp-subscription-manager.php:133
|
| 317 |
msgid "Remove Block"
|
| 318 |
msgstr ""
|
| 319 |
|
| 320 |
+
#: wp-subscription-manager.php:136
|
| 321 |
#, php-format
|
| 322 |
+
msgid ""
|
| 323 |
+
"Click the button below to remove the block on <strong>%s</strong>. This "
|
| 324 |
+
"should only be done if the user has specifically requested it."
|
| 325 |
msgstr ""
|
| 326 |
|
| 327 |
+
#: wp-subscription-manager.php:144
|
| 328 |
msgid "Remove Block »"
|
| 329 |
msgstr ""
|
| 330 |
|
| 331 |
+
#: wp-subscription-manager.php:152
|
| 332 |
msgid "Blocked"
|
| 333 |
msgstr ""
|
| 334 |
|
| 335 |
+
#: wp-subscription-manager.php:155
|
| 336 |
#, php-format
|
| 337 |
+
msgid ""
|
| 338 |
+
"You have indicated that you do not wish to receive any notifications at "
|
| 339 |
+
"<strong>%s</strong> from this site. If this is incorrect, or if you wish to "
|
| 340 |
+
"have the block removed, please contact the <a href=\"mailto:%s\">site "
|
| 341 |
+
"administrator</a>."
|
| 342 |
msgstr ""
|
| 343 |
|
| 344 |
+
#: wp-subscription-manager.php:169
|
| 345 |
#, php-format
|
| 346 |
msgid "<strong>%s</strong> is not subscribed to any posts on this site."
|
| 347 |
msgstr ""
|
| 348 |
|
| 349 |
+
#: wp-subscription-manager.php:171
|
| 350 |
#, php-format
|
| 351 |
msgid "<strong>%s</strong> is not a valid e-mail address."
|
| 352 |
msgstr ""
|
| 353 |
|
| 354 |
+
#: wp-subscription-manager.php:183
|
| 355 |
msgid "Find Subscriptions"
|
| 356 |
msgstr ""
|
| 357 |
|
| 358 |
+
#: wp-subscription-manager.php:186
|
| 359 |
msgid "Enter an e-mail address to view its subscriptions or undo a block."
|
| 360 |
msgstr ""
|
| 361 |
|
| 362 |
+
#: wp-subscription-manager.php:194
|
| 363 |
msgid "Search »"
|
| 364 |
msgstr ""
|
| 365 |
|
| 366 |
+
#: wp-subscription-manager.php:223
|
| 367 |
#, php-format
|
| 368 |
+
msgid ""
|
| 369 |
+
"<strong>%s</strong> is subscribed to the posts listed below. To unsubscribe "
|
| 370 |
+
"to one or more posts, click the checkbox next to the title, then click "
|
| 371 |
+
"\"Remove Selected Subscription(s)\" at the bottom of the list."
|
| 372 |
msgstr ""
|
| 373 |
|
| 374 |
+
#: wp-subscription-manager.php:237
|
| 375 |
msgid "Invert Checkbox Selection"
|
| 376 |
msgstr ""
|
| 377 |
|
| 378 |
+
#: wp-subscription-manager.php:241
|
| 379 |
msgid "Remove Selected Subscription(s) »"
|
| 380 |
msgstr ""
|
| 381 |
|
| 382 |
+
#: wp-subscription-manager.php:248
|
| 383 |
msgid "Advanced Options"
|
| 384 |
msgstr ""
|
| 385 |
|
| 386 |
+
#: wp-subscription-manager.php:251
|
| 387 |
msgid "Block All Notifications"
|
| 388 |
msgstr ""
|
| 389 |
|
| 390 |
+
#: wp-subscription-manager.php:258
|
| 391 |
#, php-format
|
| 392 |
+
msgid ""
|
| 393 |
+
"If you would like <strong>%s</strong> to be blocked from receiving any "
|
| 394 |
+
"notifications from this site, click the button below. This should be "
|
| 395 |
+
"reserved for cases where someone is signing you up for notifications without "
|
| 396 |
+
"your consent."
|
| 397 |
msgstr ""
|
| 398 |
|
| 399 |
+
#: wp-subscription-manager.php:262
|
| 400 |
msgid "Block Notifications »"
|
| 401 |
msgstr ""
|
| 402 |
|
| 403 |
+
#: wp-subscription-manager.php:268
|
| 404 |
msgid "Change E-mail Address"
|
| 405 |
msgstr ""
|
| 406 |
|
| 407 |
+
#: wp-subscription-manager.php:275
|
| 408 |
#, php-format
|
| 409 |
+
msgid ""
|
| 410 |
+
"If you would like to change the e-mail address for your subscriptions, enter "
|
| 411 |
+
"the new address below. You will be required to verify this request by "
|
| 412 |
+
"clicking a special link sent to your current address (<strong>%s</strong>)."
|
| 413 |
msgstr ""
|
| 414 |
|
| 415 |
+
#: wp-subscription-manager.php:279
|
| 416 |
msgid "New E-mail Address:"
|
| 417 |
msgstr ""
|
| 418 |
|
| 419 |
+
#: wp-subscription-manager.php:284
|
| 420 |
msgid "Change E-mail Address »"
|
| 421 |
msgstr ""
|
|
|
