Version Description
Download this release
Release Info
Developer | mailmunch |
Plugin | MailChimp Forms by MailMunch |
Version | 1.0.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.8
- css/admin.css +39 -0
- img/close.png +0 -0
- inc/mailmunchapi.php +1 -1
- js/admin.js +52 -6
- mailchimp-mailmunch.php +11 -5
- readme.txt +13 -11
css/admin.css
CHANGED
@@ -1,3 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#sign-in-form, #sign-up-form {
|
2 |
display: none;
|
3 |
}
|
1 |
+
#signup-signin-box-overlay {
|
2 |
+
background-color: #000;
|
3 |
+
opacity: 0.8;
|
4 |
+
position: fixed;
|
5 |
+
left: 0px;
|
6 |
+
top: 0px;
|
7 |
+
height: 100%;
|
8 |
+
width: 100%;
|
9 |
+
z-index: 10000;
|
10 |
+
}
|
11 |
+
|
12 |
+
#signup-signin-close {
|
13 |
+
cursor: pointer;
|
14 |
+
position: absolute;
|
15 |
+
right: 0px;
|
16 |
+
top: 0px;
|
17 |
+
line-height: 0px;
|
18 |
+
}
|
19 |
+
|
20 |
+
#signup-signin-close img {
|
21 |
+
width: 20px;
|
22 |
+
height: 20px;
|
23 |
+
}
|
24 |
+
|
25 |
+
#signup-signin-box {
|
26 |
+
position: fixed;
|
27 |
+
background-color: #FFF;
|
28 |
+
z-index: 100000;
|
29 |
+
padding: 20px;
|
30 |
+
max-width: 600px;
|
31 |
+
}
|
32 |
+
|
33 |
+
#signup-signin-box h2.modal-header {
|
34 |
+
margin-top: 0px;
|
35 |
+
border-bottom: 1px solid #DEDEDE;
|
36 |
+
margin-bottom: 10px;
|
37 |
+
padding-bottom: 10px;
|
38 |
+
}
|
39 |
+
|
40 |
#sign-in-form, #sign-up-form {
|
41 |
display: none;
|
42 |
}
|
img/close.png
ADDED
Binary file
|
inc/mailmunchapi.php
CHANGED
@@ -150,7 +150,7 @@
|
|
150 |
$request = wp_remote_post($url, $args);
|
151 |
}
|
152 |
|
153 |
-
if ( !is_wp_error( $request ) && $request['response']['code'] == 500 ) {
|
154 |
return new WP_Error( 'broke', "Internal Server Error" );
|
155 |
}
|
156 |
|
150 |
$request = wp_remote_post($url, $args);
|
151 |
}
|
152 |
|
153 |
+
if ( !is_wp_error( $request ) && ( $request['response']['code'] == 500 || $request['response']['code'] == 503 ) ) {
|
154 |
return new WP_Error( 'broke', "Internal Server Error" );
|
155 |
}
|
156 |
|
js/admin.js
CHANGED
@@ -25,28 +25,74 @@ window.onmessage = function (e) {
|
|
25 |
}
|
26 |
};
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
function showSignInForm() {
|
29 |
document.getElementById("sign-up-form").style.display = 'none';
|
30 |
document.getElementById("sign-in-form").style.display = 'block';
|
31 |
document.getElementById('why-account').style.display = 'none';
|
32 |
-
showSignupBox(
|
33 |
}
|
34 |
|
35 |
function showSignUpForm() {
|
36 |
document.getElementById("sign-in-form").style.display = 'none';
|
37 |
document.getElementById("sign-up-form").style.display = 'block';
|
38 |
document.getElementById('why-account').style.display = 'none';
|
39 |
-
showSignupBox(
|
40 |
}
|
41 |
|
42 |
function showSignupBox(width, height) {
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
46 |
return false;
|
47 |
}
|
48 |
|
|
|
|
|
|
|
|
|
|
|
49 |
function showWhyAccount() {
|
50 |
document.getElementById('why-account').style.display = 'block';
|
51 |
-
|
52 |
}
|
25 |
}
|
26 |
};
|
27 |
|
28 |
+
function repositionSignupBox() {
|
29 |
+
divId = 'signup-signin-box';
|
30 |
+
var divWidth, divHeight;
|
31 |
+
var objDiv = document.getElementById(divId);
|
32 |
+
|
33 |
+
if (objDiv.clientWidth) {
|
34 |
+
divWidth = objDiv.clientWidth;
|
35 |
+
divHeight = objDiv.clientHeight;
|
36 |
+
}
|
37 |
+
else if (objDiv.offsetWidth)
|
38 |
+
{
|
39 |
+
divWidth = objDiv.offsetWidth;
|
40 |
+
divHeight = objDiv.offsetHeight;
|
41 |
+
}
|
42 |
+
|
43 |
+
// Get the x and y coordinates of the center in output browser's window
|
44 |
+
var centerX, centerY;
|
45 |
+
if (window.innerHeight)
|
46 |
+
{
|
47 |
+
centerX = window.innerWidth;
|
48 |
+
centerY = window.innerHeight;
|
49 |
+
}
|
50 |
+
else if (document.documentElement && document.documentElement.clientHeight)
|
51 |
+
{
|
52 |
+
centerX = document.documentElement.clientWidth;
|
53 |
+
centerY = document.documentElement.clientHeight;
|
54 |
+
}
|
55 |
+
else if (document.body)
|
56 |
+
{
|
57 |
+
centerX = document.body.clientWidth;
|
58 |
+
centerY = document.body.clientHeight;
|
59 |
+
}
|
60 |
+
|
61 |
+
var offsetLeft = (centerX - divWidth) / 2;
|
62 |
+
var offsetTop = (centerY - divHeight) / 2;
|
63 |
+
|
64 |
+
objDiv.style.top = offsetTop + 'px';
|
65 |
+
objDiv.style.left = offsetLeft + 'px';
|
66 |
+
}
|
67 |
+
|
68 |
function showSignInForm() {
|
69 |
document.getElementById("sign-up-form").style.display = 'none';
|
70 |
document.getElementById("sign-in-form").style.display = 'block';
|
71 |
document.getElementById('why-account').style.display = 'none';
|
72 |
+
showSignupBox();
|
73 |
}
|
74 |
|
75 |
function showSignUpForm() {
|
76 |
document.getElementById("sign-in-form").style.display = 'none';
|
77 |
document.getElementById("sign-up-form").style.display = 'block';
|
78 |
document.getElementById('why-account').style.display = 'none';
|
79 |
+
showSignupBox();
|
80 |
}
|
81 |
|
82 |
function showSignupBox(width, height) {
|
83 |
+
document.getElementById("signup-signin-box-overlay").style.display = 'block';
|
84 |
+
document.getElementById("signup-signin-box").style.display = 'block';
|
85 |
+
repositionSignupBox();
|
86 |
+
|
87 |
return false;
|
88 |
}
|
89 |
|
90 |
+
function hideSignupBox() {
|
91 |
+
document.getElementById("signup-signin-box-overlay").style.display = 'none';
|
92 |
+
document.getElementById("signup-signin-box").style.display = 'none';
|
93 |
+
}
|
94 |
+
|
95 |
function showWhyAccount() {
|
96 |
document.getElementById('why-account').style.display = 'block';
|
97 |
+
repositionSignupBox();
|
98 |
}
|
mailchimp-mailmunch.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: MailChimp Forms by MailMunch
|
4 |
Plugin URI: http://connect.mailchimp.com/integrations/mailmunch-email-list-builder
|
5 |
Description: The MailChimp plugin allows you to quickly and easily add signup forms for your MailChimp lists. Popup, Embedded, Top Bar and a variety of different options available.
|
6 |
-
Version: 1.0.
|
7 |
Author: MailMunch
|
8 |
Author URI: http://www.mailmunch.co
|
9 |
License: GPL2
|
@@ -14,7 +14,7 @@
|
|
14 |
require_once( plugin_dir_path( __FILE__ ) . 'inc/sidebar_widget.php' );
|
15 |
|
16 |
define( 'MAILCHIMP_MAILMUNCH_SLUG', "mailchimp-mailmunch");
|
17 |
-
define( 'MAILCHIMP_MAILMUNCH_VER', "1.0.
|
18 |
define( 'MAILCHIMP_MAILMUNCH_URL', "www.mailmunch.co");
|
19 |
|
20 |
// Create unique WordPress instance ID
|
@@ -322,7 +322,7 @@
|
|
322 |
<div class="form-group">
|
323 |
<input type="hidden" name="action" value="save_settings" />
|
324 |
|
325 |
-
<select name="
|
326 |
<?php foreach ($sites as $site) { ?>
|
327 |
<option value="<?php echo $site->id ?>"><?php echo $site->name ?></option>
|
328 |
<?php } ?>
|
@@ -378,12 +378,17 @@
|
|
378 |
$current_user = wp_get_current_user();
|
379 |
?>
|
380 |
|
381 |
-
|
382 |
|
383 |
<div id="signup-signin-box" style="display:none;">
|
|
|
|
|
|
|
|
|
384 |
<div id="sign-up-form" class="<?php if (!$_POST || ($_POST["action"] != "sign_in" && $_POST["action"] != "unlink_account")) { ?> active<?php } ?>">
|
385 |
<div class="form-container">
|
386 |
-
<
|
|
|
387 |
|
388 |
<div id="why-account" class="alert alert-warning" style="display: none;">
|
389 |
<h4>Why do I need a MailMunch account?</h4>
|
@@ -432,6 +437,7 @@
|
|
432 |
</div>
|
433 |
|
434 |
<div id="sign-in-form" class="<?php if ($_POST && ($_POST["action"] == "sign_in" || $_POST["action"] == "unlink_account")) { ?> active<?php } ?>">
|
|
|
435 |
<p>Sign in using your email and password below.</p>
|
436 |
|
437 |
<?php if ($_POST && $_POST["action"] == "sign_in") { ?>
|
3 |
Plugin Name: MailChimp Forms by MailMunch
|
4 |
Plugin URI: http://connect.mailchimp.com/integrations/mailmunch-email-list-builder
|
5 |
Description: The MailChimp plugin allows you to quickly and easily add signup forms for your MailChimp lists. Popup, Embedded, Top Bar and a variety of different options available.
|
6 |
+
Version: 1.0.8
|
7 |
Author: MailMunch
|
8 |
Author URI: http://www.mailmunch.co
|
9 |
License: GPL2
|
14 |
require_once( plugin_dir_path( __FILE__ ) . 'inc/sidebar_widget.php' );
|
15 |
|
16 |
define( 'MAILCHIMP_MAILMUNCH_SLUG', "mailchimp-mailmunch");
|
17 |
+
define( 'MAILCHIMP_MAILMUNCH_VER', "1.0.8");
|
18 |
define( 'MAILCHIMP_MAILMUNCH_URL', "www.mailmunch.co");
|
19 |
|
20 |
// Create unique WordPress instance ID
|
322 |
<div class="form-group">
|
323 |
<input type="hidden" name="action" value="save_settings" />
|
324 |
|
325 |
+
<select name="mc_mm_data[site_id]">
|
326 |
<?php foreach ($sites as $site) { ?>
|
327 |
<option value="<?php echo $site->id ?>"><?php echo $site->name ?></option>
|
328 |
<?php } ?>
|
378 |
$current_user = wp_get_current_user();
|
379 |
?>
|
380 |
|
381 |
+
<div id="signup-signin-box-overlay" onclick="hideSignupBox();" style="display: none;"></div>
|
382 |
|
383 |
<div id="signup-signin-box" style="display:none;">
|
384 |
+
<a id="signup-signin-close" onclick="hideSignupBox();">
|
385 |
+
<img src="<?php echo plugins_url( 'img/close.png', __FILE__ ) ?>" />
|
386 |
+
</a>
|
387 |
+
|
388 |
<div id="sign-up-form" class="<?php if (!$_POST || ($_POST["action"] != "sign_in" && $_POST["action"] != "unlink_account")) { ?> active<?php } ?>">
|
389 |
<div class="form-container">
|
390 |
+
<h2 class="modal-header">Sign Up</h2>
|
391 |
+
<p>To activate your MailChimp forms, we will now create your account on MailMunch (<a onclick="showWhyAccount();" id="why-account-btn">Why?</a>).</p>
|
392 |
|
393 |
<div id="why-account" class="alert alert-warning" style="display: none;">
|
394 |
<h4>Why do I need a MailMunch account?</h4>
|
437 |
</div>
|
438 |
|
439 |
<div id="sign-in-form" class="<?php if ($_POST && ($_POST["action"] == "sign_in" || $_POST["action"] == "unlink_account")) { ?> active<?php } ?>">
|
440 |
+
<h2 class="modal-header">Sign In</h2>
|
441 |
<p>Sign in using your email and password below.</p>
|
442 |
|
443 |
<?php if ($_POST && $_POST["action"] == "sign_in") { ?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: mailmunch
|
|
3 |
Tags: mailchimp, MailChimp form, MailChimp Newsletter form, MailChimp plugin, newsletter, newsletter form, newsletter form plugin, optin form, form, signup, signup forms, signup form, widget, email form, leads
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 4.1
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -15,7 +15,9 @@ The #1 MailChimp plugin to get more email subscribers. Easily add MailChimp sign
|
|
15 |
|
16 |
What is [MailChimp](http://www.mailchimp.com/)? MailChimp is one of the best email marketing tools. Signup up for a [FREE Trial Account](http://www.mailchimp.com/signup/) and see for yourself!
|
17 |
|
18 |
-
|
|
|
|
|
19 |
|
20 |
= Sign-Up Forms =
|
21 |
Easily create sign-up forms for your MailChimp list and display it as a popup, embedded widget or a top bar.
|
@@ -36,8 +38,8 @@ Easily create sign-up forms for your MailChimp list and display it as a popup, e
|
|
36 |
* Redirect users to a page on submission
|
37 |
* Un-subscribe users from MailChimp lists
|
38 |
* View subscriber MailChimp profiles
|
39 |
-
* View individual form subscriber count
|
40 |
-
* Display multiple forms on a single page
|
41 |
* Easily add MailChimp forms to pages and posts with a button in the page/post editor
|
42 |
|
43 |
After installation and creating your account, the plugin will guide you through connecting with MailChimp, selecting your MailChimp List from our service, and then adding the form to your site. The time from starting installation to have the form on your site should be less than 5 minutes - absolutely everything can be done via our user friendly GUI - no file editing at all!
|
@@ -53,7 +55,7 @@ This section describes how to install the plugin and get started using it.
|
|
53 |
4. Sign up and create your first optin form
|
54 |
5. Choose the optin form type: Popover, Embedded or Top Bar
|
55 |
6. Connect MailChimp and choose a list
|
56 |
-
7. Start collecting user emails and growing your subscriber list!
|
57 |
|
58 |
= Advanced =
|
59 |
If you are using Wordpress v3.0 or higher, you can use the short-code given during the optin form creation. It will look something like this:
|
@@ -78,13 +80,13 @@ For more help, visit the MailChimp Support article [How do I create a new list?]
|
|
78 |
The first step is to activate the plugin and sign up. Then we will guide you through the process of connecting your MailChimp account and choosing the list. This is done on the WordPress admin "MailChimp" menu page.
|
79 |
|
80 |
= Do I need MailChimp's API Key? =
|
81 |
-
You don't have to worry about that. We will guide you through the
|
82 |
|
83 |
= How do I add my MailChimp lists? =
|
84 |
-
After you connect your MailChimp account, the plugin will fetch all of your MailChimp list information and load it into the plugin admin. You can simply choose the lists you want to make forms for.
|
85 |
|
86 |
= How do I add the MailChimp sign up forms to my site? =
|
87 |
-
We offer a variety of forms: Popups, Embedded, Top Bar, etc. You can choose which pages, posts or categories to show it on. You can also use a shortcode to add a form to a specific area in a page or post. Everything is done visually.
|
88 |
|
89 |
= Does this plugin slow down my site? =
|
90 |
Absolutely not. MailChimp by MailMunch is designed with high performance and scalability in mind. It's completely asynchronous and hosted on Amazon's highly scalable infrastructure. Some of our customers have very high traffic websites.
|
@@ -110,10 +112,10 @@ Why people use MailChimp
|
|
110 |
== Screenshots ==
|
111 |
|
112 |
1. This is the MailChimp optin form designer by MailMunch where you can customize your optin form
|
113 |
-
2. The second step is configuring your
|
114 |
3. This is the integration step where you can connect your MailChimp account
|
115 |
-
4. This is the final step where you can publish your
|
116 |
-
5. And finally, we have the
|
117 |
6. A MailChimp connected form example from a user site
|
118 |
7. Another MailChimp connected example from a user site
|
119 |
|
3 |
Tags: mailchimp, MailChimp form, MailChimp Newsletter form, MailChimp plugin, newsletter, newsletter form, newsletter form plugin, optin form, form, signup, signup forms, signup form, widget, email form, leads
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 4.1
|
6 |
+
Stable tag: 1.0.8
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
15 |
|
16 |
What is [MailChimp](http://www.mailchimp.com/)? MailChimp is one of the best email marketing tools. Signup up for a [FREE Trial Account](http://www.mailchimp.com/signup/) and see for yourself!
|
17 |
|
18 |
+
[vimeo http://vimeo.com/117103275]
|
19 |
+
|
20 |
+
Our improved signup plugin for MailChimp will proactively sign-up new subscribers to your MailChimp newsletter list. Our forms offer the same basic features that MailChimp's official plugin, but also much more. In addition to the form, analytics will help you track the number of form views and subscriptions.
|
21 |
|
22 |
= Sign-Up Forms =
|
23 |
Easily create sign-up forms for your MailChimp list and display it as a popup, embedded widget or a top bar.
|
38 |
* Redirect users to a page on submission
|
39 |
* Un-subscribe users from MailChimp lists
|
40 |
* View subscriber MailChimp profiles
|
41 |
+
* View individual MailChimp form subscriber count
|
42 |
+
* Display multiple MailChimp forms on a single page
|
43 |
* Easily add MailChimp forms to pages and posts with a button in the page/post editor
|
44 |
|
45 |
After installation and creating your account, the plugin will guide you through connecting with MailChimp, selecting your MailChimp List from our service, and then adding the form to your site. The time from starting installation to have the form on your site should be less than 5 minutes - absolutely everything can be done via our user friendly GUI - no file editing at all!
|
55 |
4. Sign up and create your first optin form
|
56 |
5. Choose the optin form type: Popover, Embedded or Top Bar
|
57 |
6. Connect MailChimp and choose a list
|
58 |
+
7. Start collecting user emails and growing your MailChimp subscriber list!
|
59 |
|
60 |
= Advanced =
|
61 |
If you are using Wordpress v3.0 or higher, you can use the short-code given during the optin form creation. It will look something like this:
|
80 |
The first step is to activate the plugin and sign up. Then we will guide you through the process of connecting your MailChimp account and choosing the list. This is done on the WordPress admin "MailChimp" menu page.
|
81 |
|
82 |
= Do I need MailChimp's API Key? =
|
83 |
+
You don't have to worry about that. We will guide you through the MailChimp flow.
|
84 |
|
85 |
= How do I add my MailChimp lists? =
|
86 |
+
After you connect your MailChimp account, the plugin will fetch all of your MailChimp list information and load it into the plugin admin. You can simply choose the MailChimp lists you want to make forms for.
|
87 |
|
88 |
= How do I add the MailChimp sign up forms to my site? =
|
89 |
+
We offer a variety of forms: Popups, Embedded, Top Bar, etc. You can choose which pages, posts or categories to show it on. You can also use a shortcode to add a MailChimp form to a specific area in a page or post. Everything is done visually.
|
90 |
|
91 |
= Does this plugin slow down my site? =
|
92 |
Absolutely not. MailChimp by MailMunch is designed with high performance and scalability in mind. It's completely asynchronous and hosted on Amazon's highly scalable infrastructure. Some of our customers have very high traffic websites.
|
112 |
== Screenshots ==
|
113 |
|
114 |
1. This is the MailChimp optin form designer by MailMunch where you can customize your optin form
|
115 |
+
2. The second step is configuring your MailChimp form for things like when to show it, how often to show it, and where to go after they subscribe
|
116 |
3. This is the integration step where you can connect your MailChimp account
|
117 |
+
4. This is the final step where you can publish your MailChimp form to all or selected posts, categories or pages
|
118 |
+
5. And finally, we have the MailChimp form working live on your blog - increasing your MailChimp subscribers :)
|
119 |
6. A MailChimp connected form example from a user site
|
120 |
7. Another MailChimp connected example from a user site
|
121 |
|