Newsletter - Version 1.2.0

Version Description

Download this release

Release Info

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

Code changes from version 1.1.9 to 1.2.0

languages/fr_FR_options.php CHANGED
@@ -38,7 +38,7 @@ $newsletter_default_options['confirmed_message'] =
38
 
39
  // Unsubscription request introductory text
40
  $newsletter_default_options['unsubscription_text'] =
41
- "<p>&Ecirc;tes-vous certain de vouloir vous d&eacute;sinscrire de la lettre d&prime;information {blog_title} ? <a href=\{unsubscription_confirm_url}\">Oui</a>.";
42
 
43
  // When you finally loosed your subscriber
44
  $newsletter_default_options['unsubscribed_text'] =
38
 
39
  // Unsubscription request introductory text
40
  $newsletter_default_options['unsubscription_text'] =
41
+ "<p>&Ecirc;tes-vous certain de vouloir vous d&eacute;sinscrire de la lettre d&prime;information {blog_title} ? <a href=\"{unsubscription_confirm_url}\">Oui</a>.";
42
 
43
  // When you finally loosed your subscriber
44
  $newsletter_default_options['unsubscribed_text'] =
languages/pt_BR.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Subscription form (traslate "your name", "your email" and the button "subscribe me")
4
+ $newsletter_labels['subscription_form'] =
5
+ '<form method="post" action="" style="text-align: center">
6
+ <input type="hidden" name="na" value="s"/>
7
+ <table cellspacing="3" cellpadding="3" border="0" width="50%">
8
+ <tr><td>Seu&nbsp;nome</td><td><input type="text" name="nn" size="30"/></td></tr>
9
+ <tr><td>Seu&nbsp;email</td><td><input type="text" name="ne" size="30"/></td></tr>
10
+ <tr><td colspan="2" style="text-align: center"><input type="submit" value="Assinar"/></td></tr>
11
+ </table>
12
+ </form>';
13
+
14
+ $newsletter_labels['widget_form'] =
15
+ '<form action="{newsletter_url}" method="post">
16
+ {text}
17
+ <p><input type="text" name="nn" value="Seu nome" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
18
+ <p><input type="text" name="ne" value="Seu email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
19
+ <p><input type="submit" value="Assinar"/></p>
20
+ <input type="hidden" name="na" value="s"/>
21
+ </form>';
22
+
23
+ $newsletter_labels['embedded_form'] =
24
+ '<form action="{newsletter_url}" method="post">
25
+ <p><input type="text" name="ne" value="Seu email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
26
+ &nbsp;<input type="text" name="nn" value="Seu nome" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
27
+ <input type="submit" value="Assinar"/>
28
+ <input type="hidden" name="na" value="s"/></p>
29
+ </form>';
30
+
31
+ // Errors on subscription
32
+ $newsletter_labels['error_email'] = 'Endereço de email incorreto. <a href="javascript:history.back()">Go back</a>.';
33
+ $newsletter_labels['error_name'] = 'O nome não pode estar vazio. <a href="javascript:history.back()">Go back</a>.';
34
+
35
+ ?>
languages/pt_BR_options.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // This file contains the default options values
3
+
4
+ // Subscription page introductory text (befor the subscription form)
5
+ $newsletter_default_options['subscription_text'] =
6
+ "<p>Inscreva-se na minha newsletter preenchendo os campos abaixo.
7
+ Tentarei lhe fazer feliz.</p>
8
+ <p>Um email de confirmação será enviado a sua caixa de entrada:
9
+ por favor leia as instruções e complete seu registro.</p>";
10
+
11
+ // Message show after a subbscription request has made.
12
+ $newsletter_default_options['subscribed_text'] =
13
+ "<p>Você foi inscrito corretamente na newsletter.
14
+ Em alguns minutos você receberá um email de confirmação. Siga o link para confirmar a inscrição.
15
+ Se o email demorar mais do que 15 minutos para chegar, cheque sua caixa de SPAM.</p>";
16
+
17
+ // Confirmation email subject (double opt-in)
18
+ $newsletter_default_options['confirmation_subject'] =
19
+ "{name}, confirme sua inscrição no site {blog_title}";
20
+
21
+ // Confirmation email body (double opt-in)
22
+ $newsletter_default_options['confirmation_message'] =
23
+ "<p>Oi {name},</p>
24
+ <p>Recebemos um pedido de inscrição nos nossos informativos deste email. Você pode confirmar
25
+ <a href=\"{subscription_confirm_url}\"><strong>clicando aqui</strong></a>.
26
+ Se você não puder seguir o link, acesse este endereço:</p>
27
+ <p>{subscription_confirm_url}</p>
28
+ <p>Se o pedido de inscrição não veio de você, apenas ignore esta mensagem.</p>
29
+ <p>Obrigado.</p>";
30
+
31
+
32
+ // Subscription confirmed text (after a user clicked the confirmation link
33
+ // on the email he received
34
+ $newsletter_default_options['confirmed_text'] =
35
+ "<p>Sua inscrição foi confirmada!
36
+ Obrigado {name}.</p>";
37
+
38
+ $newsletter_default_options['confirmed_subject'] =
39
+ "Bem vindo(a) a bordo, {name}";
40
+
41
+ $newsletter_default_options['confirmed_message'] =
42
+ "<p>A mensagem confirma a sua inscrição nos nossos informativos.</p>
43
+ <p>Obrigado.</p>";
44
+
45
+ // Unsubscription request introductory text
46
+ $newsletter_default_options['unsubscription_text'] =
47
+ "<p>Cancele a sua inscrição nos informativos
48
+ <a href=\"{unsubscription_confirm_url}\">clicando aqui</a>.";
49
+
50
+ // When you finally loosed your subscriber
51
+ $newsletter_default_options['unsubscribed_text'] =
52
+ "<p>Sua inscrição foi cancelada. Inscreva-se novamente quando quiser.</p>";
53
+ ?>
options.php CHANGED
@@ -300,6 +300,13 @@ The text of the link for unsubscription to be placed in the unsubscription email
300
  <label for="options[novisual]">do not use visual editors</label>
