Subscribe2 - Version 2.13

Version Description

Download this release

Release Info

Developer MattyRob
Plugin Icon 128x128 Subscribe2
Version 2.13
Comparing to
See all releases

Code changes from version 3.0 to 2.13

ReadMe.txt CHANGED
@@ -77,15 +77,6 @@ Batches will occur for each group of message as described above. A site on Drea
77
 
78
  == Version History ==
79
 
80
- Version 3.0 by Matthew Robinson
81
-
82
- * Updated for WordPress 2.1 Branch
83
-
84
- Version 2.14 by Matthew Robinson
85
-
86
- * Amended DREAMHOST setting to BCCLIMIT as more hosts are limiting emails
87
- * Fixed oversight in upgrade() function
88
-
89
  Version 2.13 by Matthew Robinson
90
 
91
  * Added WordPress nonce functionality to improve admin security
77
 
78
  == Version History ==
79
 
 
 
 
 
 
 
 
 
 
80
  Version 2.13 by Matthew Robinson
81
 
82
  * Added WordPress nonce functionality to improve admin security
subscribe2/include.php CHANGED
@@ -31,16 +31,12 @@ if (!isset($this->subscribe2_options['barred'])) {
31
  $this->subscribe2_options['barred'] = '';
32
  } // option containing domains barred from public registration
33
 
34
- if (!isset($this->subscribe2_options['email_freq'])) {
35
- $this->subscribe2_options['email_freq'] = "never";
36
- } // option for sending emails periodically or per-post
37
-
38
  if (!isset($this->subscribe2_options['mailtext'])) {
39
  $this->subscribe2_options['mailtext'] = "BLOGNAME has posted a new item, 'TITLE'\r\nPOST\r\nYou may view the latest post at\r\nPERMALINK\r\nYou received this e-mail because you asked to be notified when new updates are posted.\r\nBest regards,\r\nMYNAME\r\nEMAIL";
40
  } // Default notification email text
41
 
42
  if (!isset($this->subscribe2_options['confirm_email'])) {
43
- $this->subscribe2_options['confirm_email'] = "BLOGNAME has received a request to ACTION for this email address. To complete your request please click on the link below:\n\nLINK\n\nIf you did not request this, please feel free to disregard this notice!\n\nThank you,\nMYNAME.";
44
  } // Default confirmation email text
45
 
46
  if (!isset($this->subscribe2_options['remind_email'])) {
31
  $this->subscribe2_options['barred'] = '';
32
  } // option containing domains barred from public registration
33
 
 
 
 
 
34
  if (!isset($this->subscribe2_options['mailtext'])) {
35
  $this->subscribe2_options['mailtext'] = "BLOGNAME has posted a new item, 'TITLE'\r\nPOST\r\nYou may view the latest post at\r\nPERMALINK\r\nYou received this e-mail because you asked to be notified when new updates are posted.\r\nBest regards,\r\nMYNAME\r\nEMAIL";
36
  } // Default notification email text
37
 
38
  if (!isset($this->subscribe2_options['confirm_email'])) {
39
+ $this->subscribe2_options['confirm_email'] = "In order to confirm your request for BLOGNAME, please click on the link below:\n\nLINK\n\nIf you did not request this, please feel free to disregard this notice!\n\nThank you,\nMYNAME.";
40
  } // Default confirmation email text
41
 
