Newsletter - Version 3.5.2

Version Description

  • Fixed the {title} tag replacement for old subscriber list with the gender not set
  • Added the upgrade from old versions button on diagnostic panel
Download this release

Release Info

Developer satollo
Plugin Icon 128x128 Newsletter
Version 3.5.2
Comparing to
See all releases

Code changes from version 3.5.0 to 3.5.2

Files changed (6) hide show
  1. admin.css +28 -17
  2. header-extension.php +11 -13
  3. includes/module.php +4 -1
  4. main/diagnostic.php +17 -0
  5. plugin.php +24 -16
  6. readme.txt +9 -0
admin.css CHANGED
@@ -618,6 +618,22 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
618
  text-decoration: none;
619
  }
620
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
621
  #newsletter-path {
622
 
623
  }
@@ -627,7 +643,6 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
627
  }
628
 
629
  #newsletter-title {
630
- xfloat: left;
631
  }
632
 
633
  .newsletter-separator {
@@ -863,17 +878,13 @@ table.clicks {
863
  }
864
 
865
  .newsletter-message {
866
- background-color: lightYellow;
867
- border-color: #E6DB55;
868
- border-radius: 3px;
869
  border-style: solid;
870
- border-width: 1px;
871
  padding: .6em;
872
  margin-bottom: .6em;
873
- background-image: url("images/messages.png");
874
- padding-left: 30px;
875
- background-repeat: no-repeat;
876
- background-position: left center;
877
  }
878
 
879
  .newsletter-error-span {
@@ -882,17 +893,17 @@ table.clicks {
882
  }
883
 
884
  .newsletter-error {
885
- background-color: #FFEBE8;
886
- border-color: #C00;
887
- border-radius: 3px;
888
  border-style: solid;
889
- border-width: 1px;
890
  padding: .6em;
891
- padding-left: 30px;
892
  margin-bottom: .6em;
893
- background-image: url("images/messages.png");
894
- background-repeat: no-repeat;
895
- background-position: left center;
 
896
  }
897
 
898
  #newsletter-warnings {
618
  text-decoration: none;
619
  }
620
 
621
+ /* Admin header for extensions */
622
+ #newsletter-header-ext {
623
+ text-align: left;
624
+ background-color: #fff;
625
+ padding: 10px;
626
+ font-size: 12px;
627
+ border: 1px solid #ccc;
628
+ float: right;
629
+ width: 300px;
630
+ }
631
+
632
+ #newsletter-header-ext a {
633
+ margin-right: 10px;
634
+ text-decoration: none;
635
+ }
636
+
637
  #newsletter-path {
638
 
639
  }
643
  }
644
 
645
  #newsletter-title {
 
646
  }
647
 
648
  .newsletter-separator {
878
  }
879
 
880
  .newsletter-message {
881
+ background-color: #efe;
882
+ border-color: #393;
883
+ border-radius: 5px;
884
  border-style: solid;
885
+ border-width: 3px;
886
  padding: .6em;
887
  margin-bottom: .6em;
 
 
 
 
888
  }
889
 
890
  .newsletter-error-span {
893
  }
894
 
895
  .newsletter-error {
896
+ background-color: #fee;
897
+ border-color: #933;
898
+ border-radius: 5px;
899
  border-style: solid;
900
+ border-width: 2px;
901
  padding: .6em;
 
902
  margin-bottom: .6em;
903
+ }
904
+
905
+ .newsletter-error strong, .newsletter-message strong {
906
+ font-weight: bold;
907
  }
908
 
909
  #newsletter-warnings {
header-extension.php CHANGED
@@ -7,23 +7,21 @@
7
  */
8
  ?>
9
  <?php if (NEWSLETTER_HEADER) { ?>
10
- <div id="newsletter-header">
11
- <a href="http://www.satollo.net/plugins/newsletter/newsletter-documentation" target="_blank">Documentation</a>
12
- <a href="http://www.satollo.net/forums" target="_blank">Forum</a>
 
 
13
 
14
  <!--<a href="http://www.satollo.net/plugins/newsletter/newsletter-collaboration" target="_blank">Collaboration</a>-->
 
15
 
16
- <form style="display: inline; margin: 0;" action="http://www.satollo.net/wp-content/plugins/newsletter/do/subscribe.php" method="post" target="_blank">
17
- Subscribe<!-- to satollo.net--> <input type="email" name="ne" required placeholder="Your email">
18
- <input type="submit" value="Go">
 
19
  </form>
20
-
21
- <a href="https://www.facebook.com/satollo.net" target="_blank"><img style="vertical-align: bottom" src="<?php echo plugins_url('newsletter'); ?>/images/facebook.png"></a>
22
-
23
- <!--
24
- <a href="http://www.satollo.net/plugins/newsletter/newsletter-delivery-engine" target="_blank">Engine next run in <?php echo wp_next_scheduled('newsletter') - time(); ?> s</a>
25
- -->
26
  </div>
27
  <?php } ?>