301
  </td>
302
  </tr>
 
 
 
 
 
 
 
303
  </table>
304
 
305
  <h2>Zanzara client</h2>
300
  <label for="options[novisual]">do not use visual editors</label>
301
  </td>
302
  </tr>
303
+ <tr valign="top">
304
+ <th scope="row">&nbsp;</th>
305
+ <td>
306
+ <input type="checkbox" name="options[editor]" value="1" <?php echo $options['editor']!= null?'checked':''; ?> />
307
+ <label for="options[editor]">allow editors to user the newsletter plugin</label>
308
+ </td>
309
+ </tr>
310
  </table>
311
 
312
  <h2>Zanzara client</h2>
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Newsletter
4
  Plugin URI: http://www.satollo.net/plugins/newsletter
5
  Description: Newsletter is a simple plugin (still in developement) to collect subscribers and send out newsletters
6
- Version: 1.1.9
7
  Author: Satollo
8
  Author URI: http://www.satollo.net
9
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -316,8 +316,11 @@ function newsletter_subscribe($email, $name)
316
 
317
  newsletter_send_confirmation($newsletter_subscriber);
318
 
319
- $message = 'New subscription: ' . $name . ' <' . $email . '>';
320
- $subject = 'A new subscription';
 
 
 
321
  newsletter_notify_admin($subject, $message);
322
  }
323
 
@@ -584,9 +587,13 @@ function newsletter_unsubscribe($email, $token)
584
  $wpdb->query("delete from " . $wpdb->prefix . "newsletter where email='" . $wpdb->escape($email) . "'" .
585
  " and token='" . $wpdb->escape($token) . "'");
586
 
587
- $message = 'Unsubscription: ' . $name . ' <' . $email . '>';
588
- $subject = 'Unsubscription';
589
- newsletter_notify_admin($subject, $newsletter);
 
 
 
 
590
  }
591
 
592
  function newsletter_delete($email)
@@ -650,9 +657,8 @@ function newsletter_set_status($email, $status)
650
  function newsletter_notify_admin(&$subject, &$message)
651
  {
652
  $to = get_option('admin_email');
653
- $headers = "MIME-Version: 1.0\n";
654
  $headers .= "Content-type: text/plain; charset=UTF-8\n";
655
- mail($to, $subject, $message, $headers);
656
  }
657
 