42
  if (!isset($this->subscribe2_options['remind_email'])) {
subscribe2/subscribe2.php CHANGED
@@ -3,13 +3,13 @@
3
  Plugin Name: Subscribe2
4
  Plugin URI: http://subscribe2.wordpress.com
5
  Description: Notifies an email list when new entries are posted.
6
- Version: 2.3.1 for WP2.1
7
  Author: Matthew Robinson
8
  Author URI: http://subscribe2.wordpress.com
9
  */
10
 
11
  /*
12
- Copyright (C) 2006-7 Matthew Robinson
13
  Based on the Original Subscribe2 plugin by
14
  Copyright (C) 2005 Scott Merrill (skippy@skippy.net)
15
 
@@ -29,18 +29,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
  http://www.gnu.org/licenses/gpl.html
30
  */
31
 
32
- // If you are on a host that limits the numner of recipients
33
- // permitted on each outgoing email message
34
- // change this value to your hosts limit
35
- define('BCCLIMIT', '0');
36
 
37
  // by default, subscribe2 grabs the first page from your database for use
38
  // when displaying the confirmation screen to public subscribers.
39
  // You can override this by specifying a page ID below.
40
  define('S2PAGE', '0');
41
 
 
 
 
 
42
  // our version number. Don't touch.
43
- define('S2VERSION', '2.3.1');
44
 
45
  // Add the Subscribe code into the WP API
46
  add_action('init', 's2init');
@@ -102,9 +106,7 @@ class subscribe2 {
102
 
103
  $this->please_log_in = "<p>" . __('To manage your subscription options please ', 'subscribe2') . "<a href=\"" . get_settings('siteurl') . "/wp-login.php\">login</a>.</p>";
104
 
105
- $this->use_profile_admin = "<p>" . __('You may manage your subscription options from your ', 'subscribe2') . "<a href=\"" . get_settings('siteurl') . "/wp-admin/users.php?page=" . plugin_basename(__FILE__) . "\">profile</a>.</p>";
106
-
107
- $this->use_profile_users = "<p>" . __('You may manage your subscription options from your ', 'subscribe2') . "<a href=\"" . get_settings('siteurl') . "/wp-admin/profile.php?page=" . plugin_basename(__FILE__) . "\">profile</a>.</p>";
108
 
109
  $this->confirmation_sent = "<p>" . __('A confirmation message is on its way!', 'subscribe2') . "</p>";
110
 
@@ -147,12 +149,8 @@ class subscribe2 {
147
  function admin_menu() {
148
  add_management_page(__('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), "manage_options", __FILE__, array(&$this, 'manage_menu'));
149
  add_options_page(__('Subscribe2 Options', 'subscribe2'), __('Subscribe2','subscribe2'), "manage_options", __FILE__, array(&$this, 'options_menu'));
150
- if (current_user_can('manage_options')) {
151
- add_submenu_page('users.php', __('Subscriptions', 'subscribe2'), __('Subscriptions', 'subscribe2'), "read", __FILE__, array(&$this, 'user_menu'));
152
- } else {
153
- add_submenu_page('profile.php', __('Subscriptions', 'subscribe2'), __('Subscriptions', 'subscribe2'), "read", __FILE__, array(&$this, 'user_menu'));
154
- }
155
- add_submenu_page('post-new.php', __('Mail Subscribers','subscribe2'), __('Mail Subscribers', 'subscribe2'),"manage_options", __FILE__, array(&$this, 'write_menu'));
156
  $s2nonce = md5('subscribe2');
157
  }
158
 
@@ -174,11 +172,6 @@ class subscribe2 {
174
  echo "</script>\r\n";
175
  }
176
 
177
- function add_weekly_sched($sched) {
178
- $sched['weekly'] = array('interval' => 604800, 'display' => __('Once Weekly','subscribe2'));
179
- return $sched;
180
- }
181
-
182
  /* ===== Install, upgrade, reset ===== */
183
  /**
184
  Install our table
@@ -215,7 +208,7 @@ class subscribe2 {
215
  maybe_add_column($this->public, 'date', "ALTER TABLE `$this->public` ADD `date` DATE DEFAULT '$date' NOT NULL AFTER `active`;");
216
 
217
  // let's take the time to check process registered users
218
- // existing public subscribers are subscribed to all categories
219
  $users = $wpdb->get_col("SELECT ID FROM $wpdb->users");
220
  if (!empty($users)) {
221
  foreach ($users as $user) {
@@ -223,6 +216,8 @@ class subscribe2 {
223
  }
224
  }
225
  // update the options table to serialized format
 
 
226
  $old_options = $wpdb->get_col("SELECT option_name from $wpdb->options where option_name LIKE 's2%' AND option_name != 's2_future_posts'");
227
 
228
  if (!empty($old_options)) {
@@ -234,8 +229,6 @@ class subscribe2 {
234
  }
235
  }
236
  $this->subscribe2_options['version'] = S2VERSION;
237
- //double check that the options are in the database
238
- require_once(ABSPATH . "/wp-content/plugins/subscribe2/include.php");
239
  update_option('subscribe2_options', $this->subscribe2_options);
240
  } // end upgrade()
241
 
@@ -299,8 +292,8 @@ class subscribe2 {
299
 
300
  // BCC all recipients
301
  $bcc = '';
302
- if ( (defined('BCCLIMIT') && (BCCLIMIT > 0) ) &&
303
- (count($recipients) > BCCLIMIT) ) {
304
  // we're on Dreamhost, and have more than 30 susbcribers
305
  $count = 1;
306
  $batch = array();
@@ -351,7 +344,7 @@ class subscribe2 {
351
  $headers .= "$bcc\r\n";
352
  }
353
  // actually send mail
354
- if ( (defined('BCCLIMIT')) && (BCCLIMIT > 0) && (isset($batch)) ) {
355
  foreach ($batch as $bcc) {
356
  $newheaders = $headers . "$bcc\r\n";
357
  @wp_mail($this->myemail, $subject, $mailtext, $newheaders);
@@ -364,18 +357,21 @@ class subscribe2 {
364
  /**
365
  Sends an email notification of a new post
366
  */
367
- function publish($id = 0) {
368
- if ( (!$id) || is_page($id) ) { return $id; }
369
 
370
  // are we doing daily digests? If so, don't send anything now
371
- if ($this->subscribe2_options['email_freq'] != 'never') { return; }
372
 
373
  // we need to determine whether this is a new post, or an edit
374
- if ($this->private) {
375
- // this post was published from draft status
376
- // OR is an edit of an existing post
377
- // so send no notification
378
- return $id;
 
 
 
379
  }
380
 
381
  $post_cats = wp_get_post_cats('1', $id);
@@ -402,6 +398,19 @@ class subscribe2 {
402
  $post =& get_post($id);
403
  // is this post set in the future?
404
  if ($post->post_date > current_time('mysql')) {
 
 
 
 
 
 
 
 
 
 
 
 
 
405
  // bail out
406
  return $id;
407
  }
@@ -541,7 +550,7 @@ class subscribe2 {
541
 
542
  $admin = get_userdata(1);
543
  $this->myname = $admin->display_name;
544
-
545
  if ($is_remind == TRUE) {
546
  $body = $this->substitute(stripslashes($this->subscribe2_options['remind_email']));
547
  $subject = stripslashes($this->remind_subject);
@@ -931,18 +940,14 @@ class subscribe2 {
931
 
932
  if (0 == $user_id) { return $user_id; }
933
  $user = get_userdata($user_id);
934
- $all_cats = get_categories('type=post&hide_empty=1&hierarchical=0');
935
- foreach ($all_cats as $cat) {
936
- ('' == $cats) ? $cats = "$cat->cat_ID" : $cats .= ",$cat->cat_ID";
937
- }
938
 
939
  // has this user previously signed up for email notification?
940
  if (false !== $this->is_public($user->user_email)) {
941
  // delete this user from the public table, and subscribe them to all the categories
942
  $this->delete($user->user_email);
943
- update_usermeta($user_id, 's2_subscribed', $cats);
944
- foreach(explode(',', $cats) as $cat) {
945
- update_usermeta($user_id, 's2_cat' . $all_cats->cat_ID, "$all_cats->cat_ID");
946
  }
947
  update_usermeta($user_id, 's2_format', 'text');
948
  update_usermeta($user_id, 's2_excerpt', 'excerpt');
@@ -951,16 +956,16 @@ class subscribe2 {
951
  $check = get_usermeta($user_id, 's2_subscribed');
952
  // ensure existing subscriptions are not overwritten on upgrade
953
  if (empty($check)) {
954
- if ('yes' == $this->subscribe2_options['autosub']) {
955
  // don't add entires by default if autosub is off, messes up daily digests
956
  update_usermeta($user_id, 's2_subscribed', $this->get_all_categories());
957
  foreach(explode(',', $this->get_all_categories()) as $cat) {
958
  update_usermeta($user_id, 's2_cat' . $cat, "$cat");
959
  }
960
- if ('html' == $this->subscribe2_options['autoformat']) {
961
  update_usermeta($user_id, 's2_format', 'html');
962
  update_usermeta($user_id, 's2_excerpt', 'post');
963
- } elseif ('fulltext' == $this->subscribe2_options['autoformat']) {
964
  update_usermeta($user_id, 's2_format', 'text');
965
  update_usermeta($user_id, 's2_excerpt', 'post');
966
  } else {
@@ -1304,7 +1309,7 @@ class subscribe2 {
1304
  } else {
1305
  $exclude_cats = '';
1306
  }
1307
- $this->subscribe2_options['exclude'] = $exclude_cats;
1308
  // allow override?
1309
  (isset($_POST['reg_override'])) ? $override = '1' : $override = '0';
1310
  $this->subscribe2_options['reg_override'] = $override;
@@ -1318,77 +1323,54 @@ class subscribe2 {
1318
  if ('admin' == $_POST['sender']) {
1319
  $sender = 'admin';
1320
  }
1321
- $this->subscribe2_options['sender'] = $sender;
1322
-
1323
- // send per-post or digest emails
1324
- $email_freq = $_POST['email_freq'];
1325
- $this->subscribe2_options['email_freq'] = $email_freq;
1326
- wp_clear_scheduled_hook('s2_digest_cron');
1327
- $scheds = (array) wp_get_schedules();
1328
- $interval = ( isset($scheds[$email_freq]['interval']) ) ? (int) $scheds[$email_freq]['interval'] : 0;
1329
- if ($interval == 0) {
1330
- // if we are on per-post emails remove last_cron entry
1331
- unset($this->subscribe2_options['last_s2cron']);
1332
- } else {
1333
- if (!wp_next_scheduled('s2_digest_cron')) {
1334
- // if we are using digest schedule the event and prime last_cron as now
1335
- wp_schedule_event(time() + $interval, $email_freq, 's2_digest_cron');
1336
- $now = date('Y-m-d H:i:s', time());
1337
- $this->subscribe2_options['last_s2cron'] = $now;
1338
- }
1339
- }
1340
 
1341
  // email templates
1342
  $mailtext = $_POST['mailtext'];
1343
- $this->subscribe2_options['mailtext'] = $mailtext;
1344
  $confirm_email = $_POST['confirm_email'];
1345
- $this->subscribe2_options['confirm_email'] = $confirm_email;
1346
  $remind_email = $_POST['remind_email'];
1347
- $this->subscribe2_options['remind_email'] = $remind_email;
1348
 
1349
  //automatic subscription
1350
  $autosub_option = $_POST['autosub'];
1351
- $this->subscribe2_options['autosub']= $autosub_option;
1352
  $autosub_format_option = $_POST['autoformat'];
1353
- $this->subscribe2_options['autoformat']= $autosub_format_option;
1354
 
1355
  //barred domains
1356
  $barred_option = $_POST['barred'];
1357
- $this->subscribe2_options['barred'] = $barred_option;
1358
  echo "<div id=\"message\" class=\"updated fade\"><strong><p>$this->options_saved</p></strong></div>";
1359
- update_option('subscribe2_options', $this->subscribe2_options);
1360
  }
1361
  }
1362
  // show our form
1363
  echo "<div class=\"wrap\">";
1364
- echo "<form method=\"post\" action=\"\">\r\n";
1365
  if (function_exists('wp_nonce_field')) {
1366
  wp_nonce_field('subscribe2-options_subscribers' . $s2nonce);
1367
  }
1368
- echo "<input type=\"hidden\" name=\"s2_admin\" value=\"options\" />\r\n";
1369
- echo "<h2>" . __('Delivery Options', 'subscribe2') . ":</h2>\r\n";
1370
  echo __('Send Email From', 'subscribe2') . ': ';
1371
- echo "<input type=\"radio\" name=\"sender\" value=\"author\"";
1372
  if ('author' == $this->subscribe2_options['sender']) {
1373
  echo "checked=\"checked\" ";
1374
  }
1375
  echo " /> " . __('Author of the post', 'subscribe2') . " &nbsp;&nbsp;";
1376
- echo "<input type=\"radio\" name=\"sender\" value=\"admin\"";
1377
  if ('admin' == $this->subscribe2_options['sender']) {
1378
  echo "checked=\"checked\" ";
1379
  }
1380
- echo " /> " . __('Blog Admin', 'subscribe2') . "<br /><br />\r\n";
1381
- if (function_exists('wp_schedule_event')) {
1382
- echo __('Send Email as Digest', 'subscribe2') . ": <br /><br />\r\n";
1383
- $this->display_digest_choices();
1384
- echo "<br />\r\n";
1385
- }
1386
  echo "<h2>" . __('Email Templates', 'subscribe2') . "</h2>\r\n";
1387
- echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"1\" class=\"editform\">\r\n";
1388
  echo "<tr><td>";
1389
  echo __('New Post email (must not be empty)', 'subscribe2') . ":";
1390
  echo "<br />\r\n";
1391
- echo "<textarea rows=\"9\" cols=\"60\" name=\"mailtext\">" . stripslashes($this->subscribe2_options['mailtext']) . "</textarea><br /><br />\r\n";
1392
  echo "</td><td valign=\"top\" rowspan=\"3\">";
1393
  echo "<h3>" . __('Message substitions', 'subscribe2') . "</h3>\r\n";
1394
  echo "<dl>";
@@ -1404,38 +1386,38 @@ class subscribe2 {
1404
  echo "<dt><b>ACTION</b></dt><dd>" . __("Action performed by LINK in confirmation email<br />(<i>only used in the confirmation email template</i>)", 'subscribe2') . "</dd>\r\n";
1405
  echo "</dl></td></tr><tr><td>";
1406
  echo __('Subscribe / Unsubscribe confirmation email', 'subscribe2') . ":<br />\r\n";
1407
- echo "<textarea rows=\"9\" cols=\"60\" name=\"confirm_email\">" . stripslashes($this->subscribe2_options['confirm_email']) . "</textarea><br /><br />\r\n";
1408
- echo "</td></tr><tr valign=\"top\"><td>";
1409
  echo __('Reminder email to Unconfirmed Subscribers', 'subscribe2') . ":<br />\r\n";
1410
- echo "<textarea rows=\"9\" cols=\"60\" name=\"remind_email\">" . stripslashes($this->subscribe2_options['remind_email']) . "</textarea><br /><br />\r\n";
1411
- echo "</td></tr></table><br />\r\n";
1412
 
1413
  // excluded categories
1414
  echo "<h2>" . __('Excluded Categories', 'subscribe2') . "</h2>\r\n";
1415
  $this->display_category_form(explode(',', $this->get_excluded_cats()));
1416
- echo "<center><input type=\"checkbox\" name=\"reg_override\" value=\"1\"";
1417
  if ('1' == $this->subscribe2_options['reg_override']) {
1418
- echo " checked=\"checked\"";
1419
  }
1420
- echo " /> " . __('Allow registered users to subscribe to excluded categories?', 'subscribe2') . "</center><br />\r\n";
1421
  echo "<h2>" . __('Writing Options', 'subscribe2') . "</h2>\r\n";
1422
- echo "<input type=\"checkbox\" name=\"show_button\" value=\"1\"";
1423
  if ('1' == $this->subscribe2_options['show_button']) {
1424
- echo " checked=\"checked\"";
1425
  }
1426
- echo " /> " . __('Show the Subscribe2 button on the Write toolbar?', 'subscribe2') . "<br /><br />\r\n";
1427
 
1428
  //Auto Subscription for new registrations
1429
  echo "<h2>" . __('Auto Subscribe', 'subscribe2') . "</h2>\r\n";
1430
  echo __('Automatically subscribe new users registering with your blog.', 'subscribe2') . "<br />\r\n";
1431
- echo "<input type=\"radio\" name=\"autosub\" value=\"yes\"";
1432
  if ('yes' == $this->subscribe2_options['autosub']) {
1433
- echo " checked=\"checked\"";
1434
  }
1435
  echo " /> " . __('Yes', 'subscribe2') . " &nbsp;&nbsp;";
1436
- echo "<input type=\"radio\" name=\"autosub\" value=\"no\"";
1437
  if ('no' == $this->subscribe2_options['autosub']) {
1438
- echo " checked=\"checked\"";
1439
  }
1440
  echo " /> " . __('No', 'subscribe2') . "<br /><br />\r\n";
1441
  echo __('Auto-subscribe users to receive email as', 'subscribe2') . ": <br />\r\n";
@@ -1453,7 +1435,7 @@ class subscribe2 {
1453
  if ('text' == $this->subscribe2_options['autoformat']) {
1454
  echo "checked=\"checked\" ";
1455
  }
1456
- echo "/> " . __('Plain Text - Excerpt', 'subscribe2') . " <br /><br />";
1457
 
1458
  //barred domains
1459
  echo "<h2>" . __('Barred Domains', 'subscribe2') . "</h2>\r\n";
@@ -1547,7 +1529,7 @@ class subscribe2 {
1547
  wp_nonce_field('subscribe2-user_subscribers' . $s2nonce);
1548
  }
1549
  echo "<input type=\"hidden\" name=\"s2_admin\" value=\"user\" />";
1550
- if ($this->subscribe2_options['email_freq'] == 'never') {
1551
  echo __('Receive email as', 'subscribe2') . ": &nbsp;&nbsp;";
1552
  echo "<input type=\"radio\" name=\"s2_format\" value=\"html\"";
1553
  if ('html' == get_usermeta($user_ID, 's2_format')) {
@@ -1673,8 +1655,7 @@ class subscribe2 {
1673
  function display_category_form($selected = array(), $override = 1) {
1674
  global $wpdb;
1675
 
1676
- $all_cats = get_categories('type=post&hide_empty=1&hierarchical=0');
1677
-
1678
  if (0 == $override) {
1679
  // registered users are not allowed to subscribe to
1680
  // excluded categories
@@ -1688,26 +1669,26 @@ class subscribe2 {
1688
  $half = (count($all_cats) / 2);
1689
  $i = 0;
1690
  $j = 0;
1691
- echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"5\" class=\"editform\">\r\n";
1692
- echo "<tr valign=\"top\"><td width=\"50%\" align=\"left\">\r\n";
1693
- foreach ($all_cats as $cat) {
1694
  if ( ($i >= $half) && (0 == $j) ){
1695
- echo "</td><td width=\"50%\" align=\"left\">\r\n";
1696
  $j++;
1697
  }
1698
  if (0 == $j) {
1699
- echo "<input type=\"checkbox\" name=\"category[]\" value=\"" . $cat->cat_ID . "\"";
1700
- if (in_array($cat->cat_ID, $selected)) {
1701
  echo " checked=\"checked\" ";
1702
  }
1703
- echo " /> " . $cat->cat_name . "<br />\r\n";
1704
  } else {
1705
 
1706
- echo "<input type=\"checkbox\" name=\"category[]\" value=\"" . $cat->cat_ID . "\"";
1707
- if (in_array($cat->cat_ID, $selected)) {
1708
  echo " checked=\"checked\" ";
1709
  }
1710
- echo " /> " . $cat->cat_name . "<br />\r\n";
1711
  }
1712
  $i++;
1713
  }
@@ -1732,8 +1713,6 @@ class subscribe2 {
1732
  'unconfirmed' => ' &nbsp;&nbsp;' . __('Unconfirmed', 'subscribe2'),
1733
  'registered' => __('Registered Subscribers', 'subscribe2'));
1734
 
1735
- $all_cats = get_categories('type=post&hide_empty=1&hierarchical=0');
1736
-
1737
  // count the number of subscribers
1738
  $count['confirmed'] = $wpdb->get_var("SELECT COUNT(id) FROM $this->public WHERE active='1'");
1739
  $count['unconfirmed'] = $wpdb->get_var("SELECT COUNT(id) FROM $this->public WHERE active='0'");
@@ -1746,8 +1725,8 @@ class subscribe2 {
1746
  }
1747
  $count['registered'] = $wpdb->get_var("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key='s2_subscribed'");
1748
  $count['all'] = ($count['confirmed'] + $count['unconfirmed'] + $count['registered']);
1749
- foreach ($all_cats as $cat) {
1750
- $count[$cat->cat_name] = $wpdb->get_var("SELECT COUNT(meta_value) FROM $wpdb->usermeta WHERE meta_key='s2_cat$cat->cat_ID'");
1751
  }
1752
 
1753
  // do have actually have some subscribers?
@@ -1770,11 +1749,12 @@ class subscribe2 {
1770
  }
1771
 
1772
  if ($count['registered'] > 0) {
1773
- foreach ($all_cats as $cat) {
1774
- if (in_array($cat->cat_ID, $exclude)) { continue; }
1775
- echo "<option value=\"" . $cat->cat_ID . "\"";
1776
- if ($cat->cat_ID == $selected) { echo " selected=\"selected\" "; }
1777
- echo "> &nbsp;&nbsp;" . $cat->cat_name . "&nbsp;(" . $count[$cat->cat_name] . ") </option>\r\n";
 
1778
  }
1779
  }
1780
  echo "</select>";
@@ -1783,31 +1763,6 @@ class subscribe2 {
1783
  }
1784
  } // end display_subscriber_dropdown()
1785
 
1786
- function display_digest_choices() {
1787
- global $wpdb;
1788
- $schedule = (array)wp_get_schedules();
1789
- $schedule = array_merge(array('never' => array('interval' => 0, 'display' => __('Per Post Email','subscribe2'))), $schedule);
1790
- $sort = array();
1791
- foreach ( (array)$schedule as $key => $value ) $sort[$key] = $value['interval'];
1792
- asort($sort);
1793
- $schedule_sorted = array();
1794
- foreach ($sort as $key => $value) {
1795
- $schedule_sorted[$key] = $schedule[$key];
1796
- }
1797
- foreach ($schedule_sorted as $key => $value) {
1798
- echo "<input type=\"radio\" name=\"email_freq\" value=\"" . $key . "\"";
1799
- if ($key == $this->subscribe2_options['email_freq']) {
1800
- echo " checked=\"checked\" ";
1801
- }
1802
- echo " /> " . $value['display'] . "<br />\r\n";
1803
- }
1804
- if (wp_next_scheduled('s2_digest_cron')) {
1805
- $datetime = get_option('date_format') . ' @ ' . get_option('time_format');
1806
- echo "<p>" . __('Next email notification will be sent', 'subscribe2') . ": \r\n";
1807
- echo "<strong>" . gmdate($datetime, wp_next_scheduled('s2_digest_cron') + (get_option('gmt_offset') * 3600)) . "</strong></p>\r\n";
1808
- }
1809
- } // end display_digest_choices()
1810
-
1811
  /* ===== template and filter functions ===== */
1812
  /**
1813
  Display our form; also handles (un)subscribe requests
@@ -1819,11 +1774,7 @@ class subscribe2 {
1819
  global $user_ID;
1820
  get_currentuserinfo();
1821
  if ($user_ID) {
1822
- if (current_user_can('manage_options')) {
1823
- $this->s2form = $this->use_profile_admin;
1824
- } else {
1825
- $this->s2form = $this->use_profile_users;
1826
- }
1827
  }
1828
  if (isset($_POST['s2_action'])) {
1829
  global $wpdb, $user_email;
@@ -1916,23 +1867,49 @@ class subscribe2 {
1916
  } // end template_filter()
1917
 
1918
  /* ===== wp-cron functions ===== */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1919
  /**
1920
  Send a daily digest of today's new posts
1921
  */
1922
- function subscribe2_cron() {
1923
  global $wpdb;
1924
 
1925
- // collect posts
1926
- $now = date('Y-m-d H:i:s', time());
1927
- $prev = $this->subscribe2_options['last_s2cron'];
1928
- $posts = $wpdb->get_results("SELECT ID, post_title, post_excerpt, post_content FROM $wpdb->posts WHERE post_date >= '$prev' AND post_date < '$now' AND post_status='publish' AND post_type='post'");
1929
 
1930
- // update last_s2cron execution time before completing or bailing
1931
- $this->subscribe2_options['last_s2cron'] = $now;
1932
- update_option('subscribe2_options', $this->subscribe2_options);
1933
-
1934
  // do we have any posts?
1935
- if (empty($posts)) { return; }
1936
 
1937
  // if we have posts, let's prepare the digest
1938
  foreach ($posts as $post) {
@@ -1974,6 +1951,7 @@ class subscribe2 {
1974
  }
1975
 
1976
  $author = get_userdata($post->post_author);
 
1977
 
1978
  // do we send as admin, or post author?
1979
  if ('author' == $this->subscribe2_options['sender']) {
@@ -1985,18 +1963,41 @@ class subscribe2 {
1985
  }
1986
  $this->myemail = $user->user_email;
1987
  $this->myname = $user->display_name;
1988
-
1989
- $scheds = (array) wp_get_schedules();
1990
- $email_freq = $this->subscribe2_options['email_freq'];
1991
- $display = $scheds[$email_freq]['display'];
1992
- $subject = '[' . stripslashes(get_settings('blogname')) . '] ' . $display . ' ' . __('Digest Email', 'subscribe2');
1993
  $public = $this->get_public();
1994
  $registered = $this->get_registered();
1995
  $recipients = array_merge((array)$public, (array)$registered);
1996
  $mailtext = $this->substitute(stripslashes($this->subscribe2_options['mailtext']));
1997
  $body = str_replace('POST', $message, $mailtext);
1998
  $this->mail($recipients, $subject, $body);
1999
- } // end subscribe2_cron
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2000
 
2001
  /* ===== Our constructor ===== */
2002
  /**
@@ -2013,11 +2014,11 @@ class subscribe2 {
2013
 
2014
  // do we need to install anything?
2015
  $this->public = $table_prefix . "subscribe2";
2016
- if(mysql_query("SELECT COUNT(*) FROM ".$this->public)==FALSE) { $this->install(); }
2017
  //do we need to upgrade anything?
2018
  if ($this->subscribe2_options['version'] !== S2VERSION) {
2019
- $this->upgrade();
2020
- }
2021
 
2022
  if (isset($_GET['s2'])) {
2023
  // someone is confirming a request
@@ -2028,18 +2029,17 @@ class subscribe2 {
2028
 
2029
  add_action('admin_head', array(&$this, 'admin_head'));
2030
  add_action('admin_menu', array(&$this, 'admin_menu'));
 
 
 
2031
  add_action('user_register', array(&$this, 'register'));
2032
  add_action('create_category', array(&$this, 'autosub_new_category'));
2033
  add_filter('the_content', array(&$this, 'filter'));
2034
- add_filter('cron_schedules', array(&$this, 'add_weekly_sched'));
2035
-
2036
- if ($this->subscribe2_options['email_freq'] != 'never') {
2037
- add_action('s2_digest_cron', array(&$this, 'subscribe2_cron'));
2038
- } else {
2039
- add_action('publish_post', array(&$this, 'publish'));
2040
- add_action('edit_post', array(&$this, 'edit'));
2041
- add_action('private_to_published', array(&$this, 'private2publish'));
2042
  }
 
2043
 
2044
  // load our strings
2045
  $this->load_strings();
3
  Plugin Name: Subscribe2
4
  Plugin URI: http://subscribe2.wordpress.com
5
  Description: Notifies an email list when new entries are posted.
6
+ Version: 2.2.13
7
  Author: Matthew Robinson
8
  Author URI: http://subscribe2.wordpress.com
9
  */
10
 
11
  /*
12
+ Copyright (C) 2006 Matthew Robinson
13
  Based on the Original Subscribe2 plugin by
14
  Copyright (C) 2005 Scott Merrill (skippy@skippy.net)
15
 
29
  http://www.gnu.org/licenses/gpl.html
30
  */
31
 
32
+ // change this to TRUE if you're on Dreamhost
33
+ // (or any other host that limits the number of recipients
34
+ // permitted on each outgoing email message)
35
+ define('DREAMHOST', false);
36
 
37
  // by default, subscribe2 grabs the first page from your database for use
38
  // when displaying the confirmation screen to public subscribers.
39
  // You can override this by specifying a page ID below.
40
  define('S2PAGE', '0');
41
 
42
+ // change this to TRUE if you want a daily digest of the day's posts
43
+ // send to your subscribers
44
+ define('S2DIGEST', false);
45
+
46
  // our version number. Don't touch.
47
+ define('S2VERSION', '2.2.13');
48
 
49
  // Add the Subscribe code into the WP API
50
  add_action('init', 's2init');
106
 
107
  $this->please_log_in = "<p>" . __('To manage your subscription options please ', 'subscribe2') . "<a href=\"" . get_settings('siteurl') . "/wp-login.php\">login</a>.</p>";
108
 
109
+ $this->use_profile = "<p>" . __('You may manage your subscription options from your ', 'subscribe2') . "<a href=\"" . get_settings('siteurl') . "/wp-admin/profile.php?page=" . plugin_basename(__FILE__) . "\">profile</a>.</p>";
 
 
110
 
111
  $this->confirmation_sent = "<p>" . __('A confirmation message is on its way!', 'subscribe2') . "</p>";
112
 
149
  function admin_menu() {
150
  add_management_page(__('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), "manage_options", __FILE__, array(&$this, 'manage_menu'));
151
  add_options_page(__('Subscribe2 Options', 'subscribe2'), __('Subscribe2','subscribe2'), "manage_options", __FILE__, array(&$this, 'options_menu'));
152
+ add_submenu_page('profile.php', __('Subscriptions', 'subscribe2'), __('Subscriptions', 'subscribe2'), "read", __FILE__, array(&$this, 'user_menu'));
153
+ add_submenu_page('post.php', __('Mail Subscribers','subscribe2'), __('Mail Subscribers', 'subscribe2'),"manage_options", __FILE__, array(&$this, 'write_menu'));
 
 
 
 
154
  $s2nonce = md5('subscribe2');
155
  }
156
 
172
  echo "</script>\r\n";
173
  }
174
 
 
 
 
 
 
175
  /* ===== Install, upgrade, reset ===== */
176
  /**
177
  Install our table
208
  maybe_add_column($this->public, 'date', "ALTER TABLE `$this->public` ADD `date` DATE DEFAULT '$date' NOT NULL AFTER `active`;");
209
 
210
  // let's take the time to check process registered users
211
+ // existing public subscribers are subscribed to all categories
212
  $users = $wpdb->get_col("SELECT ID FROM $wpdb->users");
213
  if (!empty($users)) {
214
  foreach ($users as $user) {
216
  }
217
  }
218
  // update the options table to serialized format
219
+ // We'll deal with s2_future_posts another time
220
+ // TODO: Fix s2_future posts
221
  $old_options = $wpdb->get_col("SELECT option_name from $wpdb->options where option_name LIKE 's2%' AND option_name != 's2_future_posts'");
222
 
223
  if (!empty($old_options)) {
229
  }
230
  }
231
  $this->subscribe2_options['version'] = S2VERSION;
 
 
232
  update_option('subscribe2_options', $this->subscribe2_options);
233
  } // end upgrade()
234
 
292
 
293
  // BCC all recipients
294
  $bcc = '';
295
+ if ( (defined('DREAMHOST') && true == DREAMHOST) &&
296
+ (count($recipients) > 30) ) {
297
  // we're on Dreamhost, and have more than 30 susbcribers
298
  $count = 1;
299
  $batch = array();
344
  $headers .= "$bcc\r\n";
345
  }
346
  // actually send mail
347
+ if ( (defined('DREAMHOST')) && (true == DREAMHOST) && (isset($batch)) ) {
348
  foreach ($batch as $bcc) {
349
  $newheaders = $headers . "$bcc\r\n";
350
  @wp_mail($this->myemail, $subject, $mailtext, $newheaders);
357
  /**
358
  Sends an email notification of a new post
359
  */
360
+ function publish($id = 0, $cron = 0) {
361
+ if (!$id) { return $id; }
362
 
363
  // are we doing daily digests? If so, don't send anything now
364
+ if ( (defined('S2DIGEST')) && (true == S2DIGEST) ) { return; }
365
 
366
  // we need to determine whether this is a new post, or an edit
367
+ if (0 == $cron) {
368
+ // we're not being called from WP-Cron
369
+ if ($this->private) {
370
+ // this post was published from draft status
371
+ // OR is an edit of an existing post
372
+ // so send no notification
373
+ return $id;
374
+ }
375
  }
376
 
377
  $post_cats = wp_get_post_cats('1', $id);
398
  $post =& get_post($id);
399
  // is this post set in the future?
400
  if ($post->post_date > current_time('mysql')) {
401
+ // is wp-cron installed?
402
+ if (function_exists('wp_cron_init')) {
403
+ // are we doing daily digests?
404
+ if ( (defined('S2DIGEST')) && (false == S2DIGEST) ) {
405
+ // not doing daily digests, so
406
+ // add this post to the list of
407
+ // future posts
408
+ $our_post = array('id' => $id, 'date' => $post->post_date);
409
+ $future_posts = get_option('s2_future_posts');
410
+ $future_posts[] = $our_post;
411
+ update_option('s2_future_posts', $future_posts);
412
+ }
413
+ }
414
  // bail out
415
  return $id;
416
  }
550
 
551
  $admin = get_userdata(1);
552
  $this->myname = $admin->display_name;
553
+
554
  if ($is_remind == TRUE) {
555
  $body = $this->substitute(stripslashes($this->subscribe2_options['remind_email']));
556
  $subject = stripslashes($this->remind_subject);
940
 
941
  if (0 == $user_id) { return $user_id; }
942
  $user = get_userdata($user_id);
 
 
 
 
943
 
944
  // has this user previously signed up for email notification?
945
  if (false !== $this->is_public($user->user_email)) {
946
  // delete this user from the public table, and subscribe them to all the categories
947
  $this->delete($user->user_email);
948
+ update_usermeta($user_id, 's2_subscribed', $this->get_all_categories());
949
+ foreach(explode(',', $this->get_all_categories()) as $cat) {
950
+ update_usermeta($user_id, 's2_cat' . $cat, "$cat");
951
  }
952
  update_usermeta($user_id, 's2_format', 'text');
953
  update_usermeta($user_id, 's2_excerpt', 'excerpt');
956
  $check = get_usermeta($user_id, 's2_subscribed');
957
  // ensure existing subscriptions are not overwritten on upgrade
958
  if (empty($check)) {
959
+ if ('yes' == $this->subscribe2_options['s2_autosub']) {
960
  // don't add entires by default if autosub is off, messes up daily digests
961
  update_usermeta($user_id, 's2_subscribed', $this->get_all_categories());
962
  foreach(explode(',', $this->get_all_categories()) as $cat) {
963
  update_usermeta($user_id, 's2_cat' . $cat, "$cat");
964
  }
965
+ if ('html' == $this->subscribe2_options['s2_autoformat']) {
966
  update_usermeta($user_id, 's2_format', 'html');
967
  update_usermeta($user_id, 's2_excerpt', 'post');
968
+ } elseif ('fulltext' == $this->subscribe2_options['s2_autoformat']) {
969
  update_usermeta($user_id, 's2_format', 'text');
970
  update_usermeta($user_id, 's2_excerpt', 'post');
971
  } else {
1309
  } else {
1310
  $exclude_cats = '';
1311
  }
1312
+ $this->subscribe2_options['exclude'] = $exclude_cats;
1313
  // allow override?
1314
  (isset($_POST['reg_override'])) ? $override = '1' : $override = '0';
1315
  $this->subscribe2_options['reg_override'] = $override;
1323
  if ('admin' == $_POST['sender']) {
1324
  $sender = 'admin';
1325
  }
1326
+ $this->subscribe2_options['sender'] = $sender;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1327
 
1328
  // email templates
1329
  $mailtext = $_POST['mailtext'];
1330
+ $this->subscribe2_options['mailtext'] = $mailtext;
1331
  $confirm_email = $_POST['confirm_email'];
1332
+ $this->subscribe2_options['confirm_email'] = $confirm_email;
1333
  $remind_email = $_POST['remind_email'];
1334
+ $this->subscribe2_options['remind_email'] = $remind_email;
1335
 
1336
  //automatic subscription
1337
  $autosub_option = $_POST['autosub'];
1338
+ $this->subscribe2_options['autosub']= $autosub_option;
1339
  $autosub_format_option = $_POST['autoformat'];
1340
+ $this->subscribe2_options['autoformat']= $autosub_format_option;
1341
 
1342
  //barred domains
1343
  $barred_option = $_POST['barred'];
1344
+ $this->subscribe2_options['barred'] = $barred_option;
1345
  echo "<div id=\"message\" class=\"updated fade\"><strong><p>$this->options_saved</p></strong></div>";
1346
+ update_option('subscribe2_options', $this->subscribe2_options);
1347
  }
1348
  }
1349
  // show our form
1350
  echo "<div class=\"wrap\">";
1351
+ echo "<form method=\"post\" action=\"\">";
1352
  if (function_exists('wp_nonce_field')) {
1353
  wp_nonce_field('subscribe2-options_subscribers' . $s2nonce);
1354
  }
1355
+ echo "<input type=\"hidden\" name=\"s2_admin\" value=\"options\" />";
1356
+ echo "<h2>" . __('Delivery Options', 'subscribe2') . ":</h2>";
1357
  echo __('Send Email From', 'subscribe2') . ': ';
1358
+ echo "<input type=\"radio\" name=\"sender\" value=\"author\" ";
1359
  if ('author' == $this->subscribe2_options['sender']) {
1360
  echo "checked=\"checked\" ";
1361
  }
1362
  echo " /> " . __('Author of the post', 'subscribe2') . " &nbsp;&nbsp;";
1363
+ echo "<input type=\"radio\" name=\"sender\" value=\"admin\" ";
1364
  if ('admin' == $this->subscribe2_options['sender']) {
1365
  echo "checked=\"checked\" ";
1366
  }
1367
+ echo " /> " . __('Blog Admin', 'subscribe2') . "<br />\r\n";
 
 
 
 
 
1368
  echo "<h2>" . __('Email Templates', 'subscribe2') . "</h2>\r\n";
1369
+ echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"1\" class=\"editform\">";
1370
  echo "<tr><td>";
1371
  echo __('New Post email (must not be empty)', 'subscribe2') . ":";
1372
  echo "<br />\r\n";
1373
+ echo "<textarea rows=\"9\" cols=\"60\" name=\"mailtext\">" . stripslashes($this->subscribe2_options['mailtext']) . "</textarea><p>\r\n";
1374
  echo "</td><td valign=\"top\" rowspan=\"3\">";
1375
  echo "<h3>" . __('Message substitions', 'subscribe2') . "</h3>\r\n";
1376
  echo "<dl>";
1386
  echo "<dt><b>ACTION</b></dt><dd>" . __("Action performed by LINK in confirmation email<br />(<i>only used in the confirmation email template</i>)", 'subscribe2') . "</dd>\r\n";
1387
  echo "</dl></td></tr><tr><td>";
1388
  echo __('Subscribe / Unsubscribe confirmation email', 'subscribe2') . ":<br />\r\n";
1389
+ echo "<textarea rows=\"9\" cols=\"60\" name=\"confirm_email\">" . stripslashes($this->subscribe2_options['confirm_email']) . "</textarea><p>";
1390
+ echo "</td></tr><tr><td>";
1391
  echo __('Reminder email to Unconfirmed Subscribers', 'subscribe2') . ":<br />\r\n";
1392
+ echo "<textarea rows=\"9\" cols=\"60\" name=\"remind_email\">" . stripslashes($this->subscribe2_options['remind_email']) . "</textarea><p>";
1393
+ echo "</td></tr></table>\r\n";
1394
 
1395
  // excluded categories
1396
  echo "<h2>" . __('Excluded Categories', 'subscribe2') . "</h2>\r\n";
1397
  $this->display_category_form(explode(',', $this->get_excluded_cats()));
1398
+ echo "<p align=\"center\"><input type=\"checkbox\" name=\"reg_override\" value=\"1\"";
1399
  if ('1' == $this->subscribe2_options['reg_override']) {
1400
+ echo "checked=\"checked\"";
1401
  }
1402
+ echo "/> " . __('Allow registered users to subscribe to excluded categories?', 'subscribe2') . "</p>";
1403
  echo "<h2>" . __('Writing Options', 'subscribe2') . "</h2>\r\n";
1404
+ echo "<p align=\"center\"><input type=\"checkbox\" name=\"show_button\" value=\"1\"";
1405
  if ('1' == $this->subscribe2_options['show_button']) {
1406
+ echo "checked=\"checked\"";
1407
  }
1408
+ echo "/> " . __('Show the Subscribe2 button on the Write toolbar?', 'subscribe2') . "</p>";
1409
 
1410
  //Auto Subscription for new registrations
1411
  echo "<h2>" . __('Auto Subscribe', 'subscribe2') . "</h2>\r\n";
1412
  echo __('Automatically subscribe new users registering with your blog.', 'subscribe2') . "<br />\r\n";
1413
+ echo "<input type=\"radio\" name=\"autosub\" value=\"yes\" ";
1414
  if ('yes' == $this->subscribe2_options['autosub']) {
1415
+ echo "checked=\"checked\" ";
1416
  }
1417
  echo " /> " . __('Yes', 'subscribe2') . " &nbsp;&nbsp;";
1418
+ echo "<input type=\"radio\" name=\"autosub\" value=\"no\" ";
1419
  if ('no' == $this->subscribe2_options['autosub']) {
1420
+ echo "checked=\"checked\" ";
1421
  }
1422
  echo " /> " . __('No', 'subscribe2') . "<br /><br />\r\n";
1423
  echo __('Auto-subscribe users to receive email as', 'subscribe2') . ": <br />\r\n";
1435
  if ('text' == $this->subscribe2_options['autoformat']) {
1436
  echo "checked=\"checked\" ";
1437
  }
1438
+ echo "/> " . __('Plain Text - Excerpt', 'subscribe2') . " &nbsp;&nbsp;";
1439
 
1440
  //barred domains
1441
  echo "<h2>" . __('Barred Domains', 'subscribe2') . "</h2>\r\n";
1529
  wp_nonce_field('subscribe2-user_subscribers' . $s2nonce);
1530
  }
1531
  echo "<input type=\"hidden\" name=\"s2_admin\" value=\"user\" />";
1532
+ if ( (defined('S2DIGEST')) && (FALSE == S2DIGEST) ) {
1533
  echo __('Receive email as', 'subscribe2') . ": &nbsp;&nbsp;";
1534
  echo "<input type=\"radio\" name=\"s2_format\" value=\"html\"";
1535
  if ('html' == get_usermeta($user_ID, 's2_format')) {
1655
  function display_category_form($selected = array(), $override = 1) {
1656
  global $wpdb;
1657
 
1658
+ $all_cats = $this->get_all_categories('array');
 
1659
  if (0 == $override) {
1660
  // registered users are not allowed to subscribe to
1661
  // excluded categories
1669
  $half = (count($all_cats) / 2);
1670
  $i = 0;
1671
  $j = 0;
1672
+ echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"5\" class=\"editform\">";
1673
+ echo "<tr valign=\"top\"><td width=\"50%\" align=\"left\">";
1674
+ foreach ($all_cats as $cat_ID => $cat_name) {
1675
  if ( ($i >= $half) && (0 == $j) ){
1676
+ echo "</td><td width=\"50%\" align=\"left\">";
1677
  $j++;
1678
  }
1679
  if (0 == $j) {
1680
+ echo "<input type=\"checkbox\" name=\"category[]\" value=\"" . $cat_ID . "\"";
1681
+ if (in_array($cat_ID, $selected)) {
1682
  echo " checked=\"checked\" ";
1683
  }
1684
+ echo " /> " . $cat_name . "<br />\r\n";
1685
  } else {
1686
 
1687
+ echo "<input type=\"checkbox\" name=\"category[]\" value=\"" . $cat_ID . "\"";
1688
+ if (in_array($cat_ID, $selected)) {
1689
  echo " checked=\"checked\" ";
1690
  }
1691
+ echo " /> " . $cat_name . "<br />\r\n";
1692
  }
1693
  $i++;
1694
  }
1713
  'unconfirmed' => ' &nbsp;&nbsp;' . __('Unconfirmed', 'subscribe2'),
1714
  'registered' => __('Registered Subscribers', 'subscribe2'));
1715
 
 
 
1716
  // count the number of subscribers
1717
  $count['confirmed'] = $wpdb->get_var("SELECT COUNT(id) FROM $this->public WHERE active='1'");
1718
  $count['unconfirmed'] = $wpdb->get_var("SELECT COUNT(id) FROM $this->public WHERE active='0'");
1725
  }
1726
  $count['registered'] = $wpdb->get_var("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key='s2_subscribed'");
1727
  $count['all'] = ($count['confirmed'] + $count['unconfirmed'] + $count['registered']);
1728
+ foreach ($this->get_all_categories('array') as $cat_ID => $cat_name) {
1729
+ $count[$cat_name] = $wpdb->get_var("SELECT COUNT(meta_value) FROM $wpdb->usermeta WHERE meta_key='s2_cat$cat_ID'");
1730
  }
1731
 
1732
  // do have actually have some subscribers?
1749
  }
1750
 
1751
  if ($count['registered'] > 0) {
1752
+ foreach ($this->get_all_categories('array') as $cat_ID => $cat_name) {
1753
+ if (in_array($cat_ID, $exclude)) { continue; }
1754
+ if (0 == $count[$cat_name]) { continue; }
1755
+ echo "<option value=\"$cat_ID\"";
1756
+ if ($cat_ID == $selected) { echo " selected=\"selected\" "; }
1757
+ echo "> &nbsp;&nbsp;$cat_name (" . $count[$cat_name] . ") </option>\r\n";
1758
  }
1759
  }
1760
  echo "</select>";
1763
  }
1764
  } // end display_subscriber_dropdown()
1765
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1766
  /* ===== template and filter functions ===== */
1767
  /**
1768
  Display our form; also handles (un)subscribe requests
1774
  global $user_ID;
1775
  get_currentuserinfo();
1776
  if ($user_ID) {
1777
+ $this->s2form = $this->use_profile;
 
 
 
 
1778
  }
1779
  if (isset($_POST['s2_action'])) {
1780
  global $wpdb, $user_email;
1867
  } // end template_filter()
1868
 
1869
  /* ===== wp-cron functions ===== */
1870
+ /**
1871
+ Send notifications for any posts that are now visible
1872
+ */
1873
+ function subscribe2_hourly() {
1874
+ $future_posts = get_option('s2_future_posts');
1875
+
1876
+ // if we have no future posts, bail out
1877
+ if (!$future_posts) { return; }
1878
+
1879
+ // this will hold the posts that aren't yet visible
1880
+ $not_yet = array();
1881
+
1882
+ foreach ($future_posts as $post) {
1883
+ if ( (current_time('mysql')) > ($post['date']) ) {
1884
+ // this post is now visible, so let's
1885
+ // send a notification
1886
+ $this->publish($post['id'], 1);
1887
+ } else {
1888
+ array_push($not_yet, $post);
1889
+ }
1890
+ }
1891
+ // are the number of elements in $not_yet
1892
+ // the same as in $future posts?
1893
+ if ( (count($not_yet)) != (count($future_posts)) ) {
1894
+ // if not, then some posts have been removed
1895
+ // from $future_posts, and the remainder need
1896
+ // to be recorded back to the database
1897
+ update_option('s2_future_posts', $not_yet);
1898
+ }
1899
+ } // end subscribe2_hourly
1900
+
1901
  /**
1902
  Send a daily digest of today's new posts
1903
  */
1904
+ function subscribe2_daily() {
1905
  global $wpdb;
1906
 
1907
+ // collect yesterday's posts
1908
+ $yesterday = date('Y-m-d', (get_option('wp_cron_daily_lastrun')-60));
1909
+ $posts = $wpdb->get_results("SELECT ID, post_title, post_excerpt, post_content FROM $wpdb->posts WHERE post_date > '$yesterday 00:00:00' AND post_date < '$yesterday 23:59:59' AND post_status='publish'");
 
1910
 
 
 
 
 
1911
  // do we have any posts?
1912
+ if (!$posts) { return; }
1913
 
1914
  // if we have posts, let's prepare the digest
1915
  foreach ($posts as $post) {
1951
  }
1952
 
1953
  $author = get_userdata($post->post_author);
1954
+ $this->authorname = $author->display_name;
1955
 
1956
  // do we send as admin, or post author?
1957
  if ('author' == $this->subscribe2_options['sender']) {
1963
  }
1964
  $this->myemail = $user->user_email;
1965
  $this->myname = $user->display_name;
1966
+
1967
+ $subject = '[' . stripslashes(get_settings('blogname')) . '] ' . __('Daily Digest', 'subscribe2') . ' ' . $yesterday;
 
 
 
1968
  $public = $this->get_public();
1969
  $registered = $this->get_registered();
1970
  $recipients = array_merge((array)$public, (array)$registered);
1971
  $mailtext = $this->substitute(stripslashes($this->subscribe2_options['mailtext']));
1972
  $body = str_replace('POST', $message, $mailtext);
1973
  $this->mail($recipients, $subject, $body);
1974
+ } // end subscribe2_daily
1975
+
1976
+ /**
1977
+ If the to-be-deleted post was future-dated, remove it from the list of future-dated posts
1978
+ */
1979
+ function delete_future($id = 0) {
1980
+ if (0 == $id) { return $id; }
1981
+
1982
+ $future = get_settings('s2_future_posts');
1983
+ // if we have no future-dated posts scheduled, bail out
1984
+ if (!$future) {
1985
+ return $id;
1986
+ }
1987
+ foreach ($future as $post) {
1988
+ // is the deleted post in the list of future posts?
1989
+ if ($id == $post['id']) {
1990
+ // skip it
1991
+ continue;
1992
+ } else {
1993
+ // add this to the new list of future posts
1994
+ $new_future[] = $post;
1995
+ }
1996
+ }
1997
+ if ($new_future != $future) {
1998
+ update_option('s2_future_posts', $new_future);
1999
+ }
2000
+ } // end delete_future()
2001
 
2002
  /* ===== Our constructor ===== */
2003
  /**
2014
 
2015
  // do we need to install anything?
2016
  $this->public = $table_prefix . "subscribe2";
2017
+ if(mysql_query("SELECT COUNT(*) FROM ".$this->public)==FALSE) { $this->install(); }
2018
  //do we need to upgrade anything?
2019
  if ($this->subscribe2_options['version'] !== S2VERSION) {
2020
+ $this->upgrade();
2021
+ }
2022
 
2023
  if (isset($_GET['s2'])) {
2024
  // someone is confirming a request
2029
 
2030
  add_action('admin_head', array(&$this, 'admin_head'));
2031
  add_action('admin_menu', array(&$this, 'admin_menu'));
2032
+ add_action('publish_post', array(&$this, 'publish'));
2033
+ add_action('edit_post', array(&$this, 'edit'));
2034
+ add_action('private_to_published', array(&$this, 'private2publish'));
2035
  add_action('user_register', array(&$this, 'register'));
2036
  add_action('create_category', array(&$this, 'autosub_new_category'));
2037
  add_filter('the_content', array(&$this, 'filter'));
2038
+ add_action('wp_cron_hourly', array(&$this, 'subscribe2_hourly'));
2039
+ if ( (defined('S2DIGEST')) && (TRUE == S2DIGEST) ) {
2040
+ add_action('wp_cron_daily', array(&$this, 'subscribe2_daily'));
 
 
 
 
 
2041
  }
2042
+ add_action('delete_post', array(&$this, 'delete_future'));
2043
 
2044
  // load our strings
2045
  $this->load_strings();
subscribe2/subscribe2.pot CHANGED
@@ -8,7 +8,7 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2007-03-19 19:24+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,449 +16,429 @@ msgstr ""
16
  "Content-Type: text/plain; charset=CHARSET\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
 
19
- #: subscribe2.php:103
20
  msgid "To manage your subscription options please "
21
  msgstr ""
22
 
23
- #: subscribe2.php:105 subscribe2.php:107
24
  msgid "You may manage your subscription options from your "
25
  msgstr ""
26
 
27
- #: subscribe2.php:109
28
  msgid "A confirmation message is on its way!"
29
  msgstr ""
30
 
31
- #: subscribe2.php:111
32
  msgid "That email address is already subscribed."
33
  msgstr ""
34
 
35
- #: subscribe2.php:113
36
  msgid "That email address is not subscribed."
37
  msgstr ""
38
 
39
- #: subscribe2.php:115
40
  msgid "Sorry, but that does not look like an email address to me."
41
  msgstr ""
42
 
43
- #: subscribe2.php:117
44
  msgid ""
45
  "Sorry, email addresses at that domain are currently barred due to spam, "
46
  "please use an alternative email address."
47
  msgstr ""
48
 
49
- #: subscribe2.php:119
50
  msgid "Message sent!"
51
  msgstr ""
52
 
53
- #: subscribe2.php:121
54
  msgid "Your email:"
55
  msgstr ""
56
 
57
- #: subscribe2.php:121 subscribe2.php:1185 subscribe2.php:1277
58
  msgid "Subscribe"
59
  msgstr ""
60
 
61
- #: subscribe2.php:121 subscribe2.php:1278
62
  msgid "Unsubscribe"
63
  msgstr ""
64
 
65
- #: subscribe2.php:121 subscribe2.php:1659
66
  msgid "Send"
67
  msgstr ""
68
 
69
- #: subscribe2.php:124
70
  msgid "No such email address is registered."
71
  msgstr ""
72
 
73
- #: subscribe2.php:126
74
  msgid "You have successfully subscribed!"
75
  msgstr ""
76
 
77
- #: subscribe2.php:128
78
  msgid "You have successfully unsubscribed."
79
  msgstr ""
80
 
81
- #: subscribe2.php:130
82
  msgid "Please confirm your request"
83
  msgstr ""
84
 
85
- #: subscribe2.php:132
86
  msgid "Subscription Reminder"
87
  msgstr ""
88
 
89
- #: subscribe2.php:134
90
  msgid "subscribe"
91
  msgstr ""
92
 
93
- #: subscribe2.php:136
94
  msgid "unsubscribe"
95
  msgstr ""
96
 
97
- #: subscribe2.php:139
98
  msgid "Options saved!"
99
  msgstr ""
100
 
101
- #: subscribe2.php:140
102
  msgid "Options reset!"
103
  msgstr ""
104
 
105
- #: subscribe2.php:148 subscribe2.php:1190
106
  msgid "Subscribers"
107
  msgstr ""
108
 
109
- #: subscribe2.php:149
110
  msgid "Subscribe2 Options"
111
  msgstr ""
112
 
113
- #: subscribe2.php:149
114
  msgid "Subscribe2"
115
  msgstr ""
116
 
117
- #: subscribe2.php:151 subscribe2.php:153
118
  msgid "Subscriptions"
119
  msgstr ""
120
 
121
- #: subscribe2.php:155
122
  msgid "Mail Subscribers"
123
  msgstr ""
124
 
125
- #: subscribe2.php:178
126
- msgid "Once Weekly"
127
- msgstr ""
128
-
129
- #: subscribe2.php:780
130
  msgid "New subscriber"
131
  msgstr ""
132
 
133
- #: subscribe2.php:781
134
  msgid "subscribed to email notifications!"
135
  msgstr ""
136
 
137
- #: subscribe2.php:1098
138
  msgid "Address(es) subscribed!"
139
  msgstr ""
140
 
141
- #: subscribe2.php:1101
142
  msgid "deleted!"
143
  msgstr ""
144
 
145
- #: subscribe2.php:1104
146
  msgid "status changed!"
147
  msgstr ""
148
 
149
- #: subscribe2.php:1107
150
  msgid "Reminder Email(s) Sent!"
151
  msgstr ""
152
 
153
- #: subscribe2.php:1110
154
  msgid "CSV File Created in wp-content"
155
  msgstr ""
156
 
157
- #: subscribe2.php:1113
158
  msgid "Registered Users Subscribed!"
159
  msgstr ""
160
 
161
- #: subscribe2.php:1116
162
  msgid "Registered Users Unsubscribed!"
163
  msgstr ""
164
 
165
- #: subscribe2.php:1178
 
 
 
 
166
  msgid "Subscribe Addresses"
167
  msgstr ""
168
 
169
- #: subscribe2.php:1183
170
  msgid "Enter addresses, one per line or comma-seperated"
171
  msgstr ""
172
 
173
- #: subscribe2.php:1192
174
  msgid "Filter"
175
  msgstr ""
176
 
177
- #: subscribe2.php:1196
178
  msgid ""
179
  "Registered on the left, confirmed in the middle, unconfirmed on the right"
180
  msgstr ""
181
 
182
- #: subscribe2.php:1205
183
  msgid "Save Emails to CSV File"
184
  msgstr ""
185
 
186
- #: subscribe2.php:1251
187
  msgid "NONE"
188
  msgstr ""
189
 
190
- #: subscribe2.php:1261
191
- msgid "Send Reminder Email"
192
- msgstr ""
193
-
194
- #: subscribe2.php:1268
195
  msgid "Categories"
196
  msgstr ""
197
 
198
- #: subscribe2.php:1269
199
  msgid ""
200
  "Existing Registered Users can be automatically (un)subscribed to categories "
201
  "using this section."
202
  msgstr ""
203
 
204
- #: subscribe2.php:1270
205
  msgid "Consider User Privacy as changes cannot be undone"
206
  msgstr ""
207
 
208
- #: subscribe2.php:1369
209
  msgid "Delivery Options"
210
  msgstr ""
211
 
212
- #: subscribe2.php:1370
213
  msgid "Send Email From"
214
  msgstr ""
215
 
216
- #: subscribe2.php:1375
217
  msgid "Author of the post"
218
  msgstr ""
219
 
220
- #: subscribe2.php:1380
221
  msgid "Blog Admin"
222
  msgstr ""
223
 
224
- #: subscribe2.php:1382
225
- msgid "Send Email as Digest"
226
- msgstr ""
227
-
228
- #: subscribe2.php:1386
229
  msgid "Email Templates"
230
  msgstr ""
231
 
232
- #: subscribe2.php:1389
233
  msgid "New Post email (must not be empty)"
234
  msgstr ""
235
 
236
- #: subscribe2.php:1393
237
  msgid "Message substitions"
238
  msgstr ""
239
 
240
- #: subscribe2.php:1397
241
  msgid "the post's title"
242
  msgstr ""
243
 
244
- #: subscribe2.php:1398
245
  msgid ""
246
  "the excerpt or the entire post<br />(<i>based on the subscriber's "
247
  "preferences</i>)"
248
  msgstr ""
249
 
250
- #: subscribe2.php:1399
251
  msgid "the post's permalink"
252
  msgstr ""
253
 
254
- #: subscribe2.php:1400
255
  msgid "the admin or post author's name"
256
  msgstr ""
257
 
258
- #: subscribe2.php:1401
259
  msgid "the admin or post author's email"
260
  msgstr ""
261
 
262
- #: subscribe2.php:1402
263
  msgid "the post author's name"
264
  msgstr ""
265
 
266
- #: subscribe2.php:1403
267
  msgid ""
268
  "the generated link to confirm a request<br />(<i>only used in the "
269
  "confirmation email template</i>)"
270
  msgstr ""
271
 
272
- #: subscribe2.php:1404
273
  msgid ""
274
  "Action performed by LINK in confirmation email<br />(<i>only used in the "
275
  "confirmation email template</i>)"
276
  msgstr ""
277
 
278
- #: subscribe2.php:1406
279
  msgid "Subscribe / Unsubscribe confirmation email"
280
  msgstr ""
281
 
282
- #: subscribe2.php:1409
283
  msgid "Reminder email to Unconfirmed Subscribers"
284
  msgstr ""
285
 
286
- #: subscribe2.php:1414
287
  msgid "Excluded Categories"
288
  msgstr ""
289
 
290
- #: subscribe2.php:1420
291
  msgid "Allow registered users to subscribe to excluded categories?"
292
  msgstr ""
293
 
294
- #: subscribe2.php:1421
295
  msgid "Writing Options"
296
  msgstr ""
297
 
298
- #: subscribe2.php:1426
299
  msgid "Show the Subscribe2 button on the Write toolbar?"
300
  msgstr ""
301
 
302
- #: subscribe2.php:1429
303
  msgid "Auto Subscribe"
304
  msgstr ""
305
 
306
- #: subscribe2.php:1430
307
  msgid "Automatically subscribe new users registering with your blog."
308
  msgstr ""
309
 
310
- #: subscribe2.php:1435
311
  msgid "Yes"
312
  msgstr ""
313
 
314
- #: subscribe2.php:1440
315
  msgid "No"
316
  msgstr ""
317
 
318
- #: subscribe2.php:1441
319
  msgid "Auto-subscribe users to receive email as"
320
  msgstr ""
321
 
322
- #: subscribe2.php:1446 subscribe2.php:1556
323
  msgid "HTML"
324
  msgstr ""
325
 
326
- #: subscribe2.php:1451
327
  msgid "Plain Text - Full"
328
  msgstr ""
329
 
330
- #: subscribe2.php:1456
331
  msgid "Plain Text - Excerpt"
332
  msgstr ""
333
 
334
- #: subscribe2.php:1459
335
  msgid "Barred Domains"
336
  msgstr ""
337
 
338
- #: subscribe2.php:1460
339
  msgid ""
340
  "Enter domains to bar from public subscriptions: <br /> (Use a new line for "
341
  "each entry and omit the \"@\" symbol, for example email.com)"
342
  msgstr ""
343
 
344
- #: subscribe2.php:1464
345
  msgid "Submit"
346
  msgstr ""
347
 
348
- #: subscribe2.php:1469
349
  msgid "Reset Default"
350
  msgstr ""
351
 
352
- #: subscribe2.php:1470
353
  msgid ""
354
  "Use this to reset all options to their defaults. This <strong><em>will not</"
355
  "em></strong> modify your list of subscribers."
356
  msgstr ""
357
 
358
- #: subscribe2.php:1477
359
  msgid "RESET"
360
  msgstr ""
361
 
362
- #: subscribe2.php:1497
363
  msgid "Subscription preferences updated."
364
  msgstr ""
365
 
366
- #: subscribe2.php:1544
367
  msgid "Notification Settings"
368
  msgstr ""
369
 
370
- #: subscribe2.php:1551
371
  msgid "Receive email as"
372
  msgstr ""
373
 
374
- #: subscribe2.php:1561
375
  msgid "Plain Text"
376
  msgstr ""
377
 
378
- #: subscribe2.php:1563
379
  msgid "Email contains"
380
  msgstr ""
381
 
382
- #: subscribe2.php:1564
383
  msgid "Excerpt Only"
384
  msgstr ""
385
 
386
- #: subscribe2.php:1564
387
  msgid "Full Post"
388
  msgstr ""
389
 
390
- #: subscribe2.php:1572
391
  msgid "Note: HTML format will always deliver the full post."
392
  msgstr ""
393
 
394
- #: subscribe2.php:1573
395
  msgid "Automatically subscribe me to newly created categories"
396
  msgstr ""
397
 
398
- #: subscribe2.php:1585
399
  msgid "Subscribed Categories"
400
  msgstr ""
401
 
402
- #: subscribe2.php:1590
403
  msgid "Receive daily summary of new posts?"
404
  msgstr ""
405
 
406
- #: subscribe2.php:1603
407
  msgid "Update Preferences &raquo;"
408
  msgstr ""
409
 
410
- #: subscribe2.php:1648
411
  msgid "Send email to all subscribers"
412
  msgstr ""
413
 
414
- #: subscribe2.php:1653
415
  msgid "Subject"
416
  msgstr ""
417
 
418
- #: subscribe2.php:1653
419
  msgid "A message from "
420
  msgstr ""
421
 
422
- #: subscribe2.php:1656
423
  msgid "Recipients: "
424
  msgstr ""
425
 
426
- #: subscribe2.php:1716
427
- msgid "Select / Unselect All"
428
- msgstr ""
429
-
430
- #: subscribe2.php:1729
431
  msgid "All Subscribers"
432
  msgstr ""
433
 
434
- #: subscribe2.php:1730
435
  msgid "Public Subscribers"
436
  msgstr ""
437
 
438
- #: subscribe2.php:1731
439
  msgid "Confirmed"
440
  msgstr ""
441
 
442
- #: subscribe2.php:1732
443
  msgid "Unconfirmed"
444
  msgstr ""
445
 
446
- #: subscribe2.php:1733
447
  msgid "Registered Subscribers"
448
  msgstr ""
449
 
450
- #: subscribe2.php:1789
451
- msgid "Per Post Email"
452
- msgstr ""
453
-
454
- #: subscribe2.php:1806
455
- msgid "Next email notification will be sent"
456
- msgstr ""
457
-
458
- #: subscribe2.php:1906
459
  msgid "Subscription Confirmation"
460
  msgstr ""
461
 
462
- #: subscribe2.php:1992
463
- msgid "Digest Email"
464
  msgstr ""
8
  msgstr ""
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
  "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2007-01-20 20:54+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
  "Content-Type: text/plain; charset=CHARSET\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
 
19
+ #: subscribe2.php:107
20
  msgid "To manage your subscription options please "
21
  msgstr ""
22
 
23
+ #: subscribe2.php:109
24
  msgid "You may manage your subscription options from your "
25
  msgstr ""
26
 
27
+ #: subscribe2.php:111
28
  msgid "A confirmation message is on its way!"
29
  msgstr ""
30
 
31
+ #: subscribe2.php:113
32
  msgid "That email address is already subscribed."
33
  msgstr ""
34
 
35
+ #: subscribe2.php:115
36
  msgid "That email address is not subscribed."
37
  msgstr ""
38
 
39
+ #: subscribe2.php:117
40
  msgid "Sorry, but that does not look like an email address to me."
41
  msgstr ""
42
 
43
+ #: subscribe2.php:119
44
  msgid ""
45
  "Sorry, email addresses at that domain are currently barred due to spam, "
46
  "please use an alternative email address."
47
  msgstr ""
48
 
49
+ #: subscribe2.php:121
50
  msgid "Message sent!"
51
  msgstr ""
52
 
53
+ #: subscribe2.php:123
54
  msgid "Your email:"
55
  msgstr ""
56
 
57
+ #: subscribe2.php:123 subscribe2.php:1184 subscribe2.php:1238
58
  msgid "Subscribe"
59
  msgstr ""
60
 
61
+ #: subscribe2.php:123 subscribe2.php:1239
62
  msgid "Unsubscribe"
63
  msgstr ""
64
 
65
+ #: subscribe2.php:123 subscribe2.php:1578
66
  msgid "Send"
67
  msgstr ""
68
 
69
+ #: subscribe2.php:126
70
  msgid "No such email address is registered."
71
  msgstr ""
72
 
73
+ #: subscribe2.php:128
74
  msgid "You have successfully subscribed!"
75
  msgstr ""
76
 
77
+ #: subscribe2.php:130
78
  msgid "You have successfully unsubscribed."
79
  msgstr ""
80
 
81
+ #: subscribe2.php:132
82
  msgid "Please confirm your request"
83
  msgstr ""
84
 
85
+ #: subscribe2.php:134
86
  msgid "Subscription Reminder"
87
  msgstr ""
88
 
89
+ #: subscribe2.php:136
90
  msgid "subscribe"
91
  msgstr ""
92
 
93
+ #: subscribe2.php:138
94
  msgid "unsubscribe"
95
  msgstr ""
96
 
97
+ #: subscribe2.php:141
98
  msgid "Options saved!"
99
  msgstr ""
100
 
101
+ #: subscribe2.php:142
102
  msgid "Options reset!"
103
  msgstr ""
104
 
105
+ #: subscribe2.php:150 subscribe2.php:1189
106
  msgid "Subscribers"
107
  msgstr ""
108
 
109
+ #: subscribe2.php:151
110
  msgid "Subscribe2 Options"
111
  msgstr ""
112
 
113
+ #: subscribe2.php:151
114
  msgid "Subscribe2"
115
  msgstr ""
116
 
117
+ #: subscribe2.php:152
118
  msgid "Subscriptions"
119
  msgstr ""
120
 
121
+ #: subscribe2.php:153
122
  msgid "Mail Subscribers"
123
  msgstr ""
124
 
125
+ #: subscribe2.php:787
 
 
 
 
126
  msgid "New subscriber"
127
  msgstr ""
128
 
129
+ #: subscribe2.php:788
130
  msgid "subscribed to email notifications!"
131
  msgstr ""
132
 
133
+ #: subscribe2.php:1100
134
  msgid "Address(es) subscribed!"
135
  msgstr ""
136
 
137
+ #: subscribe2.php:1103
138
  msgid "deleted!"
139
  msgstr ""
140
 
141
+ #: subscribe2.php:1106
142
  msgid "status changed!"
143
  msgstr ""
144
 
145
+ #: subscribe2.php:1109
146
  msgid "Reminder Email(s) Sent!"
147
  msgstr ""
148
 
149
+ #: subscribe2.php:1112
150
  msgid "CSV File Created in wp-content"
151
  msgstr ""
152
 
153
+ #: subscribe2.php:1115
154
  msgid "Registered Users Subscribed!"
155
  msgstr ""
156
 
157
+ #: subscribe2.php:1118
158
  msgid "Registered Users Unsubscribed!"
159
  msgstr ""
160
 
161
+ #: subscribe2.php:1143
162
+ msgid "Send Reminder Email"
163
+ msgstr ""
164
+
165
+ #: subscribe2.php:1180
166
  msgid "Subscribe Addresses"
167
  msgstr ""
168
 
169
+ #: subscribe2.php:1182
170
  msgid "Enter addresses, one per line or comma-seperated"
171
  msgstr ""
172
 
173
+ #: subscribe2.php:1191
174
  msgid "Filter"
175
  msgstr ""
176
 
177
+ #: subscribe2.php:1195
178
  msgid ""
179
  "Registered on the left, confirmed in the middle, unconfirmed on the right"
180
  msgstr ""
181
 
182
+ #: subscribe2.php:1198
183
  msgid "Save Emails to CSV File"
184
  msgstr ""
185
 
186
+ #: subscribe2.php:1225
187
  msgid "NONE"
188
  msgstr ""
189
 
190
+ #: subscribe2.php:1233
 
 
 
 
191
  msgid "Categories"
192
  msgstr ""
193
 
194
+ #: subscribe2.php:1234
195
  msgid ""
196
  "Existing Registered Users can be automatically (un)subscribed to categories "
197
  "using this section."
198
  msgstr ""
199
 
200
+ #: subscribe2.php:1235
201
  msgid "Consider User Privacy as changes cannot be undone"
202
  msgstr ""
203
 
204
+ #: subscribe2.php:1306
205
  msgid "Delivery Options"
206
  msgstr ""
207
 
208
+ #: subscribe2.php:1307
209
  msgid "Send Email From"
210
  msgstr ""
211
 
212
+ #: subscribe2.php:1312
213
  msgid "Author of the post"
214
  msgstr ""
215
 
216
+ #: subscribe2.php:1317
217
  msgid "Blog Admin"
218
  msgstr ""
219
 
220
+ #: subscribe2.php:1318
 
 
 
 
221
  msgid "Email Templates"
222
  msgstr ""
223
 
224
+ #: subscribe2.php:1321
225
  msgid "New Post email (must not be empty)"
226
  msgstr ""
227
 
228
+ #: subscribe2.php:1325
229
  msgid "Message substitions"
230
  msgstr ""
231
 
232
+ #: subscribe2.php:1329
233
  msgid "the post's title"
234
  msgstr ""
235
 
236
+ #: subscribe2.php:1330
237
  msgid ""
238
  "the excerpt or the entire post<br />(<i>based on the subscriber's "
239
  "preferences</i>)"
240
  msgstr ""
241
 
242
+ #: subscribe2.php:1331
243
  msgid "the post's permalink"
244
  msgstr ""
245
 
246
+ #: subscribe2.php:1332
247
  msgid "the admin or post author's name"
248
  msgstr ""
249
 
250
+ #: subscribe2.php:1333
251
  msgid "the admin or post author's email"
252
  msgstr ""
253
 
254
+ #: subscribe2.php:1334
255
  msgid "the post author's name"
256
  msgstr ""
257
 
258
+ #: subscribe2.php:1335
259
  msgid ""
260
  "the generated link to confirm a request<br />(<i>only used in the "
261
  "confirmation email template</i>)"
262
  msgstr ""
263
 
264
+ #: subscribe2.php:1336
265
  msgid ""
266
  "Action performed by LINK in confirmation email<br />(<i>only used in the "
267
  "confirmation email template</i>)"
268
  msgstr ""
269
 
270
+ #: subscribe2.php:1338
271
  msgid "Subscribe / Unsubscribe confirmation email"
272
  msgstr ""
273
 
274
+ #: subscribe2.php:1341
275
  msgid "Reminder email to Unconfirmed Subscribers"
276
  msgstr ""
277
 
278
+ #: subscribe2.php:1346
279
  msgid "Excluded Categories"
280
  msgstr ""
281
 
282
+ #: subscribe2.php:1352
283
  msgid "Allow registered users to subscribe to excluded categories?"
284
  msgstr ""
285
 
286
+ #: subscribe2.php:1353
287
  msgid "Writing Options"
288
  msgstr ""
289
 
290
+ #: subscribe2.php:1358
291
  msgid "Show the Subscribe2 button on the Write toolbar?"
292
  msgstr ""
293
 
294
+ #: subscribe2.php:1361
295
  msgid "Auto Subscribe"
296
  msgstr ""
297
 
298
+ #: subscribe2.php:1362
299
  msgid "Automatically subscribe new users registering with your blog."
300
  msgstr ""
301
 
302
+ #: subscribe2.php:1367
303
  msgid "Yes"
304
  msgstr ""
305
 
306
+ #: subscribe2.php:1372
307
  msgid "No"
308
  msgstr ""
309
 
310
+ #: subscribe2.php:1373
311
  msgid "Auto-subscribe users to receive email as"
312
  msgstr ""
313
 
314
+ #: subscribe2.php:1378 subscribe2.php:1481
315
  msgid "HTML"
316
  msgstr ""
317
 
318
+ #: subscribe2.php:1383
319
  msgid "Plain Text - Full"
320
  msgstr ""
321
 
322
+ #: subscribe2.php:1388
323
  msgid "Plain Text - Excerpt"
324
  msgstr ""
325
 
326
+ #: subscribe2.php:1391
327
  msgid "Barred Domains"
328
  msgstr ""
329
 
330
+ #: subscribe2.php:1392
331
  msgid ""
332
  "Enter domains to bar from public subscriptions: <br /> (Use a new line for "
333
  "each entry and omit the \"@\" symbol, for example email.com)"
334
  msgstr ""
335
 
336
+ #: subscribe2.php:1396
337
  msgid "Submit"
338
  msgstr ""
339
 
340
+ #: subscribe2.php:1401
341
  msgid "Reset Default"
342
  msgstr ""
343
 
344
+ #: subscribe2.php:1402
345
  msgid ""
346
  "Use this to reset all options to their defaults. This <strong><em>will not</"
347
  "em></strong> modify your list of subscribers."
348
  msgstr ""
349
 
350
+ #: subscribe2.php:1406
351
  msgid "RESET"
352
  msgstr ""
353
 
354
+ #: subscribe2.php:1425
355
  msgid "Subscription preferences updated."
356
  msgstr ""
357
 
358
+ #: subscribe2.php:1472
359
  msgid "Notification Settings"
360
  msgstr ""
361
 
362
+ #: subscribe2.php:1476
363
  msgid "Receive email as"
364
  msgstr ""
365
 
366
+ #: subscribe2.php:1486
367
  msgid "Plain Text"
368
  msgstr ""
369
 
370
+ #: subscribe2.php:1488
371
  msgid "Email contains"
372
  msgstr ""
373
 
374
+ #: subscribe2.php:1489
375
  msgid "Excerpt Only"
376
  msgstr ""
377
 
378
+ #: subscribe2.php:1489
379
  msgid "Full Post"
380
  msgstr ""
381
 
382
+ #: subscribe2.php:1497
383
  msgid "Note: HTML format will always deliver the full post."
384
  msgstr ""
385
 
386
+ #: subscribe2.php:1498
387
  msgid "Automatically subscribe me to newly created categories"
388
  msgstr ""
389
 
390
+ #: subscribe2.php:1510
391
  msgid "Subscribed Categories"
392
  msgstr ""
393
 
394
+ #: subscribe2.php:1515
395
  msgid "Receive daily summary of new posts?"
396
  msgstr ""
397
 
398
+ #: subscribe2.php:1528
399
  msgid "Update Preferences &raquo;"
400
  msgstr ""
401
 
402
+ #: subscribe2.php:1570
403
  msgid "Send email to all subscribers"
404
  msgstr ""
405
 
406
+ #: subscribe2.php:1572
407
  msgid "Subject"
408
  msgstr ""
409
 
410
+ #: subscribe2.php:1572
411
  msgid "A message from "
412
  msgstr ""
413
 
414
+ #: subscribe2.php:1575
415
  msgid "Recipients: "
416
  msgstr ""
417
 
418
+ #: subscribe2.php:1647
 
 
 
 
419
  msgid "All Subscribers"
420
  msgstr ""
421
 
422
+ #: subscribe2.php:1648
423
  msgid "Public Subscribers"
424
  msgstr ""
425
 
426
+ #: subscribe2.php:1649
427
  msgid "Confirmed"
428
  msgstr ""
429
 
430
+ #: subscribe2.php:1650
431
  msgid "Unconfirmed"
432
  msgstr ""
433
 
434
+ #: subscribe2.php:1651
435
  msgid "Registered Subscribers"
436
  msgstr ""
437
 
438
+ #: subscribe2.php:1794
 
 
 
 
 
 
 
 
439
  msgid "Subscription Confirmation"
440
  msgstr ""
441
 
442
+ #: subscribe2.php:1904
443
+ msgid "Daily Digest"
444
  msgstr ""