28
 
29
- <?php $newsletter->warnings(); ?>
7
  */
8
  ?>
9
  <?php if (NEWSLETTER_HEADER) { ?>
10
+ <div id="newsletter-header-ext">
11
+ <div style="text-align: center; margin-top: 5px;">
12
+ <a href="http://www.satollo.net/plugins/newsletter/newsletter-documentation" target="_blank"><img style="vertical-align: bottom" src="<?php echo plugins_url('newsletter'); ?>/images/header/documentation.png"> Documentation</a>
13
+ <a href="http://www.satollo.net/forums" target="_blank"><img style="vertical-align: bottom" src="<?php echo plugins_url('newsletter'); ?>/images/header/forum.png"> Forum</a>
14
+ <a href="https://www.facebook.com/satollo.net" target="_blank"><img style="vertical-align: bottom" src="<?php echo plugins_url('newsletter'); ?>/images/header/facebook.png"> Facebook</a>
15
 
16
  <!--<a href="http://www.satollo.net/plugins/newsletter/newsletter-collaboration" target="_blank">Collaboration</a>-->
17
+ </div>
18
 
19
+ <div style="text-align: center; margin-top: 5px;">
20
+ <form style="margin: 0;" action="http://www.satollo.net/wp-content/plugins/newsletter/do/subscribe.php" method="post" target="_blank">
21
+ My Newsletter<!-- to satollo.net--> <input type="email" name="ne" required placeholder="Your email" style="padding: 2px">
22
+ <input type="submit" value="Go" style="padding: 2px">
23
  </form>
24
+ </div>
 
 
 
 
 
25
  </div>
26
  <?php } ?>
