Version Description
Download this release
Release Info
Developer | MattyRob |
Plugin | Subscribe2 |
Version | 2.17 |
Comparing to | |
See all releases |
Code changes from version 3.0 to 2.17
- ReadMe.txt +37 -0
- subscribe2/include.php +1 -5
- subscribe2/subscribe2.php +199 -225
- subscribe2/subscribe2.pot +106 -122
ReadMe.txt
CHANGED
@@ -77,10 +77,47 @@ 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
|
77 |
|
78 |
== Version History ==
|
79 |
|
80 |
+
Version 3.3 by Matthew Robinson
|
81 |
+
|
82 |
+
* QuickTag button added! Works with Visual and Standard Editor. __Look in Code for token addition if using RTE.__
|
83 |
+
* Current Server time displayed for Cron tasks
|
84 |
+
* Fixed bug so Registered users now identified correctly
|
85 |
+
* Upgrade function called via WordPress hook to prevent calls to undefined functions
|
86 |
+
* Fixed a bug affecting Registered Users not appearing in the drop down list
|
87 |
+
* Improved handling of the Subscribe2 option array
|
88 |
+
|
89 |
+
Version 3.2 by Matthew Robinson
|
90 |
+
|
91 |
+
* Fixed a bug affecting Registered Users not appearing in the drop down list
|
92 |
+
* Improved handling of the Subscribe2 option array
|
93 |
+
|
94 |
+
Version 3.1 by Matthew Robinson
|
95 |
+
|
96 |
+
* Amended code to use core cron functionality for future posts and digest notifications, no longer need WP-Cron
|
97 |
+
* Improved HTML code generated for admin pages
|
98 |
+
* Removed sending of emails for WordPress Pages
|
99 |
+
* Fixed display issues if S2PAGE is not defined
|
100 |
+
|
101 |
Version 3.0 by Matthew Robinson
|
102 |
|
103 |
* Updated for WordPress 2.1 Branch
|
104 |
|
105 |
+
Version 2.17 by Matthew Robinson
|
106 |
+
|
107 |
+
* Current Server time displayed for Cron tasks
|
108 |
+
* Fixed bug so Registered users now identified correctly
|
109 |
+
* Upgrade function called via WordPress hook to prevent calls to undefined functions
|
110 |
+
|
111 |
+
Version 2.16 by Matthew Robinson
|
112 |
+
|
113 |
+
* Fixed a bug affecting Registered Users not appearing in the drop down list
|
114 |
+
* Improved handling of the Subscribe2 option array
|
115 |
+
|
116 |
+
Version 2.15 by Matthew Robinson
|
117 |
+
|
118 |
+
* Improved HTML code generated for admin pages
|
119 |
+
* Fixed display issues if S2PAGE is not defined
|
120 |
+
|
121 |
Version 2.14 by Matthew Robinson
|
122 |
|
123 |
* Amended DREAMHOST setting to BCCLIMIT as more hosts are limiting emails
|
subscribe2/include.php
CHANGED
@@ -31,12 +31,8 @@ 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'\
|
40 |
} // Default notification email text
|
41 |
|
42 |
if (!isset($this->subscribe2_options['confirm_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'\n\nPOST\n\nYou may view the latest post at\nPERMALINK\n\nYou received this e-mail because you asked to be notified when new updates are posted.\nBest regards,\nMYNAME\nEMAIL";
|
36 |
} // Default notification email text
|
37 |
|
38 |
if (!isset($this->subscribe2_options['confirm_email'])) {
|
subscribe2/subscribe2.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.
|
7 |
Author: Matthew Robinson
|
8 |
Author URI: http://subscribe2.wordpress.com
|
9 |
*/
|
@@ -29,69 +29,32 @@ 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
|
33 |
// permitted on each outgoing email message
|
34 |
-
// change
|
35 |
define('BCCLIMIT', '0');
|
36 |
|
37 |
-
// by default,
|
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 |
-
//
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
add_action('marker_css', 'subscribe2_css');
|
56 |
-
}
|
57 |
-
unset($s2_options);
|
58 |
-
|
59 |
-
function s2init() {
|
60 |
-
global $subscribe2;
|
61 |
-
$mysubscribe2 = new subscribe2();
|
62 |
-
$mysubscribe2->subscribe2();
|
63 |
-
}
|
64 |
-
|
65 |
-
/* ===== ButtonSnap configuration ===== */
|
66 |
-
/**
|
67 |
-
Register our button in the QuickTags bar
|
68 |
-
*/
|
69 |
-
function s2_button_init() {
|
70 |
-
$url = get_settings('siteurl') . '/wp-content/plugins/subscribe2/s2_button.png';
|
71 |
-
buttonsnap_textbutton($url, 'Subscribe2', '<!--subscribe2-->');
|
72 |
-
buttonsnap_register_marker('subscribe2', 's2_marker');
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
Style a marker in the Rich Text Editor for our tag
|
77 |
-
By default, the RTE suppresses output of HTML comments, so this places a CSS style on our token in order to make it display
|
78 |
-
*/
|
79 |
-
function subscribe2_css() {
|
80 |
-
$marker_url = get_settings('siteurl') . '/wp-content/plugins/subscribe2/s2_marker.png';
|
81 |
-
echo "
|
82 |
-
.s2_marker {
|
83 |
-
display: block;
|
84 |
-
height: 45px;
|
85 |
-
margin-top: 5px;
|
86 |
-
background-image: url({$marker_url});
|
87 |
-
background-repeat: no-repeat;
|
88 |
-
background-position: center;
|
89 |
-
}
|
90 |
-
";
|
91 |
-
}
|
92 |
|
93 |
// start our class
|
94 |
-
class
|
95 |
// variables and constructor are declared at the end
|
96 |
|
97 |
/**
|
@@ -102,9 +65,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->
|
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 +108,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 |
-
|
151 |
-
|
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 +131,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
|
@@ -235,7 +187,7 @@ class subscribe2 {
|
|
235 |
}
|
236 |
$this->subscribe2_options['version'] = S2VERSION;
|
237 |
//double check that the options are in the database
|
238 |
-
|
239 |
update_option('subscribe2_options', $this->subscribe2_options);
|
240 |
} // end upgrade()
|
241 |
|
@@ -279,8 +231,8 @@ class subscribe2 {
|
|
279 |
$this->myname = $admin->display_name;
|
280 |
$this->myemail = $admin->user_email;
|
281 |
}
|
282 |
-
$headers = "From: $this->myname
|
283 |
-
$headers .= "Return-Path:
|
284 |
$headers .= "X-Mailer:PHP" . phpversion() . "\n";
|
285 |
$headers .= "Precedence: list\nList-Id: " . get_settings('blogname') . "\n";
|
286 |
|
@@ -364,18 +316,21 @@ class subscribe2 {
|
|
364 |
/**
|
365 |
Sends an email notification of a new post
|
366 |
*/
|
367 |
-
function publish($id = 0) {
|
368 |
-
if (
|
369 |
|
370 |
// are we doing daily digests? If so, don't send anything now
|
371 |
-
if (
|
372 |
|
373 |
// we need to determine whether this is a new post, or an edit
|
374 |
-
if ($
|
375 |
-
//
|
376 |
-
|
377 |
-
|
378 |
-
|
|
|
|
|
|
|
379 |
}
|
380 |
|
381 |
$post_cats = wp_get_post_cats('1', $id);
|
@@ -383,7 +338,7 @@ class subscribe2 {
|
|
383 |
$check = false;
|
384 |
// is the current post assigned to any categories
|
385 |
// which should not generate a notification email?
|
386 |
-
foreach (explode(',', $this->
|
387 |
if (in_array($cat, $post_cats)) {
|
388 |
$check = true;
|
389 |
}
|
@@ -402,6 +357,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 |
}
|
@@ -466,8 +434,8 @@ class subscribe2 {
|
|
466 |
$excerpt = implode(' ', $words);
|
467 |
}
|
468 |
}
|
469 |
-
|
470 |
}
|
|
|
471 |
// first we send plaintext summary emails
|
472 |
$body = str_replace('POST', $excerpt, $mailtext);
|
473 |
$registered = $this->get_registered("cats=$post_cats_string&format=text&amount=excerpt");
|
@@ -568,19 +536,6 @@ class subscribe2 {
|
|
568 |
} // end send_confirm()
|
569 |
|
570 |
/* ===== Category functions ===== */
|
571 |
-
/**
|
572 |
-
Returns a comma-separated list of category IDs which should not generate notifications
|
573 |
-
*/
|
574 |
-
function get_excluded_cats() {
|
575 |
-
if ('' != $this->excluded_cats) {
|
576 |
-
return $this->excluded_cats;
|
577 |
-
} else {
|
578 |
-
global $wpdb;
|
579 |
-
$this->excluded_cats = $this->subscribe2_options['exclude'];
|
580 |
-
return $this->excluded_cats;
|
581 |
-
}
|
582 |
-
} // end get_excluded_cats()
|
583 |
-
|
584 |
/**
|
585 |
Return either a comma-separated list of all the category IDs in the blog or an array of cat_ID => cat_name
|
586 |
*/
|
@@ -931,18 +886,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', $
|
944 |
-
foreach(explode(',', $
|
945 |
-
update_usermeta($user_id, 's2_cat' . $
|
946 |
}
|
947 |
update_usermeta($user_id, 's2_format', 'text');
|
948 |
update_usermeta($user_id, 's2_excerpt', 'excerpt');
|
@@ -967,7 +918,9 @@ class subscribe2 {
|
|
967 |
update_usermeta($user_id, 's2_format', 'text');
|
968 |
update_usermeta($user_id, 's2_excerpt', 'excerpt');
|
969 |
}
|
970 |
-
}
|
|
|
|
|
971 |
}
|
972 |
}
|
973 |
return $user_id;
|
@@ -1002,8 +955,8 @@ class subscribe2 {
|
|
1002 |
update_usermeta($user_ID, 's2_cat' . $id, "$id");
|
1003 |
}
|
1004 |
}
|
1005 |
-
|
1006 |
-
|
1007 |
}
|
1008 |
} // end subscribe_registered_users
|
1009 |
|
@@ -1041,7 +994,7 @@ class subscribe2 {
|
|
1041 |
foreach ($cats as $id) {
|
1042 |
delete_usermeta($user_ID, 's2_cat' . $id, "$id");
|
1043 |
}
|
1044 |
-
update_usermeta($user_ID, 's2_subscribed', '');
|
1045 |
}
|
1046 |
}
|
1047 |
} // end unsubscribe_registered_users
|
@@ -1320,24 +1273,6 @@ class subscribe2 {
|
|
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;
|
@@ -1377,12 +1312,7 @@ class subscribe2 {
|
|
1377 |
if ('admin' == $this->subscribe2_options['sender']) {
|
1378 |
echo "checked=\"checked\" ";
|
1379 |
}
|
1380 |
-
echo " /> " . __('Blog Admin', 'subscribe2') . "<br
|
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>";
|
@@ -1412,7 +1342,7 @@ class subscribe2 {
|
|
1412 |
|
1413 |
// excluded categories
|
1414 |
echo "<h2>" . __('Excluded Categories', 'subscribe2') . "</h2>\r\n";
|
1415 |
-
$this->display_category_form(explode(',', $this->
|
1416 |
echo "<center><input type=\"checkbox\" name=\"reg_override\" value=\"1\"";
|
1417 |
if ('1' == $this->subscribe2_options['reg_override']) {
|
1418 |
echo " checked=\"checked\"";
|
@@ -1515,7 +1445,7 @@ class subscribe2 {
|
|
1515 |
delete_usermeta($user_ID, "s2_cat" . $cat);
|
1516 |
}
|
1517 |
}
|
1518 |
-
|
1519 |
} else {
|
1520 |
if (!is_array($cats)) {
|
1521 |
$cats = array($_POST['category']);
|
@@ -1547,7 +1477,7 @@ class subscribe2 {
|
|
1547 |
wp_nonce_field('subscribe2-user_subscribers' . $s2nonce);
|
1548 |
}
|
1549 |
echo "<input type=\"hidden\" name=\"s2_admin\" value=\"user\" />";
|
1550 |
-
if (
|
1551 |
echo __('Receive email as', 'subscribe2') . ": ";
|
1552 |
echo "<input type=\"radio\" name=\"s2_format\" value=\"html\"";
|
1553 |
if ('html' == get_usermeta($user_ID, 's2_format')) {
|
@@ -1673,12 +1603,11 @@ class subscribe2 {
|
|
1673 |
function display_category_form($selected = array(), $override = 1) {
|
1674 |
global $wpdb;
|
1675 |
|
1676 |
-
$all_cats =
|
1677 |
-
|
1678 |
if (0 == $override) {
|
1679 |
// registered users are not allowed to subscribe to
|
1680 |
// excluded categories
|
1681 |
-
foreach (explode(',', $this->
|
1682 |
$category = get_category($cat);
|
1683 |
$excluded[$cat] = $category->cat_name;
|
1684 |
}
|
@@ -1688,26 +1617,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\"
|
1692 |
-
echo "<tr valign=\"top\"><td width=\"50%\" align=\"left\"
|
1693 |
-
foreach ($all_cats as $
|
1694 |
if ( ($i >= $half) && (0 == $j) ){
|
1695 |
-
echo "</td><td width=\"50%\" align=\"left\"
|
1696 |
$j++;
|
1697 |
}
|
1698 |
if (0 == $j) {
|
1699 |
-
echo "<input type=\"checkbox\" name=\"category[]\" value=\"" . $
|
1700 |
-
if (in_array($
|
1701 |
echo " checked=\"checked\" ";
|
1702 |
}
|
1703 |
-
echo " /> " . $
|
1704 |
} else {
|
1705 |
|
1706 |
-
echo "<input type=\"checkbox\" name=\"category[]\" value=\"" . $
|
1707 |
-
if (in_array($
|
1708 |
echo " checked=\"checked\" ";
|
1709 |
}
|
1710 |
-
echo " /> " . $
|
1711 |
}
|
1712 |
$i++;
|
1713 |
}
|
@@ -1732,8 +1661,6 @@ class subscribe2 {
|
|
1732 |
'unconfirmed' => ' ' . __('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 +1673,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 ($
|
1750 |
-
$count[$
|
1751 |
}
|
1752 |
|
1753 |
// do have actually have some subscribers?
|
@@ -1770,11 +1697,12 @@ class subscribe2 {
|
|
1770 |
}
|
1771 |
|
1772 |
if ($count['registered'] > 0) {
|
1773 |
-
foreach ($
|
1774 |
-
if (in_array($
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
|
|
1778 |
}
|
1779 |
}
|
1780 |
echo "</select>";
|
@@ -1783,31 +1711,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 +1722,7 @@ class subscribe2 {
|
|
1819 |
global $user_ID;
|
1820 |
get_currentuserinfo();
|
1821 |
if ($user_ID) {
|
1822 |
-
|
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;
|
@@ -1877,7 +1776,7 @@ class subscribe2 {
|
|
1877 |
/**
|
1878 |
Overrides the default query when handling a (un)subscription confirmation
|
1879 |
This is basically a trick: if the s2 variable is in the query string, just grab the first static page
|
1880 |
-
and override it's contents later with title_filter()
|
1881 |
*/
|
1882 |
function query_filter() {
|
1883 |
// don't interfere if we've already done our thing
|
@@ -1885,7 +1784,7 @@ class subscribe2 {
|
|
1885 |
|
1886 |
global $wpdb;
|
1887 |
|
1888 |
-
if ( (defined('S2PAGE')) && (0
|
1889 |
return "page_id=" . S2PAGE;
|
1890 |
} else {
|
1891 |
$id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_status='static' LIMIT 1");
|
@@ -1906,33 +1805,50 @@ class subscribe2 {
|
|
1906 |
return __('Subscription Confirmation', 'subscribe2');
|
1907 |
} // end title_filter()
|
1908 |
|
|
|
1909 |
/**
|
1910 |
-
|
1911 |
*/
|
1912 |
-
function
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1917 |
|
1918 |
-
/* ===== wp-cron functions ===== */
|
1919 |
/**
|
1920 |
Send a daily digest of today's new posts
|
1921 |
*/
|
1922 |
-
function
|
1923 |
global $wpdb;
|
1924 |
|
1925 |
-
// collect posts
|
1926 |
-
$
|
1927 |
-
$
|
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 (
|
1936 |
|
1937 |
// if we have posts, let's prepare the digest
|
1938 |
foreach ($posts as $post) {
|
@@ -1941,7 +1857,7 @@ class subscribe2 {
|
|
1941 |
$check = false;
|
1942 |
// is the current post assigned to any categories
|
1943 |
// which should not generate a notification email?
|
1944 |
-
foreach (explode(',', $this->
|
1945 |
if (in_array($cat, $post_cats)) {
|
1946 |
$check = true;
|
1947 |
}
|
@@ -1974,7 +1890,8 @@ 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']) {
|
1980 |
// get author details
|
@@ -1985,38 +1902,68 @@ class subscribe2 {
|
|
1985 |
}
|
1986 |
$this->myemail = $user->user_email;
|
1987 |
$this->myname = $user->display_name;
|
1988 |
-
|
1989 |
-
$
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000 |
|
2001 |
/* ===== Our constructor ===== */
|
2002 |
/**
|
2003 |
Subscribe2 constructor
|
2004 |
*/
|
2005 |
-
function
|
2006 |
-
global $table_prefix;
|
2007 |
-
|
2008 |
load_plugin_textdomain('subscribe2', 'wp-content/plugins/subscribe2');
|
2009 |
|
2010 |
// load the options
|
2011 |
$this->subscribe2_options = array();
|
2012 |
$this->subscribe2_options = get_option('subscribe2_options');
|
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 |
-
|
2020 |
}
|
2021 |
|
2022 |
if (isset($_GET['s2'])) {
|
@@ -2028,22 +1975,49 @@ 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 |
-
|
2035 |
-
|
2036 |
-
|
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();
|
2046 |
} // end subscribe2()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2047 |
|
2048 |
/* ===== our variables ===== */
|
2049 |
// cache variables
|
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.17
|
7 |
Author: Matthew Robinson
|
8 |
Author URI: http://subscribe2.wordpress.com
|
9 |
*/
|
29 |
http://www.gnu.org/licenses/gpl.html
|
30 |
*/
|
31 |
|
32 |
+
// If you are on a host that limits the number of recipients
|
33 |
// permitted on each outgoing email message
|
34 |
+
// change the value on the line below 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 on the line below.
|
40 |
define('S2PAGE', '0');
|
41 |
|
42 |
+
// change the value below to TRUE if you want a daily digest
|
43 |
+
// of the days posts sent to your subscribers
|
44 |
+
define('S2DIGEST', false);
|
45 |
+
|
46 |
+
// our version number. Don't touch this or any line below
|
47 |
+
// unless you know exacly what you are doing
|
48 |
+
define('S2VERSION', '2.2.17');
|
49 |
+
|
50 |
+
// use Owen's excellent ButtonSnap library
|
51 |
+
require(ABSPATH . '/wp-content/plugins/buttonsnap.php');
|
52 |
+
|
53 |
+
$mysubscribe2 = new s2class;
|
54 |
+
$mysubscribe2->s2init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
// start our class
|
57 |
+
class s2class {
|
58 |
// variables and constructor are declared at the end
|
59 |
|
60 |
/**
|
65 |
|
66 |
$this->please_log_in = "<p>" . __('To manage your subscription options please ', 'subscribe2') . "<a href=\"" . get_settings('siteurl') . "/wp-login.php\">login</a>.</p>";
|
67 |
|
68 |
+
$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>";
|
|
|
|
|
69 |
|
70 |
$this->confirmation_sent = "<p>" . __('A confirmation message is on its way!', 'subscribe2') . "</p>";
|
71 |
|
108 |
function admin_menu() {
|
109 |
add_management_page(__('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), "manage_options", __FILE__, array(&$this, 'manage_menu'));
|
110 |
add_options_page(__('Subscribe2 Options', 'subscribe2'), __('Subscribe2','subscribe2'), "manage_options", __FILE__, array(&$this, 'options_menu'));
|
111 |
+
add_submenu_page('profile.php', __('Subscriptions', 'subscribe2'), __('Subscriptions', 'subscribe2'), "read", __FILE__, array(&$this, 'user_menu'));
|
112 |
+
add_submenu_page('post.php', __('Mail Subscribers','subscribe2'), __('Mail Subscribers', 'subscribe2'),"manage_options", __FILE__, array(&$this, 'write_menu'));
|
|
|
|
|
|
|
|
|
113 |
$s2nonce = md5('subscribe2');
|
114 |
}
|
115 |
|
131 |
echo "</script>\r\n";
|
132 |
}
|
133 |
|
|
|
|
|
|
|
|
|
|
|
134 |
/* ===== Install, upgrade, reset ===== */
|
135 |
/**
|
136 |
Install our table
|
187 |
}
|
188 |
$this->subscribe2_options['version'] = S2VERSION;
|
189 |
//double check that the options are in the database
|
190 |
+
require(ABSPATH . "/wp-content/plugins/subscribe2/include.php");
|
191 |
update_option('subscribe2_options', $this->subscribe2_options);
|
192 |
} // end upgrade()
|
193 |
|
231 |
$this->myname = $admin->display_name;
|
232 |
$this->myemail = $admin->user_email;
|
233 |
}
|
234 |
+
$headers = "From: " . $this->myname . " <" . $this->myemail . ">\n";
|
235 |
+
$headers .= "Return-Path: <" . $this->myemail . ">\n";
|
236 |
$headers .= "X-Mailer:PHP" . phpversion() . "\n";
|
237 |
$headers .= "Precedence: list\nList-Id: " . get_settings('blogname') . "\n";
|
238 |
|
316 |
/**
|
317 |
Sends an email notification of a new post
|
318 |
*/
|
319 |
+
function publish($id = 0, $cron = 0) {
|
320 |
+
if (!$id) { return $id; }
|
321 |
|
322 |
// are we doing daily digests? If so, don't send anything now
|
323 |
+
if ( (defined('S2DIGEST')) && (true == S2DIGEST) ) { return; }
|
324 |
|
325 |
// we need to determine whether this is a new post, or an edit
|
326 |
+
if (0 == $cron) {
|
327 |
+
// we're not being called from WP-Cron
|
328 |
+
if ($this->private) {
|
329 |
+
// this post was published from draft status
|
330 |
+
// OR is an edit of an existing post
|
331 |
+
// so send no notification
|
332 |
+
return $id;
|
333 |
+
}
|
334 |
}
|
335 |
|
336 |
$post_cats = wp_get_post_cats('1', $id);
|
338 |
$check = false;
|
339 |
// is the current post assigned to any categories
|
340 |
// which should not generate a notification email?
|
341 |
+
foreach (explode(',', $this->subscribe2_options['exclude']) as $cat) {
|
342 |
if (in_array($cat, $post_cats)) {
|
343 |
$check = true;
|
344 |
}
|
357 |
$post =& get_post($id);
|
358 |
// is this post set in the future?
|
359 |
if ($post->post_date > current_time('mysql')) {
|
360 |
+
// is wp-cron installed?
|
361 |
+
if (function_exists('wp_cron_init')) {
|
362 |
+
// are we doing daily digests?
|
363 |
+
if ( (defined('S2DIGEST')) && (false == S2DIGEST) ) {
|
364 |
+
// not doing daily digests, so
|
365 |
+
// add this post to the list of
|
366 |
+
// future posts
|
367 |
+
$our_post = array('id' => $id, 'date' => $post->post_date);
|
368 |
+
$future_posts = get_option('s2_future_posts');
|
369 |
+
$future_posts[] = $our_post;
|
370 |
+
update_option('s2_future_posts', $future_posts);
|
371 |
+
}
|
372 |
+
}
|
373 |
// bail out
|
374 |
return $id;
|
375 |
}
|
434 |
$excerpt = implode(' ', $words);
|
435 |
}
|
436 |
}
|
|
|
437 |
}
|
438 |
+
|
439 |
// first we send plaintext summary emails
|
440 |
$body = str_replace('POST', $excerpt, $mailtext);
|
441 |
$registered = $this->get_registered("cats=$post_cats_string&format=text&amount=excerpt");
|
536 |
} // end send_confirm()
|
537 |
|
538 |
/* ===== Category functions ===== */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
539 |
/**
|
540 |
Return either a comma-separated list of all the category IDs in the blog or an array of cat_ID => cat_name
|
541 |
*/
|
886 |
|
887 |
if (0 == $user_id) { return $user_id; }
|
888 |
$user = get_userdata($user_id);
|
|
|
|
|
|
|
|
|
889 |
|
890 |
// has this user previously signed up for email notification?
|
891 |
if (false !== $this->is_public($user->user_email)) {
|
892 |
// delete this user from the public table, and subscribe them to all the categories
|
893 |
$this->delete($user->user_email);
|
894 |
+
update_usermeta($user_id, 's2_subscribed', $this->get_all_categories());
|
895 |
+
foreach(explode(',', $this->get_all_categories()) as $cat) {
|
896 |
+
update_usermeta($user_id, 's2_cat' . $cat, "$cat");
|
897 |
}
|
898 |
update_usermeta($user_id, 's2_format', 'text');
|
899 |
update_usermeta($user_id, 's2_excerpt', 'excerpt');
|
918 |
update_usermeta($user_id, 's2_format', 'text');
|
919 |
update_usermeta($user_id, 's2_excerpt', 'excerpt');
|
920 |
}
|
921 |
+
} else {
|
922 |
+
update_usermeta($user_id, 's2_subscribed', '-1');
|
923 |
+
}
|
924 |
}
|
925 |
}
|
926 |
return $user_id;
|
955 |
update_usermeta($user_ID, 's2_cat' . $id, "$id");
|
956 |
}
|
957 |
}
|
958 |
+
$newcats = array_merge($cats, $old_cats);
|
959 |
+
update_usermeta($user_ID, 's2_subscribed', implode(',', $newcats));
|
960 |
}
|
961 |
} // end subscribe_registered_users
|
962 |
|
994 |
foreach ($cats as $id) {
|
995 |
delete_usermeta($user_ID, 's2_cat' . $id, "$id");
|
996 |
}
|
997 |
+
update_usermeta($user_ID, 's2_subscribed', '-1');
|
998 |
}
|
999 |
}
|
1000 |
} // end unsubscribe_registered_users
|
1273 |
}
|
1274 |
$this->subscribe2_options['sender'] = $sender;
|
1275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1276 |
// email templates
|
1277 |
$mailtext = $_POST['mailtext'];
|
1278 |
$this->subscribe2_options['mailtext'] = $mailtext;
|
1312 |
if ('admin' == $this->subscribe2_options['sender']) {
|
1313 |
echo "checked=\"checked\" ";
|
1314 |
}
|
1315 |
+
echo " /> " . __('Blog Admin', 'subscribe2') . "<br />\r\n";
|
|
|
|
|
|
|
|
|
|
|
1316 |
echo "<h2>" . __('Email Templates', 'subscribe2') . "</h2>\r\n";
|
1317 |
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"1\" class=\"editform\">\r\n";
|
1318 |
echo "<tr><td>";
|
1342 |
|
1343 |
// excluded categories
|
1344 |
echo "<h2>" . __('Excluded Categories', 'subscribe2') . "</h2>\r\n";
|
1345 |
+
$this->display_category_form(explode(',', $this->subscribe2_options['exclude']));
|
1346 |
echo "<center><input type=\"checkbox\" name=\"reg_override\" value=\"1\"";
|
1347 |
if ('1' == $this->subscribe2_options['reg_override']) {
|
1348 |
echo " checked=\"checked\"";
|
1445 |
delete_usermeta($user_ID, "s2_cat" . $cat);
|
1446 |
}
|
1447 |
}
|
1448 |
+
update_usermeta($user_ID, 's2_subscribed', '-1');
|
1449 |
} else {
|
1450 |
if (!is_array($cats)) {
|
1451 |
$cats = array($_POST['category']);
|
1477 |
wp_nonce_field('subscribe2-user_subscribers' . $s2nonce);
|
1478 |
}
|
1479 |
echo "<input type=\"hidden\" name=\"s2_admin\" value=\"user\" />";
|
1480 |
+
if ( (defined('S2DIGEST')) && (FALSE == S2DIGEST) ) {
|
1481 |
echo __('Receive email as', 'subscribe2') . ": ";
|
1482 |
echo "<input type=\"radio\" name=\"s2_format\" value=\"html\"";
|
1483 |
if ('html' == get_usermeta($user_ID, 's2_format')) {
|
1603 |
function display_category_form($selected = array(), $override = 1) {
|
1604 |
global $wpdb;
|
1605 |
|
1606 |
+
$all_cats = $this->get_all_categories('array');
|
|
|
1607 |
if (0 == $override) {
|
1608 |
// registered users are not allowed to subscribe to
|
1609 |
// excluded categories
|
1610 |
+
foreach (explode(',', $this->subscribe2_options['exclude']) as $cat) {
|
1611 |
$category = get_category($cat);
|
1612 |
$excluded[$cat] = $category->cat_name;
|
1613 |
}
|
1617 |
$half = (count($all_cats) / 2);
|
1618 |
$i = 0;
|
1619 |
$j = 0;
|
1620 |
+
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"5\" class=\"editform\">";
|
1621 |
+
echo "<tr valign=\"top\"><td width=\"50%\" align=\"left\">";
|
1622 |
+
foreach ($all_cats as $cat_ID => $cat_name) {
|
1623 |
if ( ($i >= $half) && (0 == $j) ){
|
1624 |
+
echo "</td><td width=\"50%\" align=\"left\">";
|
1625 |
$j++;
|
1626 |
}
|
1627 |
if (0 == $j) {
|
1628 |
+
echo "<input type=\"checkbox\" name=\"category[]\" value=\"" . $cat_ID . "\"";
|
1629 |
+
if (in_array($cat_ID, $selected)) {
|
1630 |
echo " checked=\"checked\" ";
|
1631 |
}
|
1632 |
+
echo " /> " . $cat_name . "<br />\r\n";
|
1633 |
} else {
|
1634 |
|
1635 |
+
echo "<input type=\"checkbox\" name=\"category[]\" value=\"" . $cat_ID . "\"";
|
1636 |
+
if (in_array($cat_ID, $selected)) {
|
1637 |
echo " checked=\"checked\" ";
|
1638 |
}
|
1639 |
+
echo " /> " . $cat_name . "<br />\r\n";
|
1640 |
}
|
1641 |
$i++;
|
1642 |
}
|
1661 |
'unconfirmed' => ' ' . __('Unconfirmed', 'subscribe2'),
|
1662 |
'registered' => __('Registered Subscribers', 'subscribe2'));
|
1663 |
|
|
|
|
|
1664 |
// count the number of subscribers
|
1665 |
$count['confirmed'] = $wpdb->get_var("SELECT COUNT(id) FROM $this->public WHERE active='1'");
|
1666 |
$count['unconfirmed'] = $wpdb->get_var("SELECT COUNT(id) FROM $this->public WHERE active='0'");
|
1673 |
}
|
1674 |
$count['registered'] = $wpdb->get_var("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key='s2_subscribed'");
|
1675 |
$count['all'] = ($count['confirmed'] + $count['unconfirmed'] + $count['registered']);
|
1676 |
+
foreach ($this->get_all_categories('array') as $cat_ID => $cat_name) {
|
1677 |
+
$count[$cat_name] = $wpdb->get_var("SELECT COUNT(meta_value) FROM $wpdb->usermeta WHERE meta_key='s2_cat$cat_ID'");
|
1678 |
}
|
1679 |
|
1680 |
// do have actually have some subscribers?
|
1697 |
}
|
1698 |
|
1699 |
if ($count['registered'] > 0) {
|
1700 |
+
foreach ($this->get_all_categories('array') as $cat_ID => $cat_name) {
|
1701 |
+
if (in_array($cat_ID, $exclude)) { continue; }
|
1702 |
+
if (0 == $count[$cat_name]) { continue; }
|
1703 |
+
echo "<option value=\"$cat_ID\"";
|
1704 |
+
if ($cat_ID == $selected) { echo " selected=\"selected\" "; }
|
1705 |
+
echo "> $cat_name (" . $count[$cat_name] . ") </option>\r\n";
|
1706 |
}
|
1707 |
}
|
1708 |
echo "</select>";
|
1711 |
}
|
1712 |
} // end display_subscriber_dropdown()
|
1713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1714 |
/* ===== template and filter functions ===== */
|
1715 |
/**
|
1716 |
Display our form; also handles (un)subscribe requests
|
1722 |
global $user_ID;
|
1723 |
get_currentuserinfo();
|
1724 |
if ($user_ID) {
|
1725 |
+
$this->s2form = $this->use_profile;
|
|
|
|
|
|
|
|
|
1726 |
}
|
1727 |
if (isset($_POST['s2_action'])) {
|
1728 |
global $wpdb, $user_email;
|
1776 |
/**
|
1777 |
Overrides the default query when handling a (un)subscription confirmation
|
1778 |
This is basically a trick: if the s2 variable is in the query string, just grab the first static page
|
1779 |
+
and override it's contents later with title_filter()
|
1780 |
*/
|
1781 |
function query_filter() {
|
1782 |
// don't interfere if we've already done our thing
|
1784 |
|
1785 |
global $wpdb;
|
1786 |
|
1787 |
+
if ( (defined('S2PAGE')) && (0 != S2PAGE) ) {
|
1788 |
return "page_id=" . S2PAGE;
|
1789 |
} else {
|
1790 |
$id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_status='static' LIMIT 1");
|
1805 |
return __('Subscription Confirmation', 'subscribe2');
|
1806 |
} // end title_filter()
|
1807 |
|
1808 |
+
/* ===== wp-cron functions ===== */
|
1809 |
/**
|
1810 |
+
Send notifications for any posts that are now visible
|
1811 |
*/
|
1812 |
+
function subscribe2_hourly() {
|
1813 |
+
$future_posts = get_option('s2_future_posts');
|
1814 |
+
|
1815 |
+
// if we have no future posts, bail out
|
1816 |
+
if (!$future_posts) { return; }
|
1817 |
+
|
1818 |
+
// this will hold the posts that aren't yet visible
|
1819 |
+
$not_yet = array();
|
1820 |
+
|
1821 |
+
foreach ($future_posts as $post) {
|
1822 |
+
if ( (current_time('mysql')) > ($post['date']) ) {
|
1823 |
+
// this post is now visible, so let's
|
1824 |
+
// send a notification
|
1825 |
+
$this->publish($post['id'], 1);
|
1826 |
+
} else {
|
1827 |
+
array_push($not_yet, $post);
|
1828 |
+
}
|
1829 |
+
}
|
1830 |
+
// are the number of elements in $not_yet
|
1831 |
+
// the same as in $future posts?
|
1832 |
+
if ( (count($not_yet)) != (count($future_posts)) ) {
|
1833 |
+
// if not, then some posts have been removed
|
1834 |
+
// from $future_posts, and the remainder need
|
1835 |
+
// to be recorded back to the database
|
1836 |
+
update_option('s2_future_posts', $not_yet);
|
1837 |
+
}
|
1838 |
+
} // end subscribe2_hourly
|
1839 |
|
|
|
1840 |
/**
|
1841 |
Send a daily digest of today's new posts
|
1842 |
*/
|
1843 |
+
function subscribe2_daily() {
|
1844 |
global $wpdb;
|
1845 |
|
1846 |
+
// collect yesterday's posts
|
1847 |
+
$yesterday = date('Y-m-d', (get_option('wp_cron_daily_lastrun')-60));
|
1848 |
+
$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'");
|
|
|
1849 |
|
|
|
|
|
|
|
|
|
1850 |
// do we have any posts?
|
1851 |
+
if (!$posts) { return; }
|
1852 |
|
1853 |
// if we have posts, let's prepare the digest
|
1854 |
foreach ($posts as $post) {
|
1857 |
$check = false;
|
1858 |
// is the current post assigned to any categories
|
1859 |
// which should not generate a notification email?
|
1860 |
+
foreach (explode(',', $this->subscribe2_options['exclude']) as $cat) {
|
1861 |
if (in_array($cat, $post_cats)) {
|
1862 |
$check = true;
|
1863 |
}
|
1890 |
}
|
1891 |
|
1892 |
$author = get_userdata($post->post_author);
|
1893 |
+
$this->authorname = $author->display_name;
|
1894 |
+
|
1895 |
// do we send as admin, or post author?
|
1896 |
if ('author' == $this->subscribe2_options['sender']) {
|
1897 |
// get author details
|
1902 |
}
|
1903 |
$this->myemail = $user->user_email;
|
1904 |
$this->myname = $user->display_name;
|
1905 |
+
|
1906 |
+
$subject = '[' . stripslashes(get_settings('blogname')) . '] ' . __('Daily Digest', 'subscribe2') . ' ' . $yesterday;
|
|
|
|
|
|
|
1907 |
$public = $this->get_public();
|
1908 |
$registered = $this->get_registered();
|
1909 |
$recipients = array_merge((array)$public, (array)$registered);
|
1910 |
$mailtext = $this->substitute(stripslashes($this->subscribe2_options['mailtext']));
|
1911 |
$body = str_replace('POST', $message, $mailtext);
|
1912 |
$this->mail($recipients, $subject, $body);
|
1913 |
+
} // end subscribe2_daily
|
1914 |
+
|
1915 |
+
/**
|
1916 |
+
If the to-be-deleted post was future-dated, remove it from the list of future-dated posts
|
1917 |
+
*/
|
1918 |
+
function delete_future($id = 0) {
|
1919 |
+
if (0 == $id) { return $id; }
|
1920 |
+
|
1921 |
+
$future = get_settings('s2_future_posts');
|
1922 |
+
// if we have no future-dated posts scheduled, bail out
|
1923 |
+
if (!$future) {
|
1924 |
+
return $id;
|
1925 |
+
}
|
1926 |
+
foreach ($future as $post) {
|
1927 |
+
// is the deleted post in the list of future posts?
|
1928 |
+
if ($id == $post['id']) {
|
1929 |
+
// skip it
|
1930 |
+
continue;
|
1931 |
+
} else {
|
1932 |
+
// add this to the new list of future posts
|
1933 |
+
$new_future[] = $post;
|
1934 |
+
}
|
1935 |
+
}
|
1936 |
+
if ($new_future != $future) {
|
1937 |
+
update_option('s2_future_posts', $new_future);
|
1938 |
+
}
|
1939 |
+
} // end delete_future()
|
1940 |
|
1941 |
/* ===== Our constructor ===== */
|
1942 |
/**
|
1943 |
Subscribe2 constructor
|
1944 |
*/
|
1945 |
+
function s2init() {
|
|
|
|
|
1946 |
load_plugin_textdomain('subscribe2', 'wp-content/plugins/subscribe2');
|
1947 |
|
1948 |
// load the options
|
1949 |
$this->subscribe2_options = array();
|
1950 |
$this->subscribe2_options = get_option('subscribe2_options');
|
1951 |
|
1952 |
+
add_action('init', array(&$this, 'subscribe2'));
|
1953 |
+
if('1' == $this->subscribe2_options['show_button']) {
|
1954 |
+
add_action('init', array(&$this, 'button_init'));
|
1955 |
+
}
|
1956 |
+
}
|
1957 |
+
|
1958 |
+
function subscribe2() {
|
1959 |
+
global $table_prefix;
|
1960 |
+
|
1961 |
// do we need to install anything?
|
1962 |
$this->public = $table_prefix . "subscribe2";
|
1963 |
if(mysql_query("SELECT COUNT(*) FROM ".$this->public)==FALSE) { $this->install(); }
|
1964 |
//do we need to upgrade anything?
|
1965 |
if ($this->subscribe2_options['version'] !== S2VERSION) {
|
1966 |
+
add_action('shutdown', array(&$this, 'upgrade'));
|
1967 |
}
|
1968 |
|
1969 |
if (isset($_GET['s2'])) {
|
1975 |
|
1976 |
add_action('admin_head', array(&$this, 'admin_head'));
|
1977 |
add_action('admin_menu', array(&$this, 'admin_menu'));
|
1978 |
+
add_action('publish_post', array(&$this, 'publish'));
|
1979 |
+
add_action('edit_post', array(&$this, 'edit'));
|
1980 |
+
add_action('private_to_published', array(&$this, 'private2publish'));
|
1981 |
add_action('user_register', array(&$this, 'register'));
|
1982 |
add_action('create_category', array(&$this, 'autosub_new_category'));
|
1983 |
add_filter('the_content', array(&$this, 'filter'));
|
1984 |
+
add_action('wp_cron_hourly', array(&$this, 'subscribe2_hourly'));
|
1985 |
+
if ( (defined('S2DIGEST')) && (TRUE == S2DIGEST) ) {
|
1986 |
+
add_action('wp_cron_daily', array(&$this, 'subscribe2_daily'));
|
|
|
|
|
|
|
|
|
|
|
1987 |
}
|
1988 |
+
add_action('delete_post', array(&$this, 'delete_future'));
|
1989 |
|
1990 |
// load our strings
|
1991 |
$this->load_strings();
|
1992 |
} // end subscribe2()
|
1993 |
+
|
1994 |
+
/* ===== ButtonSnap configuration ===== */
|
1995 |
+
/**
|
1996 |
+
Register our button in the QuickTags bar
|
1997 |
+
*/
|
1998 |
+
function button_init() {
|
1999 |
+
$url = get_settings('siteurl') . '/wp-content/plugins/subscribe2/s2_button.png';
|
2000 |
+
buttonsnap_textbutton($url, 'Subscribe2', '<!--subscribe2-->');
|
2001 |
+
buttonsnap_register_marker('subscribe2', 's2_marker');
|
2002 |
+
}
|
2003 |
+
|
2004 |
+
/**
|
2005 |
+
Style a marker in the Rich Text Editor for our tag
|
2006 |
+
By default, the RTE suppresses output of HTML comments, so this places a CSS style on our token in order to make it display
|
2007 |
+
*/
|
2008 |
+
function subscribe2_css() {
|
2009 |
+
$marker_url = get_settings('siteurl') . '/wp-content/plugins/subscribe2/s2_marker.png';
|
2010 |
+
echo "
|
2011 |
+
.s2_marker {
|
2012 |
+
display: block;
|
2013 |
+
height: 45px;
|
2014 |
+
margin-top: 5px;
|
2015 |
+
background-image: url({$marker_url});
|
2016 |
+
background-repeat: no-repeat;
|
2017 |
+
background-position: center;
|
2018 |
+
}
|
2019 |
+
";
|
2020 |
+
}
|
2021 |
|
2022 |
/* ===== our variables ===== */
|
2023 |
// cache variables
|
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-
|
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,433 @@ msgstr ""
|
|
16 |
"Content-Type: text/plain; charset=CHARSET\n"
|
17 |
"Content-Transfer-Encoding: 8bit\n"
|
18 |
|
19 |
-
#: subscribe2.php:
|
20 |
msgid "To manage your subscription options please "
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: subscribe2.php:
|
24 |
msgid "You may manage your subscription options from your "
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: subscribe2.php:
|
28 |
msgid "A confirmation message is on its way!"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: subscribe2.php:
|
32 |
msgid "That email address is already subscribed."
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: subscribe2.php:
|
36 |
msgid "That email address is not subscribed."
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: subscribe2.php:
|
40 |
msgid "Sorry, but that does not look like an email address to me."
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: subscribe2.php:
|
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:
|
50 |
msgid "Message sent!"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: subscribe2.php:
|
54 |
msgid "Your email:"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: subscribe2.php:
|
58 |
msgid "Subscribe"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: subscribe2.php:
|
62 |
msgid "Unsubscribe"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: subscribe2.php:
|
66 |
msgid "Send"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: subscribe2.php:
|
70 |
msgid "No such email address is registered."
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: subscribe2.php:
|
74 |
msgid "You have successfully subscribed!"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: subscribe2.php:
|
78 |
msgid "You have successfully unsubscribed."
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: subscribe2.php:
|
82 |
msgid "Please confirm your request"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: subscribe2.php:
|
86 |
msgid "Subscription Reminder"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: subscribe2.php:
|
90 |
msgid "subscribe"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: subscribe2.php:
|
94 |
msgid "unsubscribe"
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: subscribe2.php:
|
98 |
msgid "Options saved!"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: subscribe2.php:
|
102 |
msgid "Options reset!"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: subscribe2.php:
|
106 |
msgid "Subscribers"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: subscribe2.php:
|
110 |
msgid "Subscribe2 Options"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: subscribe2.php:
|
114 |
msgid "Subscribe2"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: subscribe2.php:
|
118 |
msgid "Subscriptions"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: subscribe2.php:
|
122 |
msgid "Mail Subscribers"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: subscribe2.php:
|
126 |
-
msgid "Once Weekly"
|
127 |
-
msgstr ""
|
128 |
-
|
129 |
-
#: subscribe2.php:780
|
130 |
msgid "New subscriber"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: subscribe2.php:
|
134 |
msgid "subscribed to email notifications!"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: subscribe2.php:
|
138 |
msgid "Address(es) subscribed!"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: subscribe2.php:
|
142 |
msgid "deleted!"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: subscribe2.php:
|
146 |
msgid "status changed!"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: subscribe2.php:
|
150 |
msgid "Reminder Email(s) Sent!"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: subscribe2.php:
|
154 |
msgid "CSV File Created in wp-content"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: subscribe2.php:
|
158 |
msgid "Registered Users Subscribed!"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: subscribe2.php:
|
162 |
msgid "Registered Users Unsubscribed!"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: subscribe2.php:
|
166 |
msgid "Subscribe Addresses"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: subscribe2.php:
|
170 |
msgid "Enter addresses, one per line or comma-seperated"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: subscribe2.php:
|
174 |
msgid "Filter"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: subscribe2.php:
|
178 |
msgid ""
|
179 |
"Registered on the left, confirmed in the middle, unconfirmed on the right"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: subscribe2.php:
|
183 |
msgid "Save Emails to CSV File"
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: subscribe2.php:
|
187 |
msgid "NONE"
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: subscribe2.php:
|
191 |
msgid "Send Reminder Email"
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: subscribe2.php:
|
195 |
msgid "Categories"
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: subscribe2.php:
|
199 |
msgid ""
|
200 |
"Existing Registered Users can be automatically (un)subscribed to categories "
|
201 |
"using this section."
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: subscribe2.php:
|
205 |
msgid "Consider User Privacy as changes cannot be undone"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: subscribe2.php:
|
209 |
msgid "Delivery Options"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: subscribe2.php:
|
213 |
msgid "Send Email From"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: subscribe2.php:
|
217 |
msgid "Author of the post"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: subscribe2.php:
|
221 |
msgid "Blog Admin"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: subscribe2.php:
|
225 |
-
msgid "Send Email as Digest"
|
226 |
-
msgstr ""
|
227 |
-
|
228 |
-
#: subscribe2.php:1386
|
229 |
msgid "Email Templates"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: subscribe2.php:
|
233 |
msgid "New Post email (must not be empty)"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: subscribe2.php:
|
237 |
msgid "Message substitions"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: subscribe2.php:
|
241 |
msgid "the post's title"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: subscribe2.php:
|
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:
|
251 |
msgid "the post's permalink"
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: subscribe2.php:
|
255 |
msgid "the admin or post author's name"
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: subscribe2.php:
|
259 |
msgid "the admin or post author's email"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: subscribe2.php:
|
263 |
msgid "the post author's name"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: subscribe2.php:
|
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:
|
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:
|
279 |
msgid "Subscribe / Unsubscribe confirmation email"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: subscribe2.php:
|
283 |
msgid "Reminder email to Unconfirmed Subscribers"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: subscribe2.php:
|
287 |
msgid "Excluded Categories"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: subscribe2.php:
|
291 |
msgid "Allow registered users to subscribe to excluded categories?"
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: subscribe2.php:
|
295 |
msgid "Writing Options"
|
296 |
msgstr ""
|
297 |
|
298 |
-
#: subscribe2.php:
|
299 |
msgid "Show the Subscribe2 button on the Write toolbar?"
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: subscribe2.php:
|
303 |
msgid "Auto Subscribe"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: subscribe2.php:
|
307 |
msgid "Automatically subscribe new users registering with your blog."
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: subscribe2.php:
|
311 |
msgid "Yes"
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: subscribe2.php:
|
315 |
msgid "No"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: subscribe2.php:
|
319 |
msgid "Auto-subscribe users to receive email as"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: subscribe2.php:
|
323 |
msgid "HTML"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: subscribe2.php:
|
327 |
msgid "Plain Text - Full"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: subscribe2.php:
|
331 |
msgid "Plain Text - Excerpt"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: subscribe2.php:
|
335 |
msgid "Barred Domains"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: subscribe2.php:
|
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:
|
345 |
msgid "Submit"
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: subscribe2.php:
|
349 |
msgid "Reset Default"
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: subscribe2.php:
|
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:
|
359 |
msgid "RESET"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: subscribe2.php:
|
363 |
msgid "Subscription preferences updated."
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: subscribe2.php:
|
367 |
msgid "Notification Settings"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: subscribe2.php:
|
371 |
msgid "Receive email as"
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: subscribe2.php:
|
375 |
msgid "Plain Text"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: subscribe2.php:
|
379 |
msgid "Email contains"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: subscribe2.php:
|
383 |
msgid "Excerpt Only"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: subscribe2.php:
|
387 |
msgid "Full Post"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: subscribe2.php:
|
391 |
msgid "Note: HTML format will always deliver the full post."
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: subscribe2.php:
|
395 |
msgid "Automatically subscribe me to newly created categories"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: subscribe2.php:
|
399 |
msgid "Subscribed Categories"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: subscribe2.php:
|
403 |
msgid "Receive daily summary of new posts?"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: subscribe2.php:
|
407 |
msgid "Update Preferences »"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: subscribe2.php:
|
411 |
msgid "Send email to all subscribers"
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: subscribe2.php:
|
415 |
msgid "Subject"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: subscribe2.php:
|
419 |
msgid "A message from "
|
420 |
msgstr ""
|
421 |
|
422 |
-
#: subscribe2.php:
|
423 |
msgid "Recipients: "
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: subscribe2.php:
|
427 |
msgid "Select / Unselect All"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: subscribe2.php:
|
431 |
msgid "All Subscribers"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: subscribe2.php:
|
435 |
msgid "Public Subscribers"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: subscribe2.php:
|
439 |
msgid "Confirmed"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#: subscribe2.php:
|
443 |
msgid "Unconfirmed"
|
444 |
msgstr ""
|
445 |
|
446 |
-
#: subscribe2.php:
|
447 |
msgid "Registered Subscribers"
|
448 |
msgstr ""
|
449 |
|
450 |
-
#: subscribe2.php:
|
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:
|
463 |
-
msgid "Digest
|
464 |
msgstr ""
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: PACKAGE VERSION\n"
|
10 |
"Report-Msgid-Bugs-To: \n"
|
11 |
+
"POT-Creation-Date: 2007-04-24 12:40+0100\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:66
|
20 |
msgid "To manage your subscription options please "
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: subscribe2.php:68
|
24 |
msgid "You may manage your subscription options from your "
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: subscribe2.php:70
|
28 |
msgid "A confirmation message is on its way!"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: subscribe2.php:72
|
32 |
msgid "That email address is already subscribed."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: subscribe2.php:74
|
36 |
msgid "That email address is not subscribed."
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: subscribe2.php:76
|
40 |
msgid "Sorry, but that does not look like an email address to me."
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: subscribe2.php:78
|
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:80
|
50 |
msgid "Message sent!"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: subscribe2.php:82
|
54 |
msgid "Your email:"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: subscribe2.php:82 subscribe2.php:1138 subscribe2.php:1230
|
58 |
msgid "Subscribe"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: subscribe2.php:82 subscribe2.php:1231
|
62 |
msgid "Unsubscribe"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: subscribe2.php:82 subscribe2.php:1589
|
66 |
msgid "Send"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: subscribe2.php:85
|
70 |
msgid "No such email address is registered."
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: subscribe2.php:87
|
74 |
msgid "You have successfully subscribed!"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: subscribe2.php:89
|
78 |
msgid "You have successfully unsubscribed."
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: subscribe2.php:91
|
82 |
msgid "Please confirm your request"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: subscribe2.php:93
|
86 |
msgid "Subscription Reminder"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: subscribe2.php:95
|
90 |
msgid "subscribe"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: subscribe2.php:97
|
94 |
msgid "unsubscribe"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: subscribe2.php:100
|
98 |
msgid "Options saved!"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: subscribe2.php:101
|
102 |
msgid "Options reset!"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: subscribe2.php:109 subscribe2.php:1143
|
106 |
msgid "Subscribers"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: subscribe2.php:110
|
110 |
msgid "Subscribe2 Options"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: subscribe2.php:110
|
114 |
msgid "Subscribe2"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: subscribe2.php:111
|
118 |
msgid "Subscriptions"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: subscribe2.php:112
|
122 |
msgid "Mail Subscribers"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: subscribe2.php:735
|
|
|
|
|
|
|
|
|
126 |
msgid "New subscriber"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: subscribe2.php:736
|
130 |
msgid "subscribed to email notifications!"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: subscribe2.php:1051
|
134 |
msgid "Address(es) subscribed!"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: subscribe2.php:1054
|
138 |
msgid "deleted!"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: subscribe2.php:1057
|
142 |
msgid "status changed!"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: subscribe2.php:1060
|
146 |
msgid "Reminder Email(s) Sent!"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: subscribe2.php:1063
|
150 |
msgid "CSV File Created in wp-content"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: subscribe2.php:1066
|
154 |
msgid "Registered Users Subscribed!"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: subscribe2.php:1069
|
158 |
msgid "Registered Users Unsubscribed!"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: subscribe2.php:1131
|
162 |
msgid "Subscribe Addresses"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: subscribe2.php:1136
|
166 |
msgid "Enter addresses, one per line or comma-seperated"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: subscribe2.php:1145
|
170 |
msgid "Filter"
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: subscribe2.php:1149
|
174 |
msgid ""
|
175 |
"Registered on the left, confirmed in the middle, unconfirmed on the right"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: subscribe2.php:1158
|
179 |
msgid "Save Emails to CSV File"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: subscribe2.php:1204
|
183 |
msgid "NONE"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: subscribe2.php:1214
|
187 |
msgid "Send Reminder Email"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: subscribe2.php:1221
|
191 |
msgid "Categories"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: subscribe2.php:1222
|
195 |
msgid ""
|
196 |
"Existing Registered Users can be automatically (un)subscribed to categories "
|
197 |
"using this section."
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: subscribe2.php:1223
|
201 |
msgid "Consider User Privacy as changes cannot be undone"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: subscribe2.php:1304
|
205 |
msgid "Delivery Options"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: subscribe2.php:1305
|
209 |
msgid "Send Email From"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: subscribe2.php:1310
|
213 |
msgid "Author of the post"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: subscribe2.php:1315
|
217 |
msgid "Blog Admin"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: subscribe2.php:1316
|
|
|
|
|
|
|
|
|
221 |
msgid "Email Templates"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: subscribe2.php:1319
|
225 |
msgid "New Post email (must not be empty)"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: subscribe2.php:1323
|
229 |
msgid "Message substitions"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: subscribe2.php:1327
|
233 |
msgid "the post's title"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: subscribe2.php:1328
|
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:1329
|
243 |
msgid "the post's permalink"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: subscribe2.php:1330
|
247 |
msgid "the admin or post author's name"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: subscribe2.php:1331
|
251 |
msgid "the admin or post author's email"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: subscribe2.php:1332
|
255 |
msgid "the post author's name"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: subscribe2.php:1333
|
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:1334
|
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:1336
|
271 |
msgid "Subscribe / Unsubscribe confirmation email"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: subscribe2.php:1339
|
275 |
msgid "Reminder email to Unconfirmed Subscribers"
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: subscribe2.php:1344
|
279 |
msgid "Excluded Categories"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: subscribe2.php:1350
|
283 |
msgid "Allow registered users to subscribe to excluded categories?"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: subscribe2.php:1351
|
287 |
msgid "Writing Options"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: subscribe2.php:1356
|
291 |
msgid "Show the Subscribe2 button on the Write toolbar?"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: subscribe2.php:1359
|
295 |
msgid "Auto Subscribe"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: subscribe2.php:1360
|
299 |
msgid "Automatically subscribe new users registering with your blog."
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: subscribe2.php:1365
|
303 |
msgid "Yes"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: subscribe2.php:1370
|
307 |
msgid "No"
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: subscribe2.php:1371
|
311 |
msgid "Auto-subscribe users to receive email as"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: subscribe2.php:1376 subscribe2.php:1486
|
315 |
msgid "HTML"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: subscribe2.php:1381
|
319 |
msgid "Plain Text - Full"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: subscribe2.php:1386
|
323 |
msgid "Plain Text - Excerpt"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: subscribe2.php:1389
|
327 |
msgid "Barred Domains"
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: subscribe2.php:1390
|
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:1394
|
337 |
msgid "Submit"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: subscribe2.php:1399
|
341 |
msgid "Reset Default"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: subscribe2.php:1400
|
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:1407
|
351 |
msgid "RESET"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: subscribe2.php:1427
|
355 |
msgid "Subscription preferences updated."
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: subscribe2.php:1474
|
359 |
msgid "Notification Settings"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: subscribe2.php:1481
|
363 |
msgid "Receive email as"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: subscribe2.php:1491
|
367 |
msgid "Plain Text"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: subscribe2.php:1493
|
371 |
msgid "Email contains"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: subscribe2.php:1494
|
375 |
msgid "Excerpt Only"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: subscribe2.php:1494
|
379 |
msgid "Full Post"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: subscribe2.php:1502
|
383 |
msgid "Note: HTML format will always deliver the full post."
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: subscribe2.php:1503
|
387 |
msgid "Automatically subscribe me to newly created categories"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: subscribe2.php:1515
|
391 |
msgid "Subscribed Categories"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: subscribe2.php:1520
|
395 |
msgid "Receive daily summary of new posts?"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: subscribe2.php:1533
|
399 |
msgid "Update Preferences »"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: subscribe2.php:1578
|
403 |
msgid "Send email to all subscribers"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: subscribe2.php:1583
|
407 |
msgid "Subject"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: subscribe2.php:1583
|
411 |
msgid "A message from "
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: subscribe2.php:1586
|
415 |
msgid "Recipients: "
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: subscribe2.php:1645
|
419 |
msgid "Select / Unselect All"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: subscribe2.php:1658
|
423 |
msgid "All Subscribers"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: subscribe2.php:1659
|
427 |
msgid "Public Subscribers"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: subscribe2.php:1660
|
431 |
msgid "Confirmed"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: subscribe2.php:1661
|
435 |
msgid "Unconfirmed"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: subscribe2.php:1662
|
439 |
msgid "Registered Subscribers"
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: subscribe2.php:1805
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
msgid "Subscription Confirmation"
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: subscribe2.php:1906
|
447 |
+
msgid "Daily Digest"
|
448 |
msgstr ""
|