Version Description
Download this release
Release Info
Developer | markjaquith |
Plugin | Subscribe to Comments |
Version | 2.0-beta-1 |
Comparing to | |
See all releases |
Code changes from version 2.0.2 to 2.0-beta-1
- readme.html +6 -10
- readme.txt +0 -26
- subscribe-to-comments.php +55 -145
- subscribe-to-comments.pot +0 -379
- wp-subscription-manager.php +38 -41
readme.html
CHANGED
@@ -35,10 +35,6 @@
|
|
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.
|
39 |
-
<pre><code><?php if (comment_subscription_status()) { ?>
|
40 |
-
Subscribed
|
41 |
-
<?php } ?></code></pre></li>
|
42 |
<li>You need to be a logged-in WordPress user of 8 or above in order to search for subscriptions on random e-mail addresses or to remove a "do not mail" block.</li>
|
43 |
<li>The author of the post is always determined to be subscribed, and thus will never see the "subscribe" checkbox for his entries, but instead will see the "entry author" message.</li>
|
44 |
<li>Users are never e-mailed notifications for their own comments. (important that you know that for testing out the plugin)</li>
|
@@ -82,10 +78,10 @@ text-align: right;
|
|
82 |
|
83 |
|
84 |
.updated {
|
85 |
-
background: #B9D6EF;
|
86 |
-
border: 1px solid #589bd2;
|
87 |
-
margin: 1em 5% 10px;
|
88 |
-
padding: 0 1em;
|
89 |
}
|
90 |
|
91 |
.updated-error {
|
@@ -99,8 +95,8 @@ padding: 0;
|
|
99 |
}
|
100 |
|
101 |
div.warp li {
|
102 |
-
margin-bottom: 6px;
|
103 |
-
line-height: 130%;
|
104 |
}
|
105 |
/* END SUBSCRIPTION MANAGER STYLE */
|
106 |
|
35 |
|
36 |
<h2>Notes</h2>
|
37 |
<ul>
|
|
|
|
|
|
|
|
|
38 |
<li>You need to be a logged-in WordPress user of 8 or above in order to search for subscriptions on random e-mail addresses or to remove a "do not mail" block.</li>
|
39 |
<li>The author of the post is always determined to be subscribed, and thus will never see the "subscribe" checkbox for his entries, but instead will see the "entry author" message.</li>
|
40 |
<li>Users are never e-mailed notifications for their own comments. (important that you know that for testing out the plugin)</li>
|
78 |
|
79 |
|
80 |
.updated {
|
81 |
+
background: #B9D6EF;
|
82 |
+
border: 1px solid #589bd2;
|
83 |
+
margin: 1em 5% 10px;
|
84 |
+
padding: 0 1em;
|
85 |
}
|
86 |
|
87 |
.updated-error {
|
95 |
}
|
96 |
|
97 |
div.warp li {
|
98 |
+
margin-bottom: 6px;
|
99 |
+
line-height: 130%;
|
100 |
}
|
101 |
/* END SUBSCRIPTION MANAGER STYLE */
|
102 |
|
readme.txt
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
=== Subscribe to Comments ===
|
2 |
-
Tags: comments, subscription
|
3 |
-
Contributors: markjaquith
|
4 |
-
|
5 |
-
Subscribe to Comments 2 is a WordPress plugin that allows commenters on an entry to subscribe to e-mail notifications for subsequent comments. It does NOT e-mail you new blog posts. For that functionality, use Skippy's Subscribe2 plugin.
|
6 |
-
|
7 |
-
== Installation ==
|
8 |
-
|
9 |
-
1. Put subscribe-to-comments.php into [wordpress_dir]/wp-content/plugins/
|
10 |
-
2. Put wp-subscription-manager.php into your blog's root WordPress directory (the directory where wp-config.php resides)
|
11 |
-
3. Go into the WordPress admin interface and activate the plugin
|
12 |
-
4. Optional: if your WordPress 1.5 theme doesn't have the comment_form hook, or if you would like to manually determine where in your comments form the subscribe checkbox appears, enter this where you would like it: <?php show_subscription_checkbox(); ?>
|
13 |
-
5. 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 </form> tag for the comments form: <?php show_manual_subscription_form(); ?>
|
14 |
-
|
15 |
-
== Frequently Asked Questions ==
|
16 |
-
|
17 |
-
= How can I tell if it's working? =
|
18 |
-
|
19 |
-
1. Log out of WordPress
|
20 |
-
2. Leave a comment on an entry and check the comment subscription box, using an e-mail that is NOT the WP admin e-mail address or the e-mail address of the author of the post.
|
21 |
-
3. Leave a second comment (don't have to subscribed) using any old e-mail address
|
22 |
-
4. This should trigger a notification to the first address you used.
|
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subscribe-to-comments.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Subscribe To Comments
|
4 |
-
Version: 2.0
|
5 |
Plugin URI: http://txfx.net/search/subscribe%20to%20comments%202
|
6 |
Description: Allows readers to recieve notifications of new comments that are posted to an entry
|
7 |
-
Author:
|
8 |
Author URI: http://scriptygoddess.com/
|
9 |
*/
|
10 |
|
@@ -34,7 +34,7 @@ function show_subscription_checkbox ($id='0') {
|
|
34 |
<?php /* ------------------------------------------------------------------- */ ?>
|
35 |
|
36 |
<p style="clear: both;" class="subscribe-to-comments">
|
37 |
-
<input type="checkbox" name="subscribe" id="subscribe" value="subscribe" style="width:
|
38 |
<label for="subscribe"><?php echo $sg_subscribe->not_subscribed_text; ?></label>
|
39 |
</p>
|
40 |
|
@@ -78,7 +78,7 @@ return $id;
|
|
78 |
function show_manual_subscription_form () {
|
79 |
global $id, $sg_subscribe, $user_email;
|
80 |
sg_subscribe_start();
|
81 |
-
$sg_subscribe->show_errors('solo_subscribe', '<div class="solo-subscribe-errors">', '</div>', __('<strong>Error: </strong>', '
|
82 |
|
83 |
if ( !$sg_subscribe->current_viewer_subscription_status() ) :
|
84 |
get_currentuserinfo(); ?>
|
@@ -93,11 +93,11 @@ if ( !$sg_subscribe->current_viewer_subscription_status() ) :
|
|
93 |
<input type="hidden" name="ref" value="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" />
|
94 |
|
95 |
<p class="solo-subscribe-to-comments">
|
96 |
-
<?php _e('Subscribe without commenting', '
|
97 |
<br />
|
98 |
-
<label for="solo-subscribe-email"><?php _e('E-Mail:', '
|
99 |
<input type="text" name="email" id="solo-subscribe-email" size="22" value="<?php echo $user_email; ?>" /></label>
|
100 |
-
<input type="submit" name="submit" value="<?php _e('Subscribe', '
|
101 |
</p>
|
102 |
</form>
|
103 |
|
@@ -143,22 +143,22 @@ class sg_subscribe_settings
|
|
143 |
echo '<h2>Subscribe to Comments Options</h2>';
|
144 |
echo '<ul>';
|
145 |
|
146 |
-
echo '<li><label for="name">' . __('"From" name for notifications:', '
|
147 |
-
echo '<li><label for="email">' . __('"From" e-mail addresss for notifications:', '
|
148 |
-
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', '
|
149 |
echo '</ul>';
|
150 |
|
151 |
-
echo '<fieldset><legend>' . __('Comment Form Text', '
|
152 |
|
153 |
-
echo '<p>' . __('Customize the messages shown to different people. Use <code>[manager_link]</code> to insert the URI to the Subscription Manager.', '
|
154 |
|
155 |
echo '<ul>';
|
156 |
|
157 |
-
echo '<li><label for="not_subscribed_text">' . __('Not subscribed', '
|
158 |
|
159 |
-
echo '<li><label for="subscribed_text">' . __('Subscribed', '
|
160 |
|
161 |
-
echo '<li><label for="author_text">' . __('Entry Author', '
|
162 |
|
163 |
echo '</ul></fieldset>';
|
164 |
|
@@ -170,18 +170,18 @@ class sg_subscribe_settings
|
|
170 |
|
171 |
|
172 |
echo '<fieldset>';
|
173 |
-
echo '<legend><input type="checkbox" id="use_custom_style" name="sg_subscribe_settings[use_custom_style]" value="use_custom_style"' . sg_subscribe_settings::checkflag('use_custom_style') . ' /> <label for="use_custom_style">' . __('Use custom style for Subscription Manager', '
|
174 |
|
175 |
-
echo '<p>' . __('These settings only matter if you are using a custom style. <code>[theme_path]</code> will be replaced with the path to your current theme.', '
|
176 |
|
177 |
echo '<ul>';
|
178 |
-
echo '<li><label for="sg_sub_header">' . __('Path to header:', '
|
179 |
-
echo '<li><label for="sg_sub_sidebar">' . __('Path to sidebar:', '
|
180 |
-
echo '<li><label for="sg_sub_footer">' . __('Path to footer:', '
|
181 |
|
182 |
|
183 |
-
echo '<li><label for="before_manager">' . __('HTML for before the subscription manager:', '
|
184 |
-
echo '<li><label for="after_manager">' . __('HTML for after the subscription manager:', '
|
185 |
echo '</ul>';
|
186 |
echo '</fieldset>';
|
187 |
}
|
@@ -218,7 +218,7 @@ class sg_subscribe_settings
|
|
218 |
sg_subscribe_settings::options_page_contents();
|
219 |
|
220 |
echo '<p class="submit"><input type="submit" name="sg_subscribe_settings_submit" value="';
|
221 |
-
_e('Update Options »', '
|
222 |
echo '" /></p></div>';
|
223 |
echo '</form>';
|
224 |
}
|
@@ -342,7 +342,7 @@ class sg_subscribe
|
|
342 |
global $wpdb;
|
343 |
$postid = (int) $postid;
|
344 |
$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)");
|
345 |
-
$subscribed_without_comment = get_post_meta($postid, '
|
346 |
if( is_array($subscribed_without_comment) ) {
|
347 |
foreach ($subscribed_without_comment as $email)
|
348 |
$this->post_subscriptions[]->comment_author_email = $email;
|
@@ -364,7 +364,7 @@ class sg_subscribe
|
|
364 |
$i++;
|
365 |
}
|
366 |
}
|
367 |
-
$subscriptions = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '
|
368 |
if ( is_array($subscriptions) ) {
|
369 |
foreach ($subscriptions as $subscription) {
|
370 |
$this->email_subscriptions[$i] = $subscription->post_id;
|
@@ -389,21 +389,21 @@ class sg_subscribe
|
|
389 |
if ( is_email($user_email) )
|
390 |
$email = strtolower($user_email);
|
391 |
else
|
392 |
-
$this->add_error(__('Please provide a valid e-mail address.', '
|
393 |
}
|
394 |
|
395 |
-
if ( ( $email == $this->site_email && is_email($this->site_email) ) || ( $email == get_settings('admin_email') && is_email(get_settings('admin_email')) ) ) $this->add_error(__('This e-mail address may not be subscribed', '
|
396 |
|
397 |
if ( is_array($this->subscriptions_from_email($email)) )
|
398 |
if (in_array($postid, $this->subscriptions_from_email($email))) {
|
399 |
// already subscribed
|
400 |
setcookie('comment_author_email_' . COOKIEHASH, stripslashes($email), time() + 30000000, COOKIEPATH);
|
401 |
-
$this->add_error(__('You appear to be already subscribed to this entry.', '
|
402 |
}
|
403 |
$email = $wpdb->escape($email);
|
404 |
$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");
|
405 |
|
406 |
-
if(!$post) $this->add_error(__('Comments are not allowed on this entry.', '
|
407 |
|
408 |
if ( empty($cache_userdata[$post->post_author]) && $post->post_author != 0) {
|
409 |
$cache_userdata[$post->post_author] = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = $post->post_author");
|
@@ -412,10 +412,10 @@ class sg_subscribe
|
|
412 |
|
413 |
$post_author = $cache_userdata[$post->post_author];
|
414 |
|
415 |
-
if ( strtolower($post_author->user_email) == stripslashes($email) ) $this->add_error(__('You appear to be already subscribed to this entry.', '
|
416 |
|
417 |
if ( !is_array($this->errors['solo_subscribe']) ) {
|
418 |
-
add_post_meta($postid, '
|
419 |
|
420 |
setcookie('comment_author_email_' . COOKIEHASH, stripslashes($email), time() + 30000000, COOKIEPATH);
|
421 |
$location = $this->manage_link(stripslashes($email), false, false) . '&subscribeid=' . $postid;
|
@@ -431,11 +431,11 @@ class sg_subscribe
|
|
431 |
$email = $wpdb->escape(strtolower($wpdb->get_var("SELECT comment_author_email FROM $wpdb->comments WHERE comment_ID = '$cid'")));
|
432 |
$postid = $wpdb->get_var("SELECT comment_post_ID from $wpdb->comments WHERE comment_ID = '$cid'");
|
433 |
|
434 |
-
$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, '
|
435 |
|
436 |
// If user wants to be notified or has previously subscribed, set the flag on this current comment
|
437 |
if (($_POST['subscribe'] == 'subscribe' && is_email($email)) || $previously_subscribed) {
|
438 |
-
delete_post_meta($postid, '
|
439 |
$wpdb->query("UPDATE $wpdb->comments SET comment_subscribe = 'Y' where comment_post_ID = '$postid' AND LCASE(comment_author_email) = '$email'");
|
440 |
}
|
441 |
return $cid;
|
@@ -548,7 +548,7 @@ class sg_subscribe
|
|
548 |
$postid = (int) $postid;
|
549 |
$email = $wpdb->escape(strtolower($email));
|
550 |
|
551 |
-
if ( delete_post_meta($postid, '
|
552 |
return true;
|
553 |
else
|
554 |
return false;
|
@@ -574,16 +574,16 @@ class sg_subscribe
|
|
574 |
if ($comment->comment_approved == '1' && $comment->comment_type == '') {
|
575 |
// Comment has been approved and isn't a trackback or a pingback, so we should send out notifications
|
576 |
|
577 |
-
$message = sprintf(__("There is a new comment on the post \"%s\"", '
|
578 |
-
$message .= sprintf(__("Author: %s\n", '
|
579 |
-
$message .= __("Comment:\n", '
|
580 |
-
$message .= __("See all comments on this post here:\n", '
|
581 |
$message .= get_permalink($comment->comment_post_ID) . "#comments\n\n";
|
582 |
//add link to manage comment notifications
|
583 |
-
$message .= __("To manage your subscriptions or to block all notifications from this site, click the link below:\n", '
|
584 |
$message .= get_settings('siteurl')."/wp-subscription-manager.php?email=[email]&key=[key]";
|
585 |
|
586 |
-
$subject = sprintf(__('New Comment On: %s', '
|
587 |
|
588 |
$subscriptions = $this->subscriptions_from_post($comment->comment_post_ID);
|
589 |
if ( is_array($subscriptions) ) {
|
@@ -603,22 +603,22 @@ class sg_subscribe
|
|
603 |
function change_email_request() {
|
604 |
if ( $this->is_blocked() ) return false;
|
605 |
|
606 |
-
$subject = __('E-mail change confirmation', '
|
607 |
-
$message = sprintf(__("You are receiving this message to confirm a change of e-mail address for your subscriptions at \"%s\"\n\n", '
|
608 |
-
$message .= sprintf(__("To change your e-mail address to %s, click this link:\n\n", '
|
609 |
$message .= get_bloginfo('wpurl') . "/wp-subscription-manager.php?email=" . $this->email . "&new_email=" . $this->new_email . "&key=" . md5($this->email . $this->new_email . DB_PASSWORD) . ".\n\n";
|
610 |
-
$message .= __('If you did not request this action, please disregard this message.', '
|
611 |
return $this->send_mail($this->email, $subject, $message);
|
612 |
}
|
613 |
|
614 |
|
615 |
function block_email_request($email) {
|
616 |
if($this->is_blocked($email)) return false;
|
617 |
-
$subject = __('E-mail block confirmation', '
|
618 |
-
$message = sprintf(__("You are receiving this message to confirm that you no longer wish to receive e-mail comment notifications from \"%s\"\n\n", '
|
619 |
-
$message .= __("To cancel all future notifications for this address, click this link:\n\n", '
|
620 |
$message .= get_bloginfo('wpurl') . "/wp-subscription-manager.php?email=" . $email . "&key=" . md5($email . 'blockrequest' . DB_PASSWORD) . "&blockemailconfirm=true" . ".\n\n";
|
621 |
-
$message .= __("If you did not request this action, please disregard this message.", '
|
622 |
return $this->send_mail($email, $subject, $message);
|
623 |
}
|
624 |
|
@@ -627,7 +627,7 @@ class sg_subscribe
|
|
627 |
$subject = '[' . get_bloginfo('name') . '] ' . $subject;
|
628 |
$headers = "From: ".$this->site_name." <".$this->site_email.">\n";
|
629 |
$headers .= "MIME-Version: 1.0\n" . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
|
630 |
-
return
|
631 |
}
|
632 |
|
633 |
|
@@ -637,7 +637,7 @@ class sg_subscribe
|
|
637 |
$email = $wpdb->escape(strtolower($this->email));
|
638 |
if ( $wpdb->query("UPDATE $wpdb->comments SET comment_author_email = '$new_email' WHERE comment_author_email = '$email'") )
|
639 |
$return = true;
|
640 |
-
if ( $wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '$new_email' WHERE meta_value = '$email' AND meta_key = '
|
641 |
$return = true;
|
642 |
|
643 |
return $return;
|
@@ -648,7 +648,7 @@ class sg_subscribe
|
|
648 |
if ( empty($uri) ) $uri = get_permalink($postid);
|
649 |
$postid = (int) $postid;
|
650 |
$title = get_the_title($postid);
|
651 |
-
if ( empty($title) ) $title = __('click here', '
|
652 |
$output = '<a href="'.$uri.'">'.$title.'</a>';
|
653 |
return $output;
|
654 |
}
|
@@ -670,7 +670,7 @@ class sg_subscribe
|
|
670 |
global $wpdb;
|
671 |
|
672 |
// add the options
|
673 |
-
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', '
|
674 |
|
675 |
$column_name = 'comment_subscribe';
|
676 |
foreach ($wpdb->get_col("DESC $wpdb->comments", 0) as $column )
|
@@ -705,96 +705,6 @@ class sg_subscribe
|
|
705 |
}
|
706 |
|
707 |
|
708 |
-
function url_to_postid($url) {
|
709 |
-
// This function is the version of WordPress' url_to_postid()
|
710 |
-
// function that was modified by Mark Jaquith for use in
|
711 |
-
// the upcoming WordPress version 1.6
|
712 |
-
// It fixes many bugs inherant in the 1.5.x version of the function
|
713 |
-
|
714 |
-
global $wp_rewrite;
|
715 |
-
|
716 |
-
// First, check to see if there is a 'p=N' or 'page_id=N' to match against
|
717 |
-
preg_match('#[?&](p|page_id)=(\d+)#', $url, $values);
|
718 |
-
$id = intval($values[2]);
|
719 |
-
if ($id) return $id;
|
720 |
-
|
721 |
-
// Check to see if we are using rewrite rules
|
722 |
-
$rewrite = $wp_rewrite->wp_rewrite_rules();
|
723 |
-
|
724 |
-
// Not using rewrite rules, and 'p=N' and 'page_id=N' methods failed, so we're out of options
|
725 |
-
if ( empty($rewrite) )
|
726 |
-
return 0;
|
727 |
-
|
728 |
-
// $url cleanup by Mark Jaquith
|
729 |
-
// This fixes things like #anchors, ?query=strings, missing 'www.',
|
730 |
-
// added 'www.', or added 'index.php/' that will mess up our WP_Query
|
731 |
-
// and return a false negative
|
732 |
-
|
733 |
-
// Get rid of the #anchor
|
734 |
-
$url_split = explode('#', $url);
|
735 |
-
$url = $url_split[0];
|
736 |
-
|
737 |
-
// Get rid of URI ?query=string
|
738 |
-
$url_split = explode('?', $url);
|
739 |
-
$url = $url_split[0];
|
740 |
-
|
741 |
-
// Add 'www.' if it is absent and should be there
|
742 |
-
if ( false !== strpos(get_settings('home'), '://www.') && false === strpos($url, '://www.') )
|
743 |
-
$url = str_replace('://', '://www.', $url);
|
744 |
-
|
745 |
-
// Strip 'www.' if it is present and shouldn't be
|
746 |
-
if ( false === strpos(get_settings('home'), '://www.') )
|
747 |
-
$url = str_replace('://www.', '://', $url);
|
748 |
-
|
749 |
-
// Strip 'index.php/' if we're not using path info permalinks
|
750 |
-
if ( false === strpos($rewrite, 'index.php/') )
|
751 |
-
$url = str_replace('index.php/', '', $url);
|
752 |
-
|
753 |
-
// Chop off http://domain.com
|
754 |
-
if ( false !== strpos($url, get_settings('home')) ) {
|
755 |
-
$url = str_replace(get_settings('home'), '', $url);
|
756 |
-
} else {
|
757 |
-
// Chop off /path/to/blog
|
758 |
-
$home_path = parse_url(get_settings('home'));
|
759 |
-
$home_path = $home_path['path'];
|
760 |
-
$url = str_replace($home_path, '', $url);
|
761 |
-
}
|
762 |
-
|
763 |
-
// Trim leading and lagging slashes
|
764 |
-
$url = trim($url, '/');
|
765 |
-
|
766 |
-
$request = $url;
|
767 |
-
|
768 |
-
// Done with cleanup
|
769 |
-
|
770 |
-
// Look for matches.
|
771 |
-
$request_match = $request;
|
772 |
-
foreach ($rewrite as $match => $query) {
|
773 |
-
// If the requesting file is the anchor of the match, prepend it
|
774 |
-
// to the path info.
|
775 |
-
if ((! empty($url)) && (strpos($match, $url) === 0)) {
|
776 |
-
$request_match = $url . '/' . $request;
|
777 |
-
}
|
778 |
-
|
779 |
-
if (preg_match("!^$match!", $request_match, $matches)) {
|
780 |
-
// Got a match.
|
781 |
-
// Trim the query of everything up to the '?'.
|
782 |
-
$query = preg_replace("!^.+\?!", '', $query);
|
783 |
-
|
784 |
-
// Substitute the substring matches into the query.
|
785 |
-
eval("\$query = \"$query\";");
|
786 |
-
$query = new WP_Query($query);
|
787 |
-
if ( $query->is_single || $query->is_page )
|
788 |
-
return $query->post->ID;
|
789 |
-
else
|
790 |
-
return 0;
|
791 |
-
}
|
792 |
-
}
|
793 |
-
|
794 |
-
return 0;
|
795 |
-
}
|
796 |
-
|
797 |
-
|
798 |
function manage_link($email='', $html=true, $echo=true) {
|
799 |
$link = get_bloginfo('wpurl') . '/wp-subscription-manager.php?';
|
800 |
if ($html) $amp = 'amp;';
|
@@ -810,12 +720,12 @@ class sg_subscribe
|
|
810 |
|
811 |
|
812 |
function add_admin_menu() {
|
813 |
-
add_management_page(__('Comment Subscription Manager', '
|
814 |
|
815 |
if(class_exists('SmallOptions'))
|
816 |
add_action('small_options_page', array('sg_subscribe_settings', 'options_page_contents'));
|
817 |
else
|
818 |
-
add_options_page(__('Subscribe to Comments', '
|
819 |
}
|
820 |
|
821 |
|
@@ -830,7 +740,7 @@ function sg_subscribe_start() {
|
|
830 |
global $sg_subscribe;
|
831 |
|
832 |
if (!$sg_subscribe) {
|
833 |
-
load_plugin_textdomain('
|
834 |
$sg_subscribe = new sg_subscribe();
|
835 |
}
|
836 |
}
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Subscribe To Comments
|
4 |
+
Version: 2.0-beta-1
|
5 |
Plugin URI: http://txfx.net/search/subscribe%20to%20comments%202
|
6 |
Description: Allows readers to recieve notifications of new comments that are posted to an entry
|
7 |
+
Author: Jennifer (ScriptyGoddess) and Mark (Tempus Fugit)
|
8 |
Author URI: http://scriptygoddess.com/
|
9 |
*/
|
10 |
|
34 |
<?php /* ------------------------------------------------------------------- */ ?>
|
35 |
|
36 |
<p style="clear: both;" class="subscribe-to-comments">
|
37 |
+
<input type="checkbox" name="subscribe" id="subscribe" value="subscribe" style="width: 20px;" <?php if ($sg_subscribe->default_subscribed) echo 'checked="checked" '; ?>/>
|
38 |
<label for="subscribe"><?php echo $sg_subscribe->not_subscribed_text; ?></label>
|
39 |
</p>
|
40 |
|
78 |
function show_manual_subscription_form () {
|
79 |
global $id, $sg_subscribe, $user_email;
|
80 |
sg_subscribe_start();
|
81 |
+
$sg_subscribe->show_errors('solo_subscribe', '<div class="solo-subscribe-errors">', '</div>', __('<strong>Error: </strong>', 'subscribe_to_comments'), '<br />');
|
82 |
|
83 |
if ( !$sg_subscribe->current_viewer_subscription_status() ) :
|
84 |
get_currentuserinfo(); ?>
|
93 |
<input type="hidden" name="ref" value="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" />
|
94 |
|
95 |
<p class="solo-subscribe-to-comments">
|
96 |
+
<?php _e('Subscribe without commenting', 'subscribe_to_comments'); ?>
|
97 |
<br />
|
98 |
+
<label for="solo-subscribe-email"><?php _e('E-Mail:', 'subscribe_to_comments'); ?>
|
99 |
<input type="text" name="email" id="solo-subscribe-email" size="22" value="<?php echo $user_email; ?>" /></label>
|
100 |
+
<input type="submit" name="submit" value="<?php _e('Subscribe', 'subscribe_to_comments'); ?>" />
|
101 |
</p>
|
102 |
</form>
|
103 |
|
143 |
echo '<h2>Subscribe to Comments Options</h2>';
|
144 |
echo '<ul>';
|
145 |
|
146 |
+
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>';
|
147 |
+
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>';
|
148 |
+
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>';
|
149 |
echo '</ul>';
|
150 |
|
151 |
+
echo '<fieldset><legend>' . __('Comment Form Text', 'subscribe_to_comments') . '</legend>';
|
152 |
|
153 |
+
echo '<p>' . __('Customize the messages shown to different people. Use <code>[manager_link]</code> to insert the URI to the Subscription Manager.', 'subscribe_to_comments') . '</p>';
|
154 |
|
155 |
echo '<ul>';
|
156 |
|
157 |
+
echo '<li><label for="not_subscribed_text">' . __('Not subscribed', 'subscribe_to_comments') . '</label><br /><textarea style="width: 98%; font-size: 12px;" rows="2" cols="60" id="not_subscribed_text" name="sg_subscribe_settings[not_subscribed_text]">' . sg_subscribe_settings::textarea_setting('not_subscribed_text') . '</textarea></li>';
|
158 |
|
159 |
+
echo '<li><label for="subscribed_text">' . __('Subscribed', 'subscribe_to_comments') . '</label><br /><textarea style="width: 98%; font-size: 12px;" rows="2" cols="60" id="subscribed_text" name="sg_subscribe_settings[subscribed_text]">' . sg_subscribe_settings::textarea_setting('subscribed_text') . '</textarea></li>';
|
160 |
|
161 |
+
echo '<li><label for="author_text">' . __('Entry Author', 'subscribe_to_comments') . '</label><br /><textarea style="width: 98%; font-size: 12px;" rows="2" cols="60" id="author_text" name="sg_subscribe_settings[author_text]">' . sg_subscribe_settings::textarea_setting('author_text') . '</textarea></li>';
|
162 |
|
163 |
echo '</ul></fieldset>';
|
164 |
|
170 |
|
171 |
|
172 |
echo '<fieldset>';
|
173 |
+
echo '<legend><input type="checkbox" id="use_custom_style" name="sg_subscribe_settings[use_custom_style]" value="use_custom_style"' . sg_subscribe_settings::checkflag('use_custom_style') . ' /> <label for="use_custom_style">' . __('Use custom style for Subscription Manager', 'subscribe_to_comments') . '</label></legend>';
|
174 |
|
175 |
+
echo '<p>' . __('These settings only matter if you are using a custom style. <code>[theme_path]</code> will be replaced with the path to your current theme.', 'subscribe_to_comments') . '</p>';
|
176 |
|
177 |
echo '<ul>';
|
178 |
+
echo '<li><label for="sg_sub_header">' . __('Path to header:', 'subscribe_to_comments') . ' <input type="text" size="40" id="sg_sub_header" name="sg_subscribe_settings[header]" value="' . sg_subscribe_settings::form_setting('header') . '" /></label></li>';
|
179 |
+
echo '<li><label for="sg_sub_sidebar">' . __('Path to sidebar:', 'subscribe_to_comments') . ' <input type="text" size="40" id="sg_sub_sidebar" name="sg_subscribe_settings[sidebar]" value="' . sg_subscribe_settings::form_setting('sidebar') . '" /></label></li>';
|
180 |
+
echo '<li><label for="sg_sub_footer">' . __('Path to footer:', 'subscribe_to_comments') . ' <input type="text" size="40" id="sg_sub_footer" name="sg_subscribe_settings[footer]" value="' . sg_subscribe_settings::form_setting('footer') . '" /></label></li>';
|
181 |
|
182 |
|
183 |
+
echo '<li><label for="before_manager">' . __('HTML for before the subscription manager:', 'subscribe_to_comments') . ' </label><br /><textarea style="width: 98%; font-size: 12px;" rows="2" cols="60" id="before_manager" name="sg_subscribe_settings[before_manager]">' . sg_subscribe_settings::textarea_setting('before_manager') . '</textarea></li>';
|
184 |
+
echo '<li><label for="after_manager">' . __('HTML for after the subscription manager:', 'subscribe_to_comments') . ' </label><br /><textarea style="width: 98%; font-size: 12px;" rows="2" cols="60" id="after_manager" name="sg_subscribe_settings[after_manager]">' . sg_subscribe_settings::textarea_setting('after_manager') . '</textarea></li>';
|
185 |
echo '</ul>';
|
186 |
echo '</fieldset>';
|
187 |
}
|
218 |
sg_subscribe_settings::options_page_contents();
|
219 |
|
220 |
echo '<p class="submit"><input type="submit" name="sg_subscribe_settings_submit" value="';
|
221 |
+
_e('Update Options »', 'subscribe_to_comments');
|
222 |
echo '" /></p></div>';
|
223 |
echo '</form>';
|
224 |
}
|
342 |
global $wpdb;
|
343 |
$postid = (int) $postid;
|
344 |
$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)");
|
345 |
+
$subscribed_without_comment = get_post_meta($postid, '_sg_subscribe_to_comments');
|
346 |
if( is_array($subscribed_without_comment) ) {
|
347 |
foreach ($subscribed_without_comment as $email)
|
348 |
$this->post_subscriptions[]->comment_author_email = $email;
|
364 |
$i++;
|
365 |
}
|
366 |
}
|
367 |
+
$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");
|
368 |
if ( is_array($subscriptions) ) {
|
369 |
foreach ($subscriptions as $subscription) {
|
370 |
$this->email_subscriptions[$i] = $subscription->post_id;
|
389 |
if ( is_email($user_email) )
|
390 |
$email = strtolower($user_email);
|
391 |
else
|
392 |
+
$this->add_error(__('Please provide a valid e-mail address.', 'subscribe_to_comments'),'solo_subscribe');
|
393 |
}
|
394 |
|
395 |
+
if ( ( $email == $this->site_email && is_email($this->site_email) ) || ( $email == get_settings('admin_email') && is_email(get_settings('admin_email')) ) ) $this->add_error(__('This e-mail address may not be subscribed', 'subscribe_to_comments'),'solo_subscribe');
|
396 |
|
397 |
if ( is_array($this->subscriptions_from_email($email)) )
|
398 |
if (in_array($postid, $this->subscriptions_from_email($email))) {
|
399 |
// already subscribed
|
400 |
setcookie('comment_author_email_' . COOKIEHASH, stripslashes($email), time() + 30000000, COOKIEPATH);
|
401 |
+
$this->add_error(__('You appear to be already subscribed to this entry.', 'subscribe_to_comments'),'solo_subscribe');
|
402 |
}
|
403 |
$email = $wpdb->escape($email);
|
404 |
$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");
|
405 |
|
406 |
+
if(!$post) $this->add_error(__('Comments are not allowed on this entry.', 'subscribe_to_comments'),'solo_subscribe');
|
407 |
|
408 |
if ( empty($cache_userdata[$post->post_author]) && $post->post_author != 0) {
|
409 |
$cache_userdata[$post->post_author] = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = $post->post_author");
|
412 |
|
413 |
$post_author = $cache_userdata[$post->post_author];
|
414 |
|
415 |
+
if ( strtolower($post_author->user_email) == stripslashes($email) ) $this->add_error(__('You appear to be already subscribed to this entry.', 'subscribe_to_comments'),'solo_subscribe');
|
416 |
|
417 |
if ( !is_array($this->errors['solo_subscribe']) ) {
|
418 |
+
add_post_meta($postid, '_sg_subscribe_to_comments', stripslashes($email));
|
419 |
|
420 |
setcookie('comment_author_email_' . COOKIEHASH, stripslashes($email), time() + 30000000, COOKIEPATH);
|
421 |
$location = $this->manage_link(stripslashes($email), false, false) . '&subscribeid=' . $postid;
|
431 |
$email = $wpdb->escape(strtolower($wpdb->get_var("SELECT comment_author_email FROM $wpdb->comments WHERE comment_ID = '$cid'")));
|
432 |
$postid = $wpdb->get_var("SELECT comment_post_ID from $wpdb->comments WHERE comment_ID = '$cid'");
|
433 |
|
434 |
+
$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;
|
435 |
|
436 |
// If user wants to be notified or has previously subscribed, set the flag on this current comment
|
437 |
if (($_POST['subscribe'] == 'subscribe' && is_email($email)) || $previously_subscribed) {
|
438 |
+
delete_post_meta($postid, '_sg_subscribe_to_comments', stripslashes($email));
|
439 |
$wpdb->query("UPDATE $wpdb->comments SET comment_subscribe = 'Y' where comment_post_ID = '$postid' AND LCASE(comment_author_email) = '$email'");
|
440 |
}
|
441 |
return $cid;
|
548 |
$postid = (int) $postid;
|
549 |
$email = $wpdb->escape(strtolower($email));
|
550 |
|
551 |
+
if ( delete_post_meta($postid, '_sg_subscribe_to_comments', stripslashes($email)) || $wpdb->query("UPDATE $wpdb->comments SET comment_subscribe = 'N' WHERE comment_post_ID = '$postid' AND LCASE(comment_author_email) ='$email'") )
|
552 |
return true;
|
553 |
else
|
554 |
return false;
|
574 |
if ($comment->comment_approved == '1' && $comment->comment_type == '') {
|
575 |
// Comment has been approved and isn't a trackback or a pingback, so we should send out notifications
|
576 |
|
577 |
+
$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));
|
578 |
+
$message .= sprintf(__("Author: %s\n", 'subscribe_to_comments'), $comment->comment_author);
|
579 |
+
$message .= __("Comment:\n", 'subscribe_to_comments') . stripslashes($comment->comment_content) . "\n\n";
|
580 |
+
$message .= __("See all comments on this post here:\n", 'subscribe_to_comments');
|
581 |
$message .= get_permalink($comment->comment_post_ID) . "#comments\n\n";
|
582 |
//add link to manage comment notifications
|
583 |
+
$message .= __("To manage your subscriptions or to block all notifications from this site, click the link below:\n", 'subscribe_to_comments');
|
584 |
$message .= get_settings('siteurl')."/wp-subscription-manager.php?email=[email]&key=[key]";
|
585 |
|
586 |
+
$subject = sprintf(__('New Comment On: %s', 'subscribe_to_comments'), stripslashes($post->post_title));
|
587 |
|
588 |
$subscriptions = $this->subscriptions_from_post($comment->comment_post_ID);
|
589 |
if ( is_array($subscriptions) ) {
|
603 |
function change_email_request() {
|
604 |
if ( $this->is_blocked() ) return false;
|
605 |
|
606 |
+
$subject = __('E-mail change confirmation', 'subscribe_to_comments');
|
607 |
+
$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'));
|
608 |
+
$message .= sprintf(__("To change your e-mail address to %s, click this link:\n\n", 'subscribe_to_comments'), $this->new_email);
|
609 |
$message .= get_bloginfo('wpurl') . "/wp-subscription-manager.php?email=" . $this->email . "&new_email=" . $this->new_email . "&key=" . md5($this->email . $this->new_email . DB_PASSWORD) . ".\n\n";
|
610 |
+
$message .= __('If you did not request this action, please disregard this message.', 'subscribe_to_comments');
|
611 |
return $this->send_mail($this->email, $subject, $message);
|
612 |
}
|
613 |
|
614 |
|
615 |
function block_email_request($email) {
|
616 |
if($this->is_blocked($email)) return false;
|
617 |
+
$subject = __('E-mail block confirmation', 'subscribe_to_comments');
|
618 |
+
$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'));
|
619 |
+
$message .= __("To cancel all future notifications for this address, click this link:\n\n", 'subscribe_to_comments');
|
620 |
$message .= get_bloginfo('wpurl') . "/wp-subscription-manager.php?email=" . $email . "&key=" . md5($email . 'blockrequest' . DB_PASSWORD) . "&blockemailconfirm=true" . ".\n\n";
|
621 |
+
$message .= __("If you did not request this action, please disregard this message.", 'subscribe_to_comments');
|
622 |
return $this->send_mail($email, $subject, $message);
|
623 |
}
|
624 |
|
627 |
$subject = '[' . get_bloginfo('name') . '] ' . $subject;
|
628 |
$headers = "From: ".$this->site_name." <".$this->site_email.">\n";
|
629 |
$headers .= "MIME-Version: 1.0\n" . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
|
630 |
+
return mail ($to, $subject, $message, $headers);
|
631 |
}
|
632 |
|
633 |
|
637 |
$email = $wpdb->escape(strtolower($this->email));
|
638 |
if ( $wpdb->query("UPDATE $wpdb->comments SET comment_author_email = '$new_email' WHERE comment_author_email = '$email'") )
|
639 |
$return = true;
|
640 |
+
if ( $wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '$new_email' WHERE meta_value = '$email' AND meta_key = '_sg_subscribe_to_comments'") )
|
641 |
$return = true;
|
642 |
|
643 |
return $return;
|
648 |
if ( empty($uri) ) $uri = get_permalink($postid);
|
649 |
$postid = (int) $postid;
|
650 |
$title = get_the_title($postid);
|
651 |
+
if ( empty($title) ) $title = __('click here', 'subscribe_to_comments');
|
652 |
$output = '<a href="'.$uri.'">'.$title.'</a>';
|
653 |
return $output;
|
654 |
}
|
670 |
global $wpdb;
|
671 |
|
672 |
// add the options
|
673 |
+
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')));
|
674 |
|
675 |
$column_name = 'comment_subscribe';
|
676 |
foreach ($wpdb->get_col("DESC $wpdb->comments", 0) as $column )
|
705 |
}
|
706 |
|
707 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
708 |
function manage_link($email='', $html=true, $echo=true) {
|
709 |
$link = get_bloginfo('wpurl') . '/wp-subscription-manager.php?';
|
710 |
if ($html) $amp = 'amp;';
|
720 |
|
721 |
|
722 |
function add_admin_menu() {
|
723 |
+
add_management_page(__('Comment Subscription Manager', 'subscribe_to_comments'), __('Subscriptions', 'subscribe_to_comments'), 8, __FILE__, 'sg_subscribe_admin');
|
724 |
|
725 |
if(class_exists('SmallOptions'))
|
726 |
add_action('small_options_page', array('sg_subscribe_settings', 'options_page_contents'));
|
727 |
else
|
728 |
+
add_options_page(__('Subscribe to Comments', 'subscribe_to_comments'), __('Subscribe to Comments', 'subscribe_to_comments'), 5, basename(__FILE__), array('sg_subscribe_settings', 'options_page'));
|
729 |
}
|
730 |
|
731 |
|
740 |
global $sg_subscribe;
|
741 |
|
742 |
if (!$sg_subscribe) {
|
743 |
+
load_plugin_textdomain('subscribe_to_comments');
|
744 |
$sg_subscribe = new sg_subscribe();
|
745 |
}
|
746 |
}
|
subscribe-to-comments.pot
DELETED
@@ -1,379 +0,0 @@
|
|
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 |
-
# c:\stc/subscribe-to-comments.php:81
|
16 |
-
msgid "<strong>Error: </strong>"
|
17 |
-
msgstr ""
|
18 |
-
|
19 |
-
# c:\stc/subscribe-to-comments.php:96
|
20 |
-
msgid "Subscribe without commenting"
|
21 |
-
msgstr ""
|
22 |
-
|
23 |
-
# c:\stc/subscribe-to-comments.php:98
|
24 |
-
msgid "E-Mail:"
|
25 |
-
msgstr ""
|
26 |
-
|
27 |
-
# c:\stc/subscribe-to-comments.php:100
|
28 |
-
msgid "Subscribe"
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
# c:\stc/subscribe-to-comments.php:146
|
32 |
-
msgid "\"From\" name for notifications:"
|
33 |
-
msgstr ""
|
34 |
-
|
35 |
-
# c:\stc/subscribe-to-comments.php:147
|
36 |
-
msgid "\"From\" e-mail addresss for notifications:"
|
37 |
-
msgstr ""
|
38 |
-
|
39 |
-
# c:\stc/subscribe-to-comments.php:148
|
40 |
-
msgid "\"Subscribe\" box should be checked by default"
|
41 |
-
msgstr ""
|
42 |
-
|
43 |
-
# c:\stc/subscribe-to-comments.php:151
|
44 |
-
msgid "Comment Form Text"
|
45 |
-
msgstr ""
|
46 |
-
|
47 |
-
# c:\stc/subscribe-to-comments.php:153
|
48 |
-
msgid "Customize the messages shown to different people. Use <code>[manager_link]</code> to insert the URI to the Subscription Manager."
|
49 |
-
msgstr ""
|
50 |
-
|
51 |
-
# c:\stc/subscribe-to-comments.php:157
|
52 |
-
msgid "Not subscribed"
|
53 |
-
msgstr ""
|
54 |
-
|
55 |
-
# c:\stc/subscribe-to-comments.php:159
|
56 |
-
msgid "Subscribed"
|
57 |
-
msgstr ""
|
58 |
-
|
59 |
-
# c:\stc/subscribe-to-comments.php:161
|
60 |
-
msgid "Entry Author"
|
61 |
-
msgstr ""
|
62 |
-
|
63 |
-
# c:\stc/subscribe-to-comments.php:173
|
64 |
-
msgid "Use custom style for Subscription Manager"
|
65 |
-
msgstr ""
|
66 |
-
|
67 |
-
# c:\stc/subscribe-to-comments.php:175
|
68 |
-
msgid "These settings only matter if you are using a custom style. <code>[theme_path]</code> will be replaced with the path to your current theme."
|
69 |
-
msgstr ""
|
70 |
-
|
71 |
-
# c:\stc/subscribe-to-comments.php:178
|
72 |
-
msgid "Path to header:"
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
# c:\stc/subscribe-to-comments.php:179
|
76 |
-
msgid "Path to sidebar:"
|
77 |
-
msgstr ""
|
78 |
-
|
79 |
-
# c:\stc/subscribe-to-comments.php:180
|
80 |
-
msgid "Path to footer:"
|
81 |
-
msgstr ""
|
82 |
-
|
83 |
-
# c:\stc/subscribe-to-comments.php:183
|
84 |
-
msgid "HTML for before the subscription manager:"
|
85 |
-
msgstr ""
|
86 |
-
|
87 |
-
# c:\stc/subscribe-to-comments.php:184
|
88 |
-
msgid "HTML for after the subscription manager:"
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
# c:\stc/subscribe-to-comments.php:213
|
92 |
-
msgid "Options saved."
|
93 |
-
msgstr ""
|
94 |
-
|
95 |
-
# c:\stc/subscribe-to-comments.php:221
|
96 |
-
msgid "Update Options »"
|
97 |
-
msgstr ""
|
98 |
-
|
99 |
-
# c:\stc/subscribe-to-comments.php:392
|
100 |
-
msgid "Please provide a valid e-mail address."
|
101 |
-
msgstr ""
|
102 |
-
|
103 |
-
# c:\stc/subscribe-to-comments.php:395
|
104 |
-
msgid "This e-mail address may not be subscribed"
|
105 |
-
msgstr ""
|
106 |
-
|
107 |
-
# c:\stc/subscribe-to-comments.php:401
|
108 |
-
# c:\stc/subscribe-to-comments.php:415
|
109 |
-
msgid "You appear to be already subscribed to this entry."
|
110 |
-
msgstr ""
|
111 |
-
|
112 |
-
# c:\stc/subscribe-to-comments.php:406
|
113 |
-
msgid "Comments are not allowed on this entry."
|
114 |
-
msgstr ""
|
115 |
-
|
116 |
-
# c:\stc/subscribe-to-comments.php:577
|
117 |
-
#, php-format
|
118 |
-
msgid "There is a new comment on the post \"%s\""
|
119 |
-
msgstr ""
|
120 |
-
|
121 |
-
# c:\stc/subscribe-to-comments.php:578
|
122 |
-
#, php-format
|
123 |
-
msgid "Author: %s\n"
|
124 |
-
msgstr ""
|
125 |
-
|
126 |
-
# c:\stc/subscribe-to-comments.php:579
|
127 |
-
msgid "Comment:\n"
|
128 |
-
msgstr ""
|
129 |
-
|
130 |
-
# c:\stc/subscribe-to-comments.php:580
|
131 |
-
msgid "See all comments on this post here:\n"
|
132 |
-
msgstr ""
|
133 |
-
|
134 |
-
# c:\stc/subscribe-to-comments.php:583
|
135 |
-
msgid "To manage your subscriptions or to block all notifications from this site, click the link below:\n"
|
136 |
-
msgstr ""
|
137 |
-
|
138 |
-
# c:\stc/subscribe-to-comments.php:586
|
139 |
-
#, php-format
|
140 |
-
msgid "New Comment On: %s"
|
141 |
-
msgstr ""
|
142 |
-
|
143 |
-
# c:\stc/subscribe-to-comments.php:606
|
144 |
-
msgid "E-mail change confirmation"
|
145 |
-
msgstr ""
|
146 |
-
|
147 |
-
# c:\stc/subscribe-to-comments.php:607
|
148 |
-
#, php-format
|
149 |
-
msgid ""
|
150 |
-
"You are receiving this message to confirm a change of e-mail address for your subscriptions at \"%s\"\n"
|
151 |
-
"\n"
|
152 |
-
msgstr ""
|
153 |
-
|
154 |
-
# c:\stc/subscribe-to-comments.php:608
|
155 |
-
#, php-format
|
156 |
-
msgid ""
|
157 |
-
"To change your e-mail address to %s, click this link:\n"
|
158 |
-
"\n"
|
159 |
-
msgstr ""
|
160 |
-
|
161 |
-
# c:\stc/subscribe-to-comments.php:610
|
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 |
-
# c:\stc/subscribe-to-comments.php:617
|
167 |
-
msgid "E-mail block confirmation"
|
168 |
-
msgstr ""
|
169 |
-
|
170 |
-
# c:\stc/subscribe-to-comments.php:618
|
171 |
-
#, php-format
|
172 |
-
msgid ""
|
173 |
-
"You are receiving this message to confirm that you no longer wish to receive e-mail comment notifications from \"%s\"\n"
|
174 |
-
"\n"
|
175 |
-
msgstr ""
|
176 |
-
|
177 |
-
# c:\stc/subscribe-to-comments.php:619
|
178 |
-
msgid ""
|
179 |
-
"To cancel all future notifications for this address, click this link:\n"
|
180 |
-
"\n"
|
181 |
-
msgstr ""
|
182 |
-
|
183 |
-
# c:\stc/subscribe-to-comments.php:651
|
184 |
-
msgid "click here"
|
185 |
-
msgstr ""
|
186 |
-
|
187 |
-
# c:\stc/subscribe-to-comments.php:673
|
188 |
-
msgid "Notify me of followup comments via e-mail"
|
189 |
-
msgstr ""
|
190 |
-
|
191 |
-
# c:\stc/subscribe-to-comments.php:673
|
192 |
-
msgid "You are subscribed to this entry. <a href=\"[manager_link]\">Manage your subscriptions</a>."
|
193 |
-
msgstr ""
|
194 |
-
|
195 |
-
# c:\stc/subscribe-to-comments.php:673
|
196 |
-
msgid "You are the author of this entry. <a href=\"[manager_link]\">Manage subscriptions</a>."
|
197 |
-
msgstr ""
|
198 |
-
|
199 |
-
# c:\stc/subscribe-to-comments.php:813
|
200 |
-
# c:\stc/wp-subscription-manager.php:119
|
201 |
-
msgid "Comment Subscription Manager"
|
202 |
-
msgstr ""
|
203 |
-
|
204 |
-
# c:\stc/subscribe-to-comments.php:813
|
205 |
-
# c:\stc/wp-subscription-manager.php:220
|
206 |
-
msgid "Subscriptions"
|
207 |
-
msgstr ""
|
208 |
-
|
209 |
-
# c:\stc/subscribe-to-comments.php:818
|
210 |
-
msgid "Subscribe to Comments"
|
211 |
-
msgstr ""
|
212 |
-
|
213 |
-
# c:\stc/wp-subscription-manager.php:9
|
214 |
-
msgid "You must activate the \"Subscribe to Comments\" plugin in the WordPress admin panel"
|
215 |
-
msgstr ""
|
216 |
-
|
217 |
-
# c:\stc/wp-subscription-manager.php:26
|
218 |
-
msgid "You may not access this page without a valid key."
|
219 |
-
msgstr ""
|
220 |
-
|
221 |
-
# c:\stc/wp-subscription-manager.php:34
|
222 |
-
#, php-format
|
223 |
-
msgid "All notifications that were formerly sent to <strong>%s</strong> will now be sent to <strong>%s</strong>!"
|
224 |
-
msgstr ""
|
225 |
-
|
226 |
-
# c:\stc/wp-subscription-manager.php:46
|
227 |
-
#, php-format
|
228 |
-
msgid "<strong>%s</strong> %s removed successfully."
|
229 |
-
msgstr ""
|
230 |
-
|
231 |
-
# c:\stc/wp-subscription-manager.php:46
|
232 |
-
msgid "subscriptions"
|
233 |
-
msgstr ""
|
234 |
-
|
235 |
-
# c:\stc/wp-subscription-manager.php:46
|
236 |
-
msgid "subscription"
|
237 |
-
msgstr ""
|
238 |
-
|
239 |
-
# c:\stc/wp-subscription-manager.php:51
|
240 |
-
#, php-format
|
241 |
-
msgid "The block on <strong>%s</strong> has been successfully removed."
|
242 |
-
msgstr ""
|
243 |
-
|
244 |
-
# c:\stc/wp-subscription-manager.php:53
|
245 |
-
#, php-format
|
246 |
-
msgid "<strong>%s</strong> isn't blocked!"
|
247 |
-
msgstr ""
|
248 |
-
|
249 |
-
# c:\stc/wp-subscription-manager.php:58
|
250 |
-
#, php-format
|
251 |
-
msgid "<strong>%s</strong> has been blocked from receiving notifications. You will have to have the administrator remove the block before you will be able to change your notification address."
|
252 |
-
msgstr ""
|
253 |
-
|
254 |
-
# c:\stc/wp-subscription-manager.php:61
|
255 |
-
#, php-format
|
256 |
-
msgid "Your change of e-mail request was successfully received. Please check your old account (<strong>%s</strong>) in order to confirm the change."
|
257 |
-
msgstr ""
|
258 |
-
|
259 |
-
# c:\stc/wp-subscription-manager.php:66
|
260 |
-
#, php-format
|
261 |
-
msgid "Your request to block <strong>%s</strong> from receiving any further notifications has been received. In order for you to complete the block, please check your e-mail and click on the link in the message that has been sent to you."
|
262 |
-
msgstr ""
|
263 |
-
|
264 |
-
# c:\stc/wp-subscription-manager.php:70
|
265 |
-
#, php-format
|
266 |
-
msgid "<strong>%s</strong> has been successfully subscribed to %s"
|
267 |
-
msgstr ""
|
268 |
-
|
269 |
-
# c:\stc/wp-subscription-manager.php:75
|
270 |
-
#, php-format
|
271 |
-
msgid "<strong>%s</strong> has been added to the \"do not mail\" list. You will no longer receive any notifications from this site. If this was done in error, please contact the <a href=\"mailto:%s\">site administrator</a> to remove this block."
|
272 |
-
msgstr ""
|
273 |
-
|
274 |
-
# c:\stc/wp-subscription-manager.php:77
|
275 |
-
#, php-format
|
276 |
-
msgid "<strong>%s</strong> has already been blocked!"
|
277 |
-
msgstr ""
|
278 |
-
|
279 |
-
# c:\stc/wp-subscription-manager.php:94
|
280 |
-
#, php-format
|
281 |
-
msgid "%s Comment Subscription Manager"
|
282 |
-
msgstr ""
|
283 |
-
|
284 |
-
# c:\stc/wp-subscription-manager.php:122
|
285 |
-
#, php-format
|
286 |
-
msgid "Return to the page you were viewing: %s"
|
287 |
-
msgstr ""
|
288 |
-
|
289 |
-
# c:\stc/wp-subscription-manager.php:133
|
290 |
-
msgid "Remove Block"
|
291 |
-
msgstr ""
|
292 |
-
|
293 |
-
# c:\stc/wp-subscription-manager.php:136
|
294 |
-
#, php-format
|
295 |
-
msgid "Click the button below to remove the block on <strong>%s</strong>. This should only be done if the user has specifically requested it."
|
296 |
-
msgstr ""
|
297 |
-
|
298 |
-
# c:\stc/wp-subscription-manager.php:144
|
299 |
-
msgid "Remove Block »"
|
300 |
-
msgstr ""
|
301 |
-
|
302 |
-
# c:\stc/wp-subscription-manager.php:152
|
303 |
-
msgid "Blocked"
|
304 |
-
msgstr ""
|
305 |
-
|
306 |
-
# c:\stc/wp-subscription-manager.php:155
|
307 |
-
#, php-format
|
308 |
-
msgid "You have indicated that you do not wish to receive any notifications at <strong>%s</strong> from this site. If this is incorrect, or if you wish to have the block removed, please contact the <a href=\"mailto:%s\">site administrator</a>."
|
309 |
-
msgstr ""
|
310 |
-
|
311 |
-
# c:\stc/wp-subscription-manager.php:169
|
312 |
-
#, php-format
|
313 |
-
msgid "<strong>%s</strong> is not subscribed to any posts on this site."
|
314 |
-
msgstr ""
|
315 |
-
|
316 |
-
# c:\stc/wp-subscription-manager.php:171
|
317 |
-
#, php-format
|
318 |
-
msgid "<strong>%s</strong> is not a valid e-mail address."
|
319 |
-
msgstr ""
|
320 |
-
|
321 |
-
# c:\stc/wp-subscription-manager.php:183
|
322 |
-
msgid "Find Subscriptions"
|
323 |
-
msgstr ""
|
324 |
-
|
325 |
-
# c:\stc/wp-subscription-manager.php:186
|
326 |
-
msgid "Enter an e-mail address to view its subscriptions or undo a block."
|
327 |
-
msgstr ""
|
328 |
-
|
329 |
-
# c:\stc/wp-subscription-manager.php:194
|
330 |
-
msgid "Search »"
|
331 |
-
msgstr ""
|
332 |
-
|
333 |
-
# c:\stc/wp-subscription-manager.php:223
|
334 |
-
#, php-format
|
335 |
-
msgid "<strong>%s</strong> is subscribed to the posts listed below. To unsubscribe to one or more posts, click the checkbox next to the title, then click \"Remove Selected Subscription(s)\" at the bottom of the list."
|
336 |
-
msgstr ""
|
337 |
-
|
338 |
-
# c:\stc/wp-subscription-manager.php:237
|
339 |
-
msgid "Invert Checkbox Selection"
|
340 |
-
msgstr ""
|
341 |
-
|
342 |
-
# c:\stc/wp-subscription-manager.php:241
|
343 |
-
msgid "Remove Selected Subscription(s) »"
|
344 |
-
msgstr ""
|
345 |
-
|
346 |
-
# c:\stc/wp-subscription-manager.php:248
|
347 |
-
msgid "Advanced Options"
|
348 |
-
msgstr ""
|
349 |
-
|
350 |
-
# c:\stc/wp-subscription-manager.php:251
|
351 |
-
msgid "Block All Notifications"
|
352 |
-
msgstr ""
|
353 |
-
|
354 |
-
# c:\stc/wp-subscription-manager.php:258
|
355 |
-
#, php-format
|
356 |
-
msgid "If you would like <strong>%s</strong> to be blocked from receiving any notifications from this site, click the button below. This should be reserved for cases where someone is signing you up for notifications without your consent."
|
357 |
-
msgstr ""
|
358 |
-
|
359 |
-
# c:\stc/wp-subscription-manager.php:262
|
360 |
-
msgid "Block Notifications »"
|
361 |
-
msgstr ""
|
362 |
-
|
363 |
-
# c:\stc/wp-subscription-manager.php:268
|
364 |
-
msgid "Change E-mail Address"
|
365 |
-
msgstr ""
|
366 |
-
|
367 |
-
# c:\stc/wp-subscription-manager.php:275
|
368 |
-
#, php-format
|
369 |
-
msgid "If you would like to change the e-mail address for your subscriptions, enter the new address below. You will be required to verify this request by clicking a special link sent to your current address (<strong>%s</strong>)."
|
370 |
-
msgstr ""
|
371 |
-
|
372 |
-
# c:\stc/wp-subscription-manager.php:279
|
373 |
-
msgid "New E-mail Address:"
|
374 |
-
msgstr ""
|
375 |
-
|
376 |
-
# c:\stc/wp-subscription-manager.php:284
|
377 |
-
msgid "Change E-mail Address »"
|
378 |
-
msgstr ""
|
379 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wp-subscription-manager.php
CHANGED
@@ -6,12 +6,12 @@ if (!function_exists('sg_subscribe_start')) {
|
|
6 |
require('./wp-blog-header.php');
|
7 |
|
8 |
if (!function_exists('sg_subscribe_start'))
|
9 |
-
die (__('You must activate the "Subscribe to Comments" plugin in the WordPress admin panel', '
|
10 |
|
11 |
sg_subscribe_start();
|
12 |
$sg_subscribe->form_action = 'wp-subscription-manager.php';
|
13 |
$sg_subscribe->standalone = true;
|
14 |
-
ob_start(create_function('$a', 'return str_replace("<title>", "<title> " . __("Subscription Manager", "
|
15 |
} else {
|
16 |
sg_subscribe_start();
|
17 |
$sg_subscribe->form_action = 'edit.php?page=subscribe-to-comments.php';
|
@@ -23,7 +23,7 @@ $sg_subscribe->manager_init();
|
|
23 |
get_currentuserinfo();
|
24 |
|
25 |
if ( !$sg_subscribe->validate_key() )
|
26 |
-
die ( __('You may not access this page without a valid key.', '
|
27 |
|
28 |
$sg_subscribe->determine_action();
|
29 |
|
@@ -31,7 +31,7 @@ switch ($sg_subscribe->action) :
|
|
31 |
|
32 |
case "change_email" :
|
33 |
if ( $sg_subscribe->change_email() ) {
|
34 |
-
$sg_subscribe->add_message(sprintf(__('All notifications that were formerly sent to <strong>%s</strong> will now be sent to <strong>%s</strong>!', '
|
35 |
// change info to the new email
|
36 |
$sg_subscribe->email = $sg_subscribe->new_email;
|
37 |
unset($sg_subscribe->new_email);
|
@@ -43,38 +43,38 @@ switch ($sg_subscribe->action) :
|
|
43 |
case "remove_subscriptions" :
|
44 |
$postsremoved = $sg_subscribe->remove_subscriptions($_POST['subscrips']);
|
45 |
if ( $postsremoved > 0 )
|
46 |
-
$sg_subscribe->add_message(sprintf(__('<strong>%s</strong> %s removed successfully.', '
|
47 |
break;
|
48 |
|
49 |
case "remove_block" :
|
50 |
if ($sg_subscribe->remove_block($sg_subscribe->email))
|
51 |
-
$sg_subscribe->add_message(sprintf(__('The block on <strong>%s</strong> has been successfully removed.', '
|
52 |
else
|
53 |
-
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> isn\'t blocked!', '
|
54 |
break;
|
55 |
|
56 |
case "email_change_request" :
|
57 |
if ($sg_subscribe->is_blocked($sg_subscribe->email))
|
58 |
-
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> has been blocked from receiving notifications. You will have to have the administrator remove the block before you will be able to change your notification address.', '
|
59 |
else
|
60 |
if ($sg_subscribe->change_email_request($sg_subscribe->email, $sg_subscribe->new_email))
|
61 |
-
$sg_subscribe->add_message(sprintf(__('Your change of e-mail request was successfully received. Please check your old account (<strong>%s</strong>) in order to confirm the change.', '
|
62 |
break;
|
63 |
|
64 |
case "block_request" :
|
65 |
if ($sg_subscribe->block_email_request($sg_subscribe->email ))
|
66 |
-
$sg_subscribe->add_message(sprintf(__('Your request to block <strong>%s</strong> from receiving any further notifications has been received. In order for you to complete the block, please check your e-mail and click on the link in the message that has been sent to you.', '
|
67 |
break;
|
68 |
|
69 |
case "solo_subscribe" :
|
70 |
-
$sg_subscribe->add_message(sprintf(__('<strong>%s</strong> has been successfully subscribed to %s', '
|
71 |
break;
|
72 |
|
73 |
case "block" :
|
74 |
if ($sg_subscribe->add_block($sg_subscribe->email))
|
75 |
-
$sg_subscribe->add_message(sprintf(__('<strong>%s</strong> has been added to the "do not mail" list. You will no longer receive any notifications from this site. If this was done in error, please contact the <a href="mailto:%s">site administrator</a> to remove this block.', '
|
76 |
else
|
77 |
-
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> has already been blocked!', '
|
78 |
$sg_subscribe->key = md5($sg_subscribe->email . DB_PASSWORD);
|
79 |
$sg_subscribe->validate_key();
|
80 |
break;
|
@@ -91,16 +91,13 @@ echo $sg_subscribe->before_manager;
|
|
91 |
} else { ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
92 |
<html>
|
93 |
<head>
|
94 |
-
<title><?php
|
95 |
|
96 |
<style type="text/css" media="screen">
|
97 |
@import url( <?php echo get_settings('siteurl'); ?>/wp-admin/wp-admin.css );
|
98 |
</style>
|
99 |
|
100 |
<link rel="stylesheet" type="text/css" media="print" href="<?php echo get_settings('siteurl'); ?>/print.css" />
|
101 |
-
|
102 |
-
<meta http-equiv="Content-Type" content="text/plain;
|
103 |
-
charset=<?php bloginfo('charset'); ?>" />
|
104 |
|
105 |
<?php $sg_subscribe->sg_wp_head(); ?>
|
106 |
|
@@ -116,10 +113,10 @@ charset=<?php bloginfo('charset'); ?>" />
|
|
116 |
|
117 |
|
118 |
<div class="wrap">
|
119 |
-
<h2><?php bloginfo('name'); ?> <?php _e('Comment Subscription Manager', '
|
120 |
|
121 |
<?php if (!empty($sg_subscribe->ref)) : ?>
|
122 |
-
<?php $sg_subscribe->add_message(sprintf(__('Return to the page you were viewing: %s', '
|
123 |
<?php $sg_subscribe->show_messages(); ?>
|
124 |
<?php endif; ?>
|
125 |
|
@@ -130,10 +127,10 @@ charset=<?php bloginfo('charset'); ?>" />
|
|
130 |
<?php if ($user_level >= 8) : ?>
|
131 |
|
132 |
<fieldset class="options">
|
133 |
-
<legend><?php _e('Remove Block', '
|
134 |
|
135 |
<p>
|
136 |
-
<?php printf(__('Click the button below to remove the block on <strong>%s</strong>. This should only be done if the user has specifically requested it.', '
|
137 |
</p>
|
138 |
|
139 |
<form name="removeBlock" method="post" action="<?php echo $sg_subscribe->form_action; ?>">
|
@@ -141,7 +138,7 @@ charset=<?php bloginfo('charset'); ?>" />
|
|
141 |
<?php $sg_subscribe->hidden_form_fields(); ?>
|
142 |
|
143 |
<p class="submit">
|
144 |
-
<input type="submit" name="submit" value="<?php _e('Remove Block »', '
|
145 |
</p>
|
146 |
</form>
|
147 |
</fieldset>
|
@@ -149,10 +146,10 @@ charset=<?php bloginfo('charset'); ?>" />
|
|
149 |
<?php else : ?>
|
150 |
|
151 |
<fieldset class="options">
|
152 |
-
<legend><?php _e('Blocked', '
|
153 |
|
154 |
<p>
|
155 |
-
<?php printf(__('You have indicated that you do not wish to receive any notifications at <strong>%s</strong> from this site. If this is incorrect, or if you wish to have the block removed, please contact the <a href="mailto:%s">site administrator</a>.', '
|
156 |
</p>
|
157 |
</fieldset>
|
158 |
|
@@ -166,9 +163,9 @@ charset=<?php bloginfo('charset'); ?>" />
|
|
166 |
|
167 |
<?php if (isset($sg_subscribe->email) && !is_array($postlist) && $sg_subscribe->email != $sg_subscribe->site_email && $sg_subscribe->email != get_bloginfo('admin_email') ) { ?>
|
168 |
<?php if (is_email($sg_subscribe->email)) : ?>
|
169 |
-
<?php $sg_subscribe->add_error(sprintf(__('<strong>%s</strong> is not subscribed to any posts on this site.', '
|
170 |
<?php else : ?>
|
171 |
-
<?php $sg_subscribe->add_error(sprintf(__('<strong>%s</strong> is not a valid e-mail address.', '
|
172 |
<?php endif; ?>
|
173 |
<?php } ?>
|
174 |
|
@@ -180,10 +177,10 @@ charset=<?php bloginfo('charset'); ?>" />
|
|
180 |
<?php if ( $user_level >= 8 ) { ?>
|
181 |
|
182 |
<fieldset class="options">
|
183 |
-
<legend><?php _e('Find Subscriptions'
|
184 |
|
185 |
<p>
|
186 |
-
<?php _e('Enter an e-mail address to view its subscriptions or undo a block.', '
|
187 |
</p>
|
188 |
|
189 |
<form name="getemail" method="post" action="<?php echo $sg_subscribe->form_action; ?>">
|
@@ -191,7 +188,7 @@ charset=<?php bloginfo('charset'); ?>" />
|
|
191 |
|
192 |
<p>
|
193 |
<input name="email" type="text" id="email" size="40" />
|
194 |
-
<input type="submit" value="<?php _e('Search »'
|
195 |
</p>
|
196 |
</form>
|
197 |
</fieldset>
|
@@ -217,10 +214,10 @@ for( i = 0, n = form.elements.length; i < n; i++ ) {
|
|
217 |
</script>
|
218 |
|
219 |
<fieldset class="options">
|
220 |
-
<legend><?php _e('Subscriptions'
|
221 |
|
222 |
<p>
|
223 |
-
<?php printf(__('<strong>%s</strong> is subscribed to the posts listed below. To unsubscribe to one or more posts, click the checkbox next to the title, then click "Remove Selected Subscription(s)" at the bottom of the list.', '
|
224 |
</p>
|
225 |
|
226 |
<form name="removeSubscription" id="removeSubscription" method="post" action="<?php echo $sg_subscribe->form_action; ?>">
|
@@ -234,54 +231,54 @@ for( i = 0, n = form.elements.length; i < n; i++ ) {
|
|
234 |
</ol>
|
235 |
|
236 |
<p>
|
237 |
-
<a href="javascript:;" onclick="checkAll(document.getElementById('removeSubscription')); return false; "><?php _e('Invert Checkbox Selection', '
|
238 |
</p>
|
239 |
|
240 |
<p class="submit">
|
241 |
-
<input type="submit" name="submit" value="<?php _e('Remove Selected Subscription(s) »', '
|
242 |
</p>
|
243 |
</form>
|
244 |
</fieldset>
|
245 |
</div>
|
246 |
|
247 |
<div class="wrap">
|
248 |
-
<h2><?php _e('Advanced Options', '
|
249 |
|
250 |
<fieldset class="options">
|
251 |
-
<legend><?php _e('Block All Notifications', '
|
252 |
|
253 |
<form name="blockemail" method="post" action="<?php echo $sg_subscribe->form_action; ?>">
|
254 |
<input type="hidden" name="blockemail" value="blockemail" />
|
255 |
<?php $sg_subscribe->hidden_form_fields(); ?>
|
256 |
|
257 |
<p>
|
258 |
-
<?php printf(__('If you would like <strong>%s</strong> to be blocked from receiving any notifications from this site, click the button below. This should be reserved for cases where someone is signing you up for notifications without your consent.', '
|
259 |
</p>
|
260 |
|
261 |
<p class="submit">
|
262 |
-
<input type="submit" name="submit" value="<?php _e('Block Notifications »', '
|
263 |
</p>
|
264 |
</form>
|
265 |
</fieldset>
|
266 |
|
267 |
<fieldset class="options">
|
268 |
-
<legend><?php _e('Change E-mail Address', '
|
269 |
|
270 |
<form name="changeemailrequest" method="post" action="<?php echo $sg_subscribe->form_action; ?>">
|
271 |
<input type="hidden" name="changeemailrequest" value="changeemailrequest" />
|
272 |
<?php $sg_subscribe->hidden_form_fields(); ?>
|
273 |
|
274 |
<p>
|
275 |
-
<?php printf(__('If you would like to change the e-mail address for your subscriptions, enter the new address below. You will be required to verify this request by clicking a special link sent to your current address (<strong>%s</strong>).', '
|
276 |
</p>
|
277 |
|
278 |
<p>
|
279 |
-
<?php _e('New E-mail Address:', '
|
280 |
<input name="new_email" type="text" id="new_email" size="40" />
|
281 |
</p>
|
282 |
|
283 |
<p class="submit">
|
284 |
-
<input type="submit" name="submit" value="<?php _e('Change E-mail Address »', '
|
285 |
</p>
|
286 |
</form>
|
287 |
</fieldset>
|
6 |
require('./wp-blog-header.php');
|
7 |
|
8 |
if (!function_exists('sg_subscribe_start'))
|
9 |
+
die (__('You must activate the "Subscribe to Comments" plugin in the WordPress admin panel', 'subscribe_to_comments'));
|
10 |
|
11 |
sg_subscribe_start();
|
12 |
$sg_subscribe->form_action = 'wp-subscription-manager.php';
|
13 |
$sg_subscribe->standalone = true;
|
14 |
+
ob_start(create_function('$a', 'return str_replace("<title>", "<title> " . __("Subscription Manager", "subscribe_to_comments") . " » ", $a);'));
|
15 |
} else {
|
16 |
sg_subscribe_start();
|
17 |
$sg_subscribe->form_action = 'edit.php?page=subscribe-to-comments.php';
|
23 |
get_currentuserinfo();
|
24 |
|
25 |
if ( !$sg_subscribe->validate_key() )
|
26 |
+
die ( __('You may not access this page without a valid key.', 'subscribe_to_comments') );
|
27 |
|
28 |
$sg_subscribe->determine_action();
|
29 |
|
31 |
|
32 |
case "change_email" :
|
33 |
if ( $sg_subscribe->change_email() ) {
|
34 |
+
$sg_subscribe->add_message(sprintf(__('All notifications that were formerly sent to <strong>%s</strong> will now be sent to <strong>%s</strong>!', 'subscribe_to_comments'), $sg_subscribe->email, $sg_subscribe->new_email));
|
35 |
// change info to the new email
|
36 |
$sg_subscribe->email = $sg_subscribe->new_email;
|
37 |
unset($sg_subscribe->new_email);
|
43 |
case "remove_subscriptions" :
|
44 |
$postsremoved = $sg_subscribe->remove_subscriptions($_POST['subscrips']);
|
45 |
if ( $postsremoved > 0 )
|
46 |
+
$sg_subscribe->add_message(sprintf(__('<strong>%s</strong> %s removed successfully.', 'subscribe_to_comments'), $postsremoved, ($postsremoved != 1) ? __('subscriptions', 'subscribe_to_comments') : __('subscription', 'subscribe_to_comments')));
|
47 |
break;
|
48 |
|
49 |
case "remove_block" :
|
50 |
if ($sg_subscribe->remove_block($sg_subscribe->email))
|
51 |
+
$sg_subscribe->add_message(sprintf(__('The block on <strong>%s</strong> has been successfully removed.', 'subscribe_to_comments'), $sg_subscribe->email));
|
52 |
else
|
53 |
+
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> isn\'t blocked!', 'subscribe_to_comments'), $sg_subscribe->email), 'manager');
|
54 |
break;
|
55 |
|
56 |
case "email_change_request" :
|
57 |
if ($sg_subscribe->is_blocked($sg_subscribe->email))
|
58 |
+
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> has been blocked from receiving notifications. You will have to have the administrator remove the block before you will be able to change your notification address.', 'subscribe_to_comments'), $sg_subscribe->email));
|
59 |
else
|
60 |
if ($sg_subscribe->change_email_request($sg_subscribe->email, $sg_subscribe->new_email))
|
61 |
+
$sg_subscribe->add_message(sprintf(__('Your change of e-mail request was successfully received. Please check your old account (<strong>%s</strong>) in order to confirm the change.', 'subscribe_to_comments'), $sg_subscribe->email));
|
62 |
break;
|
63 |
|
64 |
case "block_request" :
|
65 |
if ($sg_subscribe->block_email_request($sg_subscribe->email ))
|
66 |
+
$sg_subscribe->add_message(sprintf(__('Your request to block <strong>%s</strong> from receiving any further notifications has been received. In order for you to complete the block, please check your e-mail and click on the link in the message that has been sent to you.', 'subscribe_to_comments'), $sg_subscribe->email));
|
67 |
break;
|
68 |
|
69 |
case "solo_subscribe" :
|
70 |
+
$sg_subscribe->add_message(sprintf(__('<strong>%s</strong> has been successfully subscribed to %s', 'subscribe_to_comments'), $sg_subscribe->email, $sg_subscribe->entry_link($_GET['subscribeid'])));
|
71 |
break;
|
72 |
|
73 |
case "block" :
|
74 |
if ($sg_subscribe->add_block($sg_subscribe->email))
|
75 |
+
$sg_subscribe->add_message(sprintf(__('<strong>%s</strong> has been added to the "do not mail" list. You will no longer receive any notifications from this site. If this was done in error, please contact the <a href="mailto:%s">site administrator</a> to remove this block.', 'subscribe_to_comments'), $sg_subscribe->email, $sg_subscribe->site_email));
|
76 |
else
|
77 |
+
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> has already been blocked!', 'subscribe_to_comments'), $sg_subscribe->email), 'manager');
|
78 |
$sg_subscribe->key = md5($sg_subscribe->email . DB_PASSWORD);
|
79 |
$sg_subscribe->validate_key();
|
80 |
break;
|
91 |
} else { ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
92 |
<html>
|
93 |
<head>
|
94 |
+
<title><?php bloginfo('name'); ?> <?php _e('Comment Subscription Manager', 'subscribe_to_comments'); ?></title>
|
95 |
|
96 |
<style type="text/css" media="screen">
|
97 |
@import url( <?php echo get_settings('siteurl'); ?>/wp-admin/wp-admin.css );
|
98 |
</style>
|
99 |
|
100 |
<link rel="stylesheet" type="text/css" media="print" href="<?php echo get_settings('siteurl'); ?>/print.css" />
|
|
|
|
|
|
|
101 |
|
102 |
<?php $sg_subscribe->sg_wp_head(); ?>
|
103 |
|
113 |
|
114 |
|
115 |
<div class="wrap">
|
116 |
+
<h2><?php bloginfo('name'); ?> <?php _e('Comment Subscription Manager', 'subscribe_to_comments'); ?></h2>
|
117 |
|
118 |
<?php if (!empty($sg_subscribe->ref)) : ?>
|
119 |
+
<?php $sg_subscribe->add_message(sprintf(__('Return to the page you were viewing: %s', 'subscribe_to_comments'), $sg_subscribe->entry_link(url_to_postid($sg_subscribe->ref), $sg_subscribe->ref))); ?>
|
120 |
<?php $sg_subscribe->show_messages(); ?>
|
121 |
<?php endif; ?>
|
122 |
|
127 |
<?php if ($user_level >= 8) : ?>
|
128 |
|
129 |
<fieldset class="options">
|
130 |
+
<legend><?php _e('Remove Block', 'subscribe_to_comments'); ?></legend>
|
131 |
|
132 |
<p>
|
133 |
+
<?php printf(__('Click the button below to remove the block on <strong>%s</strong>. This should only be done if the user has specifically requested it.', 'subscribe_to_comments'), $sg_subscribe->email); ?>
|
134 |
</p>
|
135 |
|
136 |
<form name="removeBlock" method="post" action="<?php echo $sg_subscribe->form_action; ?>">
|
138 |
<?php $sg_subscribe->hidden_form_fields(); ?>
|
139 |
|
140 |
<p class="submit">
|
141 |
+
<input type="submit" name="submit" value="<?php _e('Remove Block »', 'subscribe_to_comments'); ?>" />
|
142 |
</p>
|
143 |
</form>
|
144 |
</fieldset>
|
146 |
<?php else : ?>
|
147 |
|
148 |
<fieldset class="options">
|
149 |
+
<legend><?php _e('Blocked', 'subscribe_to_comments'); ?></legend>
|
150 |
|
151 |
<p>
|
152 |
+
<?php printf(__('You have indicated that you do not wish to receive any notifications at <strong>%s</strong> from this site. If this is incorrect, or if you wish to have the block removed, please contact the <a href="mailto:%s">site administrator</a>.', 'subscribe_to_comments'), $sg_subscribe->email, $sg_subscribe->site_email); ?>
|
153 |
</p>
|
154 |
</fieldset>
|
155 |
|
163 |
|
164 |
<?php if (isset($sg_subscribe->email) && !is_array($postlist) && $sg_subscribe->email != $sg_subscribe->site_email && $sg_subscribe->email != get_bloginfo('admin_email') ) { ?>
|
165 |
<?php if (is_email($sg_subscribe->email)) : ?>
|
166 |
+
<?php $sg_subscribe->add_error(sprintf(__('<strong>%s</strong> is not subscribed to any posts on this site.', 'subscribe_to_comments'), $sg_subscribe->email)); ?>
|
167 |
<?php else : ?>
|
168 |
+
<?php $sg_subscribe->add_error(sprintf(__('<strong>%s</strong> is not a valid e-mail address.', 'subscribe_to_comments'), $sg_subscribe->email)); ?>
|
169 |
<?php endif; ?>
|
170 |
<?php } ?>
|
171 |
|
177 |
<?php if ( $user_level >= 8 ) { ?>
|
178 |
|
179 |
<fieldset class="options">
|
180 |
+
<legend><?php _e('Find Subscriptions'); ?></legend>
|
181 |
|
182 |
<p>
|
183 |
+
<?php _e('Enter an e-mail address to view its subscriptions or undo a block.', 'subscribe_to_comments'); ?>
|
184 |
</p>
|
185 |
|
186 |
<form name="getemail" method="post" action="<?php echo $sg_subscribe->form_action; ?>">
|
188 |
|
189 |
<p>
|
190 |
<input name="email" type="text" id="email" size="40" />
|
191 |
+
<input type="submit" value="<?php _e('Search »'); ?>" />
|
192 |
</p>
|
193 |
</form>
|
194 |
</fieldset>
|
214 |
</script>
|
215 |
|
216 |
<fieldset class="options">
|
217 |
+
<legend><?php _e('Subscriptions'); ?></legend>
|
218 |
|
219 |
<p>
|
220 |
+
<?php printf(__('<strong>%s</strong> is subscribed to the posts listed below. To unsubscribe to one or more posts, click the checkbox next to the title, then click "Remove Selected Subscription(s)" at the bottom of the list.', 'subscribe_to_comments'), $sg_subscribe->email); ?>
|
221 |
</p>
|
222 |
|
223 |
<form name="removeSubscription" id="removeSubscription" method="post" action="<?php echo $sg_subscribe->form_action; ?>">
|
231 |
</ol>
|
232 |
|
233 |
<p>
|
234 |
+
<a href="javascript:;" onclick="checkAll(document.getElementById('removeSubscription')); return false; "><?php _e('Invert Checkbox Selection', 'subscribe_to_comments'); ?></a>
|
235 |
</p>
|
236 |
|
237 |
<p class="submit">
|
238 |
+
<input type="submit" name="submit" value="<?php _e('Remove Selected Subscription(s) »', 'subscribe_to_comments'); ?>" />
|
239 |
</p>
|
240 |
</form>
|
241 |
</fieldset>
|
242 |
</div>
|
243 |
|
244 |
<div class="wrap">
|
245 |
+
<h2><?php _e('Advanced Options', 'subscribe_to_comments'); ?></h2>
|
246 |
|
247 |
<fieldset class="options">
|
248 |
+
<legend><?php _e('Block All Notifications', 'subscribe_to_comments'); ?></legend>
|
249 |
|
250 |
<form name="blockemail" method="post" action="<?php echo $sg_subscribe->form_action; ?>">
|
251 |
<input type="hidden" name="blockemail" value="blockemail" />
|
252 |
<?php $sg_subscribe->hidden_form_fields(); ?>
|
253 |
|
254 |
<p>
|
255 |
+
<?php printf(__('If you would like <strong>%s</strong> to be blocked from receiving any notifications from this site, click the button below. This should be reserved for cases where someone is signing you up for notifications without your consent.', 'subscribe_to_comments'), $sg_subscribe->email); ?>
|
256 |
</p>
|
257 |
|
258 |
<p class="submit">
|
259 |
+
<input type="submit" name="submit" value="<?php _e('Block Notifications »', 'subscribe_to_comments'); ?>" />
|
260 |
</p>
|
261 |
</form>
|
262 |
</fieldset>
|
263 |
|
264 |
<fieldset class="options">
|
265 |
+
<legend><?php _e('Change E-mail Address', 'subscribe_to_comments'); ?></legend>
|
266 |
|
267 |
<form name="changeemailrequest" method="post" action="<?php echo $sg_subscribe->form_action; ?>">
|
268 |
<input type="hidden" name="changeemailrequest" value="changeemailrequest" />
|
269 |
<?php $sg_subscribe->hidden_form_fields(); ?>
|
270 |
|
271 |
<p>
|
272 |
+
<?php printf(__('If you would like to change the e-mail address for your subscriptions, enter the new address below. You will be required to verify this request by clicking a special link sent to your current address (<strong>%s</strong>).', 'subscribe_to_comments'), $sg_subscribe->email); ?>
|
273 |
</p>
|
274 |
|
275 |
<p>
|
276 |
+
<?php _e('New E-mail Address:', 'subscribe_to_comments'); ?>
|
277 |
<input name="new_email" type="text" id="new_email" size="40" />
|
278 |
</p>
|
279 |
|
280 |
<p class="submit">
|
281 |
+
<input type="submit" name="submit" value="<?php _e('Change E-mail Address »', 'subscribe_to_comments'); ?>" />
|
282 |
</p>
|
283 |
</form>
|
284 |
</fieldset>
|