Version Description
- Fixed the home_url and blog_url replacements
- Added the cleans up of tags used in href attributes
- Fixed the cleans up of URL tags
- Added module version checking support
- Added the welcome email option to disable it
- Fixed the new subscriber notification missing under some specific conditions
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 3.2.5 |
Comparing to | |
See all releases |
Code changes from version 3.2.4 to 3.2.5
- admin.css +4 -2
- includes/controls.php +8 -4
- includes/module.php +41 -11
- main/main.php +1 -0
- plugin.php +10 -6
- readme.txt +25 -17
- subscription/options.php +9 -2
- subscription/subscription.php +17 -16
admin.css
CHANGED
@@ -866,11 +866,13 @@ table.clicks {
|
|
866 |
|
867 |
.newsletter-buttons {
|
868 |
margin-top: 1em;
|
869 |
-
|
870 |
}
|
871 |
|
872 |
.newsletter-buttons-bottom {
|
873 |
-
|
|
|
|
|
874 |
}
|
875 |
|
876 |
/* Text under the panel title to explain the panel purpose. */
|
866 |
|
867 |
.newsletter-buttons {
|
868 |
margin-top: 1em;
|
869 |
+
margin-bottom: 1em;
|
870 |
}
|
871 |
|
872 |
.newsletter-buttons-bottom {
|
873 |
+
}
|
874 |
+
|
875 |
+
.newsletter-buttons-top {
|
876 |
}
|
877 |
|
878 |
/* Text under the panel title to explain the panel purpose. */
|
includes/controls.php
CHANGED
@@ -237,7 +237,7 @@ class NewsletterControls {
|
|
237 |
}
|
238 |
|
239 |
function text($name, $size = 20, $placeholder = '') {
|
240 |
-
echo '<input placeholder="' . $placeholder . '" name="options[' . $name . ']" type="text" size="' . $size . '" value="';
|
241 |
echo htmlspecialchars($this->data[$name]);
|
242 |
echo '"/>';
|
243 |
}
|
@@ -301,9 +301,13 @@ class NewsletterControls {
|
|
301 |
echo '</textarea>';
|
302 |
}
|
303 |
|
304 |
-
function email($prefix, $editor = null) {
|
305 |
-
|
306 |
-
|
|
|
|
|
|
|
|
|
307 |
//echo '<br />Message:<br />';
|
308 |
if ($editor == 'wordpress') {
|
309 |
$this->wp_editor($prefix . '_message');
|
237 |
}
|
238 |
|
239 |
function text($name, $size = 20, $placeholder = '') {
|
240 |
+
echo '<input placeholder="' . htmlspecialchars($placeholder) . '" name="options[' . $name . ']" type="text" size="' . $size . '" value="';
|
241 |
echo htmlspecialchars($this->data[$name]);
|
242 |
echo '"/>';
|
243 |
}
|
301 |
echo '</textarea>';
|
302 |
}
|
303 |
|
304 |
+
function email($prefix, $editor = null, $disable_option=false) {
|
305 |
+
if ($disable_option) {
|
306 |
+
$this->checkbox($prefix . '_disabled', 'Disable this email');
|
307 |
+
echo '<br>';
|
308 |
+
}
|
309 |
+
//echo 'Subject:<br />';
|
310 |
+
$this->text($prefix . '_subject', 90, 'Subject');
|
311 |
//echo '<br />Message:<br />';
|
312 |
if ($editor == 'wordpress') {
|
313 |
$this->wp_editor($prefix . '_message');
|
includes/module.php
CHANGED
@@ -28,6 +28,8 @@ class NewsletterModule {
|
|
28 |
* @var string
|
29 |
*/
|
30 |
var $version;
|
|
|
|
|
31 |
|
32 |
/**
|
33 |
* Prefix for all options stored on WordPress options table.
|
@@ -40,9 +42,10 @@ class NewsletterModule {
|
|
40 |
*/
|
41 |
var $themes;
|
42 |
|
43 |
-
function __construct($module, $version) {
|
44 |
$this->module = $module;
|
45 |
$this->version = $version;
|
|
|
46 |
$this->prefix = 'newsletter_' . $module;
|
47 |
|
48 |
|
@@ -60,7 +63,12 @@ class NewsletterModule {
|
|
60 |
$this->upgrade();
|
61 |
update_option($this->prefix . '_version', $this->version);
|
62 |
}
|
|
|
63 |
add_action('admin_menu', array($this, 'admin_menu'));
|
|
|
|
|
|
|
|
|
64 |
}
|
65 |
}
|
66 |
|
@@ -78,6 +86,10 @@ class NewsletterModule {
|
|
78 |
} else {
|
79 |
// TODO: Try with an array_merge()?
|
80 |
}
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
function upgrade_query($query) {
|
@@ -86,7 +98,17 @@ class NewsletterModule {
|
|
86 |
$this->logger->info('upgrade_query> Executing ' . $query);
|
87 |
$wpdb->query($query);
|
88 |
if ($wpdb->last_error) {
|
89 |
-
$this->logger->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
}
|
92 |
|
@@ -94,19 +116,26 @@ class NewsletterModule {
|
|
94 |
* Return, eventually, the version of this moduke available on satollo.net.
|
95 |
* @return string
|
96 |
*/
|
97 |
-
static function get_available_version($module_id) {
|
98 |
-
|
99 |
-
|
100 |
-
|
|
|
101 |
$version = @file_get_contents('http://www.satollo.net/wp-content/plugins/file-commerce-pro/version.php?f=' . $module_id);
|
102 |
-
|
103 |
-
update_option('newsletter_module_' . $module_id . '_last_check', time());
|
104 |
-
add_option('newsletter_module_' . $module_id . '_version', $version);
|
105 |
-
update_option('newsletter_module_' . $module_id . '_version', $version);
|
106 |
}
|
107 |
return $version;
|
108 |
}
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
/** Returns a prefix to be used for option names and other things which need to be uniquely named. The parameter
|
111 |
* "sub" should be used when a sub name is needed for another set of options or like.
|
112 |
*
|
@@ -410,6 +439,7 @@ class NewsletterModule {
|
|
410 |
}
|
411 |
}
|
412 |
|
|
|
413 |
static function extension_exists($name) {
|
414 |
return is_file(WP_CONTENT_DIR . "/extensions/newsletter/$name/$name.php");
|
415 |
}
|
@@ -421,7 +451,7 @@ class NewsletterModule {
|
|
421 |
static function clean_url_tags($text) {
|
422 |
$text = str_replace('%7B', '{', $text);
|
423 |
$text = str_replace('%7D', '}', $text);
|
424 |
-
$text = preg_replace("/[\"']http
|
425 |
return $text;
|
426 |
}
|
427 |
|
28 |
* @var string
|
29 |
*/
|
30 |
var $version;
|
31 |
+
var $module_id;
|
32 |
+
var $available_version;
|
33 |
|
34 |
/**
|
35 |
* Prefix for all options stored on WordPress options table.
|
42 |
*/
|
43 |
var $themes;
|
44 |
|
45 |
+
function __construct($module, $version, $module_id = null) {
|
46 |
$this->module = $module;
|
47 |
$this->version = $version;
|
48 |
+
$this->module_id = $module_id;
|
49 |
$this->prefix = 'newsletter_' . $module;
|
50 |
|
51 |
|
63 |
$this->upgrade();
|
64 |
update_option($this->prefix . '_version', $this->version);
|
65 |
}
|
66 |
+
|
67 |
add_action('admin_menu', array($this, 'admin_menu'));
|
68 |
+
$this->available_version = get_option($this->prefix . '_available_version');
|
69 |
+
}
|
70 |
+
if (!empty($this->module_id)) {
|
71 |
+
add_action($this->prefix . '_version_check', array($this, 'hook_version_check'), 1);
|
72 |
}
|
73 |
}
|
74 |
|
86 |
} else {
|
87 |
// TODO: Try with an array_merge()?
|
88 |
}
|
89 |
+
if (!empty($this->module_id)) {
|
90 |
+
wp_clear_scheduled_hook($this->prefix . '_version_check');
|
91 |
+
wp_schedule_event(time() + 30, 'daily', $this->prefix . '_version_check');
|
92 |
+
}
|
93 |
}
|
94 |
|
95 |
function upgrade_query($query) {
|
98 |
$this->logger->info('upgrade_query> Executing ' . $query);
|
99 |
$wpdb->query($query);
|
100 |
if ($wpdb->last_error) {
|
101 |
+
$this->logger->debug($wpdb->last_error);
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
function hook_version_check() {
|
106 |
+
$this->logger->info('Checking for new version');
|
107 |
+
if (empty($this->module_id)) return;
|
108 |
+
$version = @file_get_contents('http://www.satollo.net/wp-content/plugins/file-commerce-pro/version.php?f=' . $this->module_id);
|
109 |
+
if ($version) {
|
110 |
+
update_option($this->prefix . '_available_version', $version);
|
111 |
+
$this->available_version = $version;
|
112 |
}
|
113 |
}
|
114 |
|
116 |
* Return, eventually, the version of this moduke available on satollo.net.
|
117 |
* @return string
|
118 |
*/
|
119 |
+
static function get_available_version($module_id, $force = false) {
|
120 |
+
if (empty($module_id))
|
121 |
+
return '';
|
122 |
+
$version = get_transient('newsletter_module_' . $module_id . '_version');
|
123 |
+
if ($force || !$version) {
|
124 |
$version = @file_get_contents('http://www.satollo.net/wp-content/plugins/file-commerce-pro/version.php?f=' . $module_id);
|
125 |
+
set_transient('newsletter_module_' . $module_id . '_version', $version, 2 * 86400);
|
|
|
|
|
|
|
126 |
}
|
127 |
return $version;
|
128 |
}
|
129 |
|
130 |
+
function new_version_available($force = false) {
|
131 |
+
if (empty($this->module_id))
|
132 |
+
return false;
|
133 |
+
$version = self::get_available_version($this->module_id, $force);
|
134 |
+
if (empty($version))
|
135 |
+
return false;
|
136 |
+
return ($version > $this->version) ? $version : false;
|
137 |
+
}
|
138 |
+
|
139 |
/** Returns a prefix to be used for option names and other things which need to be uniquely named. The parameter
|
140 |
* "sub" should be used when a sub name is needed for another set of options or like.
|
141 |
*
|
439 |
}
|
440 |
}
|
441 |
|
442 |
+
/** Returns true if the named extension is installed. */
|
443 |
static function extension_exists($name) {
|
444 |
return is_file(WP_CONTENT_DIR . "/extensions/newsletter/$name/$name.php");
|
445 |
}
|
451 |
static function clean_url_tags($text) {
|
452 |
$text = str_replace('%7B', '{', $text);
|
453 |
$text = str_replace('%7D', '}', $text);
|
454 |
+
$text = preg_replace("/[\"']http[^\"']+(\\{[^\\}]+\\})[\"']/i", "\"\\1\"", $text);
|
455 |
return $text;
|
456 |
}
|
457 |
|
main/main.php
CHANGED
@@ -340,6 +340,7 @@ if (!$controls->is_action()) {
|
|
340 |
<tr valign="top">
|
341 |
<th>Denied content message</th>
|
342 |
<td>
|
|
|
343 |
<?php wp_editor( $controls->data['lock_message'], 'lock_message', array('textarea_name'=>'options[lock_message]') ); ?>
|
344 |
|
345 |
<?php //$controls->textarea('lock_message'); ?>
|
340 |
<tr valign="top">
|
341 |
<th>Denied content message</th>
|
342 |
<td>
|
343 |
+
<?php $controls->textarea('lock_message'); ?>
|
344 |
<?php wp_editor( $controls->data['lock_message'], 'lock_message', array('textarea_name'=>'options[lock_message]') ); ?>
|
345 |
|
346 |
<?php //$controls->textarea('lock_message'); ?>
|
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.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,7 +13,7 @@
|
|
13 |
*/
|
14 |
|
15 |
// Useed as dummy parameter on css and js links
|
16 |
-
define('NEWSLETTER_VERSION', '3.2.
|
17 |
|
18 |
global $wpdb, $newsletter;
|
19 |
|
@@ -128,6 +128,7 @@ class Newsletter extends NewsletterModule {
|
|
128 |
|
129 |
add_action('init', array($this, 'hook_init'));
|
130 |
add_action('newsletter', array($this, 'hook_newsletter'), 1);
|
|
|
131 |
|
132 |
// This specific event is created by "Feed by mail" panel on configuration
|
133 |
add_action('shutdown', array($this, 'hook_shutdown'));
|
@@ -239,7 +240,7 @@ class Newsletter extends NewsletterModule {
|
|
239 |
|
240 |
function admin_menu() {
|
241 |
// This adds the main menu page
|
242 |
-
add_menu_page('Newsletter', 'Newsletter', $
|
243 |
|
244 |
$this->add_menu_page('index', 'Welcome');
|
245 |
$this->add_menu_page('main', 'Configuration');
|
@@ -342,7 +343,7 @@ class Newsletter extends NewsletterModule {
|
|
342 |
function relink($text, $email_id, $user_id) {
|
343 |
return NewsletterStatistics::instance()->relink($text, $email_id, $user_id);
|
344 |
}
|
345 |
-
|
346 |
/**
|
347 |
* Runs every 5 minutes and look for emails that need to be processed.
|
348 |
*/
|
@@ -737,8 +738,11 @@ class Newsletter extends NewsletterModule {
|
|
737 |
|
738 |
$text = apply_filters('newsletter_replace', $text, $user_id, $email_id);
|
739 |
|
740 |
-
|
741 |
-
|
|
|
|
|
|
|
742 |
$text = str_replace('{blog_title}', get_option('blogname'), $text);
|
743 |
$text = str_replace('{blog_description}', get_option('blogdescription'), $text);
|
744 |
|
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.2.5
|
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.2.5');
|
17 |
|
18 |
global $wpdb, $newsletter;
|
19 |
|
128 |
|
129 |
add_action('init', array($this, 'hook_init'));
|
130 |
add_action('newsletter', array($this, 'hook_newsletter'), 1);
|
131 |
+
|
132 |
|
133 |
// This specific event is created by "Feed by mail" panel on configuration
|
134 |
add_action('shutdown', array($this, 'hook_shutdown'));
|
240 |
|
241 |
function admin_menu() {
|
242 |
// This adds the main menu page
|
243 |
+
add_menu_page('Newsletter', 'Newsletter', ($newsletter->options['editor'] == 1) ? 'manage_categories' : 'manage_options', 'newsletter_main_index');
|
244 |
|
245 |
$this->add_menu_page('index', 'Welcome');
|
246 |
$this->add_menu_page('main', 'Configuration');
|
343 |
function relink($text, $email_id, $user_id) {
|
344 |
return NewsletterStatistics::instance()->relink($text, $email_id, $user_id);
|
345 |
}
|
346 |
+
|
347 |
/**
|
348 |
* Runs every 5 minutes and look for emails that need to be processed.
|
349 |
*/
|
738 |
|
739 |
$text = apply_filters('newsletter_replace', $text, $user_id, $email_id);
|
740 |
|
741 |
+
//$text = str_replace('{home_url}', get_option('home'), $text);
|
742 |
+
//$text = str_replace('{blog_url}', get_option('home'), $text);
|
743 |
+
$text = $this->replace_url($text, 'BLOG_URL', get_option('home'));
|
744 |
+
$text = $this->replace_url($text, 'HOME_URL', get_option('home'));
|
745 |
+
|
746 |
$text = str_replace('{blog_title}', get_option('blogname'), $text);
|
747 |
$text = str_replace('{blog_description}', get_option('blogdescription'), $text);
|
748 |
|
readme.txt
CHANGED
@@ -1,37 +1,36 @@
|
|
1 |
=== Newsletter ===
|
2 |
Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing
|
3 |
-
Requires at least: 3.
|
4 |
Tested up to: 3.5.1
|
5 |
-
Stable tag: 3.2.
|
6 |
Donate link: http://www.satollo.net/donations
|
7 |
|
8 |
-
Add a real newsletter to your blog. In seconds. For free.
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
-
This plug-in
|
13 |
-
|
14 |
track them.
|
15 |
|
16 |
-
Unlimited subscribers, unlimited
|
17 |
|
18 |
Key features:
|
19 |
|
20 |
-
* unlimited subscribers (the database is your, why should I limit you?)
|
21 |
-
* unlimited emails
|
|
|
|
|
22 |
* single and double opt-in plus privacy acceptance checkbox (as per European laws)
|
23 |
* subscriber preferences to fine target your campaigns
|
24 |
-
* SMTP ready
|
25 |
* html and text version messages
|
26 |
-
* a real delivery engine to manage huge lists with configurable speed
|
27 |
* configurable themes
|
28 |
-
*
|
29 |
-
*
|
30 |
-
*
|
31 |
|
32 |
-
Visit the [Newsletter official page](http://www.satollo.net/plugins/newsletter).
|
33 |
-
|
34 |
-
Previous version is available [here](http://www.satollo.net/wp-content/uploads/newsletter-2.5.2.7.zip).
|
35 |
|
36 |
Thank you, Stefano Lissa (Satollo).
|
37 |
|
@@ -44,7 +43,7 @@ Thank you, Stefano Lissa (Satollo).
|
|
44 |
== Frequently Asked Questions ==
|
45 |
|
46 |
See the [Newsletter FAQ](http://www.satollo.net/plugins/newsletter/newsletter-faq) or the
|
47 |
-
[Newsletter Forum](http://www.satollo.net/forums).
|
48 |
|
49 |
For documentation start from [Newsletter official page](http://www.satollo.net/plugins/newsletter).
|
50 |
|
@@ -56,6 +55,15 @@ No screen shots are available at this time.
|
|
56 |
|
57 |
== Changelog ==
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
= 3.2.4 =
|
60 |
|
61 |
* Added target _blank on theme links so they open on a new windows for the online version
|
1 |
=== Newsletter ===
|
2 |
Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing
|
3 |
+
Requires at least: 3.3.0
|
4 |
Tested up to: 3.5.1
|
5 |
+
Stable tag: 3.2.5
|
6 |
Donate link: http://www.satollo.net/donations
|
7 |
|
8 |
+
Add a real newsletter to your blog. In seconds. For free. With unlimited emails and subscribers.
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
+
This plug-in adds a real newsletter system to your WordPress blog. Perfect for list building,
|
13 |
+
you can create cool emails with visual editor, send and
|
14 |
track them.
|
15 |
|
16 |
+
Unlimited subscribers, unlimited e-mails.
|
17 |
|
18 |
Key features:
|
19 |
|
20 |
+
* **unlimited subscribers** (the database is your, why should I limit you?) with statistics
|
21 |
+
* **unlimited emails** with tracking
|
22 |
+
* subscription widget, page or via custom form
|
23 |
+
* integrated with **WordPress user registration**
|
24 |
* single and double opt-in plus privacy acceptance checkbox (as per European laws)
|
25 |
* subscriber preferences to fine target your campaigns
|
26 |
+
* **SMTP** ready (Gmail, SendGrid, ...)
|
27 |
* html and text version messages
|
|
|
28 |
* configurable themes
|
29 |
+
* every message and label **fully translatable** from administrative panels (no .po/.mo file to edit)
|
30 |
+
* diagnostic panel for **easy system tests**
|
31 |
+
* **extensible** with specific modules (Facebook, Reports, Feed by Mail, Follow Up)
|
32 |
|
33 |
+
Visit the [Newsletter official page](http://www.satollo.net/plugins/newsletter) to know more.
|
|
|
|
|
34 |
|
35 |
Thank you, Stefano Lissa (Satollo).
|
36 |
|
43 |
== Frequently Asked Questions ==
|
44 |
|
45 |
See the [Newsletter FAQ](http://www.satollo.net/plugins/newsletter/newsletter-faq) or the
|
46 |
+
[Newsletter Forum](http://www.satollo.net/forums) to ask for help.
|
47 |
|
48 |
For documentation start from [Newsletter official page](http://www.satollo.net/plugins/newsletter).
|
49 |
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 3.2.5 =
|
59 |
+
|
60 |
+
* Fixed the home_url and blog_url replacements
|
61 |
+
* Added the cleans up of tags used in href attributes
|
62 |
+
* Fixed the cleans up of URL tags
|
63 |
+
* Added module version checking support
|
64 |
+
* Added the welcome email option to disable it
|
65 |
+
* Fixed the new subscriber notification missing under some specific conditions
|
66 |
+
|
67 |
= 3.2.4 =
|
68 |
|
69 |
* Added target _blank on theme links so they open on a new windows for the online version
|
subscription/options.php
CHANGED
@@ -47,6 +47,12 @@ if ($controls->is_action()) {
|
|
47 |
if (empty($controls->data['unsubscribed_text'])) {
|
48 |
$controls->data['unsubscribed_text'] = $defaults['unsubscribed_text'];
|
49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
$controls->data['confirmed_url'] = trim($controls->data['confirmed_url']);
|
52 |
$controls->data['confirmation_url'] = trim($controls->data['confirmation_url']);
|
@@ -343,7 +349,8 @@ if ($controls->is_action('create')) {
|
|
343 |
<?php $controls->textarea('confirmed_tracking'); ?>
|
344 |
<div class="hints">
|
345 |
The code is injected AS-IS in welcome page and can be used to track conversion
|
346 |
-
(you can use PHP if needed).
|
|
|
347 |
like Google AdWords, Google Analytics and so on.</div>
|
348 |
</td>
|
349 |
</tr>
|
@@ -354,7 +361,7 @@ if ($controls->is_action('create')) {
|
|
354 |
Welcome email<br /><small>The right place where to put bonus content link</small>
|
355 |
</th>
|
356 |
<td>
|
357 |
-
<?php $controls->email('confirmed'); ?>
|
358 |
<div class="hints">
|
359 |
Email sent to the user to confirm his subscription, the successful confirmation
|
360 |
page, the welcome email. This is the right message where to put a <strong>{unlock_url}</strong> link to remember to the
|
47 |
if (empty($controls->data['unsubscribed_text'])) {
|
48 |
$controls->data['unsubscribed_text'] = $defaults['unsubscribed_text'];
|
49 |
}
|
50 |
+
|
51 |
+
$controls->data['confirmed_message'] = NewsletterModule::clean_url_tags($controls->data['confirmed_message']);
|
52 |
+
$controls->data['confirmed_text'] = NewsletterModule::clean_url_tags($controls->data['confirmed_text']);
|
53 |
+
$controls->data['confirmation_text'] = NewsletterModule::clean_url_tags($controls->data['confirmation_text']);
|
54 |
+
$controls->data['confirmation_message'] = NewsletterModule::clean_url_tags($controls->data['confirmation_message']);
|
55 |
+
|
56 |
|
57 |
$controls->data['confirmed_url'] = trim($controls->data['confirmed_url']);
|
58 |
$controls->data['confirmation_url'] = trim($controls->data['confirmation_url']);
|
349 |
<?php $controls->textarea('confirmed_tracking'); ?>
|
350 |
<div class="hints">
|
351 |
The code is injected AS-IS in welcome page and can be used to track conversion
|
352 |
+
(you can use PHP if needed). It does not work with a custom welcome page.
|
353 |
+
Conversion code is usually supply by tracking services,
|
354 |
like Google AdWords, Google Analytics and so on.</div>
|
355 |
</td>
|
356 |
</tr>
|
361 |
Welcome email<br /><small>The right place where to put bonus content link</small>
|
362 |
</th>
|
363 |
<td>
|
364 |
+
<?php $controls->email('confirmed', null, true); ?>
|
365 |
<div class="hints">
|
366 |
Email sent to the user to confirm his subscription, the successful confirmation
|
367 |
page, the welcome email. This is the right message where to put a <strong>{unlock_url}</strong> link to remember to the
|
subscription/subscription.php
CHANGED
@@ -285,14 +285,16 @@ class NewsletterSubscription extends NewsletterModule {
|
|
285 |
|
286 |
|
287 |
$prefix = ($user->status == 'C') ? 'confirmed_' : 'confirmation_';
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
$message_text = $options[$prefix . 'message_text'];
|
292 |
-
$subject = $options[$prefix . 'subject'];
|
293 |
|
294 |
-
|
|
|
|
|
295 |
|
|
|
|
|
296 |
return $user;
|
297 |
}
|
298 |
|
@@ -333,20 +335,19 @@ class NewsletterSubscription extends NewsletterModule {
|
|
333 |
setcookie('newsletter', $user->id . '-' . $user->token, time() + 60 * 60 * 24 * 365, '/');
|
334 |
$newsletter->set_user_status($user->id, 'C');
|
335 |
$user->status = 'C';
|
|
|
336 |
|
337 |
if (!$emails)
|
338 |
return $user;
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
|
340 |
-
|
341 |
-
|
342 |
-
// TODO: This is always empty!
|
343 |
-
$message_text = $this->options['confirmed_message_text'];
|
344 |
-
$subject = $this->options['confirmed_subject'];
|
345 |
-
|
346 |
-
$this->mail($user->email, $newsletter->replace($subject, $user), $newsletter->replace($message, $user));
|
347 |
-
|
348 |
-
$this->notify_admin($user, 'Newsletter subscription');
|
349 |
-
|
350 |
|
351 |
return $user;
|
352 |
}
|
285 |
|
286 |
|
287 |
$prefix = ($user->status == 'C') ? 'confirmed_' : 'confirmation_';
|
288 |
+
|
289 |
+
if (empty($options[$prefix . 'disabled'])) {
|
290 |
+
$message = $options[$prefix . 'message'];
|
|
|
|
|
291 |
|
292 |
+
// TODO: This is always empty!
|
293 |
+
$message_text = $options[$prefix . 'message_text'];
|
294 |
+
$subject = $options[$prefix . 'subject'];
|
295 |
|
296 |
+
$this->mail($user->email, $newsletter->replace($subject, $user), $newsletter->replace($message, $user));
|
297 |
+
}
|
298 |
return $user;
|
299 |
}
|
300 |
|
335 |
setcookie('newsletter', $user->id . '-' . $user->token, time() + 60 * 60 * 24 * 365, '/');
|
336 |
$newsletter->set_user_status($user->id, 'C');
|
337 |
$user->status = 'C';
|
338 |
+
$this->notify_admin($user, 'Newsletter subscription');
|
339 |
|
340 |
if (!$emails)
|
341 |
return $user;
|
342 |
+
|
343 |
+
if (empty($this->options['confirmed_disabled'])) {
|
344 |
+
$message = $this->options['confirmed_message'];
|
345 |
+
// TODO: This is always empty!
|
346 |
+
$message_text = $this->options['confirmed_message_text'];
|
347 |
+
$subject = $this->options['confirmed_subject'];
|
348 |
|
349 |
+
$this->mail($user->email, $newsletter->replace($subject, $user), $newsletter->replace($message, $user));
|
350 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
|
352 |
return $user;
|
353 |
}
|