27
 
 
includes/module.php CHANGED
@@ -510,7 +510,10 @@ class NewsletterModule {
510
 
511
  function add_menu_page($page, $title) {
512
  global $newsletter;
513
- $file = WP_CONTENT_DIR . '/extensions/newsletter/' . $this->module . '/' . $page . '.php';
 
 
 
514
  if (!is_file($file)) {
515
  $file = NEWSLETTER_DIR . '/' . $this->module . '/' . $page . '.php';
516
  }
510
 
511
  function add_menu_page($page, $title) {
512
  global $newsletter;
513
+ $file = WP_PLUGIN_DIR . '/newsletter-' . $this->module . '/' . $page . '.php';
514
+ if (!is_file($file)) {
515
+ $file = WP_CONTENT_DIR . '/extensions/newsletter/' . $this->module . '/' . $page . '.php';
516
+ }
517
  if (!is_file($file)) {
518
  $file = NEWSLETTER_DIR . '/' . $this->module . '/' . $page . '.php';
519
  }
main/diagnostic.php CHANGED
@@ -43,6 +43,16 @@ if ($controls->is_action('upgrade')) {
43
  $controls->messages = 'Upgrade forced!';
44
  }
45
 
 
 
 
 
 
 
 
 
 
 
46
  if ($controls->is_action('delete_transient')) {
47
  delete_transient($_POST['btn']);
48
  $controls->messages = 'Deleted.';
@@ -470,6 +480,13 @@ if (empty($controls->data))
470
  <p>
471
  <?php $controls->button('undismiss', 'Restore'); ?>
472
  </p>
 
 
 
 
 
 
 
473
  </div>
474
  </div>
475
 
43
  $controls->messages = 'Upgrade forced!';
44
  }
45
 
46
+ if ($controls->is_action('upgrade_old')) {
47
+ $row = $wpdb->get_row("select * from " . NEWSLETTER_USERS_TABLE . " limit 1");
48
+ if (!isset($row->id)) {
49
+ $row = $wpdb->query("alter table " . NEWSLETTER_USERS_TABLE . " drop primary key");
50
+ $row = $wpdb->query("alter table " . NEWSLETTER_USERS_TABLE . " add column id int not null auto_increment primary key");
51
+ $row = $wpdb->query("alter table " . NEWSLETTER_USERS_TABLE . " add unique email (email)");
52
+ }
53
+ $controls->messages = 'Done.';
54
+ }
55
+
56
  if ($controls->is_action('delete_transient')) {
57
  delete_transient($_POST['btn']);
58
  $controls->messages = 'Deleted.';
480
  <p>
481
  <?php $controls->button('undismiss', 'Restore'); ?>
482
  </p>
483
+
484
+ <p>
485
+ Very old versions need to be upgraded on a spacial way. Use the button blow.
486
+ </p>
487
+ <p>
488
+ <?php $controls->button('upgrade_old', 'Force an upgrade from very old versions'); ?>
489
+ </p>
490
  </div>
491
  </div>
492
 
plugin.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Newsletter
5
  Plugin URI: http://www.satollo.net/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="http://www.satollo.net/plugins/newsletter#update">this page</a> to know what's changed.</strong>
7
- Version: 3.5.0
8
  Author: Stefano Lissa
9
  Author URI: http://www.satollo.net
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -13,7 +13,7 @@
13
  */
14
 
15
  // Useed as dummy parameter on css and js links
16
- define('NEWSLETTER_VERSION', '3.5.0');
17
 
18
  global $wpdb, $newsletter;
19
 
@@ -116,7 +116,7 @@ class Newsletter extends NewsletterModule {
116
  // Here because the upgrade is called by the parent constructor and uses the scheduler
117
  add_filter('cron_schedules', array($this, 'hook_cron_schedules'), 1000);
118
 
119
- parent::__construct('main', '1.2.1');
120
 
121
  $max = $this->options['scheduler_max'];
122
  if (!is_numeric($max))
@@ -356,12 +356,12 @@ class Newsletter extends NewsletterModule {
356
  //$this->logger->info('Checking for new versions');
357
  $url = 'http://www.satollo.net/wp-content/plugins/file-commerce-pro/version.php?f=';
358
  $modules = array(
359
- 'reports' => 34,
360
- 'feed' => 35,
361
  'followup' => 37,
362
- 'facebook' => 41,
363
- 'sendgrid' => 40,
364
- 'popup' => 43,
365
  'mandrill' => 44);
366
 
367
  foreach ($modules as $name => $id) {
@@ -677,8 +677,7 @@ class Newsletter extends NewsletterModule {
677
 
678
  if (!empty($this->options['content_transfer_encoding'])) {
679
  $this->mailer->Encoding = $this->options['content_transfer_encoding'];
680
- }
681
- else {
682
  $this->mailer->Encoding = 'base64';
683
  }
684
 
@@ -861,6 +860,8 @@ class Newsletter extends NewsletterModule {
861
  break;
862
  case 'n': $text = str_replace('{title}', $options_profile['title_none'], $text);
863
  break;
 
 
864
  }
865
 
866
 
@@ -1156,6 +1157,8 @@ require_once NEWSLETTER_DIR . '/emails/emails.php';
1156
  require_once NEWSLETTER_DIR . '/users/users.php';
1157
  require_once NEWSLETTER_DIR . '/statistics/statistics.php';
1158
 
 
 
1159
  if (is_file(WP_CONTENT_DIR . '/extensions/newsletter/feed/feed.php')) {
1160
  require_once WP_CONTENT_DIR . '/extensions/newsletter/feed/feed.php';
1161
  } else {
@@ -1174,13 +1177,17 @@ if (is_file(WP_CONTENT_DIR . '/extensions/newsletter/followup/followup.php')) {
1174
  require_once WP_CONTENT_DIR . '/extensions/newsletter/followup/followup.php';
1175
  }
1176
 
1177
- if (is_file(WP_CONTENT_DIR . '/extensions/newsletter/reports/reports.php')) {
1178
- require_once WP_CONTENT_DIR . '/extensions/newsletter/reports/reports.php';
1179
- }
 
 
1180
 
1181
- if (is_file(WP_CONTENT_DIR . '/extensions/newsletter/mailjet/mailjet.php')) {
1182
- require_once WP_CONTENT_DIR . '/extensions/newsletter/mailjet/mailjet.php';
1183
- }
 
 
1184
 
1185
  if (is_file(WP_CONTENT_DIR . '/extensions/newsletter/sendgrid/sendgrid.php')) {
1186
  require_once WP_CONTENT_DIR . '/extensions/newsletter/sendgrid/sendgrid.php';
@@ -1198,6 +1205,7 @@ if (is_file(WP_CONTENT_DIR . '/extensions/newsletter/mandrill/mandrill.php')) {
1198
  require_once WP_CONTENT_DIR . '/extensions/newsletter/mandrill/mandrill.php';
1199
  }
1200
 
 
1201
  require_once(dirname(__FILE__) . '/widget.php');
1202
 
1203
  register_activation_hook(__FILE__, 'newsletter_activate');
4
  Plugin Name: Newsletter
5
  Plugin URI: http://www.satollo.net/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="http://www.satollo.net/plugins/newsletter#update">this page</a> to know what's changed.</strong>
7
+ Version: 3.5.2
8
  Author: Stefano Lissa
9
  Author URI: http://www.satollo.net
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
13
  */
14
 
15
  // Useed as dummy parameter on css and js links
16
+ define('NEWSLETTER_VERSION', '3.5.2');
17
 
18
  global $wpdb, $newsletter;
19
 
116
  // Here because the upgrade is called by the parent constructor and uses the scheduler
117
  add_filter('cron_schedules', array($this, 'hook_cron_schedules'), 1000);
118
 
119
+ parent::__construct('main', '1.2.2');
120
 
121
  $max = $this->options['scheduler_max'];
122
  if (!is_numeric($max))
356
  //$this->logger->info('Checking for new versions');
357
  $url = 'http://www.satollo.net/wp-content/plugins/file-commerce-pro/version.php?f=';
358
  $modules = array(
359
+ 'reports' => 34,
360
+ 'feed' => 35,
361
  'followup' => 37,
362
+ 'facebook' => 41,
363
+ 'sendgrid' => 40,
364
+ 'popup' => 43,
365
  'mandrill' => 44);
366
 
367
  foreach ($modules as $name => $id) {
677
 
678
  if (!empty($this->options['content_transfer_encoding'])) {
679
  $this->mailer->Encoding = $this->options['content_transfer_encoding'];
680
+ } else {
 
681
  $this->mailer->Encoding = 'base64';
682
  }
683
 
860
  break;
861
  case 'n': $text = str_replace('{title}', $options_profile['title_none'], $text);
862
  break;
863
+ default:
864
+ $text = str_replace('{title}', '', $text);
865
  }
866
 
867
 
1157
  require_once NEWSLETTER_DIR . '/users/users.php';
1158
  require_once NEWSLETTER_DIR . '/statistics/statistics.php';
1159
 
1160
+
1161
+
1162
  if (is_file(WP_CONTENT_DIR . '/extensions/newsletter/feed/feed.php')) {
1163
  require_once WP_CONTENT_DIR . '/extensions/newsletter/feed/feed.php';
1164
  } else {
1177
  require_once WP_CONTENT_DIR . '/extensions/newsletter/followup/followup.php';
1178
  }
1179
 
1180
+ //if (!is_dir(WP_PLUGIN_DIR . '/newsletter-reports')) {
1181
+ if (is_file(WP_CONTENT_DIR . '/extensions/newsletter/reports/reports.php')) {
1182
+ //require_once WP_CONTENT_DIR . '/extensions/newsletter/reports/reports.php';
1183
+ }
1184
+ //}
1185
 
1186
+ //if (!is_dir(WP_PLUGIN_DIR . '/newsletter-mailjet')) {
1187
+ if (is_file(WP_CONTENT_DIR . '/extensions/newsletter/mailjet/mailjet.php')) {
1188
+ require_once WP_CONTENT_DIR . '/extensions/newsletter/mailjet/mailjet.php';
1189
+ }
1190
+ //}
1191
 
1192
  if (is_file(WP_CONTENT_DIR . '/extensions/newsletter/sendgrid/sendgrid.php')) {
1193
  require_once WP_CONTENT_DIR . '/extensions/newsletter/sendgrid/sendgrid.php';
1205
  require_once WP_CONTENT_DIR . '/extensions/newsletter/mandrill/mandrill.php';
1206
  }
1207
 
1208
+
1209
  require_once(dirname(__FILE__) . '/widget.php');
1210
 
1211
  register_activation_hook(__FILE__, 'newsletter_activate');
readme.txt CHANGED
@@ -57,6 +57,15 @@ No screen shots are available at this time.
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
 
 
 
 
60
  = 3.5.0 =
61
 
62
  * Fixed the subscriber list panel
57
 
58
  == Changelog ==
59
 
60
+ = 3.5.2 =
61
+
62
+ * Fixed the {title} tag replacement for old subscriber list with the gender not set
63
+ * Added the upgrade from old versions button on diagnostic panel
64
+
65
+ = 3.5.1 =
66
+
67
+ * Support for the SendGrid extension
68
+
69
  = 3.5.0 =
70
 
71
  * Fixed the subscriber list panel