658
  /**
@@ -701,7 +707,7 @@ function newsletter_activate()
701
  key `email_token` (`email`,`token`)
702
  )';
703
 
704
- $wpdb->query($sql);
705
 
706
  $options = get_option('newsletter');
707
 
@@ -723,17 +729,20 @@ if (is_admin())
723
  add_action('admin_menu', 'newsletter_admin_menu');
724
  function newsletter_admin_menu()
725
  {
 
 
 
726
  if (function_exists('add_menu_page'))
727
  {
728
- add_menu_page('Newsletter', 'Newsletter', 10, 'newsletter/options.php', '', '');
729
  }
730
 
731
  if (function_exists('add_submenu_page'))
732
  {
733
- add_submenu_page('newsletter/options.php', 'Configuration', 'Configuration', 10, 'newsletter/options.php');
734
- add_submenu_page('newsletter/options.php', 'Composer', 'Composer', 10, 'newsletter/newsletter.php');
735
- add_submenu_page('newsletter/options.php', 'Import', 'Import', 10, 'newsletter/import.php');
736
- add_submenu_page('newsletter/options.php', 'Manage', 'Manage', 10, 'newsletter/manage.php');
737
  }
738
  }
739
  }
3
  Plugin Name: Newsletter
4
  Plugin URI: http://www.satollo.net/plugins/newsletter
5
  Description: Newsletter is a simple plugin (still in developement) to collect subscribers and send out newsletters
6
+ Version: 1.2.0
7
  Author: Satollo
8
  Author URI: http://www.satollo.net
9
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
316
 
317
  newsletter_send_confirmation($newsletter_subscriber);
318
 
319
+ $message = 'There is a new subscriber to ' . get_option('blogname') . ' newsletter:' . "\n\n" .
320
+ $name . ' <' . $email . '>' . "\n\n" .
321
+ 'Have a nice day,' . "\n" . 'your Newsletter plugin.';
322
+
323
+ $subject = '[' . get_option('blogname') . '] New subscription';
324
  newsletter_notify_admin($subject, $message);
325
  }
326
 
587
  $wpdb->query("delete from " . $wpdb->prefix . "newsletter where email='" . $wpdb->escape($email) . "'" .
588
  " and token='" . $wpdb->escape($token) . "'");
589
 
590
+ $message = 'There is an unsubscription to ' . get_option('blogname') . ' newsletter:' . "\n\n" .
591
+ $name . ' <' . $email . '>' . "\n\n" .
592
+ 'Don\'t worry, for one lost two gained!' . "\n\n" .
593
+ 'Have a nice day,' . "\n" . 'your Newsletter plugin.';
594
+
595
+ $subject = '[' . get_option('blogname') . '] Unsubscription';
596
+ newsletter_notify_admin($subject, $message);
597
  }
598
 
599
  function newsletter_delete($email)
657
  function newsletter_notify_admin(&$subject, &$message)
658
  {
659
  $to = get_option('admin_email');
 
660
  $headers .= "Content-type: text/plain; charset=UTF-8\n";
661
+ wp_mail($to, $subject, $message, $headers);
662
  }
663
 
664
  /**
707
  key `email_token` (`email`,`token`)
708
  )';
709
 
710
+ @$wpdb->query($sql);
711
 
712
  $options = get_option('newsletter');
713
 
729
  add_action('admin_menu', 'newsletter_admin_menu');
730
  function newsletter_admin_menu()
731
  {
732
+ $options = get_option('newsletter');
733
+ $level = $options['editor']?7:10;
734
+
735
  if (function_exists('add_menu_page'))
736
  {
737
+ add_menu_page('Newsletter', 'Newsletter', $level, 'newsletter/options.php', '', '');
738
  }
739
 
740
  if (function_exists('add_submenu_page'))
741
  {
742
+ add_submenu_page('newsletter/options.php', 'Configuration', 'Configuration', $level, 'newsletter/options.php');
743
+ add_submenu_page('newsletter/options.php', 'Composer', 'Composer', $level, 'newsletter/newsletter.php');
744
+ add_submenu_page('newsletter/options.php', 'Import', 'Import', $level, 'newsletter/import.php');
745
+ add_submenu_page('newsletter/options.php', 'Manage', 'Manage', $level, 'newsletter/manage.php');
746
  }
747
  }
748
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@
3
  Tags: newsletter,email,subscription,mass mail
4
  Requires at least: 2.7
5
  Tested up to: 2.8.4
6
- Stable tag: 1.1.9
7
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2545483
8
  Contributors: satollo
9
 
3
  Tags: newsletter,email,subscription,mass mail
4
  Requires at least: 2.7
5
  Tested up to: 2.8.4
6
+ Stable tag: trunk
7
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2545483
8
  Contributors: satollo
9