Version Description
Download this release
Release Info
Developer | MattyRob |
Plugin | Subscribe2 |
Version | 2.5 |
Comparing to | |
See all releases |
Code changes from version 3.0 to 2.5
- ReadMe.txt +1 -56
- buttonsnap.php +6 -7
- subscribe2/include.php +0 -49
- subscribe2/subscribe2.php +1860 -2085
- subscribe2/subscribe2.pot +94 -190
ReadMe.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: MattyRob, Skippy, Ravan
|
|
3 |
Donate link: http://subscribe2.wordpress.com/donate/
|
4 |
Tags: posts, subscription, email
|
5 |
Requires at least: 2.0.x
|
6 |
-
Tested up to: 2.
|
7 |
|
8 |
Sends a list of subscribers an email notification when new posts are published to your blog
|
9 |
|
@@ -77,61 +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
|
92 |
-
|
93 |
-
Version 2.12 by Matthew Robinson
|
94 |
-
|
95 |
-
* Fix for missing Quicktags (probably since version 2.2.10)
|
96 |
-
* Fix for occasional email issue where excerpts are incomplete
|
97 |
-
|
98 |
-
Version 2.11 by Matthew Robinson
|
99 |
-
* Fixed bug that would cause all subscribers to get digest emails
|
100 |
-
* Added Select All check box to category listing
|
101 |
-
|
102 |
-
Version 2.10 by Matthew Robinson
|
103 |
-
* Improved sign up process by double checking email address
|
104 |
-
* Fix for submenu issues encountered in WP 2.0.6
|
105 |
-
|
106 |
-
Version 2.9 by Matthew Robinson
|
107 |
-
|
108 |
-
* Fixed get_userdata call issue
|
109 |
-
* Added CSV export
|
110 |
-
* Reworked options storage routines
|
111 |
-
|
112 |
-
Version 2.8 by Matthew Robinson
|
113 |
-
|
114 |
-
* Fixed missing line return in email headers that was causing failed emails
|
115 |
-
* Added user feedback messages to profile area
|
116 |
-
* Added 'Authorname' to the list of message substitutions in email messages
|
117 |
-
* Fixed name and email substitution in Digest Mails
|
118 |
-
* Fixed stripslashes issue in email subjects
|
119 |
-
* Added new 'Action' token for confirmation emails
|
120 |
-
|
121 |
-
Version 2.7 by Matthew Robinson
|
122 |
-
|
123 |
-
* Link to post in HTML emails is now functional
|
124 |
-
* Fixed bug in Bulk Management so it works when first loaded
|
125 |
-
* Ability to auto subscribe newly registering users
|
126 |
-
* Added additional email header information
|
127 |
-
|
128 |
-
Version 2.6 by Matthew Robinson
|
129 |
-
|
130 |
-
* Fixed email headers to comply with RFC2822 standard (after breaking them in the first place)
|
131 |
-
* Impoved XHTML compliance of user feedback messages and subscription form when presented on a blog
|
132 |
-
* Tidied up presentation of the code a little
|
133 |
-
* Cached some additional variables
|
134 |
-
|
135 |
Version 2.5 by Matthew Robinson
|
136 |
|
137 |
* Added functionality to Bulk Manage registered users subscriptions
|
3 |
Donate link: http://subscribe2.wordpress.com/donate/
|
4 |
Tags: posts, subscription, email
|
5 |
Requires at least: 2.0.x
|
6 |
+
Tested up to: 2.1
|
7 |
|
8 |
Sends a list of subscribers an email notification when new posts are published to your blog
|
9 |
|
77 |
|
78 |
== Version History ==
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
Version 2.5 by Matthew Robinson
|
81 |
|
82 |
* Added functionality to Bulk Manage registered users subscriptions
|
buttonsnap.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
BUTTONSNAP CLASS LIBRARY By Owen Winkler
|
4 |
http://asymptomatic.net
|
5 |
WordPress Downloads are at http://redalt.com/downloads
|
6 |
-
Version: 1.3
|
7 |
*******************************************************************************/
|
8 |
|
9 |
if (!class_exists('buttonsnap')) :
|
@@ -380,16 +380,15 @@ MORESCRIPT;
|
|
380 |
$this->markers[$marker] = $cssclass;
|
381 |
}
|
382 |
|
383 |
-
function basename(
|
384 |
{
|
385 |
-
|
386 |
-
$name = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', $src);
|
387 |
return str_replace('\\', '/', $name);
|
388 |
}
|
389 |
|
390 |
-
function plugin_uri(
|
391 |
{
|
392 |
-
return get_settings('siteurl') . '/wp-content/plugins/' . $this->basename(
|
393 |
}
|
394 |
|
395 |
function include_up($filename) {
|
@@ -431,7 +430,7 @@ function buttonsnap_jsbutton_page($imgsrc, $alttext, $js) { global $buttonsnap;
|
|
431 |
function buttonsnap_ajaxbutton_page($imgsrc, $alttext, $hook) { global $buttonsnap; return $buttonsnap->ajaxbutton($imgsrc, $alttext, $hook, 'page');}
|
432 |
function buttonsnap_separator_page() { global $buttonsnap; return $buttonsnap->separator('page');}
|
433 |
|
434 |
-
function buttonsnap_dirname(
|
435 |
function buttonsnap_register_marker($marker, $cssclass) {global $buttonsnap; return $buttonsnap->register_marker($marker, $cssclass);}
|
436 |
endif;
|
437 |
if (!defined('ABSPATH')) {
|
3 |
BUTTONSNAP CLASS LIBRARY By Owen Winkler
|
4 |
http://asymptomatic.net
|
5 |
WordPress Downloads are at http://redalt.com/downloads
|
6 |
+
Version: 1.3
|
7 |
*******************************************************************************/
|
8 |
|
9 |
if (!class_exists('buttonsnap')) :
|
380 |
$this->markers[$marker] = $cssclass;
|
381 |
}
|
382 |
|
383 |
+
function basename()
|
384 |
{
|
385 |
+
$name = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
|
|
386 |
return str_replace('\\', '/', $name);
|
387 |
}
|
388 |
|
389 |
+
function plugin_uri()
|
390 |
{
|
391 |
+
return get_settings('siteurl') . '/wp-content/plugins/' . $this->basename();
|
392 |
}
|
393 |
|
394 |
function include_up($filename) {
|
430 |
function buttonsnap_ajaxbutton_page($imgsrc, $alttext, $hook) { global $buttonsnap; return $buttonsnap->ajaxbutton($imgsrc, $alttext, $hook, 'page');}
|
431 |
function buttonsnap_separator_page() { global $buttonsnap; return $buttonsnap->separator('page');}
|
432 |
|
433 |
+
function buttonsnap_dirname() {global $buttonsnap; return dirname($buttonsnap->plugin_uri());}
|
434 |
function buttonsnap_register_marker($marker, $cssclass) {global $buttonsnap; return $buttonsnap->register_marker($marker, $cssclass);}
|
435 |
endif;
|
436 |
if (!defined('ABSPATH')) {
|
subscribe2/include.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// include.php - Handles options and common functions for subscribe2
|
3 |
-
// DO NOT EDIT THIS FILE AS IT IS SET BY THE OPTIONS PAGE
|
4 |
-
|
5 |
-
if (!isset($this->subscribe2_options['autosub'])) {
|
6 |
-
$this->subscribe2_options['autosub'] = "no";
|
7 |
-
} // option to autosubscribe registered users to new categories
|
8 |
-
|
9 |
-
if (!isset($this->subscribe2_options['autoformat'])) {
|
10 |
-
$this->subscribe2_options['autoformat'] = "text";
|
11 |
-
} // option for default auto-subscription email format
|
12 |
-
|
13 |
-
if (!isset($this->subscribe2_options['exclude'])) {
|
14 |
-
$this->subscribe2_options['exclude'] = "";
|
15 |
-
} // option for excluded categories
|
16 |
-
|
17 |
-
if (!isset($this->subscribe2_options['sender'])) {
|
18 |
-
$this->subscribe2_options['sender'] = "author";
|
19 |
-
} // option for email notification sender
|
20 |
-
|
21 |
-
// reg_override : allow registered users to subscribed to excluded cats
|
22 |
-
if (!isset($this->subscribe2_options['reg_override'])) {
|
23 |
-
$this->subscribe2_options['reg_override'] = "1";
|
24 |
-
} // option for excluded categories to be overriden for registered users
|
25 |
-
|
26 |
-
if (!isset($this->subscribe2_options['show_button'])) {
|
27 |
-
$this->subscribe2_options['show_button'] = "1";
|
28 |
-
} // option to show Subscribe2 button on Write page
|
29 |
-
|
30 |
-
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'])) {
|
47 |
-
$this->subscribe2_options['remind_email'] = "This email address was subscribed for notifications at BLOGNAME (BLOGLINK) but the subscription remains incomplete.\n\nIf you wish to complete your subscription please click on the link below:\n\nLINK\n\nIf you do not wish to complete your subscription please ignore this email and your address will be removed from our database.\n\nRegards,\nMYNAME";
|
48 |
-
} // Default reminder email text
|
49 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subscribe2/subscribe2.php
CHANGED
@@ -1,2086 +1,1861 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Subscribe2
|
4 |
-
Plugin URI: http://subscribe2.
|
5 |
-
Description: Notifies an email list when new entries are posted.
|
6 |
-
Version: 2.
|
7 |
-
Author: Matthew Robinson
|
8 |
-
Author URI: http://subscribe2.
|
9 |
-
*/
|
10 |
-
|
11 |
-
/*
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
// change this
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
//
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
//
|
46 |
-
|
47 |
-
|
48 |
-
//
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
}
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
$
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
//
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
if (
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
$
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
$headers .= "
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
$
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
//
|
339 |
-
//
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
$
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
$
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
}
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
$this->
|
441 |
-
|
442 |
-
|
443 |
-
$
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
if (
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
}
|
482 |
-
|
483 |
-
//
|
484 |
-
|
485 |
-
|
486 |
-
//
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
$
|
501 |
-
$this->
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
$
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
}
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
$
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
}
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
/**
|
603 |
-
|
604 |
-
*/
|
605 |
-
function
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
} // end
|
625 |
-
|
626 |
-
/**
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
if ($
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
if (
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
if
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
$
|
724 |
-
$this->
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
if(
|
748 |
-
return
|
749 |
-
} else {
|
750 |
-
return false;
|
751 |
-
}
|
752 |
-
} //end
|
753 |
-
|
754 |
-
/**
|
755 |
-
|
756 |
-
*/
|
757 |
-
function
|
758 |
-
global $wpdb;
|
759 |
-
|
760 |
-
if (
|
761 |
-
|
762 |
-
$
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
$this->
|
785 |
-
}
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
if (''
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
*/
|
851 |
-
function
|
852 |
-
|
853 |
-
|
854 |
-
$
|
855 |
-
$
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
$
|
918 |
-
|
919 |
-
$
|
920 |
-
}
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
}
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
$
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
$
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
$
|
1086 |
-
$
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
}
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
echo "<
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
}
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
$
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
$
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
echo "<table
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
echo "
|
1265 |
-
|
1266 |
-
|
1267 |
-
echo "
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
$
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
$
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
$
|
1318 |
-
|
1319 |
-
$
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
echo "
|
1376 |
-
echo "
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
echo "
|
1421 |
-
echo "<
|
1422 |
-
echo "<
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
echo "
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
echo "<
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
}
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
echo "
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
} // end
|
1610 |
-
|
1611 |
-
/**
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
}
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
$
|
1677 |
-
|
1678 |
-
|
1679 |
-
//
|
1680 |
-
//
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
$
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
//
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
$
|
1744 |
-
}
|
1745 |
-
|
1746 |
-
|
1747 |
-
$
|
1748 |
-
$
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
$
|
1791 |
-
|
1792 |
-
|
1793 |
-
$
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
if (false == $this->is_public($this->email)) {
|
1862 |
-
$this->s2form = $this->form . $this->not_subscribed;
|
1863 |
-
} else {
|
1864 |
-
$this->send_confirm('del');
|
1865 |
-
// set a variable to denote that we've already run, and shouldn't run again
|
1866 |
-
$this->filtered = 1;
|
1867 |
-
$this->s2form = $this->confirmation_sent;
|
1868 |
-
}
|
1869 |
-
$this->action='unsubscribe';
|
1870 |
-
}
|
1871 |
-
}
|
1872 |
-
}
|
1873 |
-
}
|
1874 |
-
return preg_replace('|(<p>)(\n)*<!--subscribe2-->(\n)*(</p>)|', $this->s2form, $content);
|
1875 |
-
} // end filter()
|
1876 |
-
|
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() and template_filter()
|
1881 |
-
*/
|
1882 |
-
function query_filter() {
|
1883 |
-
// don't interfere if we've already done our thing
|
1884 |
-
if (1 == $this->filtered) { return; }
|
1885 |
-
|
1886 |
-
global $wpdb;
|
1887 |
-
|
1888 |
-
if ( (defined('S2PAGE')) && (0 !== S2PAGE) ) {
|
1889 |
-
return "page_id=" . S2PAGE;
|
1890 |
-
} else {
|
1891 |
-
$id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_status='static' LIMIT 1");
|
1892 |
-
if ($id) {
|
1893 |
-
return "page_id=$id";
|
1894 |
-
} else {
|
1895 |
-
return "showposts=1";
|
1896 |
-
}
|
1897 |
-
}
|
1898 |
-
} // end query_filter()
|
1899 |
-
|
1900 |
-
/**
|
1901 |
-
Overrides the page title
|
1902 |
-
*/
|
1903 |
-
function title_filter() {
|
1904 |
-
// don't interfere if we've already done our thing
|
1905 |
-
if (1 == $this->filtered) { return; }
|
1906 |
-
return __('Subscription Confirmation', 'subscribe2');
|
1907 |
-
} // end title_filter()
|
1908 |
-
|
1909 |
-
/**
|
1910 |
-
Override the template filter to make sure a special template is not used
|
1911 |
-
*/
|
1912 |
-
function template_filter() {
|
1913 |
-
// don't interfere if we've already done our thing
|
1914 |
-
if (1 == $this->filtered) { return; }
|
1915 |
-
return;
|
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) {
|
1939 |
-
$post_cats = wp_get_post_cats('1', $post->ID);
|
1940 |
-
$post_cats_string = implode(',', $post_cats);
|
1941 |
-
$check = false;
|
1942 |
-
// is the current post assigned to any categories
|
1943 |
-
// which should not generate a notification email?
|
1944 |
-
foreach (explode(',', $this->get_excluded_cats()) as $cat) {
|
1945 |
-
if (in_array($cat, $post_cats)) {
|
1946 |
-
$check = true;
|
1947 |
-
}
|
1948 |
-
}
|
1949 |
-
// if this post is in an excluded category,
|
1950 |
-
// don't include it in the digest
|
1951 |
-
if ($check) {
|
1952 |
-
continue;
|
1953 |
-
}
|
1954 |
-
$message .= $post->post_title . "\r\n";
|
1955 |
-
$message .= get_permalink($post->ID) . "\r\n";
|
1956 |
-
$excerpt = $post->post_excerpt;
|
1957 |
-
if ('' == $excerpt) {
|
1958 |
-
// no excerpt, is there a <!--more--> ?
|
1959 |
-
if (false !== strpos($post->post_content, '<!--more-->')) {
|
1960 |
-
list($excerpt, $more) = explode('<!--more-->', $plaintext, 2);
|
1961 |
-
// strip leading and trailing whitespace
|
1962 |
-
$excerpt = trim($excerpt);
|
1963 |
-
} else {
|
1964 |
-
$excerpt = strip_tags($post->post_content);
|
1965 |
-
$words = explode(' ', $excerpt, 56);
|
1966 |
-
if (count($words) > 55) {
|
1967 |
-
array_pop($words);
|
1968 |
-
array_push($words, '[...]');
|
1969 |
-
$excerpt = implode(' ', $words);
|
1970 |
-
}
|
1971 |
-
}
|
1972 |
-
}
|
1973 |
-
$message .= $excerpt . "\r\n\r\n";
|
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
|
1981 |
-
$user =& $author;
|
1982 |
-
} else {
|
1983 |
-
// get admin detailts
|
1984 |
-
$user = get_userdata(1);
|
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 |
-
/**
|
2003 |
-
Subscribe2 constructor
|
2004 |
-
*/
|
2005 |
-
function subscribe2() {
|
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 |
-
$this->upgrade();
|
2020 |
-
}
|
2021 |
-
|
2022 |
-
if (isset($_GET['s2'])) {
|
2023 |
-
// someone is confirming a request
|
2024 |
-
add_filter('query_string', array(&$this, 'query_filter'));
|
2025 |
-
add_filter('the_title', array(&$this, 'title_filter'));
|
2026 |
-
add_filter('the_content', array(&$this, 'confirm'));
|
2027 |
-
}
|
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();
|
2046 |
-
} // end subscribe2()
|
2047 |
-
|
2048 |
-
/* ===== our variables ===== */
|
2049 |
-
// cache variables
|
2050 |
-
var $version = '';
|
2051 |
-
var $all_public = '';
|
2052 |
-
var $all_unconfirmed = '';
|
2053 |
-
var $excluded_cats = '';
|
2054 |
-
var $post_title = '';
|
2055 |
-
var $permalink = '';
|
2056 |
-
var $myname = '';
|
2057 |
-
var $myemail = '';
|
2058 |
-
var $s2_subject = '[BLOGNAME] TITLE';
|
2059 |
-
var $signup_dates = array();
|
2060 |
-
var $private = false;
|
2061 |
-
var $filtered = 0;
|
2062 |
-
|
2063 |
-
// state variables used to affect processing
|
2064 |
-
var $action = '';
|
2065 |
-
var $email = '';
|
2066 |
-
var $message = '';
|
2067 |
-
var $error = '';
|
2068 |
-
|
2069 |
-
// some messages
|
2070 |
-
var $please_log_in = '';
|
2071 |
-
var $use_profile = '';
|
2072 |
-
var $confirmation_sent = '';
|
2073 |
-
var $already_subscribed = '';
|
2074 |
-
var $not_subscribed ='';
|
2075 |
-
var $not_an_email = '';
|
2076 |
-
var $barred_domain = '';
|
2077 |
-
var $mail_sent = '';
|
2078 |
-
var $form = '';
|
2079 |
-
var $no_such_email = '';
|
2080 |
-
var $added = '';
|
2081 |
-
var $deleted = '';
|
2082 |
-
var $confirm_subject = '';
|
2083 |
-
var $options_saved = '';
|
2084 |
-
var $options_reset = '';
|
2085 |
-
} // end class subscribe2
|
2086 |
?>
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Subscribe2
|
4 |
+
Plugin URI: http://www.prescriber.org.uk/subscribe2.php
|
5 |
+
Description: Notifies an email list when new entries are posted.
|
6 |
+
Version: 2.2.5
|
7 |
+
Author: Matthew Robinson
|
8 |
+
Author URI: http://www.prescriber.org.uk/subscribe2.php
|
9 |
+
*/
|
10 |
+
|
11 |
+
/*
|
12 |
+
Based on the Original Subscribe2 plugin by
|
13 |
+
Copyright (C) 2005 Scott Merrill (skippy@skippy.net)
|
14 |
+
|
15 |
+
This program is free software; you can redistribute it and/or
|
16 |
+
modify it under the terms of the GNU General Public License
|
17 |
+
as published by the Free Software Foundation; either version 2
|
18 |
+
of the License, or (at your option) any later version.
|
19 |
+
|
20 |
+
This program is distributed in the hope that it will be useful,
|
21 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
+
GNU General Public License for more details.
|
24 |
+
|
25 |
+
You should have received a copy of the GNU General Public License
|
26 |
+
along with this program; if not, write to the Free Software
|
27 |
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
28 |
+
http://www.gnu.org/licenses/gpl.html
|
29 |
+
*/
|
30 |
+
|
31 |
+
// use Owen's excellent ButtonSnap library
|
32 |
+
include(ABSPATH . '/wp-content/plugins/buttonsnap.php');
|
33 |
+
|
34 |
+
// change this to TRUE if you're on Dreamhost
|
35 |
+
// (or any other host that limits the number of recipients
|
36 |
+
// permitted on each outgoing email message)
|
37 |
+
define('DREAMHOST', false);
|
38 |
+
|
39 |
+
// by default, subscribe2 grabs the first page from your database for use
|
40 |
+
// when displaying the confirmation screen to public subscribers.
|
41 |
+
// You can override this by specifying a page ID below.
|
42 |
+
define('S2PAGE', '0');
|
43 |
+
|
44 |
+
// change this to TRUE if you want a daily digest of the day's posts
|
45 |
+
// send to your subscribers
|
46 |
+
define('S2DIGEST', false);
|
47 |
+
|
48 |
+
// our version number. Don't touch.
|
49 |
+
define('S2VERSION', '2.2.5');
|
50 |
+
|
51 |
+
// start our class
|
52 |
+
class subscribe2 {
|
53 |
+
// variables and constructor are declared at the end
|
54 |
+
|
55 |
+
/**
|
56 |
+
Load all our strings
|
57 |
+
*/
|
58 |
+
function load_strings() {
|
59 |
+
// adjust the output of Subscribe2 here
|
60 |
+
|
61 |
+
$this->please_log_in = __('To manage your subscription options please ', 'subscribe2') . "<a href=\"" . get_settings('siteurl') . "/wp-login.php\">login</a>.";
|
62 |
+
|
63 |
+
$this->use_profile = __('You may manage your subscription options from your ', 'subscribe2') . "<a href=\"" . get_settings('siteurl') . "/wp-admin/profile.php?page=subscribe2/subscribe2.php\">profile</a>.";
|
64 |
+
|
65 |
+
$this->confirmation_sent = __('A confirmation message is on its way!', 'subscribe2');
|
66 |
+
|
67 |
+
$this->already_subscribed = __('That email address is already subscribed.', 'subscribe2');
|
68 |
+
|
69 |
+
$this->not_subscribed = __('That email address is not subscribed.', 'subscribe2');
|
70 |
+
|
71 |
+
$this->not_an_email = __('Sorry, but that does not look like an email address to me.', 'subscribe2');
|
72 |
+
|
73 |
+
$this->barred_domain = __('Sorry, email addresses at that domain are currently barred due to spam, please use an alternative email address.', 'subscribe2');
|
74 |
+
|
75 |
+
$this->mail_sent = __('Message sent!', 'subscribe2');
|
76 |
+
|
77 |
+
$this->form = "<form method=\"post\" action=\"\">" . __('Your email:', 'subscribe2') . " <input type=\"text\" name=\"email\" value=\"\" size=\"20\" /> <br /><input type=\"radio\" name=\"s2_action\" value=\"subscribe\" checked=\"checked\" /> " . __('Subscribe', 'subscribe2') . " <input type=\"radio\" name=\"s2_action\" value=\"unsubscribe\" /> " . __('Unsubscribe', 'subscribe2') . "  <input type=\"submit\" value=\"" . __('Send', 'subscribe2') . "\" /></form>\r\n";
|
78 |
+
|
79 |
+
// confirmation messages
|
80 |
+
$this->no_such_email = __('No such email address is registered.', 'subscribe2');
|
81 |
+
|
82 |
+
$this->added = __('You have successfully subscribed!', 'subscribe2');
|
83 |
+
|
84 |
+
$this->deleted = __('You have successfully unsubscribed.', 'subscribe2');
|
85 |
+
|
86 |
+
$this->confirm_subject = '[' . get_settings('blogname') . '] ' . __('Please confirm your request', 'subscribe2');
|
87 |
+
|
88 |
+
// menu strings
|
89 |
+
$this->options_saved = __('Options saved!', 'subscribe2');
|
90 |
+
$this->options_reset = __('Options reset!', 'subscribe2');
|
91 |
+
} // end load_strings()
|
92 |
+
|
93 |
+
/* ===== WordPress menu registration ===== */
|
94 |
+
/**
|
95 |
+
Hook the menu
|
96 |
+
*/
|
97 |
+
function admin_menu() {
|
98 |
+
add_management_page(__('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), "manage_options", basename(__FILE__), array(&$this, 'manage_menu'));
|
99 |
+
add_options_page(__('Subscribe2 Options', 'subscribe2'), __('Subscribe2','subscribe2'), "manage_options", basename(__FILE__), array(&$this, 'options_menu'));
|
100 |
+
add_submenu_page('profile.php', __('Subscriptions', 'subscribe2'), __('Subscriptions', 'subscribe2'), "read", __FILE__, array(&$this, 'user_menu'));
|
101 |
+
add_submenu_page('post.php', __('Mail Subscribers','subscribe2'), __('Mail Subscribers', 'subscribe2'),"manage_options", __FILE__, array(&$this, 'write_menu'));
|
102 |
+
}
|
103 |
+
|
104 |
+
/* ===== ButtonSnap configuration ===== */
|
105 |
+
/**
|
106 |
+
Register our button in the QuickTags bar
|
107 |
+
*/
|
108 |
+
function s2_button_init() {
|
109 |
+
$url = get_settings('siteurl') . '/wp-content/plugins/subscribe2/s2_button.png';
|
110 |
+
buttonsnap_textbutton($url, 'Subscribe2', '<!--subscribe2-->');
|
111 |
+
buttonsnap_register_marker('subscribe2', 's2_marker');
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
Style a marker in the Rich Text Editor for our tag
|
116 |
+
|
117 |
+
By default, the RTE suppresses output of HTML comments, so this places a CSS style on our token in order to make it display
|
118 |
+
*/
|
119 |
+
function subscribe2_css() {
|
120 |
+
$marker_url = get_settings('siteurl') . '/wp-content/plugins/subscribe2/s2_marker.png';
|
121 |
+
echo "
|
122 |
+
.s2_marker {
|
123 |
+
display: block;
|
124 |
+
height: 45px;
|
125 |
+
margin-top: 5px;
|
126 |
+
background-image: url({$marker_url});
|
127 |
+
background-repeat: no-repeat;
|
128 |
+
background-position: center;
|
129 |
+
}
|
130 |
+
";
|
131 |
+
}
|
132 |
+
|
133 |
+
/* ===== Install, upgrade, reset ===== */
|
134 |
+
/**
|
135 |
+
Install our table
|
136 |
+
*/
|
137 |
+
function install() {
|
138 |
+
// include upgrade-functions for maybe_create_table;
|
139 |
+
if (! function_exists('maybe_create_table')) {
|
140 |
+
require_once(ABSPATH . '/wp-admin/upgrade-functions.php');
|
141 |
+
}
|
142 |
+
$date = date('Y-m-d');
|
143 |
+
$sql = "CREATE TABLE $this->public (
|
144 |
+
id int(11) NOT NULL auto_increment,
|
145 |
+
email varchar(64) NOT NULL default '',
|
146 |
+
active tinyint(1) default 0,
|
147 |
+
date DATE default '$date' NOT NULL,
|
148 |
+
PRIMARY KEY (id) )";
|
149 |
+
|
150 |
+
// create the table, as needed
|
151 |
+
maybe_create_table($this->public, $sql);
|
152 |
+
$this->reset();
|
153 |
+
} // end install()
|
154 |
+
|
155 |
+
/**
|
156 |
+
Upgrade the database
|
157 |
+
*/
|
158 |
+
function upgrade() {
|
159 |
+
global $wpdb;
|
160 |
+
|
161 |
+
// include upgrade-functions for maybe_create_table;
|
162 |
+
if (! function_exists('maybe_create_table')) {
|
163 |
+
require_once(ABSPATH . '/wp-admin/upgrade-functions.php');
|
164 |
+
}
|
165 |
+
$date = date('Y-m-d');
|
166 |
+
maybe_add_column($this->public, 'date', "ALTER TABLE `$this->public` ADD `date` DATE DEFAULT '$date' NOT NULL AFTER `active`;");
|
167 |
+
//add reminder email template info for version 2.2.4
|
168 |
+
$s2_remind_email = get_option('s2_remind_email');
|
169 |
+
if (empty($s2_remind_email)) {
|
170 |
+
update_option('s2_remind_email', "This email address was subscribed for notifications at BLOGNAME (BLOGLINK) but the subscription remains incomplete.\n\nIf you wish to complete your subscription please click on the link below:\n\nLINK\n\nIf you do not wish to complete your subscription please ignore this email and your address will be removed from our database.\n\nRegards,\nMYNAME");
|
171 |
+
}
|
172 |
+
update_option('s2_version', S2VERSION);
|
173 |
+
|
174 |
+
// let's take the time to check process registered users
|
175 |
+
// existing public subscribers are subscribed to all categories
|
176 |
+
$check = $wpdb->get_col("SELECT ID FROM $wpdb->users");
|
177 |
+
if (! empty($check)) {
|
178 |
+
foreach ($check as $user) {
|
179 |
+
$this->register($user);
|
180 |
+
}
|
181 |
+
}
|
182 |
+
} // end upgrade()
|
183 |
+
|
184 |
+
/**
|
185 |
+
Reset our options
|
186 |
+
*/
|
187 |
+
function reset() {
|
188 |
+
update_option('s2_sender', 'author');
|
189 |
+
update_option('s2_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");
|
190 |
+
update_option('s2_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.");
|
191 |
+
update_option('s2_remind_email', "This email address was subscribed for notifications at BLOGNAME (BLOGLINK) but the subscription remains incomplete.\n\nIf you wish to complete your subscription please click on the link below:\n\nLINK\n\nIf you do not wish to complete your subscription please ignore this email and your address will be removed from our database.\n\nRegards,\nMYNAME");
|
192 |
+
update_option('s2_exclude', '');
|
193 |
+
update_option('s2_reg_override', '1');
|
194 |
+
update_option('s2_show_button', '1');
|
195 |
+
update_option('s2_barred', '');
|
196 |
+
} // end reset()
|
197 |
+
|
198 |
+
/* ===== mail handling ===== */
|
199 |
+
/**
|
200 |
+
Performs string substitutions for subscribe2 mail texts
|
201 |
+
*/
|
202 |
+
function substitute($string = '') {
|
203 |
+
if ('' == $string) {
|
204 |
+
return;
|
205 |
+
}
|
206 |
+
$string = str_replace('BLOGNAME', get_settings('blogname'), $string);
|
207 |
+
$string = str_replace('BLOGLINK', get_bloginfo('url'), $string);
|
208 |
+
$string = str_replace('TITLE', stripslashes($this->post_title), $string);
|
209 |
+
$string = str_replace('PERMALINK', $this->permalink, $string);
|
210 |
+
$string = str_replace('MYNAME', stripslashes($this->myname), $string);
|
211 |
+
$string = str_replace('EMAIL', $this->myemail, $string);
|
212 |
+
return $string;
|
213 |
+
} // end sustitute()
|
214 |
+
|
215 |
+
/**
|
216 |
+
Delivers email to recipients in HTML or plaintext
|
217 |
+
*/
|
218 |
+
function mail ($recipients = array(), $subject = '', $message = '', $type='text') {
|
219 |
+
if (empty($recipients)) { return; }
|
220 |
+
if ('' == $message) { return; }
|
221 |
+
|
222 |
+
// Set sender details
|
223 |
+
if ('' == $this->myname) {
|
224 |
+
$admin = get_userdata('1');
|
225 |
+
$this->myname = $admin->display_name;
|
226 |
+
$this->myemail = $admin->user_email;
|
227 |
+
}
|
228 |
+
$headers = "From: $this->myname <$this->myemail>\n";
|
229 |
+
$headers .= "Return-Path: <$this->myemail>\n";
|
230 |
+
$headers .= "Precedence: list\nList-Id: " . get_settings('blogname') . "\n";
|
231 |
+
|
232 |
+
if ('html' == $type) {
|
233 |
+
// To send HTML mail, the Content-type header must be set
|
234 |
+
$headers .= "MIME-Version: 1.0\n";
|
235 |
+
$headers .= "Content-type: " . get_bloginfo('html_type') . "; charset=\"". get_bloginfo('charset') . "\"\n";
|
236 |
+
$mailtext = "<html><head><title>$subject</title></head><body>" . $message . "</body></html>";
|
237 |
+
} else {
|
238 |
+
$headers .= "MIME-Version: 1.0\n";
|
239 |
+
$headers .= "Content-type: text/plain; charset=\"". get_bloginfo('charset') . "\"\n";
|
240 |
+
$message = preg_replace('|&.{3,6};|', '', $message);
|
241 |
+
$mailtext = wordwrap(strip_tags($message), 80, "\n");
|
242 |
+
}
|
243 |
+
|
244 |
+
// BCC all recipients
|
245 |
+
$bcc = '';
|
246 |
+
if ( (defined('DREAMHOST') && true == DREAMHOST) &&
|
247 |
+
(count($recipients) > 30) ) {
|
248 |
+
// we're on Dreamhost, and have more than 30 susbcribers
|
249 |
+
$count = 1;
|
250 |
+
$batch = array();
|
251 |
+
foreach ($recipients as $recipient) {
|
252 |
+
// advance the array pointer by one, for use down below
|
253 |
+
// the array pointer _is not_ advanced by the foreach() loop itself
|
254 |
+
next($recipients);
|
255 |
+
$recipient = trim($recipient);
|
256 |
+
// sanity check -- make sure we have a valid email
|
257 |
+
if (! is_email($recipient)) { continue; }
|
258 |
+
// and NOT the sender's email, since they'll
|
259 |
+
// get a copy anyway
|
260 |
+
if ( (! empty($recipient)) && ($this->myemail != $recipient) ) {
|
261 |
+
('' == $bcc) ? $bcc = "Bcc: $recipient" : $bcc .= ", $recipient";
|
262 |
+
}
|
263 |
+
if (30 == $count) {
|
264 |
+
$count = 1;
|
265 |
+
$batch[] = $bcc;
|
266 |
+
$bcc = '';
|
267 |
+
} else {
|
268 |
+
if (false == current($recipients)) {
|
269 |
+
// we've reached the end of the subscriber list
|
270 |
+
// add what we have to the batch, and move on
|
271 |
+
$batch[] = $bcc;
|
272 |
+
break;
|
273 |
+
} else {
|
274 |
+
$count++;
|
275 |
+
}
|
276 |
+
}
|
277 |
+
}
|
278 |
+
// rewind the array, just to be safe
|
279 |
+
reset($recipients);
|
280 |
+
} else {
|
281 |
+
// we're not on dreamhost, or have less than 30
|
282 |
+
// subscribers, so do it normal
|
283 |
+
foreach ($recipients as $recipient) {
|
284 |
+
$recipient = trim($recipient);
|
285 |
+
// sanity check -- make sure we have a valid email
|
286 |
+
if (! is_email($recipient)) { continue; }
|
287 |
+
// and NOT the sender's email, since they'll
|
288 |
+
// get a copy anyway
|
289 |
+
if ( (! empty($recipient)) && ($this->myemail != $recipient) ) {
|
290 |
+
('' == $bcc) ? $bcc = "Bcc: $recipient" : $bcc .= ", $recipient";
|
291 |
+
}
|
292 |
+
}
|
293 |
+
$headers .= "$bcc\r\n";
|
294 |
+
}
|
295 |
+
// actually send mail
|
296 |
+
if ( (defined('DREAMHOST') && true == DREAMHOST) && (isset($batch)) ) {
|
297 |
+
foreach ($batch as $bcc) {
|
298 |
+
$newheaders = $headers . "$bcc\r\n";
|
299 |
+
@wp_mail($this->myemail, $subject, $mailtext, $newheaders);
|
300 |
+
}
|
301 |
+
} else {
|
302 |
+
@wp_mail($this->myemail, $subject, $mailtext, $headers);
|
303 |
+
}
|
304 |
+
} // end mail()
|
305 |
+
|
306 |
+
/**
|
307 |
+
Sends an email notification of a new post
|
308 |
+
*/
|
309 |
+
function publish($id = 0, $cron = 0) {
|
310 |
+
if (! $id) { return $id; }
|
311 |
+
|
312 |
+
// are we doing daily digests? If so, don't send anything now
|
313 |
+
if ( defined('S2DIGEST') && true == S2DIGEST ) { return; }
|
314 |
+
|
315 |
+
// we need to determine whether this is a new post, or an edit
|
316 |
+
if (0 == $cron) {
|
317 |
+
// we're not being called from WP-Cron
|
318 |
+
if ($this->private) {
|
319 |
+
// this post was published from draft status
|
320 |
+
// OR is an edit of an existing post
|
321 |
+
// so send no notification
|
322 |
+
return $id;
|
323 |
+
}
|
324 |
+
}
|
325 |
+
|
326 |
+
$post_cats = wp_get_post_cats('1', $id);
|
327 |
+
$post_cats_string = implode(',', $post_cats);
|
328 |
+
$check = false;
|
329 |
+
// is the current post assigned to any categories
|
330 |
+
// which should not generate a notification email?
|
331 |
+
foreach (explode(',', $this->get_excluded_cats()) as $cat) {
|
332 |
+
if (in_array($cat, $post_cats)) {
|
333 |
+
$check = true;
|
334 |
+
}
|
335 |
+
}
|
336 |
+
// if so, bail out
|
337 |
+
if ($check) {
|
338 |
+
// hang on -- can registered users subscribe to
|
339 |
+
// excluded categories?
|
340 |
+
if ('0' == get_option('s2_reg_override')) {
|
341 |
+
// nope? okay, let's leave
|
342 |
+
return $id;
|
343 |
+
}
|
344 |
+
}
|
345 |
+
|
346 |
+
global $wpdb;
|
347 |
+
$post = & get_post($id);
|
348 |
+
// is this post set in the future?
|
349 |
+
if ($post->post_date > current_time('mysql')) {
|
350 |
+
// is wp-cron installed?
|
351 |
+
if (function_exists('wp_cron_init')) {
|
352 |
+
// are we doing daily digests?
|
353 |
+
if ( defined('S2DIGEST') && false == S2DIGEST ) {
|
354 |
+
// not doing daily digests, so
|
355 |
+
// add this post to the list of
|
356 |
+
// future posts
|
357 |
+
$our_post = array('id' => $id, 'date' => $post->post_date);
|
358 |
+
$future_posts = get_option('s2_future_posts');
|
359 |
+
$future_posts[] = $our_post;
|
360 |
+
update_option('s2_future_posts', $future_posts);
|
361 |
+
}
|
362 |
+
}
|
363 |
+
// bail out
|
364 |
+
return $id;
|
365 |
+
}
|
366 |
+
|
367 |
+
// lets collect our public subscribers
|
368 |
+
// and all our registered subscribers for these categories
|
369 |
+
if (! $check) {
|
370 |
+
// if this post is assigned to an excluded
|
371 |
+
// category, then this test will prevent
|
372 |
+
// the public from receiving notification
|
373 |
+
$public = $this->get_public();
|
374 |
+
}
|
375 |
+
$registered = $this->get_registered("cats=$post_cats_string");
|
376 |
+
|
377 |
+
// do we have subscribers?
|
378 |
+
if ( empty($public) && empty($registered) ) {
|
379 |
+
// if not, no sense doing anything else
|
380 |
+
return $id;
|
381 |
+
}
|
382 |
+
// we set these class variables so that we can avoid
|
383 |
+
// passing them in function calls a little later
|
384 |
+
$this->post_title = $post->post_title;
|
385 |
+
$this->permalink = get_permalink($id);
|
386 |
+
|
387 |
+
// do we send as admin, or post author?
|
388 |
+
if ('author' == get_option('s2_sender')) {
|
389 |
+
// get author details
|
390 |
+
$user = get_userdata($post->post_author);
|
391 |
+
} else {
|
392 |
+
// get admin detailts
|
393 |
+
$user = get_userdata(1);
|
394 |
+
}
|
395 |
+
$this->myemail = $user->user_email;
|
396 |
+
$this->myname = $user->display_name;
|
397 |
+
// Get email subject
|
398 |
+
$subject = $this->substitute($this->s2_subject);
|
399 |
+
// Get the message template
|
400 |
+
$mailtext = $this->substitute(stripslashes(get_option('s2_mailtext')));
|
401 |
+
|
402 |
+
$plaintext = $post->post_content;
|
403 |
+
$content = apply_filters('the_content', $post->post_content);
|
404 |
+
$content = str_replace(']]>', ']]>', $content);
|
405 |
+
$excerpt = $post->post_excerpt;
|
406 |
+
if ('' == $excerpt) {
|
407 |
+
// no excerpt, is there a <!--more--> ?
|
408 |
+
if (false !== strpos($plaintext, '<!--more-->')) {
|
409 |
+
list($excerpt, $more) = explode('<!--more-->', $plaintext, 2);
|
410 |
+
// strip leading and trailing whitespace
|
411 |
+
$excerpt = strip_tags($excerpt);
|
412 |
+
$excerpt = trim($excerpt);
|
413 |
+
} else {
|
414 |
+
// no <!--more-->, so grab the first 55 words
|
415 |
+
$excerpt = strip_tags($plaintext);
|
416 |
+
$excerpt_length = 55;
|
417 |
+
$words = explode(' ', $plaintext, $excerpt_length + 1);
|
418 |
+
if (count($words) > $excerpt_length) {
|
419 |
+
array_pop($words);
|
420 |
+
array_push($words, '[...]');
|
421 |
+
$excerpt = implode(' ', $words);
|
422 |
+
}
|
423 |
+
}
|
424 |
+
|
425 |
+
}
|
426 |
+
// first we send plaintext summary emails
|
427 |
+
$body = str_replace('POST', $excerpt, $mailtext);
|
428 |
+
$registered = $this->get_registered("cats=$post_cats_string&format=text&amount=excerpt");
|
429 |
+
if (empty($registered)) {
|
430 |
+
$recipients = (array)$public;
|
431 |
+
}
|
432 |
+
elseif (empty($public)) {
|
433 |
+
$recipients = (array)$registered;
|
434 |
+
} else {
|
435 |
+
$recipients = array_merge((array)$public, (array)$registered);
|
436 |
+
}
|
437 |
+
$this->mail($recipients, $subject, $body);
|
438 |
+
// next we send plaintext full content emails
|
439 |
+
$body = str_replace('POST', strip_tags($plaintext), $mailtext);
|
440 |
+
$this->mail($this->get_registered("cats=$post_cats_string&format=text&amount=post"), $subject, $body);
|
441 |
+
// finally we send html full content emails
|
442 |
+
$body = str_replace("\r\n", "<br />\r\n", $mailtext);
|
443 |
+
$body = str_replace('POST', $content, $body);
|
444 |
+
$this->mail($this->get_registered("cats=$post_cats_string&format=html"), $subject, $body, 'html');
|
445 |
+
|
446 |
+
return $id;
|
447 |
+
} // end publish()
|
448 |
+
|
449 |
+
/**
|
450 |
+
Sends a notification when a draft post is published
|
451 |
+
*/
|
452 |
+
function private2publish($ID = 0) {
|
453 |
+
if (0 == $ID) { return $ID; }
|
454 |
+
|
455 |
+
$this->publish($ID);
|
456 |
+
$this->private = TRUE;
|
457 |
+
return $ID;
|
458 |
+
} // end private2publish()
|
459 |
+
|
460 |
+
/**
|
461 |
+
Prevents notifications from being sent when editing posts
|
462 |
+
*/
|
463 |
+
function edit($ID = 0) {
|
464 |
+
if (0 == $ID) { return; }
|
465 |
+
|
466 |
+
$this->private = TRUE;
|
467 |
+
return $ID;
|
468 |
+
}
|
469 |
+
|
470 |
+
/**
|
471 |
+
Send confirmation email to the user
|
472 |
+
*/
|
473 |
+
function send_confirm($what = '', $is_remind = FALSE) {
|
474 |
+
if ($this->filtered == 1) { return; }
|
475 |
+
if ( (! $this->email) || (! $what) ) {
|
476 |
+
return false;
|
477 |
+
}
|
478 |
+
$id = $this->get_id($this->email);
|
479 |
+
if (! $id) {
|
480 |
+
return false;
|
481 |
+
}
|
482 |
+
|
483 |
+
// generate the URL "?s2=ACTION+HASH+ID"
|
484 |
+
// ACTION = 1 to subscribe, 0 to unsubscribe
|
485 |
+
// HASH = md5 hash of email address
|
486 |
+
// ID = user's ID in the subscribe2 table
|
487 |
+
if ( defined('S2PAGE') && 0 !== S2PAGE ) {
|
488 |
+
$link = get_settings('siteurl') . "?page_id=" . S2PAGE . "&s2=";
|
489 |
+
} else {
|
490 |
+
$link = get_settings('siteurl') . "?s2=";
|
491 |
+
}
|
492 |
+
if ('add' == $what) {
|
493 |
+
$link .= '1';
|
494 |
+
} elseif ('del' == $what) {
|
495 |
+
$link .= '0';
|
496 |
+
}
|
497 |
+
$link .= md5($this->email);
|
498 |
+
$link .= $id;
|
499 |
+
|
500 |
+
$admin = get_userdata(1);
|
501 |
+
$this->myname = $admin->display_name;
|
502 |
+
|
503 |
+
if ($is_remind == TRUE) {
|
504 |
+
$body = $this->substitute(get_option('s2_remind_email'));
|
505 |
+
$subject = __('Subscription Reminder', 'subscribe2');
|
506 |
+
} else {
|
507 |
+
$body = $this->substitute(get_option('s2_confirm_email'));
|
508 |
+
$subject = $this->substitute($this->confirm_subject);
|
509 |
+
}
|
510 |
+
|
511 |
+
$body = str_replace("LINK", $link, $body);
|
512 |
+
|
513 |
+
$mailheaders .= "MIME-Version: 1.0\n";
|
514 |
+
$mailheaders .= "Content-type: text/plain; charset=\"". get_bloginfo('charset') . "\"\n";
|
515 |
+
$mailheaders .= "From: $admin->display_name <$admin->user_email>";
|
516 |
+
|
517 |
+
@wp_mail ($this->email, $subject, $body, $mailheaders);
|
518 |
+
} // end send_confirm()
|
519 |
+
|
520 |
+
/* ===== Category functions ===== */
|
521 |
+
/**
|
522 |
+
Returns a comma-separated list of category IDs which should not generate notifications
|
523 |
+
*/
|
524 |
+
function get_excluded_cats() {
|
525 |
+
if ('' != $this->excluded_cats) {
|
526 |
+
return $this->excluded_cats;
|
527 |
+
} else {
|
528 |
+
global $wpdb;
|
529 |
+
$this->excluded_cats = get_option('s2_exclude');
|
530 |
+
return $this->excluded_cats;
|
531 |
+
}
|
532 |
+
} // end get_excluded_cats()
|
533 |
+
|
534 |
+
/**
|
535 |
+
Return either a comma-separated list of all the category IDs in the blog or an array of cat_ID => cat_name
|
536 |
+
*/
|
537 |
+
function get_all_categories($select = 'id') {
|
538 |
+
global $wpdb;
|
539 |
+
if ('id' == $select) {
|
540 |
+
return implode(',', $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories"));
|
541 |
+
} else {
|
542 |
+
$cats = array();
|
543 |
+
$result = $wpdb->get_results("SELECT cat_ID, cat_name FROM $wpdb->categories", ARRAY_N);
|
544 |
+
foreach ($result as $result) {
|
545 |
+
$cats[$result[0]] = $result[1];
|
546 |
+
}
|
547 |
+
return $cats;
|
548 |
+
}
|
549 |
+
} // end get_all_categories()
|
550 |
+
|
551 |
+
|
552 |
+
/* ===== Subscriber functions ===== */
|
553 |
+
/**
|
554 |
+
Given a public subscriber ID, returns the email address
|
555 |
+
*/
|
556 |
+
function get_email ($id = 0) {
|
557 |
+
global $wpdb;
|
558 |
+
|
559 |
+
if (! $id) {
|
560 |
+
return false;
|
561 |
+
}
|
562 |
+
return $wpdb->get_var("SELECT email FROM $this->public WHERE id=$id");
|
563 |
+
} // end get_email
|
564 |
+
|
565 |
+
/**
|
566 |
+
Given a public subscriber email, returns the subscriber ID
|
567 |
+
*/
|
568 |
+
function get_id ($email = '') {
|
569 |
+
global $wpdb;
|
570 |
+
|
571 |
+
if (! $email) {
|
572 |
+
return false;
|
573 |
+
}
|
574 |
+
return $wpdb->get_var("SELECT id FROM $this->public WHERE email='$email'");
|
575 |
+
} // end get_id()
|
576 |
+
|
577 |
+
/**
|
578 |
+
Activate an email address
|
579 |
+
|
580 |
+
If the address is not already present, it will be added
|
581 |
+
*/
|
582 |
+
function activate ($email = '') {
|
583 |
+
global $wpdb;
|
584 |
+
|
585 |
+
if ('' == $email) {
|
586 |
+
if ('' != $this->email) {
|
587 |
+
$email = $this->email;
|
588 |
+
} else {
|
589 |
+
return false;
|
590 |
+
}
|
591 |
+
}
|
592 |
+
|
593 |
+
if (false !== $this->is_public($email)) {
|
594 |
+
$check = $wpdb->get_var("SELECT user_email FROM $wpdb->users WHERE user_email='$this->email'");
|
595 |
+
if ($check) { return; }
|
596 |
+
$wpdb->get_results("UPDATE $this->public SET active='1' WHERE email='$email'");
|
597 |
+
} else {
|
598 |
+
$wpdb->get_results("INSERT INTO $this->public (email, active, date) VALUES ('$email', '1', NOW())");
|
599 |
+
}
|
600 |
+
} // end activate()
|
601 |
+
|
602 |
+
/**
|
603 |
+
Add an unconfirmed email address to the subscriber list
|
604 |
+
*/
|
605 |
+
function add ($email = '') {
|
606 |
+
if ($this->filtered ==1) { return; }
|
607 |
+
global $wpdb;
|
608 |
+
|
609 |
+
if ('' == $email) {
|
610 |
+
if ('' != $this->email) {
|
611 |
+
$email = $this->email;
|
612 |
+
} else {
|
613 |
+
return false;
|
614 |
+
}
|
615 |
+
}
|
616 |
+
|
617 |
+
if (! is_email($email)) { return false; }
|
618 |
+
|
619 |
+
if (false !== $this->is_public($email)) {
|
620 |
+
$wpdb->get_results("UPDATE $this->public SET date=NOW() WHERE email='$email'");
|
621 |
+
} else {
|
622 |
+
$wpdb->get_results("INSERT INTO $this->public (email, active, date) VALUES ('$email', '0', NOW())");
|
623 |
+
}
|
624 |
+
} // end add()
|
625 |
+
|
626 |
+
/**
|
627 |
+
Remove a user from the subscription table
|
628 |
+
*/
|
629 |
+
function delete($email = '') {
|
630 |
+
global $wpdb;
|
631 |
+
|
632 |
+
if ('' == $email) {
|
633 |
+
if ('' != $this->email) {
|
634 |
+
$email = $this->email;
|
635 |
+
} else {
|
636 |
+
return false;
|
637 |
+
}
|
638 |
+
}
|
639 |
+
|
640 |
+
if (! is_email($email)) { return false; }
|
641 |
+
$wpdb->get_results("DELETE FROM $this->public WHERE email='$email'");
|
642 |
+
} // end delete()
|
643 |
+
|
644 |
+
/**
|
645 |
+
Toggle a public subscriber's status
|
646 |
+
*/
|
647 |
+
function toggle($email = '') {
|
648 |
+
global $wpdb;
|
649 |
+
|
650 |
+
if ( ('' == $email) || (! is_email($email)) ) { return false; }
|
651 |
+
|
652 |
+
// let's see if this is a public user
|
653 |
+
$status = $this->is_public($email);
|
654 |
+
if (false === $status) { return false; }
|
655 |
+
|
656 |
+
if ('0' == $status) {
|
657 |
+
$wpdb->get_results("UPDATE $this->public SET active='1' WHERE email='$email'");
|
658 |
+
} else {
|
659 |
+
$wpdb->get_results("UPDATE $this->public SET active='0' WHERE email='$email'");
|
660 |
+
}
|
661 |
+
} // end toggle()
|
662 |
+
|
663 |
+
/**
|
664 |
+
Send reminder email to unconfirmed public subscribers
|
665 |
+
*/
|
666 |
+
function remind($emails = '') {
|
667 |
+
if ('' == $emails) { return false; }
|
668 |
+
|
669 |
+
$admin = get_userdata(1);
|
670 |
+
$this->myname = $admin->display_name;
|
671 |
+
|
672 |
+
$recipients = explode(",", $emails);
|
673 |
+
if (! is_array($recipients)) { $recipients = array(); }
|
674 |
+
foreach ($recipients as $recipient) {
|
675 |
+
$this->email = $recipient;
|
676 |
+
$this->send_confirm('add', TRUE);
|
677 |
+
}
|
678 |
+
} //end remind()
|
679 |
+
|
680 |
+
/**
|
681 |
+
Check email is not from a barred domain
|
682 |
+
*/
|
683 |
+
function is_barred($email='') {
|
684 |
+
$barred_option = get_option('s2_barred');
|
685 |
+
list($user, $domain) = split('@', $email);
|
686 |
+
$bar_check = stristr($barred_option, $domain);
|
687 |
+
|
688 |
+
if(!empty($bar_check)) {
|
689 |
+
return true;
|
690 |
+
} else {
|
691 |
+
return false;
|
692 |
+
}
|
693 |
+
} //end is_barred()
|
694 |
+
|
695 |
+
/**
|
696 |
+
Confirm request from the link emailed to the user and email the admin
|
697 |
+
*/
|
698 |
+
function confirm($content = '') {
|
699 |
+
global $wpdb;
|
700 |
+
|
701 |
+
if (1 == $this->filtered) { return $content; }
|
702 |
+
|
703 |
+
$code = $_GET['s2'];
|
704 |
+
$action = intval(substr($code, 0, 1));
|
705 |
+
$hash = substr($code, 1, 32);
|
706 |
+
$code = str_replace($hash, '', $code);
|
707 |
+
$id = intval(substr($code, 1));
|
708 |
+
if ($id) {
|
709 |
+
$this->email = $this->get_email($id);
|
710 |
+
if (! $this->email) {
|
711 |
+
return $this->no_such_email;
|
712 |
+
}
|
713 |
+
} else {
|
714 |
+
return $this->no_such_email;
|
715 |
+
}
|
716 |
+
|
717 |
+
if ('1' == $action) {
|
718 |
+
// make this subscription active
|
719 |
+
$this->activate();
|
720 |
+
$this->message = $this->added;
|
721 |
+
$subject = '[' . get_settings('blogname') . '] ' . __('New subscriber', 'subscribe2');
|
722 |
+
$message = "$this->email " . __('subscribed to email notifications!', 'subscribe2');
|
723 |
+
$recipients = $wpdb->get_col("SELECT DISTINCT(user_email) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key='wp_user_level' AND $wpdb->usermeta.meta_value='10'");
|
724 |
+
$this->mail($recipients, $subject, $message);
|
725 |
+
$this->filtered = 1;
|
726 |
+
} elseif ('0' == $action) {
|
727 |
+
// remove this subscriber
|
728 |
+
$this->delete();
|
729 |
+
$this->message = $this->deleted;
|
730 |
+
$this->filtered = 1;
|
731 |
+
}
|
732 |
+
|
733 |
+
if ('' != $this->message) {
|
734 |
+
return $this->message;
|
735 |
+
}
|
736 |
+
} // end confirm
|
737 |
+
|
738 |
+
/**
|
739 |
+
Is the supplied email address a public subscriber?
|
740 |
+
*/
|
741 |
+
function is_public($email = '') {
|
742 |
+
global $wpdb;
|
743 |
+
|
744 |
+
if ('' == $email) { return false; }
|
745 |
+
|
746 |
+
$check = $wpdb->get_var("SELECT active FROM $this->public WHERE email='$email'");
|
747 |
+
if ( ('0' == $check) || ('1' == $check) ) {
|
748 |
+
return $check;
|
749 |
+
} else {
|
750 |
+
return false;
|
751 |
+
}
|
752 |
+
} // end is_public
|
753 |
+
|
754 |
+
/**
|
755 |
+
Is the supplied email address a registered user of the blog?
|
756 |
+
*/
|
757 |
+
function is_registered($email = '') {
|
758 |
+
global $wpdb;
|
759 |
+
|
760 |
+
if ('' == $email) { return false; }
|
761 |
+
|
762 |
+
$check = $wpdb->get_var("SELECT email FROM $wpdb->users WHERE user_email='$email'");
|
763 |
+
if ($check) {
|
764 |
+
return true;
|
765 |
+
} else {
|
766 |
+
return false;
|
767 |
+
}
|
768 |
+
}
|
769 |
+
|
770 |
+
/**
|
771 |
+
Return an array of all the public subscribers
|
772 |
+
*/
|
773 |
+
function get_public ($confirmed = 1) {
|
774 |
+
global $wpdb;
|
775 |
+
if (1 == $confirmed) {
|
776 |
+
if ('' == $this->all_public) {
|
777 |
+
$this->all_public = $wpdb->get_col("SELECT email FROM $this->public WHERE active='1'");
|
778 |
+
}
|
779 |
+
return $this->all_public;
|
780 |
+
} else {
|
781 |
+
if ('' == $this->all_unconfirmed) {
|
782 |
+
$this->all_unconfirmed = $wpdb->get_col("SELECT email FROM $this->public WHERE active='0'");
|
783 |
+
}
|
784 |
+
return $this->all_unconfirmed;
|
785 |
+
}
|
786 |
+
} // end get_public()
|
787 |
+
|
788 |
+
/**
|
789 |
+
Return an array of registered subscribers
|
790 |
+
Collect all the registered users of the blog who are subscribed to the specified categories
|
791 |
+
*/
|
792 |
+
function get_registered ($args = '') {
|
793 |
+
global $wpdb;
|
794 |
+
|
795 |
+
$format = '';
|
796 |
+
$amount = '';
|
797 |
+
$cats = '';
|
798 |
+
$subscribers = array();
|
799 |
+
|
800 |
+
parse_str($args, $r);
|
801 |
+
if (! isset($r['cats']))
|
802 |
+
$r['cats'] = '';
|
803 |
+
if (! isset($r['format']))
|
804 |
+
$r['format'] = 'all';
|
805 |
+
if (! isset($r['amount']))
|
806 |
+
$r['amount'] = 'all';
|
807 |
+
|
808 |
+
$JOIN = ''; $AND = '';
|
809 |
+
// text or HTML subscribers
|
810 |
+
if ('all' != $r['format']) {
|
811 |
+
$JOIN .= "INNER JOIN $wpdb->usermeta AS b ON a.user_id = b.user_id ";
|
812 |
+
$AND .= " AND b.meta_key='s2_format' AND b.meta_value=";
|
813 |
+
if ('html' == $r['format']) {
|
814 |
+
$AND .= "'html'";
|
815 |
+
} elseif ('text' == $r['format']) {
|
816 |
+
$AND .= "'text'";
|
817 |
+
}
|
818 |
+
}
|
819 |
+
|
820 |
+
// full post or excerpt subscribers
|
821 |
+
if ('all' != $r['amount']) {
|
822 |
+
$JOIN .= "INNER JOIN $wpdb->usermeta AS c ON a.user_id = c.user_id ";
|
823 |
+
$AND .= " AND c.meta_key='s2_excerpt' AND c.meta_value=";
|
824 |
+
if ('excerpt' == $r['amount']) {
|
825 |
+
$AND .= "'excerpt'";
|
826 |
+
} elseif ('post' == $r['amount']) {
|
827 |
+
$AND.= "'post'";
|
828 |
+
}
|
829 |
+
}
|
830 |
+
|
831 |
+
// specific category subscribers
|
832 |
+
if ('' != $r['cats']) {
|
833 |
+
$JOIN .= "INNER JOIN $wpdb->usermeta AS d ON a.user_id = d.user_id ";
|
834 |
+
foreach (explode(',', $r['cats']) as $cat) {
|
835 |
+
('' == $and) ? $and = "d.meta_key='s2_cat$cat'" : $and .= " OR d.meta_key='s2_cat$cat'";
|
836 |
+
}
|
837 |
+
$AND .= "AND ($and)";
|
838 |
+
}
|
839 |
+
|
840 |
+
$sql = "SELECT a.user_id FROM $wpdb->usermeta AS a " . $JOIN . " WHERE a.meta_key='s2_subscribed'" . $AND;
|
841 |
+
$result = $wpdb->get_col($sql);
|
842 |
+
if ($result) {
|
843 |
+
$ids = implode(',', $result);
|
844 |
+
return $wpdb->get_col("SELECT user_email FROM $wpdb->users WHERE ID IN ($ids)");
|
845 |
+
}
|
846 |
+
} // end get_registered()
|
847 |
+
|
848 |
+
/**
|
849 |
+
Collects the signup date for all public subscribers
|
850 |
+
*/
|
851 |
+
function signup_date($email = '') {
|
852 |
+
if ('' == $email) { return false; }
|
853 |
+
|
854 |
+
global $wpdb;
|
855 |
+
if (! empty($this->signup_dates)) {
|
856 |
+
return $this->signup_dates[$email];
|
857 |
+
} else {
|
858 |
+
$results = $wpdb->get_results("SELECT email, date FROM $this->public", ARRAY_N);
|
859 |
+
foreach ($results as $result) {
|
860 |
+
$this->signup_dates[$result[0]] = $result[1];
|
861 |
+
}
|
862 |
+
return $this->signup_dates[$email];
|
863 |
+
}
|
864 |
+
} // end signup_date()
|
865 |
+
|
866 |
+
/**
|
867 |
+
Create the appropriate usermeta values when a user registers
|
868 |
+
If the registering user had previously subscribed to notifications, this function will delete them from the public subscriber list first
|
869 |
+
*/
|
870 |
+
function register ($user_id = 0) {
|
871 |
+
global $wpdb;
|
872 |
+
|
873 |
+
if (0 == $user_id) { return $user_id; }
|
874 |
+
$user = get_userdata($user_id);
|
875 |
+
|
876 |
+
// has this user previously signed up for email notification?
|
877 |
+
if (false !== $this->is_public($user->user_email)) {
|
878 |
+
// delete this user from the public table, and subscribe them to all the categories
|
879 |
+
$this->delete($user->user_email);
|
880 |
+
update_usermeta($user_id, 's2_subscribed', $this->get_all_categories());
|
881 |
+
foreach(explode(',', $this->get_all_categories()) as $cat) {
|
882 |
+
update_usermeta($user_id, 's2_cat' . $cat, "$cat");
|
883 |
+
}
|
884 |
+
update_usermeta($user_id, 's2_format', 'text');
|
885 |
+
update_usermeta($user_id, 's2_excerpt', 'excerpt');
|
886 |
+
} else {
|
887 |
+
// add the usermeta for new registrations, but don't subscribe them
|
888 |
+
$check = get_usermeta($user_id, 's2_subscribed');
|
889 |
+
if (empty($check)) {
|
890 |
+
// ensure existing subscriptions are not overwritten on upgrade
|
891 |
+
update_usermeta($user_id, 's2_subscribed', '');
|
892 |
+
update_usermeta($user_id, 's2_format', 'text');
|
893 |
+
update_usermeta($user_id, 's2_excerpt', 'excerpt');
|
894 |
+
}
|
895 |
+
}
|
896 |
+
return $user_id;
|
897 |
+
} // end register()
|
898 |
+
|
899 |
+
/**
|
900 |
+
Subscribe all registered users to category selected on Admin Manage Page
|
901 |
+
*/
|
902 |
+
function subscribe_registered_users ($emails = '', $cats = '') {
|
903 |
+
if (('' == $emails) || ('' == $cats)) { return false; }
|
904 |
+
global $wpdb;
|
905 |
+
|
906 |
+
$useremails = explode(",", $emails);
|
907 |
+
$useremails = implode("', '", $useremails);
|
908 |
+
|
909 |
+
$sql = "SELECT ID FROM $wpdb->users WHERE user_email IN ('$useremails')";
|
910 |
+
$user_IDs = $wpdb->get_col($sql);
|
911 |
+
$cats = $_POST['category'];
|
912 |
+
if (! is_array($cats)) {
|
913 |
+
$cats = array($_POST['category']);
|
914 |
+
}
|
915 |
+
|
916 |
+
foreach ($user_IDs as $user_ID) {
|
917 |
+
$old_cats = explode(',', get_usermeta($user_ID, 's2_subscribed'));
|
918 |
+
if (! is_array($old_cats)) {
|
919 |
+
$old_cats = array($old_cats);
|
920 |
+
}
|
921 |
+
$new = array_diff($cats, $old_cats);
|
922 |
+
if (! empty($new)) {
|
923 |
+
// add subscription to these cat IDs
|
924 |
+
foreach ($new as $id) {
|
925 |
+
update_usermeta($user_ID, 's2_cat' . $id, "$id");
|
926 |
+
}
|
927 |
+
}
|
928 |
+
$newcats = array_merge($cats, $old_cats);
|
929 |
+
update_usermeta($user_ID, 's2_subscribed', implode(',', $newcats));
|
930 |
+
}
|
931 |
+
} // end subscribe_registered_users
|
932 |
+
|
933 |
+
/**
|
934 |
+
Unsubscribe all registered users to category selected on Admin Manage Page
|
935 |
+
*/
|
936 |
+
function unsubscribe_registered_users ($emails = '', $cats = '') {
|
937 |
+
if (('' == $emails) || ('' == $cats)) { return false; }
|
938 |
+
global $wpdb;
|
939 |
+
|
940 |
+
$useremails = explode(",", $emails);
|
941 |
+
$useremails = implode("', '", $useremails);
|
942 |
+
|
943 |
+
$sql = "SELECT ID FROM $wpdb->users WHERE user_email IN ('$useremails')";
|
944 |
+
$user_IDs = $wpdb->get_col($sql);
|
945 |
+
$cats = $_POST['category'];
|
946 |
+
if (! is_array($cats)) {
|
947 |
+
$cats = array($_POST['category']);
|
948 |
+
}
|
949 |
+
|
950 |
+
foreach ($user_IDs as $user_ID) {
|
951 |
+
$old_cats = explode(',', get_usermeta($user_ID, 's2_subscribed'));
|
952 |
+
if (! is_array($old_cats)) {
|
953 |
+
$old_cats = array($old_cats);
|
954 |
+
}
|
955 |
+
$remain = array_diff($old_cats, $cats);
|
956 |
+
if (! empty($remain)) {
|
957 |
+
// remove subscription to these cat IDs and update s2_subscribed
|
958 |
+
foreach ($cats as $id) {
|
959 |
+
delete_usermeta($user_ID, 's2_cat' . $id, "$id");
|
960 |
+
}
|
961 |
+
update_usermeta($user_ID, 's2_subscribed', implode(',', $remain));
|
962 |
+
} else {
|
963 |
+
// remove subscription to these cat IDs and update s2_subscribed to ''
|
964 |
+
foreach ($cats as $id) {
|
965 |
+
delete_usermeta($user_ID, 's2_cat' . $id, "$id");
|
966 |
+
}
|
967 |
+
update_usermeta($user_ID, 's2_subscribed', '');
|
968 |
+
}
|
969 |
+
}
|
970 |
+
} // end unsubscribe_registered_users
|
971 |
+
|
972 |
+
/* ===== Menus ===== */
|
973 |
+
/**
|
974 |
+
Our management page
|
975 |
+
*/
|
976 |
+
function manage_menu() {
|
977 |
+
global $wpdb;
|
978 |
+
|
979 |
+
$what = '';
|
980 |
+
$reminderform = '';
|
981 |
+
|
982 |
+
// was anything POSTed ?
|
983 |
+
if (isset($_POST['s2_admin'])) {
|
984 |
+
if ('subscribe' == $_POST['s2_admin']) {
|
985 |
+
foreach (preg_split ("/[\s,]+/", $_POST['addresses']) as $email) {
|
986 |
+
if (is_email($email)) {
|
987 |
+
$this->activate($email);
|
988 |
+
}
|
989 |
+
}
|
990 |
+
$_POST['what'] = 'confirmed';
|
991 |
+
echo "<div id=\"message\" class=\"updated fade\"><strong><p>" . __('Address(es) subscribed!', 'subscribe2') . "</p></strong></div>";
|
992 |
+
} elseif ('delete' == $_POST['s2_admin']) {
|
993 |
+
$this->delete($_POST['email']);
|
994 |
+
echo "<div id=\"message\" class=\"updated fade\"><strong><p>" . $_POST['email'] . ' ' . __('deleted!', 'subscribe2') . "</p></strong></div>";
|
995 |
+
} elseif ('toggle' == $_POST['s2_admin']) {
|
996 |
+
$this->toggle($_POST['email']);
|
997 |
+
echo "<div id=\"message\" class=\"updated fade\"><strong><p>" . $_POST['email'] . ' ' . __('status changed!', 'subscribe2') . "</p></strong></div>";
|
998 |
+
} elseif ('remind' == $_POST['s2_admin']) {
|
999 |
+
$this->remind($_POST['emails']);
|
1000 |
+
echo "<div id=\"message\" class=\"updated fade\"><strong><p>" . __('Reminder Email(s) Sent!','subscribe2') . "</p></strong></div>";
|
1001 |
+
} elseif ( ('register' == $_POST['s2_admin']) && ('Subscribe' == $_POST['submit']) ) {
|
1002 |
+
$this->subscribe_registered_users($_POST['emails'], $_POST['category']);
|
1003 |
+
echo "<div id=\"message\" class=\"updated fade\"><strong><p>" . __('Registered Users Subscribed!','subscribe2') . "</p></strong></div>";
|
1004 |
+
} elseif ( ('register' == $_POST['s2_admin']) && ('Unsubscribe' == $_POST['submit']) ) {
|
1005 |
+
$this->unsubscribe_registered_users($_POST['emails'], $_POST['category']);
|
1006 |
+
echo "<div id=\"message\" class=\"updated fade\"><strong><p>" . __('Registered Users Unsubscribed!','subscribe2') . "</p></strong></div>";
|
1007 |
+
}
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
if (isset($_POST['what'])) {
|
1011 |
+
if ('all' == $_POST['what']) {
|
1012 |
+
$what = 'all';
|
1013 |
+
$confirmed = $this->get_public();
|
1014 |
+
$unconfirmed = $this->get_public(0);
|
1015 |
+
$registered = $this->get_registered();
|
1016 |
+
$subscribers = array_merge((array)$confirmed, (array)$unconfirmed, (array)$registered);
|
1017 |
+
} elseif ('public' == $_POST['what']) {
|
1018 |
+
$what = 'public';
|
1019 |
+
$confirmed = $this->get_public();
|
1020 |
+
$unconfirmed = $this->get_public(0);
|
1021 |
+
$subscribers = array_merge((array)$confirmed, (array)$unconfirmed);
|
1022 |
+
} elseif ('confirmed' == $_POST['what']) {
|
1023 |
+
$what = 'confirmed';
|
1024 |
+
$confirmed = $this->get_public();
|
1025 |
+
$subscribers = $confirmed;
|
1026 |
+
} elseif ('unconfirmed' == $_POST['what']) {
|
1027 |
+
$what = 'unconfirmed';
|
1028 |
+
$unconfirmed = $this->get_public(0);
|
1029 |
+
$subscribers = $unconfirmed;
|
1030 |
+
if (!empty($unconfirmed)) {
|
1031 |
+
$emails = implode(",", $unconfirmed);
|
1032 |
+
$reminderform = "<span class=\"submit\"><form method=\"post\" action=\"\"><input type=\"hidden\" name=\"emails\" value=\"$emails\" /><input type=\"hidden\" name=\"s2_admin\" value=\"remind\" /><input type=\"submit\" name=\"submit\" value=\"" . __('Send Reminder Email','subscribe2') . "\" /></form></span>";
|
1033 |
+
}
|
1034 |
+
} elseif (is_numeric($_POST['what'])) {
|
1035 |
+
$what = intval($_POST['what']);
|
1036 |
+
$subscribers = $this->get_registered("cats=$what");
|
1037 |
+
} elseif ('registered' == $_POST['what']) {
|
1038 |
+
$what = 'registered';
|
1039 |
+
$subscribers = $this->get_registered();
|
1040 |
+
if(!empty($subscribers)) {
|
1041 |
+
$emails = implode(",", $subscribers);
|
1042 |
+
}
|
1043 |
+
}
|
1044 |
+
} elseif ('' == $what) {
|
1045 |
+
$subscribers = $this->get_registered();
|
1046 |
+
$what = 'registered';
|
1047 |
+
$registermessage = '';
|
1048 |
+
if (empty($subscribers)) {
|
1049 |
+
$confirmed = $this->get_public();
|
1050 |
+
$subscribers = $confirmed;
|
1051 |
+
$what = 'confirmed';
|
1052 |
+
if (empty ($subscribers)) {
|
1053 |
+
$unconfirmed = $this->get_public(0);
|
1054 |
+
$subscribers = $unconfirmed;
|
1055 |
+
$what = 'unconfirmed';
|
1056 |
+
if (empty($subscribers)) {
|
1057 |
+
$what = 'all';
|
1058 |
+
}
|
1059 |
+
}
|
1060 |
+
}
|
1061 |
+
}
|
1062 |
+
if (! empty($subscribers)) {
|
1063 |
+
sort($subscribers);
|
1064 |
+
}
|
1065 |
+
// safety check for our arrays
|
1066 |
+
if ('' == $confirmed) { $confirmed = array(); }
|
1067 |
+
if ('' == $unconfirmed) { $unconfirmed = array(); }
|
1068 |
+
if ('' == $registered) { $registered = array(); }
|
1069 |
+
|
1070 |
+
// show our form
|
1071 |
+
echo "<div class=\"wrap\">";
|
1072 |
+
echo "<h2>" . __('Subscribe Addresses', 'subscribe2') . "</h2>\r\n";
|
1073 |
+
echo "<form method=\"post\" action=\"\">\r\n";
|
1074 |
+
echo "<span style=\"align:left\">" . __('Enter addresses, one per line or comma-seperated', 'subscribe2') . "</span><br />\r\n";
|
1075 |
+
echo "<textarea rows=\"2\" cols=\"80\" name=\"addresses\"></textarea>";
|
1076 |
+
echo "<span class=\"submit\"><input type=\"submit\" name=\"submit\" value=\"" . __('Subscribe', 'subscribe2') . "\"/>";
|
1077 |
+
echo "<input type=\"hidden\" name=\"s2_admin\" value=\"subscribe\" /></span>";
|
1078 |
+
echo "</form></div>";
|
1079 |
+
|
1080 |
+
// subscriber lists
|
1081 |
+
echo "<div class=\"wrap\"><h2>" . __('Subscribers', 'subscribe2') . "</h2>\r\n";
|
1082 |
+
|
1083 |
+
$this->display_subscriber_dropdown($what, __('Filter', 'subscribe2'));
|
1084 |
+
// show the selected subscribers
|
1085 |
+
$alternate = 'alternate';
|
1086 |
+
if (! empty($subscribers)) {
|
1087 |
+
echo "<p align=\"center\"><b>" . __('Registered on the left, confirmed in the middle, unconfirmed on the right', 'subscribe2') . "</b></p>";
|
1088 |
+
}
|
1089 |
+
echo "<table cellpadding=\"2\" cellspacing=\"2\">";
|
1090 |
+
if (! empty($subscribers)) {
|
1091 |
+
foreach ($subscribers as $subscriber) {
|
1092 |
+
echo "<tr class=\"$alternate\">";
|
1093 |
+
echo "<td width=\"75%\"";
|
1094 |
+
if (in_array($subscriber, $unconfirmed)) {
|
1095 |
+
echo " align=\"right\">";
|
1096 |
+
} elseif (in_array($subscriber, $confirmed)) {
|
1097 |
+
echo "align=\"center\">";
|
1098 |
+
} else {
|
1099 |
+
echo "align=\"left\" colspan=\"3\">";
|
1100 |
+
}
|
1101 |
+
echo "<a href=\"mailto:$subscriber\">$subscriber</a>\r\n";
|
1102 |
+
if ( in_array($subscriber, $unconfirmed) || in_array($subscriber, $confirmed) ) {
|
1103 |
+
echo "(" . $this->signup_date($subscriber) . ")</td>";
|
1104 |
+
echo "<td width=\"5%\" align=\"center\"><form method=\"post\" action=\"\"><input type=\"hidden\" name=\"email\" value=\"$subscriber\" /><input type=\"hidden\" name=\"s2_admin\" value=\"toggle\" /><input type=\"hidden\" name=\"what\" value=\"$what\" /><input type=\"submit\" name=\"submit\" value=\"";
|
1105 |
+
(in_array($subscriber, $unconfirmed)) ? $foo = '<-' : $foo= '->';
|
1106 |
+
echo "$foo\" /></form></td>";
|
1107 |
+
echo "<td width=\"2%\" align=\"center\"><form method=\"post\" action=\"\"><span class=\"delete\"><input type=\"hidden\" name=\"email\" value=\"$subscriber\" /><input type=\"hidden\" name=\"s2_admin\" value=\"delete\" /><input type=\"hidden\" name=\"what\" value=\"$what\" /><input type=\"submit\" name=\"submit\" value=\"X\" /></span></form>";
|
1108 |
+
}
|
1109 |
+
echo "</td></tr>\r\n";
|
1110 |
+
('alternate' == $alternate) ? $alternate = '' : $alternate = 'alternate';
|
1111 |
+
}
|
1112 |
+
} else {
|
1113 |
+
echo "<tr><td align=\"center\"><b>" . __('NONE', 'subscribe2') . "</b></td></tr>\r\n";
|
1114 |
+
}
|
1115 |
+
echo "</table>";
|
1116 |
+
if (!empty($reminderform)) {echo $reminderform;}
|
1117 |
+
echo "</div>\r\n";
|
1118 |
+
|
1119 |
+
//show bulk managment form
|
1120 |
+
echo "<div class=\"wrap\">";
|
1121 |
+
echo "<h2 >" . __('Categories', 'subscribe2') . "</h2>\r\n";
|
1122 |
+
echo "Existing Registered Users can be automatically (un)subscribed to categories using this section.<br />\r\n";
|
1123 |
+
echo "<strong>Changes cannot be undone</strong> so carefully consider <strong><em style=\"color: red\">User Privacy</em></strong> before making changes.";
|
1124 |
+
echo "<span class=\"submit\"><form method=\"post\" action=\"\"><input type=\"hidden\" name=\"emails\" value=\"$emails\" /><input type=\"hidden\" name=\"s2_admin\" value=\"register\" />";
|
1125 |
+
$this->display_category_form(explode(',', $this->get_excluded_cats()));
|
1126 |
+
echo "<input type=\"submit\" id=\"deletepost\" name=\"submit\" value=\"" . __('Subscribe','subscribe2') . "\" />";
|
1127 |
+
echo "<input type=\"submit\" id=\"deletepost\" name=\"submit\" value=\"" . __('Unsubscribe','subscribe2') . "\" /></form></span>";
|
1128 |
+
|
1129 |
+
echo "</div>\r\n";
|
1130 |
+
|
1131 |
+
echo "<div style=\"clear: both;\"><p> </p></div>";
|
1132 |
+
|
1133 |
+
include(ABSPATH . '/wp-admin/admin-footer.php');
|
1134 |
+
// just to be sure
|
1135 |
+
die;
|
1136 |
+
} // end manage_menu()
|
1137 |
+
|
1138 |
+
/**
|
1139 |
+
Our options page
|
1140 |
+
*/
|
1141 |
+
function options_menu() {
|
1142 |
+
// was anything POSTed?
|
1143 |
+
if (isset($_POST['s2_admin'])) {
|
1144 |
+
if ('RESET' == $_POST['s2_admin']) {
|
1145 |
+
$this->reset();
|
1146 |
+
echo "<div id=\"message\" class=\"updated fade\"><strong><p>$this->options_reset</p></strong></div>";
|
1147 |
+
} elseif ('options' == $_POST['s2_admin']) {
|
1148 |
+
// excluded categories
|
1149 |
+
if (! empty($_POST['category'])) {
|
1150 |
+
$exclude_cats = implode(',', $_POST['category']);
|
1151 |
+
} else {
|
1152 |
+
$exclude_cats = '';
|
1153 |
+
}
|
1154 |
+
update_option('s2_exclude', $exclude_cats);
|
1155 |
+
// allow override?
|
1156 |
+
(isset($_POST['override'])) ? $override = '1' : $override = '0';
|
1157 |
+
update_option('s2_reg_override', $override);
|
1158 |
+
|
1159 |
+
// show button?
|
1160 |
+
(isset($_POST['showbutton'])) ? $showbutton = '1' : $showbutton = '0';
|
1161 |
+
update_option('s2_show_button', $showbutton);
|
1162 |
+
|
1163 |
+
// send as author or admin?
|
1164 |
+
$sender = 'author';
|
1165 |
+
if ('admin' == $_POST['s2_sender']) {
|
1166 |
+
$sender = 'admin';
|
1167 |
+
}
|
1168 |
+
update_option('s2_sender', $sender);
|
1169 |
+
|
1170 |
+
// email templates
|
1171 |
+
$mailtext = $_POST['s2_mailtext'];
|
1172 |
+
update_option('s2_mailtext', $mailtext);
|
1173 |
+
$confirm_email = $_POST['s2_confirm_email'];
|
1174 |
+
update_option('s2_confirm_email', $confirm_email);
|
1175 |
+
$remind_email = $_POST['s2_remind_email'];
|
1176 |
+
update_option('s2_remind_email', $remind_email);
|
1177 |
+
|
1178 |
+
//barred domains
|
1179 |
+
$barred_option = $_POST['s2_barred'];
|
1180 |
+
update_option('s2_barred', $barred_option);
|
1181 |
+
echo "<div id=\"message\" class=\"updated fade\"><strong><p>$this->options_saved</p></strong></div>";
|
1182 |
+
}
|
1183 |
+
}
|
1184 |
+
// show our form
|
1185 |
+
$this->sender = get_option('s2_sender');
|
1186 |
+
$this->mailtext = get_option('s2_mailtext');
|
1187 |
+
$this->confirm_email = get_option('s2_confirm_email');
|
1188 |
+
$this->remind_email = get_option('s2_remind_email');
|
1189 |
+
$this->override = get_option('s2_reg_override');
|
1190 |
+
$this->show_button = get_option('s2_show_button');
|
1191 |
+
$this->barred_option = get_option('s2_barred');
|
1192 |
+
|
1193 |
+
echo "<div class=\"wrap\">";
|
1194 |
+
echo "<form method=\"post\" action=\"\">";
|
1195 |
+
echo "<input type=\"hidden\" name=\"s2_admin\" value=\"options\" />";
|
1196 |
+
echo "<h2>" . __('Delivery Options', 'subscribe2') . ":</h2>";
|
1197 |
+
echo __('Send Email From', 'subscribe2') . ': ';
|
1198 |
+
echo "<input type=\"radio\" name=\"s2_sender\" value=\"author\" ";
|
1199 |
+
if ('author' == $this->sender) {
|
1200 |
+
echo "checked=\"checked\" ";
|
1201 |
+
}
|
1202 |
+
echo " /> " . __('Author of the post', 'subscribe2') . " ";
|
1203 |
+
echo "<input type=\"radio\" name=\"s2_sender\" value=\"admin\" ";
|
1204 |
+
if ('admin' == $this->sender) {
|
1205 |
+
echo "checked=\"checked\" ";
|
1206 |
+
}
|
1207 |
+
echo " /> " . __('Blog Admin', 'subscribe2') . "<br />\r\n";
|
1208 |
+
echo "<h2>" . __('Email Templates', 'subscribe2') . "</h2>\r\n";
|
1209 |
+
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"1\" class=\"editform\">";
|
1210 |
+
echo "<tr><td>";
|
1211 |
+
echo __('New Post email (must not be empty)', 'subscribe2') . ":";
|
1212 |
+
echo "<br />\r\n";
|
1213 |
+
echo "<textarea rows=\"9\" cols=\"60\" name=\"s2_mailtext\">" . stripslashes($this->mailtext) . "</textarea><p>\r\n";
|
1214 |
+
echo "</td><td valign=\"top\" rowspan=\"3\">";
|
1215 |
+
echo "<h3>" . __('Message substitions', 'subscribe2') . "</h3>\r\n";
|
1216 |
+
echo "<dl>";
|
1217 |
+
echo "<dt><b>BLOGNAME</b></dt><dd>" . get_bloginfo('name') . "</dd>\r\n";
|
1218 |
+
echo "<dt><b>BLOGLINK</b></dt><dd>" . get_bloginfo('url') . "</dd>\r\n";
|
1219 |
+
echo "<dt><b>TITLE</b></dt><dd>" . __("the post's title", 'subscribe2') . "</dd>\r\n";
|
1220 |
+
echo "<dt><b>POST</b></dt><dd>" . __("the excerpt or the entire post<br />(<i>based on the subscriber's preferences</i>)", 'subscribe2') . "</dd>\r\n";
|
1221 |
+
echo "<dt><b>PERMALINK</b></dt><dd>" . __("the post's permalink", 'subscribe2') . "</dd>\r\n";
|
1222 |
+
echo "<dt><b>MYNAME</b></dt><dd>" . __("the admin or post author's name", 'subscribe2') . "</dd>\r\n";
|
1223 |
+
echo "<dt><b>EMAIL</b></dt><dd>" . __("the admin or post author's email", 'subscribe2') . "</dd>\r\n";
|
1224 |
+
echo "<dt><b>LINK</b></dt><dd>" . __('the generated link to confirm a request<br />(<i>only used in the confirmation email template</i>)', 'subscribe2') . "</dd>\r\n";
|
1225 |
+
echo "</dl></td></tr><tr><td>";
|
1226 |
+
echo __('Subscribe / Unsubscribe confirmation email', 'subscribe2') . ":<br />\r\n";
|
1227 |
+
echo "<textarea rows=\"9\" cols=\"60\" name=\"s2_confirm_email\">" . stripslashes($this->confirm_email) . "</textarea><p>";
|
1228 |
+
echo "</td></tr><tr><td>";
|
1229 |
+
echo __('Reminder email to Unconfirmed Subscribers', 'subscribe2') . ":<br />\r\n";
|
1230 |
+
echo "<textarea rows=\"9\" cols=\"60\" name=\"s2_remind_email\">" . stripslashes($this->remind_email) . "</textarea><p>";
|
1231 |
+
echo "</td></tr></table>\r\n";
|
1232 |
+
|
1233 |
+
// excluded categories
|
1234 |
+
echo "<h2>" . __('Excluded Categories', 'subscribe2') . "</h2>\r\n";
|
1235 |
+
$this->display_category_form(explode(',', $this->get_excluded_cats()));
|
1236 |
+
|
1237 |
+
echo "<p align=\"center\"><input type=\"checkbox\" name=\"override\" ";
|
1238 |
+
if ('1' == $this->override) {
|
1239 |
+
echo "checked=\"checked\"";
|
1240 |
+
}
|
1241 |
+
echo "/> " . __('Allow registered users to subscribe to excluded categories?', 'subscribe2') . "</p>";
|
1242 |
+
echo "<h2>" . __('Writing Options', 'subscribe2') . "</h2>\r\n";
|
1243 |
+
echo "<p align=\"center\"><input type=\"checkbox\" name=\"showbutton\" ";
|
1244 |
+
if ('1' == $this->show_button) {
|
1245 |
+
echo "checked=\"checked\"";
|
1246 |
+
}
|
1247 |
+
echo "/> " . __('Show the Subscribe2 button on the Write toolbar?', 'subscribe2') . "</p>";
|
1248 |
+
|
1249 |
+
//barred domains
|
1250 |
+
echo "<h2>" . __('Barred Domains', 'subscribe2') . "</h2>\r\n";
|
1251 |
+
echo __('Enter domains to bar from public subscriptions: <br /> (Use a new line for each entry and omit the "@" symbol, for example email.com)', 'subscribe2');
|
1252 |
+
echo "<textarea style=\"width: 98%;\" rows=\"4\" cols=\"60\" name=\"s2_barred\">" . $this->barred_option . "</textarea>";
|
1253 |
+
|
1254 |
+
// submit
|
1255 |
+
echo "<p align=\"center\"><span class=\"submit\"><input type=\"submit\" id=\"save\" name=\"submit\" value=\"" . __('Submit', 'subscribe2') . "\" /></span></p>";
|
1256 |
+
echo "</form>\r\n";
|
1257 |
+
|
1258 |
+
echo "</div><div class=\"wrap\">";
|
1259 |
+
// reset
|
1260 |
+
echo "<h2>" . __('Reset Default', 'subscribe2') . "</h2>\r\n";
|
1261 |
+
echo "<p>" . __('Use this to reset all options to their defaults. This <strong><em>will not</em></strong> modify your list of subscribers.', 'subscribe2') . "</p>\r\n";
|
1262 |
+
echo "<form method=\"post\" action=\"\">";
|
1263 |
+
echo "<p align=\"center\"><span class=\"submit\">";
|
1264 |
+
echo "<input type=\"hidden\" name=\"s2_admin\" value=\"RESET\" />";
|
1265 |
+
echo "<input type=\"submit\" id=\"deletepost\" name=\"submit\" value=\"" . __('RESET', 'subscribe2') .
|
1266 |
+
"\" />";
|
1267 |
+
echo "</span></p></form></div>\r\n";
|
1268 |
+
|
1269 |
+
include(ABSPATH . '/wp-admin/admin-footer.php');
|
1270 |
+
// just to be sure
|
1271 |
+
die;
|
1272 |
+
} // end options_menu()
|
1273 |
+
|
1274 |
+
/**
|
1275 |
+
Our profile menu
|
1276 |
+
*/
|
1277 |
+
function user_menu() {
|
1278 |
+
global $user_ID;
|
1279 |
+
|
1280 |
+
get_currentuserinfo();
|
1281 |
+
|
1282 |
+
// was anything POSTed?
|
1283 |
+
if ( (isset($_POST['s2_admin'])) && ('user' == $_POST['s2_admin']) ) {
|
1284 |
+
$format = 'text';
|
1285 |
+
$post = 'post';
|
1286 |
+
if ('html' == $_POST['s2_format']) {
|
1287 |
+
$format = 'html';
|
1288 |
+
}
|
1289 |
+
if ('excerpt' == $_POST['s2_excerpt']) {
|
1290 |
+
$post = 'excerpt';
|
1291 |
+
}
|
1292 |
+
update_usermeta($user_ID, 's2_excerpt', $post);
|
1293 |
+
update_usermeta($user_ID, 's2_format', $format);
|
1294 |
+
|
1295 |
+
$cats = $_POST['category'];
|
1296 |
+
if (empty($cats)) {
|
1297 |
+
$cats = explode(',', get_usermeta($user_ID, 's2_subscribed'));
|
1298 |
+
if ($cats) {
|
1299 |
+
foreach ($cats as $cat) {
|
1300 |
+
delete_usermeta($user_ID, "s2_cat" . $cat);
|
1301 |
+
}
|
1302 |
+
}
|
1303 |
+
update_usermeta($user_ID, 's2_subscribed', '');
|
1304 |
+
} else {
|
1305 |
+
if (! is_array($cats)) {
|
1306 |
+
$cats = array($_POST['category']);
|
1307 |
+
}
|
1308 |
+
$old_cats = explode(',', get_usermeta($user_ID, 's2_subscribed'));
|
1309 |
+
$remove = array_diff($old_cats, $cats);
|
1310 |
+
$new = array_diff($cats, $old_cats);
|
1311 |
+
if (! empty($remove)) {
|
1312 |
+
// remove subscription to these cat IDs
|
1313 |
+
foreach ($remove as $id) {
|
1314 |
+
delete_usermeta($user_ID, "s2_cat" .$id);
|
1315 |
+
}
|
1316 |
+
}
|
1317 |
+
if (! empty($new)) {
|
1318 |
+
// add subscription to these cat IDs
|
1319 |
+
foreach ($new as $id) {
|
1320 |
+
update_usermeta($user_ID, 's2_cat' . $id, "$id");
|
1321 |
+
}
|
1322 |
+
}
|
1323 |
+
update_usermeta($user_ID, 's2_subscribed', implode(',', $cats));
|
1324 |
+
}
|
1325 |
+
}
|
1326 |
+
|
1327 |
+
// show our form
|
1328 |
+
echo "<div class=\"wrap\">";
|
1329 |
+
echo "<h2>" . __('Notification Settings', 'subscribe2') . "</h2>\r\n";
|
1330 |
+
echo "<form method=\"post\" action=\"\">";
|
1331 |
+
echo "<input type=\"hidden\" name=\"s2_admin\" value=\"user\" />";
|
1332 |
+
if ( defined('S2DIGEST') && FALSE == S2DIGEST ) {
|
1333 |
+
echo __('Receive email as', 'subscribe2') . ": ";
|
1334 |
+
echo "<input type=\"radio\" name=\"s2_format\" value=\"html\"";
|
1335 |
+
if ('html' == get_usermeta($user_ID, 's2_format')) {
|
1336 |
+
echo "checked=\"checked\" ";
|
1337 |
+
}
|
1338 |
+
echo "/> " . __('HTML', 'subscribe2') ." ";
|
1339 |
+
echo "<input type=\"radio\" name=\"s2_format\" value=\"text\" ";
|
1340 |
+
if ('text' == get_usermeta($user_ID, 's2_format')) {
|
1341 |
+
echo "checked=\"checked\" ";
|
1342 |
+
}
|
1343 |
+
echo "/> " . __('Plain Text', 'subscribe2') . "<br /><br />\r\n";
|
1344 |
+
|
1345 |
+
echo __('Email contains', 'subscribe2') . ": ";
|
1346 |
+
$amount = array ('excerpt' => __('Excerpt Only', 'subscribe2'), 'post' => __('Full Post', 'subscribe2'));
|
1347 |
+
foreach ($amount as $key => $value) {
|
1348 |
+
echo "<input type=\"radio\" name=\"s2_excerpt\" value=\"" . $key . "\"";
|
1349 |
+
if ($key == get_usermeta($user_ID, 's2_excerpt')) {
|
1350 |
+
echo " checked=\"checked\"";
|
1351 |
+
}
|
1352 |
+
echo " /> $value ";
|
1353 |
+
}
|
1354 |
+
_e('<p>Note: HTML format will always deliver the full post.</p>', 'subscribe2');
|
1355 |
+
|
1356 |
+
// subscribed categories
|
1357 |
+
echo "<h2>" . __('Subscribed Categories', 'subscribe2') . "</h2>\r\n";
|
1358 |
+
$this->display_category_form(explode(',', get_usermeta($user_ID, 's2_subscribed')), get_option('s2_reg_override'));
|
1359 |
+
} else {
|
1360 |
+
// we're doing daily digests, so just show
|
1361 |
+
// subscribe / unnsubscribe
|
1362 |
+
echo __('Receive daily summary of new posts?', 'subscribe2') . ': ';
|
1363 |
+
echo "<input type=\"radio\" name=\"category\" value=\"1\" ";
|
1364 |
+
if (get_usermeta($user_ID, 's2_subscribed')) {
|
1365 |
+
echo "checked=\"yes\" ";
|
1366 |
+
}
|
1367 |
+
echo "/> Yes <input type=\"radio\" name=\"category\" value=\"\" ";
|
1368 |
+
if (! get_usermeta($user_ID, 's2_subscribed')) {
|
1369 |
+
echo "checked=\"yes\" ";
|
1370 |
+
}
|
1371 |
+
echo "/> No";
|
1372 |
+
}
|
1373 |
+
|
1374 |
+
// submit
|
1375 |
+
echo "<p align=\"right\"><span class=\"submit\"><input type=\"submit\" name=\"submit\" value=\"" . __("Update Preferences »", 'subscribe2') . "\" /></span></p>";
|
1376 |
+
echo "</form></div>\r\n";
|
1377 |
+
|
1378 |
+
|
1379 |
+
include(ABSPATH . '/wp-admin/admin-footer.php');
|
1380 |
+
// just to be sure
|
1381 |
+
die;
|
1382 |
+
} // end user_menu()
|
1383 |
+
|
1384 |
+
/**
|
1385 |
+
Display the Write sub-menu
|
1386 |
+
*/
|
1387 |
+
function write_menu() {
|
1388 |
+
// was anything POSTed?
|
1389 |
+
if (isset($_POST['s2_admin']) && ('mail' == $_POST['s2_admin']) ) {
|
1390 |
+
if ('confirmed' == $_POST['what']) {
|
1391 |
+
$recipients = $this->get_public();
|
1392 |
+
} elseif ('unconfirmed' == $_POST['what']) {
|
1393 |
+
$recipients = $this->get_public(0);
|
1394 |
+
} elseif ('public' == $_POST['what']) {
|
1395 |
+
$confirmed = $this->get_public();
|
1396 |
+
$unconfirmed = $this->get_public(0);
|
1397 |
+
$recipients = array_merge((array)$confirmed, (array)$unconfirmed);
|
1398 |
+
} elseif (is_numeric($_POST['what'])) {
|
1399 |
+
$cat = intval($_POST['what']);
|
1400 |
+
$recipients = $this->get_registered("cats=$cat");
|
1401 |
+
} else {
|
1402 |
+
$recipients = $this->get_registered();
|
1403 |
+
}
|
1404 |
+
global $user_identity, $user_email;
|
1405 |
+
get_currentuserinfo();
|
1406 |
+
$this->myname = $user_identity;
|
1407 |
+
$this->myemail = $user_email;
|
1408 |
+
$subject = strip_tags($_POST['subject']);
|
1409 |
+
$message = $_POST['message'];
|
1410 |
+
$this->mail($recipients, $subject, $message, 'text');
|
1411 |
+
$message = $this->mail_sent;
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
if ('' != $message) {
|
1415 |
+
echo "<div id=\"message\" class=\"updated\"><strong><p>" . $message . "</p></strong></div>\r\n";
|
1416 |
+
}
|
1417 |
+
// show our form
|
1418 |
+
echo "<div class=\"wrap\"><h2>" . __('Send email to all subscribers', 'subscribe2') . "</h2>\r\n";
|
1419 |
+
echo "<form method=\"post\" action=\"\">\r\n";
|
1420 |
+
echo __('Subject', 'subscribe2') . ": <input type=\"text\" size=\"69\" name=\"subject\" value=\"" . __('A message from ', 'subscribe2') . get_settings('blogname') . "\" /> <br />";
|
1421 |
+
echo "<textarea rows=\"12\" cols=\"75\" name=\"message\"></textarea>";
|
1422 |
+
echo "<br />\r\n";
|
1423 |
+
echo __('Recipients: ', 'subscribe2');
|
1424 |
+
$this->display_subscriber_dropdown('registered', false, array('all'));
|
1425 |
+
echo "<input type=\"hidden\" name=\"s2_admin\" value=\"mail\" />";
|
1426 |
+
echo " <span class=\"submit\"><input type=\"submit\" name=\"submit\" value=\"" . __('Send', 'subscribe2') . "\" /></span> ";
|
1427 |
+
echo "</form></div>\r\n";
|
1428 |
+
echo "<div style=\"clear: both;\"><p> </p></div>";
|
1429 |
+
|
1430 |
+
include(ABSPATH . '/wp-admin/admin-footer.php');
|
1431 |
+
// just to be sure
|
1432 |
+
die;
|
1433 |
+
} // end write_menu()
|
1434 |
+
|
1435 |
+
/* ===== helper functions: forms and stuff ===== */
|
1436 |
+
/**
|
1437 |
+
Display a table of categories with checkboxes
|
1438 |
+
|
1439 |
+
Optionally pre-select those categories specified
|
1440 |
+
*/
|
1441 |
+
function display_category_form($selected = array(), $override = 1) {
|
1442 |
+
global $wpdb;
|
1443 |
+
|
1444 |
+
$all_cats = $this->get_all_categories('array');
|
1445 |
+
if (0 == $override) {
|
1446 |
+
// registered users are not allowed to subscribe to
|
1447 |
+
// excluded categories
|
1448 |
+
foreach (explode(',', $this->get_excluded_cats()) as $cat) {
|
1449 |
+
$category = get_category($cat);
|
1450 |
+
$excluded[$cat] = $category->cat_name;
|
1451 |
+
}
|
1452 |
+
$all_cats = array_diff($all_cats, $excluded);
|
1453 |
+
}
|
1454 |
+
|
1455 |
+
$half = (count($all_cats) / 2);
|
1456 |
+
$i = 0;
|
1457 |
+
$j = 0;
|
1458 |
+
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"5\" class=\"editform\">";
|
1459 |
+
echo "<tr valign=\"top\"><td width=\"50%\" align=\"left\">";
|
1460 |
+
foreach ($all_cats as $cat_ID => $cat_name) {
|
1461 |
+
if ( ($i >= $half) && (0 == $j) ){
|
1462 |
+
echo "</td><td width=\"50%\" align=\"left\">";
|
1463 |
+
$j++;
|
1464 |
+
}
|
1465 |
+
if (0 == $j) {
|
1466 |
+
echo "<input type=\"checkbox\" name=\"category[]\" value=\"" . $cat_ID . "\"";
|
1467 |
+
if (in_array($cat_ID, $selected)) {
|
1468 |
+
echo " checked=\"checked\" ";
|
1469 |
+
}
|
1470 |
+
echo " /> " . $cat_name . "<br />\r\n";
|
1471 |
+
} else {
|
1472 |
+
|
1473 |
+
echo "<input type=\"checkbox\" name=\"category[]\" value=\"" . $cat_ID . "\"";
|
1474 |
+
if (in_array($cat_ID, $selected)) {
|
1475 |
+
echo " checked=\"checked\" ";
|
1476 |
+
}
|
1477 |
+
echo " /> " . $cat_name . "<br />\r\n";
|
1478 |
+
}
|
1479 |
+
$i++;
|
1480 |
+
}
|
1481 |
+
echo "</td></tr></table>\r\n";
|
1482 |
+
} // end display_category_form()
|
1483 |
+
|
1484 |
+
/**
|
1485 |
+
Display a drop-down form to select subscribers
|
1486 |
+
|
1487 |
+
$selected is the option to select
|
1488 |
+
$submit is the text to use on the Submit button
|
1489 |
+
*/
|
1490 |
+
function display_subscriber_dropdown ($selected = 'registered', $submit = '', $exclude = array()) {
|
1491 |
+
global $wpdb;
|
1492 |
+
|
1493 |
+
$who = array('all' => __('All Subscribers', 'subscribe2'),
|
1494 |
+
'public' => __('Public Subscribers', 'subscribe2'),
|
1495 |
+
'confirmed' => ' ' . __('Confirmed', 'subscribe2'),
|
1496 |
+
'unconfirmed' => ' ' . __('Unconfirmed', 'subscribe2'),
|
1497 |
+
'registered' => __('Registered Subscribers', 'subscribe2'));
|
1498 |
+
|
1499 |
+
// count the number of subscribers
|
1500 |
+
$count['confirmed'] = $wpdb->get_var("SELECT COUNT(id) FROM $this->public WHERE active='1'");
|
1501 |
+
$count['unconfirmed'] = $wpdb->get_var("SELECT COUNT(id) FROM $this->public WHERE active='0'");
|
1502 |
+
if (in_array('unconfirmed', $exclude)) {
|
1503 |
+
$count['public'] = $count['confirmed'];
|
1504 |
+
} elseif (in_array('confirmed', $exclude)) {
|
1505 |
+
$count['public'] = $count['unconfirmed'];
|
1506 |
+
} else {
|
1507 |
+
$count['public'] = ($count['confirmed'] + $count['unconfirmed']);
|
1508 |
+
}
|
1509 |
+
$count['registered'] = $wpdb->get_var("SELECT COUNT(meta_key) FROM $wpdb->usermeta WHERE meta_key='s2_subscribed'");
|
1510 |
+
$count['all'] = ($count['confirmed'] + $count['unconfirmed'] + $count['registered']);
|
1511 |
+
foreach ($this->get_all_categories('array') as $cat_ID => $cat_name) {
|
1512 |
+
$count[$cat_name] = $wpdb->get_var("SELECT COUNT(meta_value) FROM $wpdb->usermeta WHERE meta_key='s2_cat$cat_ID'");
|
1513 |
+
}
|
1514 |
+
|
1515 |
+
// do have actually have some subscribers?
|
1516 |
+
if ( (0 == $count['confirmed']) && (0 == $count['unconfirmed']) && (0 == $count['registered']) ) {
|
1517 |
+
// no? bail out
|
1518 |
+
return;
|
1519 |
+
}
|
1520 |
+
|
1521 |
+
if (false !== $submit) {
|
1522 |
+
echo "<form method=\"post\" action=\"\">";
|
1523 |
+
}
|
1524 |
+
echo "<select name=\"what\">\r\n";
|
1525 |
+
foreach ($who as $whom => $display) {
|
1526 |
+
if (in_array($whom, $exclude)) { continue; }
|
1527 |
+
if (0 == $count[$whom]) { continue; }
|
1528 |
+
|
1529 |
+
echo "<option value=\"$whom\"";
|
1530 |
+
if ($whom == $selected) { echo " selected=\"selected\" "; }
|
1531 |
+
echo ">$display (" . ($count[$whom]) . ")</option>\r\n";
|
1532 |
+
}
|
1533 |
+
|
1534 |
+
if ($count['registered'] > 0) {
|
1535 |
+
foreach ($this->get_all_categories('array') as $cat_ID => $cat_name) {
|
1536 |
+
if (in_array($cat_ID, $exclude)) { continue; }
|
1537 |
+
if (0 == $count[$cat_name]) { continue; }
|
1538 |
+
echo "<option value=\"$cat_ID\"";
|
1539 |
+
if ($cat_ID == $selected) { echo " selected=\"selected\" "; }
|
1540 |
+
echo "> $cat_name (" . $count[$cat_name] . ") </option>\r\n";
|
1541 |
+
}
|
1542 |
+
}
|
1543 |
+
echo "</select>";
|
1544 |
+
if (false !== $submit) {
|
1545 |
+
echo "<span class=\"submit\"><input type=\"submit\" value=\"$submit\" /></span></form>\r\n";
|
1546 |
+
}
|
1547 |
+
} // end display_subscriber_dropdown()
|
1548 |
+
|
1549 |
+
/* ===== template and filter functions ===== */
|
1550 |
+
/**
|
1551 |
+
Display our form; also handles (un)subscribe requests
|
1552 |
+
*/
|
1553 |
+
function filter($content = '') {
|
1554 |
+
if ('' == $content) { return $content; }
|
1555 |
+
$this->s2form = $this->form;
|
1556 |
+
|
1557 |
+
global $user_ID;
|
1558 |
+
get_currentuserinfo();
|
1559 |
+
if ($user_ID) {
|
1560 |
+
$this->s2form = $this->use_profile;
|
1561 |
+
}
|
1562 |
+
if (isset($_POST['s2_action'])) {
|
1563 |
+
global $wpdb, $user_email;
|
1564 |
+
if (! is_email($_POST['email'])) {
|
1565 |
+
$this->s2form = $this->form . $this->not_an_email;
|
1566 |
+
} elseif ($this->is_barred($_POST['email'])) {
|
1567 |
+
$this->s2form = $this->form . $this->barred_domain;
|
1568 |
+
} else {
|
1569 |
+
$this->email = $_POST['email'];
|
1570 |
+
// does the supplied email belong to a registered user?
|
1571 |
+
$check = $wpdb->get_var("SELECT user_email FROM $wpdb->users WHERE user_email = '$this->email'");
|
1572 |
+
if ('' != $check) {
|
1573 |
+
// this is a registered email
|
1574 |
+
$this->s2form = $this->please_log_in;
|
1575 |
+
} else {
|
1576 |
+
// this is not a registered email
|
1577 |
+
// what should we do?
|
1578 |
+
if ('subscribe' == $_POST['s2_action']) {
|
1579 |
+
// someone is trying to subscribe
|
1580 |
+
// lets see if they've tried to subscribe previously
|
1581 |
+
if ('1' !== $this->is_public($this->email)) {
|
1582 |
+
// the user is unknown or inactive
|
1583 |
+
$this->add();
|
1584 |
+
$this->send_confirm('add');
|
1585 |
+
// set a variable to denote that we've already run, and shouldn't run again
|
1586 |
+
$this->filtered = 1; //set this to not send duplicate emails
|
1587 |
+
$this->s2form = $this->confirmation_sent;
|
1588 |
+
} else {
|
1589 |
+
// they're already subscribed
|
1590 |
+
$this->s2form = $this->already_subscribed;
|
1591 |
+
}
|
1592 |
+
$this->action = 'subscribe';
|
1593 |
+
} elseif ('unsubscribe' == $_POST['s2_action']) {
|
1594 |
+
// is this email a subscriber?
|
1595 |
+
if (false == $this->is_public($this->email)) {
|
1596 |
+
$this->s2form = $this->form . $this->not_subscribed;
|
1597 |
+
} else {
|
1598 |
+
$this->send_confirm('del');
|
1599 |
+
// set a variable to denote that we've already run, and shouldn't run again
|
1600 |
+
$this->filtered = 1;
|
1601 |
+
$this->s2form = $this->confirmation_sent;
|
1602 |
+
}
|
1603 |
+
$this->action='unsubscribe';
|
1604 |
+
}
|
1605 |
+
}
|
1606 |
+
}
|
1607 |
+
}
|
1608 |
+
return preg_replace('|<p>(\n)*<!--subscribe2-->(\n)*</p>|', $this->s2form, $content);
|
1609 |
+
} // end filter()
|
1610 |
+
|
1611 |
+
/**
|
1612 |
+
Overrides the default query when handling a (un)subscription confirmation
|
1613 |
+
|
1614 |
+
this is basically a trick: if the s2 variable is in the query string, just grab the first static page
|
1615 |
+
and override it's contents later with title_filter() and template_filter()
|
1616 |
+
*/
|
1617 |
+
function query_filter() {
|
1618 |
+
// don't interfere if we've already done our thing
|
1619 |
+
if (1 == $this->filtered) { return; }
|
1620 |
+
|
1621 |
+
global $wpdb;
|
1622 |
+
|
1623 |
+
if ( defined('S2PAGE') && 0 !== S2PAGE ) {
|
1624 |
+
return "page_id=" . S2PAGE;
|
1625 |
+
} else {
|
1626 |
+
$id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_status='static' LIMIT 1");
|
1627 |
+
if ($id) {
|
1628 |
+
return "page_id=$id";
|
1629 |
+
} else {
|
1630 |
+
return "showposts=1";
|
1631 |
+
}
|
1632 |
+
}
|
1633 |
+
} // end query_filter()
|
1634 |
+
|
1635 |
+
/**
|
1636 |
+
Overrides the page title
|
1637 |
+
*/
|
1638 |
+
function title_filter() {
|
1639 |
+
// don't interfere if we've already done our thing
|
1640 |
+
if (1 == $this->filtered) { return; }
|
1641 |
+
return __('Subscription Confirmation', 'subscribe2');
|
1642 |
+
} // end title_filter()
|
1643 |
+
|
1644 |
+
/**
|
1645 |
+
Override the template filter to make sure a special template is not used
|
1646 |
+
*/
|
1647 |
+
function template_filter() {
|
1648 |
+
// don't interfere if we've already done our thing
|
1649 |
+
if (1 == $this->filtered) { return; }
|
1650 |
+
return;
|
1651 |
+
} // end template_filter()
|
1652 |
+
|
1653 |
+
/* ===== wp-cron functions ===== */
|
1654 |
+
/**
|
1655 |
+
Send notifications for any posts that are now visible
|
1656 |
+
*/
|
1657 |
+
function subscribe2_hourly() {
|
1658 |
+
$future_posts = get_option('s2_future_posts');
|
1659 |
+
|
1660 |
+
// if we have no future posts, bail out
|
1661 |
+
if (! $future_posts) { return; }
|
1662 |
+
|
1663 |
+
// this will hold the posts that aren't yet visible
|
1664 |
+
$not_yet = array();
|
1665 |
+
|
1666 |
+
foreach ($future_posts as $post) {
|
1667 |
+
if ( current_time('mysql') > $post['date'] ) {
|
1668 |
+
// this post is now visible, so let's
|
1669 |
+
// send a notification
|
1670 |
+
$this->publish($post['id'], 1);
|
1671 |
+
} else {
|
1672 |
+
array_push($not_yet, $post);
|
1673 |
+
}
|
1674 |
+
}
|
1675 |
+
// are the number of elements in $not_yet
|
1676 |
+
// the same as in $future posts?
|
1677 |
+
if ( count($not_yet) != count($future_posts) ) {
|
1678 |
+
// if not, then some posts have been removed
|
1679 |
+
// from $future_posts, and the remainder need
|
1680 |
+
// to be recorded back to the database
|
1681 |
+
update_option('s2_future_posts', $not_yet);
|
1682 |
+
}
|
1683 |
+
} // end subscribe2_hourly
|
1684 |
+
|
1685 |
+
/**
|
1686 |
+
Send a daily digest of today's new posts
|
1687 |
+
*/
|
1688 |
+
function subscribe2_daily() {
|
1689 |
+
global $wpdb;
|
1690 |
+
|
1691 |
+
// collect yesterday's posts
|
1692 |
+
$yesterday = date('Y-m-d', (get_option('wp_cron_daily_lastrun')-60));
|
1693 |
+
$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'");
|
1694 |
+
|
1695 |
+
// do we have any posts?
|
1696 |
+
if (! $posts) { return; }
|
1697 |
+
|
1698 |
+
// if we have posts, let's prepare the digest
|
1699 |
+
foreach ($posts as $post) {
|
1700 |
+
$post_cats = wp_get_post_cats('1', $post->ID);
|
1701 |
+
$post_cats_string = implode(',', $post_cats);
|
1702 |
+
$check = false;
|
1703 |
+
// is the current post assigned to any categories
|
1704 |
+
// which should not generate a notification email?
|
1705 |
+
foreach (explode(',', $this->get_excluded_cats()) as $cat) {
|
1706 |
+
if (in_array($cat, $post_cats)) {
|
1707 |
+
$check = true;
|
1708 |
+
}
|
1709 |
+
}
|
1710 |
+
// if this post is in an excluded category,
|
1711 |
+
// don't include it in the digest
|
1712 |
+
if ($check) {
|
1713 |
+
continue;
|
1714 |
+
}
|
1715 |
+
$message .= "$post->post_title\r\n";
|
1716 |
+
$message .= get_permalink($post->ID) . "\r\n";
|
1717 |
+
$excerpt = $post->post_excerpt;
|
1718 |
+
if ('' == $excerpt) {
|
1719 |
+
// no excerpt, is there a <!--more--> ?
|
1720 |
+
if (false !== strpos($post->post_content, '<!--more-->')) {
|
1721 |
+
list($excerpt, $more) = explode('<!--more-->', $plaintext, 2);
|
1722 |
+
// strip leading and trailing whitespace
|
1723 |
+
$excerpt = trim($excerpt);
|
1724 |
+
} else {
|
1725 |
+
$excerpt = strip_tags($post->post_content);
|
1726 |
+
$words = explode(' ', $excerpt, 56);
|
1727 |
+
if (count($words) > 55) {
|
1728 |
+
array_pop($words);
|
1729 |
+
array_push($words, '[...]');
|
1730 |
+
$excerpt = implode(' ', $words);
|
1731 |
+
}
|
1732 |
+
}
|
1733 |
+
}
|
1734 |
+
$message .= "$excerpt\r\n\r\n";
|
1735 |
+
}
|
1736 |
+
|
1737 |
+
// do we send as admin, or post author?
|
1738 |
+
if ('author' == get_option('s2_sender')) {
|
1739 |
+
// get author details
|
1740 |
+
$user = get_userdata($post->post_author);
|
1741 |
+
} else {
|
1742 |
+
// get admin detailts
|
1743 |
+
$user = get_userdata(1);
|
1744 |
+
}
|
1745 |
+
$subject = '[' . get_settings('blogname') . '] ' . __('Daily Digest', 'subscribe2') . ' ' . $yesterday;
|
1746 |
+
$public = $this->get_public();
|
1747 |
+
$registered = $this->get_registered();
|
1748 |
+
$recipients = array_merge((array)$public, (array)$registered);
|
1749 |
+
$mailtext = $this->substitute(stripslashes(get_option('s2_mailtext')));
|
1750 |
+
$body = str_replace('POST', $message, $mailtext);
|
1751 |
+
$this->mail($recipients, $subject, $body);
|
1752 |
+
} // end subscribe2_daily
|
1753 |
+
|
1754 |
+
/**
|
1755 |
+
If the to-be-deleted post was future-dated, remove it from the list of future-dated posts
|
1756 |
+
*/
|
1757 |
+
function delete_future($ID = 0) {
|
1758 |
+
if (0 == $ID) { return $ID; }
|
1759 |
+
|
1760 |
+
$future = get_settings('s2_future_posts');
|
1761 |
+
// if we have no future-dated posts scheduled, bail out
|
1762 |
+
if ( ! $future) {
|
1763 |
+
return $ID;
|
1764 |
+
}
|
1765 |
+
foreach ($future as $post) {
|
1766 |
+
// is the deleted post in the list of future posts?
|
1767 |
+
if ($ID == $post['id']) {
|
1768 |
+
// skip it
|
1769 |
+
continue;
|
1770 |
+
} else {
|
1771 |
+
// add this to the new list of future posts
|
1772 |
+
$new_future[] = $post;
|
1773 |
+
}
|
1774 |
+
}
|
1775 |
+
if ($new_future != $future) {
|
1776 |
+
update_option('s2_future_posts', $new_future);
|
1777 |
+
}
|
1778 |
+
} // end delete_future()
|
1779 |
+
|
1780 |
+
/* ===== Our constructor ===== */
|
1781 |
+
/**
|
1782 |
+
Subscribe2 constructor
|
1783 |
+
*/
|
1784 |
+
function subscribe2() {
|
1785 |
+
global $table_prefix;
|
1786 |
+
|
1787 |
+
load_plugin_textdomain('subscribe2', 'wp-content/plugins/subscribe2');
|
1788 |
+
|
1789 |
+
// do we need to install anything?
|
1790 |
+
$this->public = $table_prefix . "subscribe2";
|
1791 |
+
if(mysql_query("SELECT COUNT(*) FROM ".$this->public)==FALSE) { $this->install(); }
|
1792 |
+
//do we need to upgrade anything?
|
1793 |
+
$this->version = get_option('s2_version');
|
1794 |
+
if ($this->version !== S2VERSION) { $this->upgrade(); }
|
1795 |
+
|
1796 |
+
if (isset($_GET['s2'])) {
|
1797 |
+
// someone is confirming a request
|
1798 |
+
add_filter('query_string', array(&$this, 'query_filter'));
|
1799 |
+
add_filter('the_title', array(&$this, 'title_filter'));
|
1800 |
+
add_filter('the_content', array(&$this, 'confirm'));
|
1801 |
+
}
|
1802 |
+
|
1803 |
+
add_action('admin_menu', array(&$this, 'admin_menu'));
|
1804 |
+
add_action('publish_post', array(&$this, 'publish'));
|
1805 |
+
add_action('edit_post', array(&$this, 'edit'));
|
1806 |
+
add_action('private_to_published', array(&$this, 'private2publish'));
|
1807 |
+
add_action('user_register', array(&$this, 'register'));
|
1808 |
+
add_filter('the_content', array(&$this, 'filter'));
|
1809 |
+
add_action('wp_cron_hourly', array(&$this, 'subscribe2_hourly'));
|
1810 |
+
if ( defined('S2DIGEST') && TRUE == S2DIGEST ) {
|
1811 |
+
add_action('wp_cron_daily', array(&$this, 'subscribe2_daily'));
|
1812 |
+
}
|
1813 |
+
add_action('delete_post', array(&$this, 'delete_future'));
|
1814 |
+
// add our button
|
1815 |
+
if ('1' == get_option('s2_show_button')) {
|
1816 |
+
add_action('init', array(&$this, 's2_button_init'));
|
1817 |
+
add_action('marker_css', array(&$this, 'subscribe2_css'));
|
1818 |
+
}
|
1819 |
+
// load our strings
|
1820 |
+
$this->load_strings();
|
1821 |
+
} // end subscribe2()
|
1822 |
+
|
1823 |
+
/* ===== our variables ===== */
|
1824 |
+
// cache variables
|
1825 |
+
var $version = '';
|
1826 |
+
var $all_public = '';
|
1827 |
+
var $all_unconfirmed = '';
|
1828 |
+
var $excluded_cats = '';
|
1829 |
+
var $post_title = '';
|
1830 |
+
var $permalink = '';
|
1831 |
+
var $myname = '';
|
1832 |
+
var $myemail = '';
|
1833 |
+
var $s2_subject = '[BLOGNAME] TITLE';
|
1834 |
+
var $signup_dates = array();
|
1835 |
+
var $private = false;
|
1836 |
+
var $filtered = 0;
|
1837 |
+
|
1838 |
+
// state variables used to affect processing
|
1839 |
+
var $action = '';
|
1840 |
+
var $email = '';
|
1841 |
+
var $message = '';
|
1842 |
+
var $error = '';
|
1843 |
+
|
1844 |
+
// some messages
|
1845 |
+
var $use_profile = '';
|
1846 |
+
var $please_log_in = '';
|
1847 |
+
var $already_subscribed = '';
|
1848 |
+
var $not_an_email = '';
|
1849 |
+
var $barred_domain = '';
|
1850 |
+
var $mail_sent = '';
|
1851 |
+
var $form = '';
|
1852 |
+
var $no_such_email = '';
|
1853 |
+
var $added = '';
|
1854 |
+
var $deleted = '';
|
1855 |
+
var $confirm_subject = '';
|
1856 |
+
var $options_saved = '';
|
1857 |
+
var $options_reset = '';
|
1858 |
+
|
1859 |
+
} // end class subscribe2
|
1860 |
+
$mysubscribe2 = new subscribe2();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1861 |
?>
|
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:
|
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,353 @@ 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: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:
|
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 "
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: subscribe2.php:
|
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:1113
|
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:1251
|
187 |
msgid "NONE"
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: subscribe2.php:
|
191 |
-
msgid "Send Reminder Email"
|
192 |
-
msgstr ""
|
193 |
-
|
194 |
-
#: subscribe2.php:1268
|
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: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:
|
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: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:
|
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:
|
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: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:
|
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:1544
|
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: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:
|
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:1729
|
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: 2006-10-26 21:43+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:61
|
20 |
msgid "To manage your subscription options please "
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: subscribe2.php:63
|
24 |
msgid "You may manage your subscription options from your "
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: subscribe2.php:65
|
28 |
msgid "A confirmation message is on its way!"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: subscribe2.php:67
|
32 |
msgid "That email address is already subscribed."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: subscribe2.php:69
|
36 |
msgid "That email address is not subscribed."
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: subscribe2.php:71
|
40 |
msgid "Sorry, but that does not look like an email address to me."
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: subscribe2.php:73
|
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:75
|
50 |
msgid "Message sent!"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: subscribe2.php:77
|
54 |
msgid "Your email:"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: subscribe2.php:77 subscribe2.php:1076 subscribe2.php:1126
|
58 |
msgid "Subscribe"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: subscribe2.php:77 subscribe2.php:1127
|
62 |
msgid "Unsubscribe"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: subscribe2.php:77 subscribe2.php:1426
|
66 |
msgid "Send"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: subscribe2.php:80
|
70 |
msgid "No such email address is registered."
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: subscribe2.php:82
|
74 |
msgid "You have successfully subscribed!"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: subscribe2.php:84
|
78 |
msgid "You have successfully unsubscribed."
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: subscribe2.php:86
|
82 |
msgid "Please confirm your request"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: subscribe2.php:89
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
msgid "Options saved!"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: subscribe2.php:90
|
90 |
msgid "Options reset!"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: subscribe2.php:98 subscribe2.php:1081
|
94 |
msgid "Subscribers"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: subscribe2.php:99
|
98 |
msgid "Subscribe2 Options"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: subscribe2.php:99
|
102 |
msgid "Subscribe2"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: subscribe2.php:100
|
106 |
msgid "Subscriptions"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: subscribe2.php:101
|
110 |
msgid "Mail Subscribers"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: subscribe2.php:505
|
114 |
+
msgid "Subscription Reminder"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: subscribe2.php:721
|
118 |
msgid "New subscriber"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: subscribe2.php:722
|
122 |
msgid "subscribed to email notifications!"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: subscribe2.php:991
|
126 |
msgid "Address(es) subscribed!"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: subscribe2.php:994
|
130 |
msgid "deleted!"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: subscribe2.php:997
|
134 |
msgid "status changed!"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: subscribe2.php:1000
|
138 |
msgid "Reminder Email(s) Sent!"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: subscribe2.php:1003
|
|
|
|
|
|
|
|
|
142 |
msgid "Registered Users Subscribed!"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: subscribe2.php:1006
|
146 |
msgid "Registered Users Unsubscribed!"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: subscribe2.php:1032
|
150 |
+
msgid "Send Reminder Email"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: subscribe2.php:1072
|
154 |
msgid "Subscribe Addresses"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: subscribe2.php:1074
|
158 |
msgid "Enter addresses, one per line or comma-seperated"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: subscribe2.php:1083
|
162 |
msgid "Filter"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: subscribe2.php:1087
|
166 |
msgid ""
|
167 |
"Registered on the left, confirmed in the middle, unconfirmed on the right"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: subscribe2.php:1113
|
|
|
|
|
|
|
|
|
171 |
msgid "NONE"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: subscribe2.php:1121
|
|
|
|
|
|
|
|
|
175 |
msgid "Categories"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: subscribe2.php:1196
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
msgid "Delivery Options"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: subscribe2.php:1197
|
183 |
msgid "Send Email From"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: subscribe2.php:1202
|
187 |
msgid "Author of the post"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: subscribe2.php:1207
|
191 |
msgid "Blog Admin"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: subscribe2.php:1208
|
|
|
|
|
|
|
|
|
195 |
msgid "Email Templates"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: subscribe2.php:1211
|
199 |
msgid "New Post email (must not be empty)"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: subscribe2.php:1215
|
203 |
msgid "Message substitions"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: subscribe2.php:1219
|
207 |
msgid "the post's title"
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: subscribe2.php:1220
|
211 |
msgid ""
|
212 |
"the excerpt or the entire post<br />(<i>based on the subscriber's "
|
213 |
"preferences</i>)"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: subscribe2.php:1221
|
217 |
msgid "the post's permalink"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: subscribe2.php:1222
|
221 |
msgid "the admin or post author's name"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: subscribe2.php:1223
|
225 |
msgid "the admin or post author's email"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: subscribe2.php:1224
|
|
|
|
|
|
|
|
|
229 |
msgid ""
|
230 |
"the generated link to confirm a request<br />(<i>only used in the "
|
231 |
"confirmation email template</i>)"
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: subscribe2.php:1226
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
msgid "Subscribe / Unsubscribe confirmation email"
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: subscribe2.php:1229
|
239 |
msgid "Reminder email to Unconfirmed Subscribers"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: subscribe2.php:1234
|
243 |
msgid "Excluded Categories"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: subscribe2.php:1241
|
247 |
msgid "Allow registered users to subscribe to excluded categories?"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: subscribe2.php:1242
|
251 |
msgid "Writing Options"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: subscribe2.php:1247
|
255 |
msgid "Show the Subscribe2 button on the Write toolbar?"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: subscribe2.php:1250
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
msgid "Barred Domains"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: subscribe2.php:1251
|
263 |
msgid ""
|
264 |
"Enter domains to bar from public subscriptions: <br /> (Use a new line for "
|
265 |
"each entry and omit the \"@\" symbol, for example email.com)"
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: subscribe2.php:1255
|
269 |
msgid "Submit"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: subscribe2.php:1260
|
273 |
msgid "Reset Default"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: subscribe2.php:1261
|
277 |
msgid ""
|
278 |
"Use this to reset all options to their defaults. This <strong><em>will not</"
|
279 |
"em></strong> modify your list of subscribers."
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: subscribe2.php:1265
|
283 |
msgid "RESET"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: subscribe2.php:1329
|
|
|
|
|
|
|
|
|
287 |
msgid "Notification Settings"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: subscribe2.php:1333
|
291 |
msgid "Receive email as"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: subscribe2.php:1338
|
295 |
+
msgid "HTML"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: subscribe2.php:1343
|
299 |
msgid "Plain Text"
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: subscribe2.php:1345
|
303 |
msgid "Email contains"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: subscribe2.php:1346
|
307 |
msgid "Excerpt Only"
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: subscribe2.php:1346
|
311 |
msgid "Full Post"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: subscribe2.php:1357
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
msgid "Subscribed Categories"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: subscribe2.php:1362
|
319 |
msgid "Receive daily summary of new posts?"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: subscribe2.php:1375
|
323 |
msgid "Update Preferences »"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: subscribe2.php:1418
|
327 |
msgid "Send email to all subscribers"
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: subscribe2.php:1420
|
331 |
msgid "Subject"
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: subscribe2.php:1420
|
335 |
msgid "A message from "
|
336 |
msgstr ""
|
337 |
|
338 |
+
#: subscribe2.php:1423
|
339 |
msgid "Recipients: "
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: subscribe2.php:1493
|
|
|
|
|
|
|
|
|
343 |
msgid "All Subscribers"
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: subscribe2.php:1494
|
347 |
msgid "Public Subscribers"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: subscribe2.php:1495
|
351 |
msgid "Confirmed"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: subscribe2.php:1496
|
355 |
msgid "Unconfirmed"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: subscribe2.php:1497
|
359 |
msgid "Registered Subscribers"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: subscribe2.php:1641
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
msgid "Subscription Confirmation"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: subscribe2.php:1745
|
367 |
+
msgid "Daily Digest"
|
368 |
msgstr ""
|