Subscribe2 - Version 4.2

Version Description

Download this release

Release Info

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

Code changes from version 4.1 to 4.2

ReadMe.txt CHANGED
@@ -3,8 +3,8 @@ 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.3
7
- Stable tag: 4.1
8
 
9
  Sends a list of subscribers an email notification when new posts are published to your blog
10
 
@@ -78,6 +78,13 @@ Batches will occur for each group of message as described above. A site on Drea
78
 
79
  == Version History ==
80
 
 
 
 
 
 
 
 
81
  Version 4.1 by Matthew Robinson
82
 
83
  * Fixed sending of notifications for Pages
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.3.1
7
+ Stable tag: 4.2
8
 
9
  Sends a list of subscribers an email notification when new posts are published to your blog
10
 
78
 
79
  == Version History ==
80
 
81
+ Version 4.2 by Matthew Robinson
82
+
83
+ * Added translation capability to user feedback strings - thanks to Lise
84
+ * Corrected some other translation strings
85
+ * Fixed bug in notification emails to admins when new users subscribe
86
+ * Updated default options code
87
+
88
  Version 4.1 by Matthew Robinson
89
 
90
  * Fixed sending of notifications for Pages
subscribe2/include/options.php CHANGED
@@ -8,7 +8,7 @@ if (!isset($this->subscribe2_options['autosub'])) {
8
 
9
  if (!isset($this->subscribe2_options['wpregdef'])) {
10
  $this->subscribe2_options['wpregdef'] = "no";
11
- } // option to
12
 
13
  if (!isset($this->subscribe2_options['autoformat'])) {
14
  $this->subscribe2_options['autoformat'] = "text";
@@ -43,6 +43,10 @@ if (!isset($this->subscribe2_options['show_button'])) {
43
  $this->subscribe2_options['show_button'] = "1";
44
  } // option to show Subscribe2 button on Write page
45
 
 
 
 
 
46
  if (!isset($this->subscribe2_options['barred'])) {
47
  $this->subscribe2_options['barred'] = '';
48
  } // option containing domains barred from public registration
8
 
9
  if (!isset($this->subscribe2_options['wpregdef'])) {
10
  $this->subscribe2_options['wpregdef'] = "no";
11
+ } // option to check registration form box by default
12
 
13
  if (!isset($this->subscribe2_options['autoformat'])) {
14
  $this->subscribe2_options['autoformat'] = "text";
43
  $this->subscribe2_options['show_button'] = "1";
44
  } // option to show Subscribe2 button on Write page
45
 
46
+ if (!isset($this->subscribe2_options['widget'])) {
47
+ $this->subscribe2_options['widget'] = "0";
48
+ } // option to enable Subscribe2 Widget
49
+
50
  if (!isset($this->subscribe2_options['barred'])) {
51
  $this->subscribe2_options['barred'] = '';
52
  } // option containing domains barred from public registration
subscribe2/subscribe2.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Subscribe2
4
  Plugin URI: http://subscribe2.wordpress.com
5
  Description: Notifies an email list when new entries are posted.
6
- Version: 4.1
7
  Author: Matthew Robinson
8
  Author URI: http://subscribe2.wordpress.com
9
  */
@@ -41,7 +41,7 @@ define('S2PAGE', '0');
41
 
42
  // our version number. Don't touch this or any line below
43
  // unless you know exacly what you are doing
44
- define('S2VERSION', '4.1');
45
  define ('S2PATH', trailingslashit(dirname(__FILE__)));
46
 
47
  // use Owen's excellent ButtonSnap library
@@ -60,11 +60,11 @@ class s2class {
60
  function load_strings() {
61
  // adjust the output of Subscribe2 here
62
 
63
- $this->please_log_in = "<p>" . __('To manage your subscription options please ', 'subscribe2') . "<a href=\"" . get_option('siteurl') . "/wp-login.php\">login</a>.</p>";
64
 
65
- $this->use_profile_admin = "<p>" . __('You may manage your subscription options from your ', 'subscribe2') . "<a href=\"" . get_option('siteurl') . "/wp-admin/users.php?page=" . plugin_basename(__FILE__) . "\">profile</a>.</p>";
66
 
67
- $this->use_profile_users = "<p>" . __('You may manage your subscription options from your ', 'subscribe2') . "<a href=\"" . get_option('siteurl') . "/wp-admin/profile.php?page=" . plugin_basename(__FILE__) . "\">profile</a>.</p>";
68
 
69
  $this->confirmation_sent = "<p>" . __('A confirmation message is on its way!', 'subscribe2') . "</p>";
70
 
@@ -495,7 +495,7 @@ class s2class {
495
  $body = str_replace("LINK", $link, $body);
496
 
497
  $mailheaders .= "From: " . $admin->display_name . " <" . $admin->user_email . ">\n";
498
- $mailheaders .= "Return-Path: " . $admin->user_email . "\n";
499
  $mailheaders .= "X-Mailer:PHP" . phpversion() . "\n";
500
  $mailheaders .= "Precedence: list\nList-Id: " . get_option('blogname') . "\n";
501
  $mailheaders .= "MIME-Version: 1.0\n";
@@ -684,8 +684,8 @@ class s2class {
684
  $this->activate();
685
  $this->message = $this->added;
686
  $subject = '[' . get_option('blogname') . '] ' . __('New subscriber', 'subscribe2');
687
- $message = $this->email . __('subscribed to email notifications!', 'subscribe2');
688
- $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='$wpdb->prefix . user_level' AND $wpdb->usermeta.meta_value='10'");
689
  $this->mail($recipients, $subject, $message);
690
  $this->filtered = 1;
691
  } elseif ('0' == $action) {
@@ -1000,7 +1000,7 @@ class s2class {
1000
  global $wpdb;
1001
  $admin = get_userdata(1);
1002
  if (empty($admin)) {
1003
- $sql = "SELECT DISTINCT(ID) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key='$wpdb->prefix . user_level' AND $wpdb->usermeta.meta_value='10' LIMIT 1";
1004
  $admin = get_userdata($wpdb->get_var($sql));
1005
  }
1006
  return $admin;
@@ -2154,7 +2154,7 @@ class s2class {
2154
 
2155
  // do we need to install anything?
2156
  $this->public = $table_prefix . "subscribe2";
2157
- if(!mysql_query("DESCRIBE " . $this->public)) { $this->install(); }
2158
  //do we need to upgrade anything?
2159
  if ($this->subscribe2_options['version'] !== S2VERSION) {
2160
  add_action('shutdown', array(&$this, 'upgrade'));
3
  Plugin Name: Subscribe2
4
  Plugin URI: http://subscribe2.wordpress.com
5
  Description: Notifies an email list when new entries are posted.
6
+ Version: 4.2
7
  Author: Matthew Robinson
8
  Author URI: http://subscribe2.wordpress.com
9
  */
41
 
42
  // our version number. Don't touch this or any line below
43
  // unless you know exacly what you are doing
44
+ define('S2VERSION', '4.2');
45
  define ('S2PATH', trailingslashit(dirname(__FILE__)));
46
 
47
  // use Owen's excellent ButtonSnap library
60
  function load_strings() {
61
  // adjust the output of Subscribe2 here
62
 
63
+ $this->please_log_in = "<p>" . __('To manage your subscription options please ', 'subscribe2') . "<a href=\"" . get_option('siteurl') . "/wp-login.php\">" . __('login', 'subscribe2') . "</a>.</p>";
64
 
65
+ $this->use_profile_admin = "<p>" . __('You may manage your subscription options from your ', 'subscribe2') . "<a href=\"" . get_option('siteurl') . "/wp-admin/users.php?page=" . plugin_basename(__FILE__) . "\">" . __('profile', 'subscribe2') . "</a>.</p>";
66
 
67
+ $this->use_profile_users = "<p>" . __('You may manage your subscription options from your ', 'subscribe2') . "<a href=\"" . get_option('siteurl') . "/wp-admin/profile.php?page=" . plugin_basename(__FILE__) . "\">" . __('profile', 'subscribe2') . "</a>.</p>";
68
 
69
  $this->confirmation_sent = "<p>" . __('A confirmation message is on its way!', 'subscribe2') . "</p>";
70
 
495
  $body = str_replace("LINK", $link, $body);
496
 
497
  $mailheaders .= "From: " . $admin->display_name . " <" . $admin->user_email . ">\n";
498
+ $mailheaders .= "Return-Path: <" . $admin->user_email . ">\n";
499
  $mailheaders .= "X-Mailer:PHP" . phpversion() . "\n";
500
  $mailheaders .= "Precedence: list\nList-Id: " . get_option('blogname') . "\n";
501
  $mailheaders .= "MIME-Version: 1.0\n";
684
  $this->activate();
685
  $this->message = $this->added;
686
  $subject = '[' . get_option('blogname') . '] ' . __('New subscriber', 'subscribe2');
687
+ $message = $this->email . " " . __('subscribed to email notifications!', 'subscribe2');
688
+ $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='" . $wpdb->prefix . "user_level' AND $wpdb->usermeta.meta_value='10'");
689
  $this->mail($recipients, $subject, $message);
690
  $this->filtered = 1;
691
  } elseif ('0' == $action) {
1000
  global $wpdb;
1001
  $admin = get_userdata(1);
1002
  if (empty($admin)) {
1003
+ $sql = "SELECT DISTINCT(ID) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key='" . $wpdb->prefix . "user_level' AND $wpdb->usermeta.meta_value='10' LIMIT 1";
1004
  $admin = get_userdata($wpdb->get_var($sql));
1005
  }
1006
  return $admin;
2154
 
2155
  // do we need to install anything?
2156
  $this->public = $table_prefix . "subscribe2";
2157
+ if (!mysql_query("DESCRIBE " . $this->public)) { $this->install(); }
2158
  //do we need to upgrade anything?
2159
  if ($this->subscribe2_options['version'] !== S2VERSION) {
2160
  add_action('shutdown', array(&$this, 'upgrade'));
subscribe2/subscribe2.pot CHANGED
@@ -8,7 +8,7 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2007-11-02 20:03+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,10 +20,18 @@ msgstr ""
20
  msgid "To manage your subscription options please "
21
  msgstr ""
22
 
 
 
 
 
23
  #: subscribe2.php:65 subscribe2.php:67
24
  msgid "You may manage your subscription options from your "
25
  msgstr ""
26
 
 
 
 
 
27
  #: subscribe2.php:69
28
  msgid "A confirmation message is on its way!"
29
  msgstr ""
8
  msgstr ""
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
  "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2007-11-20 18:28+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
20
  msgid "To manage your subscription options please "
21
  msgstr ""
22
 
23
+ #: subscribe2.php:63
24
+ msgid "login"
25
+ msgstr ""
26
+
27
  #: subscribe2.php:65 subscribe2.php:67
28
  msgid "You may manage your subscription options from your "
29
  msgstr ""
30
 
31
+ #: subscribe2.php:65 subscribe2.php:67
32
+ msgid "profile"
33
+ msgstr ""
34
+
35
  #: subscribe2.php:69
36
  msgid "A confirmation message is on its way!"
37
  msgstr ""