Subscribe2 - Version 10.14

Version Description

Download this release

Release Info

Developer tanaylakhani
Plugin Icon 128x128 Subscribe2
Version 10.14
Comparing to
See all releases

Code changes from version 10.20.7 to 10.14

Files changed (45) hide show
  1. ChangeLog.txt +0 -96
  2. ReadMe.txt +10 -52
  3. admin/send_email.php +0 -6
  4. admin/settings.php +0 -7
  5. admin/subscribers.php +0 -11
  6. admin/your_subscriptions.php +0 -6
  7. classes/class-s2-admin.php +14 -52
  8. classes/class-s2-ajax.php +0 -141
  9. classes/class-s2-core.php +18 -23
  10. classes/class-s2-frontend.php +1 -2
  11. classes/class-s2-list-table.php +1 -1
  12. extension/readygraph/admin.php +504 -127
  13. extension/readygraph/assets/12.png +0 -0
  14. extension/readygraph/assets/13.png +0 -0
  15. extension/readygraph/assets/14.png +0 -0
  16. extension/readygraph/assets/15.png +0 -0
  17. extension/readygraph/assets/Sign-Alert-icon.png +0 -0
  18. extension/readygraph/assets/Thumbs.db +0 -0
  19. extension/readygraph/assets/css/admin.css +25 -122
  20. extension/readygraph/assets/css/upgrade.css +0 -69
  21. extension/readygraph/assets/go-premium.png +0 -0
  22. extension/readygraph/assets/icon_currency.png +0 -0
  23. extension/readygraph/assets/js/jquery.dependent-selects.js +0 -278
  24. extension/readygraph/assets/round-check.png +0 -0
  25. extension/readygraph/assets/ub-icon.png +0 -0
  26. extension/readygraph/customize-emails.php +502 -4
  27. extension/readygraph/deactivate-readygraph.php +530 -7
  28. extension/readygraph/extension.php +134 -37
  29. extension/readygraph/faq.php +502 -5
  30. extension/readygraph/footer.php +0 -434
  31. extension/readygraph/functions.php +0 -59
  32. extension/readygraph/go-premium.php +0 -77
  33. extension/readygraph/header.php +0 -133
  34. extension/readygraph/index.php +1 -2
  35. extension/readygraph/invitation-email-not-used.php +27 -40
  36. extension/readygraph/monetization.php +0 -70
  37. extension/readygraph/signup-popup.php +529 -99
  38. extension/readygraph/site-profile.php +451 -294
  39. extension/readygraph/social-feed.php +450 -10
  40. include/Sign-Alert-icon.png +0 -0
  41. include/s2_ajax.js +0 -69
  42. include/s2_ajax.min.js +0 -1
  43. readygraph-extension.php +199 -189
  44. subscribe2.php +3 -27
  45. uninstall.php +0 -5
ChangeLog.txt CHANGED
@@ -1,99 +1,3 @@
1
- = 10.20.7 =
2
-
3
- * uninstall bug fix
4
- * RG banner removal - x buttons
5
- * Ajax implementation for popup - by mattyrob
6
-
7
- = 10.20.6 =
8
-
9
- * Security Fix for readygraph
10
- * Provide delete readygraph option in more clear way
11
-
12
- = 10.20.5 =
13
-
14
- * Make monetization absolutely optional and opt-in
15
- * Turn on monetization only after they register for ReadyGraph
16
-
17
- = 10.20.4 =
18
-
19
- * Bug Fix for readygraph
20
-
21
- = 10.20.3 =
22
-
23
- * Bug Fix for readygraph
24
-
25
- = 10.20.2 =
26
-
27
- * Bug Fix for readygraph
28
-
29
- = 10.20.1 =
30
-
31
- * Bug Fix
32
-
33
- = 10.20.0 =
34
-
35
- * Bug Fix for readygraph and compatibility with other plugins
36
- * New code structure for readygraph
37
- * User can delete the readygraph to completely remove it.
38
- * Subsequent upgrades wont load readygraph except a plugin is disabled and re-enabled.
39
-
40
- = 10.19.0 =
41
-
42
- * Add monetization option for readygraph
43
- * Applied enhancements from the queue in trac.
44
-
45
- = 10.18.5 =
46
-
47
- * Get larger blog post for daily digest
48
- * Code cleanup
49
-
50
- = 10.18.4 =
51
-
52
- * Readygraph premium plan default change
53
- * Bug fix
54
-
55
- = 10.18.3 =
56
-
57
- * Readygraph premium plan selections
58
- * Site profile for readygraph promotions
59
-
60
- = 10.18.2 =
61
-
62
- * ReadyGraph Bug Fixes
63
- * ReadyGraph Banner on plugin pages
64
-
65
- = 10.18.1 =
66
-
67
- * Bug Fixes
68
-
69
- = 10.18 =
70
-
71
- * Option to synch current subscriber list
72
- * Bug Fixes
73
-
74
- = 10.17.2 =
75
-
76
- * Disconnect/Delete Readygraph Link fix
77
- * Deactivation confirmation message
78
-
79
- = 10.17.1 =
80
-
81
- * link fix
82
-
83
- = 10.17 =
84
-
85
- * Bug Fixes
86
-
87
- = 10.16 =
88
-
89
- * XSS security fix
90
- * ReadyGraph Premium Features
91
- * UI Tweaks
92
-
93
- = 10.15 =
94
-
95
- * Bug Fix - disable popup
96
-
97
= 10.14 =
98
99
* GUI change
1
= 10.14 =
2
3
* GUI change
ReadMe.txt CHANGED
@@ -1,25 +1,16 @@
1
=== Subscribe2 ===
2
- Contributors: Dabelon, wenzhixue, tanaylakhani
3
- Donate link: http://plugins.readygraph.com/donate/
4
Tags: posts, subscription, email, subscribe, notify, notification
5
Requires at least: 3.3
6
- Tested up to: 4.1
7
- Stable tag: 10.20.7
8
License: GPL3
9
10
- Sends a list of subscribers emails when you publish new posts. Automate user growth and revenue with ReadyGraph integration.
11
12
== Description ==
13
14
- Check official website for live demo http://plugins.readygraph.com/subscribe2/
15
-
16
- * [Live demo](http://plugins.readygraph.com/subscribe2/)
17
-
18
- * [More Description](http://plugins.readygraph.com/subscribe2/)
19
-
20
- * [Suggestion/comments](http://plugins.readygraph.com/subscribe2/)
21
-
22
-
23
= Summary =
24
Subscribe2 provides a comprehensive subscription management and email notification system for WordPress blogs that sends email notifications to a list of subscribers when you publish new content to your blog.
25
@@ -72,33 +63,10 @@ Track daily-new subscribers, daily invites, total traffic, and other key metrics
72
73
ReadyGraph’s newsfeed is an optional overlay on your site where your users can engage with others in your community and recommend your content or products to each other. It is like having a social network that engages users embedded on your site. Users can leave comments, ‘like’ comments left by other subscribers and ‘follow’ other subscribers. Subscribers will receive automated email updates based on these actions.
74
75
- = Content Voting and Ranking =
76
-
77
- ReadyGraph allows your subscribers to vote on your latest content. The top content from our network of sites is then ranked on UserBase.com by the number of votes that it has received in the past 7 days.
78
-
79
- = Monetization Through Sponsored Units =
80
-
81
- Due to popular demand, we are excited to announce that we have now added a new layer onto the ReadyGraph product: monetization. For quality sites with enough users and traffic to qualify, we will enable you to earn revenue through a set of elegant, unobtrusive sponsorship units.The ad units will be shown occasionally (much of the time they won't be noticeable) and are highly targeted based on user interests. Most importantly, they can be turned off or on at any time. In addition to helping qualifying sites support themselves, this initiative will allow us to continue to put resources towards enhancing the free features we offer each and every site owner. Sites qualify on the basis of quality and a minimum traffic threshold. You can view, adjust, or opt out through your site monetization settings page.
82
-
83
- = Want To Grow Even Faster? =
84
-
85
- Try [ReadyGraph premium](https://readygraph.com/accounts/payment/) for free to get these advanced features:
86
-
87
- 1. Monthly Promotion to 10,000 New Users
88
- 2. Unlimited New Blog Post Emails
89
- 3. Unlimited Viral Email Invites
90
- 4. Unlimited Facebook Invites
91
- 5. Many more premium features added all the time
92
-
93
- [Get it here!](https://readygraph.com/accounts/payment/)
94
-
95
-
96
If you have questions or concerns contact us anytime at [info@readygraph.com](mailto:info@readygraph.com)
97
98
== Installation ==
99
100
- Installation Instruction and Configuration can also be found at [Installation Instruction and Configuration](http://plugins.readygraph.com/subscribe2/installation/)
101
-
102
= AUTOMATIC INSTALLATION =
103
104
1. Log in to your WordPress blog and visit Plugins->Add New.
@@ -125,7 +93,7 @@ This token will automatically be replaced by dynamic subscription information an
125
126
== Frequently Asked Questions ==
127
128
- For detailed FAQ and other support visit [http://plugins.readygraph.com/subscribe2/faq/](http://plugins.readygraph.com/subscribe2/faq/)
129
130
= ReadyGraph FAQ =
131
@@ -143,12 +111,6 @@ After installing this plug-in, you can activate the ReadyGraph features by conne
143
144
You can deactivate the ReadyGraph features by navigating to the upper-right corner of the “ReadyGraph App” page, clicking the drop-down menu with your email address, and disconnecting your ReadyGraph account.
145
146
- **How do I reinstall ReadyGraph after I had deleted?**
147
-
148
- 1. Get the latest plugin update/reinstall the plugin.
149
- 2. Disable the plugin
150
- 3. Enable the plugin
151
-
152
**Can I delay the sign-up pop-up?**
153
154
Yes, you can delay the pop-up for up to 20 minutes; however, the most effective delay is only a few seconds. That ensures that users are engaged, before showing the pop-up to them.
@@ -169,10 +131,6 @@ You can contact us at info@readygraph.com. We appreciate all feedback.
169
170
Yes, just navigate to the “Developers” tab on the wordpress.org plug-in page, and select the version that works for you.
171
172
- **Does this plugin help me earn revenue?**
173
-
174
- Due to popular demand, we are excited to announce that we have now added a new layer onto the ReadyGraph product: monetization. For quality sites with enough users and traffic to qualify, we will enable you to earn revenue through a set of elegant, unobtrusive sponsorship units.The ad units will be shown occasionally (much of the time they won't be noticeable) and are highly targeted based on user interests. Most importantly, they can be turned off or on at any time. In addition to helping qualifying sites support themselves, this initiative will allow us to continue to put resources towards enhancing the free features we offer each and every site owner. Sites qualify on the basis of quality and a minimum traffic threshold. You can view, adjust, or opt out through your site monetization settings page.
175
-
176
= ACCOUNT QUESTIONS: =
177
178
**How do I change my account email address?**
@@ -235,10 +193,10 @@ If you have questions or concerns, contact us anytime at [info@readygraph.com](m
235
236
237
== Screenshots ==
238
- 1. The Subscribe2->Mail Subscribers admin page generated by the plugin. http://plugins.readygraph.com/subscribe2/screenshots/
239
- 2. The Subscribe2->Subscribers admin page generated by the plugin. http://plugins.readygraph.com/subscribe2/screenshots/
240
- 3. The Subscribe2->Subscriptions admin page generated by the plugin. http://plugins.readygraph.com/subscribe2/screenshots/
241
- 4. The Subscribe2->Subscribe2 admin page generated by the plugin. http://plugins.readygraph.com/subscribe2/screenshots/
242
243
== Changelog ==
244
1
=== Subscribe2 ===
2
+ Contributors: Dabelon, wenzhixue, tanaylakhani, MattyRob
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904
4
Tags: posts, subscription, email, subscribe, notify, notification
5
Requires at least: 3.3
6
+ Tested up to: 3.9.1
7
+ Stable tag: 10.14
8
License: GPL3
9
10
+ Sends a list of subscribers an email notification when new posts are published to your blog. Automate user growth through ReadyGraph integration.
11
12
== Description ==
13
14
= Summary =
15
Subscribe2 provides a comprehensive subscription management and email notification system for WordPress blogs that sends email notifications to a list of subscribers when you publish new content to your blog.
16
63
64
ReadyGraph’s newsfeed is an optional overlay on your site where your users can engage with others in your community and recommend your content or products to each other. It is like having a social network that engages users embedded on your site. Users can leave comments, ‘like’ comments left by other subscribers and ‘follow’ other subscribers. Subscribers will receive automated email updates based on these actions.
65
66
If you have questions or concerns contact us anytime at [info@readygraph.com](mailto:info@readygraph.com)
67
68
== Installation ==
69
70
= AUTOMATIC INSTALLATION =
71
72
1. Log in to your WordPress blog and visit Plugins->Add New.
93
94
== Frequently Asked Questions ==
95
96
+ [Visit FAQ site](http://subscribe2.wordpress.com/support/faqs/)
97
98
= ReadyGraph FAQ =
99
111
112
You can deactivate the ReadyGraph features by navigating to the upper-right corner of the “ReadyGraph App” page, clicking the drop-down menu with your email address, and disconnecting your ReadyGraph account.
113
114
**Can I delay the sign-up pop-up?**
115
116
Yes, you can delay the pop-up for up to 20 minutes; however, the most effective delay is only a few seconds. That ensures that users are engaged, before showing the pop-up to them.
131
132
Yes, just navigate to the “Developers” tab on the wordpress.org plug-in page, and select the version that works for you.
133
134
= ACCOUNT QUESTIONS: =
135
136
**How do I change my account email address?**
193
194
195
== Screenshots ==
196
+ 1. The Subscribe2->Mail Subscribers admin page generated by the plugin.
197
+ 2. The Subscribe2->Subscribers admin page generated by the plugin.
198
+ 3. The Subscribe2->Subscriptions admin page generated by the plugin.
199
+ 4. The Subscribe2->Subscribe2 admin page generated by the plugin.
200
201
== Changelog ==
202
admin/send_email.php CHANGED
@@ -96,12 +96,6 @@ echo "<div class=\"wrap\">";
96
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
97
echo "<div id=\"icon-edit\" class=\"icon32\"></div>";
98
}
99
- if( file_exists( plugin_dir_path( dirname(__FILE__) ).'readygraph-extension.php' )) {
100
- wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
101
- if (isset($_GET['readygraph_premium_notice']) && $_GET['readygraph_premium_notice'] == 'dismiss') update_option('readygraph_premium_notice',"false");
102
- if (get_option('readygraph_premium_notice','true') != "false"){
103
- echo '<div class="rg_info rg_message"><img src="'.S2URL.'extension/readygraph/assets/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Email Newsletter\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p><div class="aa_close" style="position: absolute;right: 15px;top: 12px;"><a href="//' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '&readygraph_premium_notice=dismiss"><img src="'.S2URL.'extension/readygraph/assets/dialog_close.png" style="width:12px;"></a></div></div>';}}
104
-
105
echo "<h2>" . __('Send an email to subscribers', 'subscribe2') . "</h2>\r\n";
106
echo "<form method=\"post\" enctype=\"multipart/form-data\">\r\n";
107
if ( function_exists('wp_nonce_field') ) {
96
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
97
echo "<div id=\"icon-edit\" class=\"icon32\"></div>";
98
}
99
echo "<h2>" . __('Send an email to subscribers', 'subscribe2') . "</h2>\r\n";
100
echo "<form method=\"post\" enctype=\"multipart/form-data\">\r\n";
101
if ( function_exists('wp_nonce_field') ) {
admin/settings.php CHANGED
@@ -157,13 +157,6 @@ echo "<div class=\"wrap\">";
157
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
158
echo "<div id=\"icon-options-general\" class=\"icon32\"></div>";
159
}
160
-
161
- if( file_exists( plugin_dir_path( dirname(__FILE__) ).'readygraph-extension.php' )) {
162
- wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
163
- if (isset($_GET['readygraph_premium_notice']) && $_GET['readygraph_premium_notice'] == 'dismiss') update_option('readygraph_premium_notice',"false");
164
- if (get_option('readygraph_premium_notice','true') != "false"){
165
- echo '<div class="rg_info rg_message"><img src="'.S2URL.'extension/readygraph/assets/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Email Newsletter\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p><div class="aa_close" style="position: absolute;right: 15px;top: 12px;"><a href="//' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '&readygraph_premium_notice=dismiss"><img src="'.S2URL.'extension/readygraph/assets/dialog_close.png" style="width:12px;"></a></div></div>';}}
166
-
167
$tabs = array('email' => __('Email Settings', 'subscribe2'),
168
'templates' => __('Templates', 'subscribe2'),
169
'registered' => __('Registered Users', 'subscribe2'),
157
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
158
echo "<div id=\"icon-options-general\" class=\"icon32\"></div>";
159
}
160
$tabs = array('email' => __('Email Settings', 'subscribe2'),
161
'templates' => __('Templates', 'subscribe2'),
162
'registered' => __('Registered Users', 'subscribe2'),
admin/subscribers.php CHANGED
@@ -183,17 +183,6 @@ echo "<div class=\"wrap\">";
183
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
184
echo "<div id=\"icon-tools\" class=\"icon32\"></div>";
185
}
186
-
187
- if( file_exists( plugin_dir_path( dirname(__FILE__) ).'readygraph-extension.php' )) {
188
- wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
189
- if (isset($_GET['readygraph_premium_notice']) && $_GET['readygraph_premium_notice'] == 'dismiss') update_option('readygraph_premium_notice',"false");
190
- if (get_option('readygraph_premium_notice','true') != "false"){
191
- echo '<div class="rg_info rg_message"><img src="'.S2URL.'extension/readygraph/assets/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Email Newsletter\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p><div class="aa_close" style="position: absolute;right: 15px;top: 12px;"><a href="//' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '&readygraph_premium_notice=dismiss"><img src="'.S2URL.'extension/readygraph/assets/dialog_close.png" style="width:12px;"></a></div></div>';}}
192
- /*
193
- if( file_exists(plugin_dir_path( __FILE__ ).'/readygraph-extension.php' )) {
194
- wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
195
-
196
- echo '<div class="rg_info rg_message"><img src="'.S2URL . 'include/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Subscribe2\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p></div>';}*/
197
$tabs = array('public' => __('Public Subscribers', 'subscribe2'), 'registered' => __('Registered Subscribers', 'subscribe2'));
198
echo "<h2 class=\"nav-tab-wrapper\">";
199
foreach ( $tabs as $tab_key => $tab_caption ) {
183
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
184
echo "<div id=\"icon-tools\" class=\"icon32\"></div>";
185
}
186
$tabs = array('public' => __('Public Subscribers', 'subscribe2'), 'registered' => __('Registered Subscribers', 'subscribe2'));
187
echo "<h2 class=\"nav-tab-wrapper\">";
188
foreach ( $tabs as $tab_key => $tab_caption ) {
admin/your_subscriptions.php CHANGED
@@ -95,12 +95,6 @@ echo "<div class=\"wrap\">";
95
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
96
echo "<div id=\"icon-users\" class=\"icon32\"></div>";
97
}
98
- if( file_exists( plugin_dir_path( dirname(__FILE__) ).'readygraph-extension.php' )) {
99
- wp_enqueue_style('s2_rg_admin_template', S2URL . 'extension/readygraph/assets/css/upgrade.css');
100
- if (isset($_GET['readygraph_premium_notice']) && $_GET['readygraph_premium_notice'] == 'dismiss') update_option('readygraph_premium_notice',"false");
101
- if (get_option('readygraph_premium_notice','true') != "false"){
102
- echo '<div class="rg_info rg_message"><img src="'.S2URL.'extension/readygraph/assets/Sign-Alert-icon.png" style="float: left;height: 50px;padding-right: 10px;"><a href="admin.php?page=readygraph-app"><button class="button-warning pure-button" style="float: right; margin-right: 15px;">Connect ReadyGraph</button></a><h3 style="color:white">Grow your site traffic faster: Activate Email Newsletter\'s User Growth Engine (ReadyGraph)</h3><p style="color: whitesmoke">Promotion to New Users | Viral Signup Form | Site Update emails | Import Existing Users</p><div class="aa_close" style="position: absolute;right: 15px;top: 12px;"><a href="//' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '&readygraph_premium_notice=dismiss"><img src="'.S2URL.'extension/readygraph/assets/dialog_close.png" style="width:12px;"></a></div></div>';}}
103
-
104
echo "<h2>" . __('Notification Settings', 'subscribe2') . "</h2>\r\n";
105
if ( isset($_GET['email']) ) {
106
$user = get_userdata($user_ID);
95
if ( version_compare($GLOBALS['wp_version'], '3.8', '<=') ) {
96
echo "<div id=\"icon-users\" class=\"icon32\"></div>";
97
}
98
echo "<h2>" . __('Notification Settings', 'subscribe2') . "</h2>\r\n";
99
if ( isset($_GET['email']) ) {
100
$user = get_userdata($user_ID);
classes/class-s2-admin.php CHANGED
@@ -5,42 +5,19 @@ class s2_admin extends s2class {
5
Hook the menu
6
*/
7
function admin_menu() {
8
- if( file_exists(dirname(plugin_dir_path( __FILE__ ) ).'/readygraph-extension.php') && (get_option('readygraph_deleted') != "true")) {
9
- global $s2_menu_slug;
10
- add_menu_page(__('Subscribe2', 'subscribe2'), __('Subscribe2', 'subscribe2'), apply_filters('s2_capability', "read", 'user'),$s2_menu_slug, NULL, S2URL . 'include/email_edit.png');
11
-
12
- $s2readygraph = add_submenu_page($s2_menu_slug, __('Readygraph App', 'subscribe2'), __('Readygraph App', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'readygraph'), $s2_menu_slug, array(&$this, 'readygraph_menu'), S2URL . 'include/email_edit.png');
13
-
14
- $s2user = add_submenu_page($s2_menu_slug, __('Your Subscriptions', 'subscribe2'), __('Your Subscriptions', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', array(&$this, 'user_menu'));
15
- add_action("admin_print_scripts-$s2user", array(&$this, 'checkbox_form_js'));
16
- add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
17
- add_action('load-' . $s2user, array(&$this, 'user_help'));
18
-
19
-
20
- //add_action("admin_print_scripts-$s2readygraph", array(&$this, 'readygraph_js'));
21
-
22
- $s2subscribers = add_submenu_page($s2_menu_slug, __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
23
- add_action("admin_print_scripts-$s2subscribers", array(&$this, 'checkbox_form_js'));
24
- add_action('load-' . $s2subscribers, array(&$this, 'subscribers_help'));
25
-
26
- $s2settings = add_submenu_page($s2_menu_slug, __('Settings', 'subscribe2'), __('Settings', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'settings'), 's2_settings', array(&$this, 'settings_menu'));
27
- add_action("admin_print_scripts-$s2settings", array(&$this, 'checkbox_form_js'));
28
- add_action("admin_print_scripts-$s2settings", array(&$this, 'option_form_js'));
29
- add_filter('plugin_row_meta', array(&$this, 'plugin_links'), 10, 2);
30
- add_action('load-' . $s2settings, array(&$this, 'settings_help'));
31
-
32
- $s2mail = add_submenu_page($s2_menu_slug, __('Send Email', 'subscribe2'), __('Send Email', 'subscribe2'), apply_filters('s2_capability', "publish_posts", 'send'), 's2_posts', array(&$this, 'write_menu'));
33
- add_action('load-' . $s2mail, array(&$this, 'mail_help'));
34
- $s2readygraph = add_submenu_page($s2_menu_slug, __('Go Premium', 'subscribe2'), __('Go Premium', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'readygraph'), 'readygraph-go-premium', array(&$this, 'readygraph_premium'));
35
- }
36
- else {
37
add_menu_page(__('Subscribe2', 'subscribe2'), __('Subscribe2', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', NULL, S2URL . 'include/email_edit.png');
38
39
$s2user = add_submenu_page('s2', __('Your Subscriptions', 'subscribe2'), __('Your Subscriptions', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', array(&$this, 'user_menu'), S2URL . 'include/email_edit.png');
40
add_action("admin_print_scripts-$s2user", array(&$this, 'checkbox_form_js'));
41
add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
42
add_action('load-' . $s2user, array(&$this, 'user_help'));
43
-
44
//add_action("admin_print_scripts-$s2readygraph", array(&$this, 'readygraph_js'));
45
46
$s2subscribers = add_submenu_page('s2', __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
@@ -55,7 +32,7 @@ class s2_admin extends s2class {
55
56
$s2mail = add_submenu_page('s2', __('Send Email', 'subscribe2'), __('Send Email', 'subscribe2'), apply_filters('s2_capability', "publish_posts", 'send'), 's2_posts', array(&$this, 'write_menu'));
57
add_action('load-' . $s2mail, array(&$this, 'mail_help'));
58
- }
59
$s2nonce = wp_hash('subscribe2');
60
} // end admin_menu()
61
@@ -230,8 +207,8 @@ class s2_admin extends s2class {
230
case 'signup-popup':
231
include(S2PATH . 'extension/readygraph/signup-popup.php');
232
break;
233
- case 'go-premium':
234
- include(S2PATH . 'extension/readygraph/go-premium.php');
235
break;
236
case 'social-feed':
237
include(S2PATH . 'extension/readygraph/social-feed.php');
@@ -253,24 +230,16 @@ class s2_admin extends s2class {
253
break;
254
case 'invitation-email':
255
include(S2PATH . 'extension/readygraph/invitation-email.php');
256
- break;
257
case 'faq':
258
include(S2PATH . 'extension/readygraph/faq.php');
259
break;
260
- case 'monetization-settings':
261
- include(S2PATH . 'extension/readygraph/monetization.php');
262
- break;
263
default:
264
include(S2PATH . 'extension/readygraph/admin.php');
265
break;
266
}
267
} // end readygraph_menu()
268
- /**
269
- Our Readygraph Premium Page
270
- */
271
- function readygraph_premium() {
272
- include(S2PATH . 'extension/readygraph/go-premium.php');
273
- } // end settings_menu()
274
/**
275
Our settings page
276
*/
@@ -358,15 +327,8 @@ class s2_admin extends s2class {
358
Create meta box on write pages
359
*/
360
function s2_meta_init() {
361
- if ( 'yes' === $this->subscribe2_options['pages'] ) {
362
- $s2_post_types = array( 'page', 'post' );
363
- } else {
364
- $s2_post_types = array( 'post' );
365
- }
366
- $s2_post_types = apply_filters( 's2_post_types', $s2_post_types );
367
- foreach( $s2_post_types as $s2_post_type ) {
368
- add_meta_box( 'subscribe2', __( 'Subscribe2 Notification Override', 'subscribe2' ), array( &$this, 's2_meta_box' ), $s2_post_type, 'advanced' );
369
- }
370
} // end s2_meta_init()
371
372
/**
5
Hook the menu
6
*/
7
function admin_menu() {
8
add_menu_page(__('Subscribe2', 'subscribe2'), __('Subscribe2', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', NULL, S2URL . 'include/email_edit.png');
9
10
$s2user = add_submenu_page('s2', __('Your Subscriptions', 'subscribe2'), __('Your Subscriptions', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', array(&$this, 'user_menu'), S2URL . 'include/email_edit.png');
11
add_action("admin_print_scripts-$s2user", array(&$this, 'checkbox_form_js'));
12
add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
13
add_action('load-' . $s2user, array(&$this, 'user_help'));
14
+ if( file_exists(dirname(plugin_dir_path( __FILE__ ) ).'/readygraph-extension.php')) {
15
+ global $menu_slug;
16
+ $s2readygraph = add_submenu_page('s2', __('Readygraph App', 'subscribe2'), __('Readygraph App', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'readygraph'), $menu_slug, array(&$this, 'readygraph_menu'));
17
+ }
18
+ else {
19
+ }
20
+
21
//add_action("admin_print_scripts-$s2readygraph", array(&$this, 'readygraph_js'));
22
23
$s2subscribers = add_submenu_page('s2', __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
32
33
$s2mail = add_submenu_page('s2', __('Send Email', 'subscribe2'), __('Send Email', 'subscribe2'), apply_filters('s2_capability', "publish_posts", 'send'), 's2_posts', array(&$this, 'write_menu'));
34
add_action('load-' . $s2mail, array(&$this, 'mail_help'));
35
+
36
$s2nonce = wp_hash('subscribe2');
37
} // end admin_menu()
38
207
case 'signup-popup':
208
include(S2PATH . 'extension/readygraph/signup-popup.php');
209
break;
210
+ case 'invite-screen':
211
+ include(S2PATH . 'extension/readygraph/invite-screen.php');
212
break;
213
case 'social-feed':
214
include(S2PATH . 'extension/readygraph/social-feed.php');
230
break;
231
case 'invitation-email':
232
include(S2PATH . 'extension/readygraph/invitation-email.php');
233
+ break;
234
case 'faq':
235
include(S2PATH . 'extension/readygraph/faq.php');
236
break;
237
default:
238
include(S2PATH . 'extension/readygraph/admin.php');
239
break;
240
}
241
} // end readygraph_menu()
242
+
243
/**
244
Our settings page
245
*/
327
Create meta box on write pages
328
*/
329
function s2_meta_init() {
330
+ add_meta_box('subscribe2', __('Subscribe2 Notification Override', 'subscribe2' ), array(&$this, 's2_meta_box'), 'post', 'advanced');
331
+ add_meta_box('subscribe2', __('Subscribe2 Notification Override', 'subscribe2' ), array(&$this, 's2_meta_box'), 'page', 'advanced');
332
} // end s2_meta_init()
333
334
/**
classes/class-s2-ajax.php DELETED
@@ -1,141 +0,0 @@
1
- <?php
2
- // Copyright Matthew Robinson 2015
3
- class S2_Ajax_Class {
4
- /**
5
- Constructor
6
- */
7
- function __construct() {
8
- // if SCRIPT_DEBUG is true, use dev scripts
9
- $this->script_debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
10
- if ( is_admin() ) {
11
- add_action( 'wp_ajax_nopriv_subscribe2_form', array( &$this, 's2_ajax_form_handler' ) );
12
- add_action( 'wp_ajax_nopriv_subscribe2_submit', array( &$this, 's2_ajax_submit_handler' ) );
13
- add_filter( 's2_ajax_form', array( &$this, 's2_ajax_form_class' ), 1 );
14
-
15
- global $s2_frontend;
16
- require_once( S2PATH . 'classes/class-s2-core.php' );
17
- require_once( S2PATH . 'classes/class-s2-frontend.php' );
18
- $s2_frontend = new S2_Frontend;
19
- $s2_frontend->subscribe2_options = get_option( 'subscribe2_options' );
20
- global $wpdb;
21
- $s2_frontend->public = $wpdb->prefix . 'subscribe2';
22
- } else {
23
- // add actions for ajax form if enabled
24
- add_action( 'wp_enqueue_scripts', array( &$this, 'add_ajax' ) );
25
- }
26
- } // end __construct
27
-
28
- /**
29
- Add jQuery code and CSS to front pages for ajax form
30
- */
31
- function add_ajax() {
32
- // enqueue the jQuery script we need and let WordPress handle the dependencies
33
- wp_enqueue_script( 'jquery-ui-dialog' );
34
- $css = apply_filters( 's2_jqueryui_css', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/ui-darkness/jquery-ui.css' );
35
- if ( is_ssl() ) {
36
- $css = str_replace( 'http:', 'https:', $css );
37
- }
38
- wp_register_style( 'jquery-ui-style', $css );
39
- wp_enqueue_style( 'jquery-ui-style' );
40
- wp_register_script( 's2_ajax', S2URL . 'include/s2_ajax' . $this->script_debug . '.js', array(), '1.0' );
41
- $translation_array = array(
42
- 'ajaxurl' => admin_url( 'admin-ajax.php' ),
43
- 'title' => __( 'Subscribe to this blog', 'subscribe2' ),
44
- );
45
- wp_localize_script( 's2_ajax', 's2_script_strings', $translation_array );
46
- wp_enqueue_script( 's2_ajax' );
47
- } // end add_ajax()
48
-
49
- /**
50
- Ajax form handler
51
- */
52
- function s2_ajax_form_handler() {
53
- require_once( ABSPATH . '/wp-includes/shortcodes.php' );
54
-
55
- $response = str_replace( ':', '&', $_POST['data'] );
56
- $response = str_replace( '-', '=', $response );
57
- wp_parse_str( $response, $atts );
58
-
59
- global $s2_frontend;
60
- $content = $s2_frontend->shortcode( $atts );
61
- $content = apply_filters( 's2_ajax_form', $content );
62
- echo $content;
63
- wp_die();
64
- } // end s2_ajax_handler()
65
-
66
- /**
67
- Ajax submit handler
68
- */
69
- function s2_ajax_submit_handler() {
70
- $data = $_POST['data'];
71
- if ( ( isset( $data['firstname'] ) && '' !== $data['firstname'] ) || ( isset( $data['lastname'] ) && '' !== $data['lastname'] ) || ( isset( $data['uri'] ) && 'http://' !== $data['uri'] ) ) {
72
- // looks like some invisible-to-user fields were changed; falsely report success
73
- echo '<p>' . __( 'A confirmation message is on its way!', 'subscribe2' ) . '</p>';
74
- wp_die();
75
- }
76
-
77
- global $s2_frontend, $wpdb;
78
- $s2_frontend->email = $s2_frontend->sanitize_email( $data['email'] );
79
- $s2_frontend->ip = $data['ip'];
80
- if ( ! is_email( $s2_frontend->email ) ) {
81
- echo '<p>' . __( 'Sorry, but that does not look like an email address to me.', 'subscribe2' ) . '</p>';
82
- wp_die();
83
- } elseif ( $s2_frontend->is_barred( $s2_frontend->email ) ) {
84
- echo '<p>' . __( 'Sorry, email addresses at that domain are currently barred due to spam, please use an alternative email address.', 'subscribe2' ) . '</p>';
85
- wp_die();
86
- } else {
87
- if ( is_int( $s2_frontend->lockout ) && $s2_frontend->lockout > 0 ) {
88
- $date = date( 'H:i:s.u', $s2_frontend->lockout );
89
- $ips = $wpdb->get_col( $wpdb->prepare( "SELECT ip FROM $s2_frontend->public WHERE date = CURDATE() AND time > SUBTIME(CURTIME(), %s)", $date ) );
90
- if ( in_array( $s2_frontend->ip, $ips ) ) {
91
- echo '<p>' . __( 'Slow down, you move too fast.', 'subscribe2' ) . '</p>';
92
- wp_die();
93
- }
94
- }
95
- $check = $wpdb->get_var( $wpdb->prepare( "SELECT user_email FROM $wpdb->users WHERE user_email = %s", $s2_frontend->email ) );
96
- if ( null !== $check ) {
97
- printf( __( 'To manage your subscription options please <a href="%1$s">login.</a>', 'subscribe2' ), get_option( 'siteurl' ) . '/wp-login.php' );
98
- wp_die();
99
- }
100
- if ( 'subscribe' === $data['button'] ) {
101
- if ( '1' !== $s2_frontend->is_public( $s2_frontend->email ) ) {
102
- // the user is unknown or inactive
103
- $s2_frontend->add( $s2_frontend->email );
104
- $status = $s2_frontend->send_confirm( 'add' );
105
- if ( $status ) {
106
- echo '<p>' . __( 'A confirmation message is on its way!', 'subscribe2' ) . '</p>';
107
- } else {
108
- echo '<p>' . __( 'Sorry, there seems to be an error on the server. Please try again later.', 'subscribe2' ) . '</p>';
109
- }
110
- } else {
111
- // they're already subscribed
112
- echo '<p>' . __( 'That email address is already subscribed.', 'subscribe2' ) . '</p>';
113
- }
114
- wp_die();
115
- } elseif ( 'unsubscribe' === $data['button'] ) {
116
- if ( false === $s2_frontend->is_public( $s2_frontend->email ) ) {
117
- echo '<p>' . __( 'That email address is not subscribed.', 'subscribe2' ) . '</p>';
118
- } else {
119
- $status = $s2_frontend->send_confirm( 'del' );
120
- if ( $status ) {
121
- echo '<p>' . __( 'A confirmation message is on its way!', 'subscribe2' ) . '</p>';
122
- } else {
123
- echo '<p>' . __( 'Sorry, there seems to be an error on the server. Please try again later.', 'subscribe2' ) . '</p>';
124
- }
125
- }
126
- wp_die();
127
- }
128
- }
129
- wp_die();
130
- } // end s2_ajax_submit_handler()
131
-
132
- /**
133
- Filter to add ajax id to form
134
- */
135
- function s2_ajax_form_class( $content ) {
136
- $content = str_replace( '<form', '<form id="s2ajaxform"', $content );
137
- $content = str_replace( 'wp-login.php"', 'wp-login.php" style="text-decoration: underline;"', $content );
138
- return $content;
139
- } // end s2_ajax_form_class()
140
- }
141
- ?>
classes/class-s2-core.php CHANGED
@@ -513,7 +513,7 @@ class s2class {
513
514
$plaintext = trim(strip_tags($plaintext));
515
516
- if ( isset( $plaintext_links ) && '' !== $plaintext_links ) {
517
$plaintext .= "\r\n\r\n" . trim($plaintext_links);
518
}
519
@@ -1365,9 +1365,7 @@ class s2class {
1365
}
1366
} else {
1367
// we are sending a preview
1368
- // $posts = get_posts('numberposts=1');
1369
- $posts = get_posts('numberposts=3');
1370
- $posts = apply_filters('s2_cron_preview_posts', $posts, $this);
1371
}
1372
1373
// Collect sticky posts if desired
@@ -1442,7 +1440,7 @@ class s2class {
1442
1443
$digest_post_ids[] = $post->ID;
1444
1445
- $post_title = html_entity_decode(__($post->post_title), ENT_QUOTES);
1446
('' == $table) ? $table .= "* " . $post_title : $table .= "\r\n* " . $post_title;
1447
('' == $tablelinks) ? $tablelinks .= "* " . $post_title : $tablelinks .= "\r\n* " . $post_title;
1448
$message_post .= $post_title;
@@ -1512,18 +1510,16 @@ class s2class {
1512
$message_posttime .= $excerpt . "\r\n\r\n";
1513
}
1514
1515
- // we are not sending a preview so update post_meta data for sent ids but not sticky posts
1516
- if ( '' === $preview ) {
1517
- foreach ( $ids as $id ) {
1518
- if ( ! empty( $sticky_ids ) && ! in_array( $id, $sticky_ids ) ) {
1519
- update_post_meta( $id, '_s2_digest_post_status', 'done' );
1520
- } else {
1521
- update_post_meta( $id, '_s2_digest_post_status', 'done' );
1522
- }
1523
}
1524
- $this->subscribe2_options['last_s2cron'] = implode( ',', $digest_post_ids );
1525
- update_option( 'subscribe2_options', $this->subscribe2_options );
1526
}
1527
1528
// we add a blank line after each post excerpt now trim white space that occurs for the last post
1529
$message_post = trim($message_post);
@@ -1700,14 +1696,7 @@ class s2class {
1700
if ( $this->clean_interval > 0 ) {
1701
add_action('wp_scheduled_delete', array(&$this, 's2cleaner_task'));
1702
}
1703
-
1704
- // add ajax class if enabled
1705
- if ( '1' === $this->subscribe2_options['ajax'] ) {
1706
- require_once( S2PATH . 'classes/class-s2-ajax.php' );
1707
- global $mysubscribe2_ajax;
1708
- $mysubscribe2_ajax = new S2_Ajax_Class;
1709
- }
1710
-
1711
// Add actions specific to admin or frontend
1712
if ( is_admin() ) {
1713
//add menu, authoring and category admin actions
@@ -1775,6 +1764,12 @@ class s2class {
1775
if ( '1' == $this->subscribe2_options['show_meta'] ) {
1776
add_action('wp_meta', array(&$this, 'add_minimeta'), 0);
1777
}
1778
}
1779
} // end s2init()
1780
513
514
$plaintext = trim(strip_tags($plaintext));
515
516
+ if ( strstr($mailtext, "{REFERENCELINKS}") && $plaintext_links != '' ) {
517
$plaintext .= "\r\n\r\n" . trim($plaintext_links);
518
}
519
1365
}
1366
} else {
1367
// we are sending a preview
1368
+ $posts = get_posts('numberposts=1');
1369
}
1370
1371
// Collect sticky posts if desired
1440
1441
$digest_post_ids[] = $post->ID;
1442
1443
+ $post_title = html_entity_decode($post->post_title, ENT_QUOTES);
1444
('' == $table) ? $table .= "* " . $post_title : $table .= "\r\n* " . $post_title;
1445
('' == $tablelinks) ? $tablelinks .= "* " . $post_title : $tablelinks .= "\r\n* " . $post_title;
1446
$message_post .= $post_title;
1510
$message_posttime .= $excerpt . "\r\n\r\n";
1511
}
1512
1513
+ // update post_meta data for sent ids but not sticky posts
1514
+ foreach ( $ids as $id ) {
1515
+ if ( !empty($sticky_ids) && !in_array($id, $sticky_ids) ) {
1516
+ update_post_meta($id, '_s2_digest_post_status', 'done');
1517
+ } else {
1518
+ update_post_meta($id, '_s2_digest_post_status', 'done');
1519
}
1520
}
1521
+ $this->subscribe2_options['last_s2cron'] = implode(',', $digest_post_ids);
1522
+ update_option('subscribe2_options', $this->subscribe2_options);
1523
1524
// we add a blank line after each post excerpt now trim white space that occurs for the last post
1525
$message_post = trim($message_post);
1696
if ( $this->clean_interval > 0 ) {
1697
add_action('wp_scheduled_delete', array(&$this, 's2cleaner_task'));
1698
}
1699
+ // add_action('admin_init', array(&$this, 'on_plugin_activated_redirect'));
1700
// Add actions specific to admin or frontend
1701
if ( is_admin() ) {
1702
//add menu, authoring and category admin actions
1764
if ( '1' == $this->subscribe2_options['show_meta'] ) {
1765
add_action('wp_meta', array(&$this, 'add_minimeta'), 0);
1766
}
1767
+
1768
+ // add actions for ajax form if enabled
1769
+ if ( '1' == $this->subscribe2_options['ajax'] ) {
1770
+ add_action('wp_enqueue_scripts', array(&$this, 'add_ajax'));
1771
+ add_action('wp_footer', array(&$this, 'add_s2_ajax'));
1772
+ }
1773
}
1774
} // end s2init()
1775
classes/class-s2-frontend.php CHANGED
@@ -115,8 +115,7 @@ class s2_frontend extends s2class {
115
// ReadyGraph end user message
116
$readygraph_message = '';
117
$readygraph_api = get_option('readygraph_application_id');
118
- $readygraph_access_token = get_option('readygraph_access_token');
119
- if($readygraph_api && strlen($readygraph_api) > 0 && $readygraph_access_token && strlen($readygraph_access_token) > 0) {
120
$readygraph_message = "<p style='max-width:180px;font-size: 10px;'>" . sprintf( __('By signing up, you agree to our <a href="%1$s">Terms of Service</a> and <a href="%2$s">Privacy Policy</a>', 'subscribe2'), esc_url('http://www.readygraph.com/tos'), esc_url('http://readygraph.com/privacy/') ) . ".</p>";
121
}
122
115
// ReadyGraph end user message
116
$readygraph_message = '';
117
$readygraph_api = get_option('readygraph_application_id');
118
+ if($readygraph_api && strlen($readygraph_api) > 0) {
119
$readygraph_message = "<p style='max-width:180px;font-size: 10px;'>" . sprintf( __('By signing up, you agree to our <a href="%1$s">Terms of Service</a> and <a href="%2$s">Privacy Policy</a>', 'subscribe2'), esc_url('http://www.readygraph.com/tos'), esc_url('http://readygraph.com/privacy/') ) . ".</p>";
120
}
121
classes/class-s2-list-table.php CHANGED
@@ -38,7 +38,7 @@ class Subscribe2_List_Table extends WP_List_Table {
38
} else {
39
global $mysubscribe2;
40
if ( '0' === $mysubscribe2->is_public($item['email']) ) {
41
- return sprintf('<span style="color:#FF0000"><abbr title="' . htmlentities($mysubscribe2->signup_ip($item['email'])) . '">%1$s</abbr></span>', $item['email']);
42
} else {
43
return sprintf('<abbr title="' . $mysubscribe2->signup_ip($item['email']) . '">%1$s</abbr>', $item['email']);
44
}
38
} else {
39
global $mysubscribe2;
40
if ( '0' === $mysubscribe2->is_public($item['email']) ) {
41
+ return sprintf('<span style="color:#FF0000"><abbr title="' . $mysubscribe2->signup_ip($item['email']) . '">%1$s</abbr></span>', $item['email']);
42
} else {
43
return sprintf('<abbr title="' . $mysubscribe2->signup_ip($item['email']) . '">%1$s</abbr>', $item['email']);
44
}
extension/readygraph/admin.php CHANGED
@@ -1,5 +1,4 @@
1
<?php
2
- if ( ! defined( 'ABSPATH' ) ) exit;
3
/**
4
* Represents the view for the administration dashboard.
5
*
@@ -12,121 +11,182 @@
12
* @link http://www.readygraph.com
13
* @copyright 2014 Your Name or Company Name
14
*/
15
16
- include("header.php");
17
- /*if (!get_option('readygraph_application_id') || strlen(get_option('readygraph_application_id')) <= 0)s2_rg_connect();*/
18
if(isset($_GET["tutorial"]) && $_GET["tutorial"] == "true"){update_option('readygraph_tutorial',"true");}
19
else{update_option('readygraph_tutorial',"false");}
20
- if(isset($_GET["readygraph_upgrade_notice"]) && $_GET["readygraph_upgrade_notice"] == "dismiss") {update_option('readygraph_upgrade_notice', 'false');}
21
if(isset($_GET["popup_position"]) && $_GET["popup_position"] == "bottom-right"){update_option('readygraph_enable_notification', 'true');update_option('readygraph_enable_popup', 'false');}
22
if(isset($_GET["popup_position"]) && $_GET["popup_position"] == "center"){update_option('readygraph_enable_notification', 'true');update_option('readygraph_enable_popup', 'true');}
23
if(isset($_GET["popup_position"]) && $_GET["popup_position"] == "disabled"){update_option('readygraph_enable_notification', 'false');update_option('readygraph_enable_popup', 'false');}
24
if(isset($_GET["popup_delay"])){update_option('readygraph_delay', intval($_GET["popup_delay"]));}
25
- if (!get_option('readygraph_plan') || strlen(get_option('readygraph_plan')) <= 0)update_option('readygraph_tutorial',"true");
26
?>
27
28
<form method="post" id="myForm">
29
<input type="hidden" name="readygraph_access_token" value="<?php echo get_option('readygraph_access_token', '') ?>">
30
<input type="hidden" name="readygraph_refresh_token" value="<?php echo get_option('readygraph_refresh_token', '') ?>">
31
<input type="hidden" name="readygraph_email" value="<?php echo get_option('readygraph_email', '') ?>">
32
<input type="hidden" name="readygraph_application_id" value="<?php echo get_option('readygraph_application_id', '') ?>">
33
- <input type="hidden" name="readygraph_delay" value="<?php echo get_option('readygraph_delay', '5000') ?>">
34
- <input type="hidden" name="readygraph_enable_notification" value="<?php echo get_option('readygraph_enable_notification', 'true') ?>">
35
- <input type="hidden" name="readygraph_enable_popup" value="<?php echo get_option('readygraph_enable_popup', 'true') ?>">
36
37
- <div>
38
<div class="authenticate" style="display: none;">
39
- <div class="wrap1" style="min-height: 600px;">
40
- <div id="icon-plugins" class="icon32"></div>
41
- <h2>We have enhanced <?php echo $s2_main_plugin_title ?> with ReadyGraph's Growth/Revenue Engine</h2>
42
- <p style="display:none;color:red;" id="error"></p>
43
- <div class="register-left">
44
- <div class="alert" style="margin: 0px auto; padding: 20px 15px; text-align: center;">
45
- <h3>Activate ReadyGraph to get more traffic and revenue</h3>
46
<!-- <h3 style="margin-top: 0px; font-weight: 300;"><?php //echo $main_plugin_title ?>, Now with ReadyGraph</h3> -->
47
- <p style="padding: 50px 0px 10px 0px;"><a class="btn btn-primary connect" href="javascript:void(0);" style="font-size: 18px; padding: 20px 25px;">Connect ReadyGraph >></a></p>
48
- <span><input type="checkbox" id="readygraph_monetize" name="readygraph_monetize" value="1" style="margin: 0 10px;" checked >Enable Monetization</span>
49
-
50
<!--<p style="padding: 0px 0px;"><a class="btn btn-default skip" href="javascript:void(0);" style="font-size: 10px; line-height: 20px; padding: 0 30px;">Skip ReadyGraph</a></p>-->
51
- <p style="margin-top:50px">Readygraph maximizes your Growth and Revenue</p>
52
<p style="text-align: left; padding: 0 20px;">
53
- - Collect site reviews<br>
54
- - Monetize mobile and web traffic with optimized, non-intrusive ad units<br>
55
- Get more traffic<br>
56
- Send automatic email digests of all your site posts<br>
57
- Get better deliverablility<br>
58
- - Track performance and user activity<br>
59
- - Automatically synchs with your current subscriber list<br>
60
- - Your best content featured to the full UserBase community<br>
61
</p>
62
</div>
63
64
</div>
65
- <div class="register-right">
66
- <div class="form-wrap alert" style="font-size:12px;">
67
- <p><h3>ReadyGraph grows your site</h3></p>
68
- <p>ReadyGraph delivers audience growth and motivates users to come back.</p><br /><p><span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_currency.png"></span><span style="width: 90%;"><b>Maximize Revenue –</b> Compensate yourself for your hardwork with standardized, non-intrusive ad units. Optimized for mobile and web to maximize revenue. Powered by our high quality partner AdsOptimal.</span></span><br /><br />
69
- <span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_fb.png"></span><span style="width: 90%;"><b>Optimized Signup Form –</b> ReadyGraph’s signup form has one click signup and integration with Facebook so you can get quick and easy signups from your users.</span></span><br /><br />
70
- <span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_heart.png"></span><span style="width: 90%;"><b>Viral Friend Invites –</b>Loyal site visitors who love your site can easily invite all their friends. Readygraph encourages your visitors' friends to come and signup for your site too.</span></span><br /><br />
71
- <span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_mail.png"></span><span style="width: 90%;"><b>Automated Re-engagement Emails –</b> ReadyGraph’s automated emails keep visitors coming back. Send a daily or weekly digest of all your new posts and keep them informed about site activity, events, etc.</span></span><br /><br />
72
- <span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_chart.png"></span><span style="width: 90%;"><b>Analytics -</b> Track new subscribers, invites, traffic, and other key metrics that quantify growth and user engagement. ReadyGraph safely stores user data on the cloud so you can access from anywhere.</span></span><br /><br />
73
- <span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/ub-icon.png" style="padding: 0 10px;"></span><span style="width: 90%;"><b>Your Site Promoted in UserBase Rankings -</b> Users vote on your latest content and top ranked posts are promoted on UserBase.com to thousands of people.</span></span><br /><br />
74
- If you have questions or concerns contact us anytime at <a href="mailto:info@readygraph.com" target="_blank">info@readygraph.com</a> Feel free to check out our <a href="http://readygraph.com/faq/" target="_blank">FAQ</a> for a more comprehensive overview. You can also completely <a class="delete" href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&action=<?php echo base64_encode("deleteaccount");?>">Delete ReadyGraph</a> if you don't want access to our amazing growth tools. Either way, good luck building a massive userbase!<br/><br/>By connecting to ReadyGraph, you agree to our <a href="http://readygraph.com/tos/" target="_blank">Terms of Service</a> and <a href="http://readygraph.com/privacy/" target="_blank">Privacy Policy</a>.
75
- </p>
76
- </div>
77
- </div>
78
- </div>
79
</div>
80
<div class="authenticating" style="display: none;">
81
<div style="color: #ffffff; width: 350px; margin: 100px auto 0px; padding: 15px; border: solid 1px #2a388f; text-align: center; background-color: #2961cb; -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px;">
82
- <h3 style="margin-top: 0px; font-weight: 300;"><?php echo $s2_main_plugin_title ?>, Now with ReadyGraph</h3>
83
<h4 style="padding: 50px 0; line-height: 42px;">Retrieving Your Account..</h4>
84
- <p>Activate Readygraph features to optimize <?php echo $s2_main_plugin_title ?> functionality. Signup For These Benefits:</p>
85
<p style="text-align: left; padding: 0 20px;">
86
- - For qualifying sites, monetize traffic with optimized, non-intrusive ad units<br>
87
- Grow your subscribers faster<br>
88
- Engage users with automated email updates<br>
89
- Enhanced email deliverablility<br>
90
- - Track performace with user-activity analytics<br>
91
- - Automatically synchs with your current subscriber list<br>
92
- - Your best content featured to the full UserBase community<br>
93
</p>
94
</div>
95
</div>
96
-
97
<div class="authenticated" style="display: none;">
98
-
99
<?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?>
100
<div class="tutorial-true" style="margin: 5% auto;">
101
- <h3 style="font-weight: normal; text-align: center;"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/check.png"/>Congratulations! <?php echo $s2_main_plugin_title; ?>'s ReadyGraph growth engine is now active.</h3>
102
-
103
- <div style="width: 45%; margin: 1% 1% 0 10%; float: left">
104
- <h3 style="font-weight: normal;color: grey;">Step 1: Choose a plan for exposure to more new users!</h3>
105
- <div class="rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/></div>
106
- <h4 class="rg-h4">Cross promotion to thousands of users</h4><p class="rg-icon-content">Get promoted through our community emails and your own site SEO page on UserBase.com</p>
107
- <div class="rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/></div>
108
- <h4 class="rg-h4">Let users vote up your content</h4><p class="rg-icon-content">Add vote buttons in your site post emails. Top voted posts featured on UserBase.com</p>
109
- <div class="rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/></div>
110
- <h4 class="rg-h4">Content recommendations</h4><p class="rg-icon-content">As a member of our cross promotion network, your users discover valuable content from related sites</p>
111
- <div class="rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" class="rg-small-icon"/></div>
112
- <h4 class="rg-h4">Full set of growth tools</h4><p class="rg-icon-content">Optimized signup form, viral invites, site update emails, and more!</p>
113
- </div>
114
- <div style="width: 25%; margin: 1% 5% 0 0; float: left; background: #F0F0F0; border-radius: 15px;padding: 1% 2% 1% 1%"><h4 class="rg-h4">Select your plan</h4>
115
- <div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_free" style="font-weight: bold; margin: 12px 0"></div><p class="rg-icon-content"><strong>Free - Stick with the Basic Plan</strong> </input><br><span style="margin-top: -12px">Basic tools, Promotion if content ranks highly</span></p></div>
116
- <div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_39" style="font-weight: bold; margin: 12px 0" checked></div><p class="rg-icon-content"><strong>Get promoted to 2000 users monthly</strong></input><br><span style="margin-top: -12px">$39/month</span></p></div>
117
- <div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_59" style="font-weight: bold; margin: 12px 0"></div><p class="rg-icon-content"><strong>Get promoted to 10,000 users monthly</strong></input><br><span style="margin-top: -12px">$59/month</span></p></div>
118
- <div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_99" style="font-weight: bold; margin: 12px 0"></div><p class="rg-icon-content"><strong>Get promoted to 100,000 users monthly</strong></input><br><span style="margin-top: -12px">$99/month</span></p></div>
119
- <div style="margin: 10px;"><div class="rg-icon-thumb"><input type="radio" name="select-plan" value="promote_no" style="font-weight: bold; margin: 12px 0"></div><p class="rg-icon-content"><strong>Don't promote my site</strong></input><br><span style="margin-top: -12px">Opt out of cross promotion network</span></p></div>
120
- <div class="rg-icon-thumb" style="margin: 10px;width:100%"><input type="checkbox" id="plan-type" name="plan-type" value="annual" style="font-weight: bold">&nbsp;&nbsp; Save 20% with an annual plan</input></div>
121
- <div class="save-changes" style="font-weight: normal; text-align: center;"><a class="btn btn-large btn-warning save-next" href="#" style="margin: 15px" onclick="subscribe_readygraph()">Continue</a><br>
122
</div></div>
123
</div>
124
<?php } else { ?>
125
-
126
- <div class="tutorial-false" style="margin: 2% auto; width: 90%">
127
<h3 style="font-weight: normal; text-align: center;">Settings - Make adjustments to grow and engage your userbase</h3>
128
- <div style="float: left;width: 75%;">
129
- <div style="display: block;min-height: 250px;">
130
<div style="width: 45%; margin: 0 auto; float: left;"><h4 class="rg-h4"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/11.png" class="rg-big-icon"/>Email</h4>
131
<button type="button" class="btn btn-large btn-warning save-next" onclick="window.open('http://readygraph.com/application/customize/settings/advance/');return false;" style="margin: 15px" formtarget="_blank">Automated Email Settings</button>
132
<button type="button" class="btn btn-large btn-warning save-next" onclick="window.open('http://readygraph.com/application/insights/');return false;" style="margin: 15px"formtarget="_blank">Mass Email Users</button>
@@ -141,7 +201,7 @@ include("header.php");
141
142
</div>
143
</div>
144
- <div style="display: block;min-height: 250px;">
145
<div style="width: 45%; margin: 0 auto; float: left;"><h4 class="rg-h4"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/7.png" class="rg-big-icon"/>Signup Overlay</h4>
146
<p>Signup Popup Activated?
147
<select class="signup-popup" name="signup-popup" class="form-control" onchange="return popup_position(this)">
@@ -178,63 +238,12 @@ include("header.php");
178
179
</div>
180
</div>
181
- </div>
182
- <div style="width: 23%; display: block; min-height: 200px; float: right;">
183
- <div class="readygraph_upgrade_right_sidebar">
184
- <div style="background: #0B3E7F; padding: 5px; color: #fff; "><h4>ReadyGraph Premium</h4></div>
185
- <p class="centered-image">All the tools you need to grow your audience.<br><br><a href="https://readygraph.com/accounts/payment/?email=<?php echo get_option('readygraph_email', '') ?>" target="_blank" style="color: #b1c1ca" ><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/go-premium.png" height="40px" style="margin:5px" /></a></p>
186
- </div>
187
- <div class="readygraph_upgrade_right_sidebar" style="margin-top: 10px;">
188
- <p class="centered-image">
189
- <em><strong>Top 3 benefits you can get!</strong></em><br>
190
- <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/7.png" width="50px" style="margin:5px" /><br>
191
- 1. Promotion to 10,000+ new users/month<br>
192
- <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/11.png" width="50px" style="margin:5px" /><br>
193
- 2. Unlimited post update emails<br>
194
- <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_fb.png" width="50px" style="margin:5px" /><br>
195
- 3. Unlimited Facebook invite referrals<br>
196
-
197
- </p>
198
- </div>
199
- </div>
200
</div>
201
<?php } ?>
202
</div>
203
- </div>
204
</form>
205
-
206
<script type="text/javascript" charset="utf-8">
207
- var enable_monetize;
208
-
209
-
210
- function subscribe_readygraph() {
211
- var radios = document.getElementsByName("select-plan");
212
- if (document.getElementById('plan-type').checked) {
213
- annual="true";
214
- } else {
215
- annual="false";
216
- }
217
-
218
- for (var i = 0; i < radios.length; i++) {
219
- if (radios[i].checked) {
220
- plan = radios[i].value;
221
- break;
222
- }
223
- }
224
- var current_url = document.URL;
225
- var url_array = document.URL.split( '&' );
226
- url = 'https://readygraph.com/accounts/payment/?email=<?php echo get_option('readygraph_email', '') ?>&payment_plan='+plan+'&is_annual='+annual+'&redirect_uri='+encodeURIComponent(url_array[0]+'&ac=site-profile');
227
- current_url = url_array[0]+'&ac=site-profile&readygraph_plan='+plan;
228
- if (plan === "promote_free"){
229
- window.location.href = current_url;
230
- }
231
- else{
232
- var win=window.open(url, '_blank');
233
- window.open(current_url, '_self');
234
- window.location.href = current_url;
235
- win.focus();
236
- }
237
- }
238
function popup_position(n){
239
<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); ?>
240
if(n.selectedIndex === 0){
@@ -254,6 +263,374 @@ function popup_delay(n){
254
<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); ?>
255
window.location.replace("<?php echo $current_url[0].'&popup_delay=';?>"+n.value);
256
}
257
- </script>
258
259
- <?php include("footer.php"); ?>
1
<?php
2
/**
3
* Represents the view for the administration dashboard.
4
*
11
* @link http://www.readygraph.com
12
* @copyright 2014 Your Name or Company Name
13
*/
14
+
15
+ function s2_disconnectReadyGraph(){
16
+ $app_id = get_option('readygraph_application_id');
17
+ wp_remote_get( "http://readygraph.com/api/v1/tracking?event=disconnect_readygraph&app_id=$app_id" );
18
+ s2_delete_rg_options();
19
+ }
20
+ function s2_deleteReadyGraph(){
21
+ $app_id = get_option('readygraph_application_id');
22
+ wp_remote_get( "http://readygraph.com/api/v1/tracking?event=uninstall_readygraph&app_id=$app_id" );
23
+ s2_delete_rg_options();
24
+ $dir = plugin_dir_path( __FILE__ );
25
+ s2_rrmdir($dir);
26
+ }
27
28
+ if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "changeaccount")s2_disconnectReadyGraph();
29
+ if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "deleteaccount")s2_deleteReadyGraph();
30
if(isset($_GET["tutorial"]) && $_GET["tutorial"] == "true"){update_option('readygraph_tutorial',"true");}
31
else{update_option('readygraph_tutorial',"false");}
32
if(isset($_GET["popup_position"]) && $_GET["popup_position"] == "bottom-right"){update_option('readygraph_enable_notification', 'true');update_option('readygraph_enable_popup', 'false');}
33
if(isset($_GET["popup_position"]) && $_GET["popup_position"] == "center"){update_option('readygraph_enable_notification', 'true');update_option('readygraph_enable_popup', 'true');}
34
if(isset($_GET["popup_position"]) && $_GET["popup_position"] == "disabled"){update_option('readygraph_enable_notification', 'false');update_option('readygraph_enable_popup', 'false');}
35
if(isset($_GET["popup_delay"])){update_option('readygraph_delay', intval($_GET["popup_delay"]));}
36
+ global $main_plugin_title;
37
+ if (!get_option('readygraph_access_token') || strlen(get_option('readygraph_access_token')) <= 0) {
38
+ if (isset($_POST["readygraph_access_token"])) update_option('readygraph_access_token', $_POST["readygraph_access_token"]);
39
+ if (isset($_POST["readygraph_refresh_token"])) update_option('readygraph_refresh_token', $_POST["readygraph_refresh_token"]);
40
+ if (isset($_POST["readygraph_email"])) update_option('readygraph_email', $_POST["readygraph_email"]);
41
+ if (isset($_POST["readygraph_application_id"])) update_option('readygraph_application_id', $_POST["readygraph_application_id"]);
42
+ if (isset($_POST["readygraph_settings"])) update_option('readygraph_settings', $_POST["readygraph_settings"]);
43
+ if (isset($_POST["readygraph_delay"])) update_option('readygraph_delay', 5000);
44
+ if (isset($_POST["readygraph_enable_notification"])) update_option('readygraph_enable_notification', 'true');
45
+ if (isset($_POST["readygraph_enable_sidebar"])) update_option('readygraph_enable_sidebar', 'false');
46
+ if (isset($_POST["readygraph_auto_select_all"])) update_option('readygraph_auto_select_all', 'true');
47
+ if (isset($_POST["readygraph_enable_branding"])) update_option('readygraph_enable_branding', 'false');
48
+ if (isset($_POST["readygraph_send_blog_updates"])) update_option('readygraph_send_blog_updates', 'true');
49
+ if (isset($_POST["readygraph_send_real_time_post_updates"])) update_option('readygraph_send_real_time_post_updates', 'false');
50
+ if (isset($_POST["readygraph_popup_template"])) update_option('readygraph_popup_template', 'default-template');
51
+ update_option('readygraph_tutorial',"true");
52
+ }
53
+ else {
54
+ }
55
?>
56
57
+ <link rel="stylesheet" type="text/css" href="<?php echo plugins_url( 'assets/css/admin.css', __FILE__ ) ?>">
58
+ <script type="text/javascript" src="<?php echo plugins_url( 'assets/js/admin.js', __FILE__ ) ?>"></script>
59
<form method="post" id="myForm">
60
<input type="hidden" name="readygraph_access_token" value="<?php echo get_option('readygraph_access_token', '') ?>">
61
<input type="hidden" name="readygraph_refresh_token" value="<?php echo get_option('readygraph_refresh_token', '') ?>">
62
<input type="hidden" name="readygraph_email" value="<?php echo get_option('readygraph_email', '') ?>">
63
<input type="hidden" name="readygraph_application_id" value="<?php echo get_option('readygraph_application_id', '') ?>">
64
65
<div class="authenticate" style="display: none;">
66
+ <div class="wrap1" style="min-height: 600px;">
67
+
68
+ <div id="icon-plugins" class="icon32"></div>
69
+ <h2>We've enhanced <?php echo $main_plugin_title ?> with ReadyGraph's User Growth Engine</h2>
70
+
71
+ <p style="display:none;color:red;" id="error"></p>
72
+ <div class="register-left">
73
+ <div class="alert" style="margin: 0px auto; padding: 15px; text-align: center;">
74
+ <h3>Activate ReadyGraph to get more traffic to your site</h3>
75
<!-- <h3 style="margin-top: 0px; font-weight: 300;"><?php //echo $main_plugin_title ?>, Now with ReadyGraph</h3> -->
76
+ <p style="padding: 50px 0px 30px 0px;"><a class="btn btn-primary connect" href="javascript:void(0);" style="font-size: 15px; line-height: 40px; padding: 0 30px;">Connect ReadyGraph</a></p>
77
<!--<p style="padding: 0px 0px;"><a class="btn btn-default skip" href="javascript:void(0);" style="font-size: 10px; line-height: 20px; padding: 0 30px;">Skip ReadyGraph</a></p>-->
78
+ <p>Readygraph adds more ways to connect to your users. </p>
79
<p style="text-align: left; padding: 0 20px;">
80
- Get more traffic<br>
81
- Send automatic email digests of all your site posts<br>
82
- Get better deliverablility<br>
83
+ - Track performace and user activity
84
</p>
85
</div>
86
87
</div>
88
+
89
+ <div class="register-right">
90
+ <div class="form-wrap alert" style="font-size:12px;">
91
+ <p><h3>ReadyGraph grows your site</h3></p>
92
+ <p>ReadyGraph delivers audience growth and motivates users to come back.</p><br /><p><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_fb.png"></span><b>Optimized Signup Form –</b> ReadyGraph’s signup form has one click signup and integration with Facebook so you can get quick and easy signups from your users.<br /><br /><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_heart.png"></span>
93
+ <b>Viral Friend Invites –</b>Loyal site visitors who love your site can easily invite all their friends. Readygraph encourages your visitors' friends to come and signup for your site too.<br /><br /><b><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_mail.png"></span>Automated Re-engagement Emails –</b> ReadyGraph’s automated emails keep visitors coming back. Send a daily or weekly digest of all your new posts and keep them informed about site activity, events, etc.<br /><br /><b><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_chart.png"></span>Analytics -</b> Track new subscribers, invites, traffic, and other key metrics that quantify growth and user engagement. ReadyGraph safely stores user data on the cloud so you can access from anywhere.<br /><br />
94
+ If you have questions or concerns contact us anytime at <a href="mailto:info@readygraph.com" target="_blank">info@readygraph.com</a> Feel free to check out our <a href="http://readygraph.com/faq/" target="_blank">FAQ</a> for a more comprehensive overview. You can also completely <a class="delete" href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&action=<?php echo base64_encode("deleteaccount");?>">Delete ReadyGraph</a> if you don't want access to our amazing growth tools. Either way, good luck building a massive userbase!</p>
95
+ </div>
96
+ </div>
97
+ </div>
98
</div>
99
<div class="authenticating" style="display: none;">
100
<div style="color: #ffffff; width: 350px; margin: 100px auto 0px; padding: 15px; border: solid 1px #2a388f; text-align: center; background-color: #2961cb; -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px;">
101
+ <h3 style="margin-top: 0px; font-weight: 300;"><?php echo $main_plugin_title ?>, Now with ReadyGraph</h3>
102
<h4 style="padding: 50px 0; line-height: 42px;">Retrieving Your Account..</h4>
103
+ <p>Activate Readygraph features to optimize <?php echo $main_plugin_title ?> functionality. Signup For These Benefits:</p>
104
<p style="text-align: left; padding: 0 20px;">
105
- Grow your subscribers faster<br>
106
- Engage users with automated email updates<br>
107
- Enhanced email deliverablility<br>
108
+ - Track performace with user-activity analytics
109
</p>
110
</div>
111
</div>
112
+ <style>a.help-tooltip {outline:none; }a.help-tooltip strong {line-height:30px;}a.help-tooltip:hover {text-decoration:none;} a.help-tooltip span { z-index:10;display:none; padding:14px 20px; margin-top:40px; margin-left:-150px; width:300px; line-height:16px;}a.help-tooltip:hover span{ display:inline; position:absolute; border:2px solid #FFF; background:#fff; text-align: justify; z-index:1000000000;}.callout {z-index:1000000000;position:absolute;border:0;top:-14px;left:120px;} /*CSS3 extras*/a.help-tooltip span{ border-radius:2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; -moz-box-shadow: 0px 0px 8px 4px #666; -webkit-box-shadow: 0px 0px 8px 4px #666; box-shadow: 0px 0px 8px 4px #666;}</style>
113
<div class="authenticated" style="display: none;">
114
+ <div style="background-color: #2961cb; min-width: 90%; height: 50px;margin-right: 1%;">
115
+ <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/white-logo.png" style="width: 138px; height: 30px; margin: 10px 0 0 15px; float: left;">
116
+ <div class="btn-group pull-right" style="margin: 8px 10px 0 0;">
117
+ <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="background: transparent; border-color: #ffffff; color: #ffffff; ">
118
+ <span class="email-address" style="text-shadow: none;"></span> <span class="caret"></span>
119
+ </button>
120
+ <ul class="dropdown-menu">
121
+ <li><a class="change-account" href="#">Change Account</a></li>
122
+ <li><a class="disconnect" href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&action=<?php echo base64_encode("changeaccount");?>">Disconnect</a></li>
123
+ <li><a class="delete" href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&action=<?php echo base64_encode("deleteaccount");?>">Delete ReadyGraph</a></li>
124
+ </ul>
125
+ </div>
126
+ <div class="btn-group pull-right" style="margin: 8px 10px 0 0;">
127
+ <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="background: transparent; border-color: #ffffff; color: #ffffff; ">
128
+ <span class="result" style="text-shadow: none;">...</span> <span class="caret"></span>
129
+ </button>
130
+ <ul class="dropdown-menu">
131
+ <li><a href="http://readygraph.com/application/insights/" target="_blank">Insights</a></li>
132
+ </ul>
133
+ </div>
134
+ <div style="clear: both;"></div>
135
+ </div>
136
+ <!-- write menu code-->
137
+ <div class="readygraph-menu">
138
+ <div class="menu-tabs"><h4>Grow Users</h4>
139
+ <ul>
140
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=signup-popup">Signup Popup</a></li>
141
+ <li><a href="https://readygraph.com/application/insights/" target="_blank">User Statistics</a></li>
142
+ <li><a href="#"></a></li>
143
+ </ul>
144
+ </div>
145
+ <div class="menu-tabs"><h4>Email Users</h4>
146
+ <ul>
147
+ <li><a href="https://readygraph.com/application/customize/settings/email/welcome/" target="_blank">Retention Email</a></li>
148
+ <li><a href="https://readygraph.com/application/customize/settings/email/invitation/" target="_blank">Invitation Email</a></li>
149
+ <li><a href="http://readygraph.com/application/insights/" target="_blank">Custom Email</a></li>
150
+ </ul>
151
+ </div>
152
+ <div class="menu-tabs"><h4>Engage Users</h4>
153
+ <ul>
154
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=social-feed">Social Feed</a></li>
155
+ <li><a href="#">Social Followers</a></li>
156
+ <li><a href="#">Feedback Survey</a></li>
157
+ </ul>
158
+ </div>
159
+ <div class="menu-tabs"><h4>Basic Settings</h4>
160
+ <ul>
161
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
162
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
163
+
164
+ </ul>
165
+ </div>
166
+ <div class="menu-tabs" style="float:right"><h4>&nbsp;</h4>
167
+ <p><a href="mailto:info@readygraph.com" style="color: #b1c1ca" >Help <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/9.png"/></a></p>
168
+ <p>
169
+ <a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=faq" style="color: #b1c1ca" >FAQ <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/10.png" /></a></p>
170
+
171
+ </ul>
172
+ </div>
173
+ </div>
174
<?php if(get_option('readygraph_tutorial') && get_option('readygraph_tutorial') == "true"){ ?>
175
<div class="tutorial-true" style="margin: 5% auto;">
176
+ <h3 style="font-weight: normal; text-align: center;"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/check.png"/>Congratulations! Subscribe2's ReadyGraph growth engine is now active.</h3>
177
+ <h4 style="font-weight: normal; text-align: center;">Next take our tutorial to customize settings for:</h4>
178
+ <div style="width: 225px; margin: 0 auto;"><h4 class="rg-h4"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/2.png" class="rg-small-icon"/>Optimized Signup Form</h4>
179
+ <h4 class="rg-h4"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/3.png" class="rg-small-icon"/>Viral Friend Invites</h4>
180
+ <h4 class="rg-h4"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/4.png" class="rg-small-icon"/>Automated Emails</h4>
181
+
182
+ <div class="save-changes" style="font-weight: normal; text-align: center;"><button type="submit" class="btn btn-large btn-warning save-next" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=signup-popup&source=basic-settings" style="margin: 15px">Customize</button><br>
183
+ <a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=basic-settings" style="margin: 15px">Skip</a>
184
</div></div>
185
</div>
186
<?php } else { ?>
187
+ <div class="tutorial-false" style="margin: 2% auto; width: 80%">
188
<h3 style="font-weight: normal; text-align: center;">Settings - Make adjustments to grow and engage your userbase</h3>
189
+ <div style="width: 100%; display: block;min-height: 200px;">
190
<div style="width: 45%; margin: 0 auto; float: left;"><h4 class="rg-h4"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/11.png" class="rg-big-icon"/>Email</h4>
191
<button type="button" class="btn btn-large btn-warning save-next" onclick="window.open('http://readygraph.com/application/customize/settings/advance/');return false;" style="margin: 15px" formtarget="_blank">Automated Email Settings</button>
192
<button type="button" class="btn btn-large btn-warning save-next" onclick="window.open('http://readygraph.com/application/insights/');return false;" style="margin: 15px"formtarget="_blank">Mass Email Users</button>
201
202
</div>
203
</div>
204
+ <div style="width: 100%; display: block;min-height: 200px;">
205
<div style="width: 45%; margin: 0 auto; float: left;"><h4 class="rg-h4"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/7.png" class="rg-big-icon"/>Signup Overlay</h4>
206
<p>Signup Popup Activated?
207
<select class="signup-popup" name="signup-popup" class="form-control" onchange="return popup_position(this)">
238
239
</div>
240
</div>
241
</div>
242
<?php } ?>
243
</div>
244
</form>
245
+ <script type="text/javascript" src="https://readygraph.com/scripts/readygraph.js"></script>
246
<script type="text/javascript" charset="utf-8">
247
function popup_position(n){
248
<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); ?>
249
if(n.selectedIndex === 0){
263
<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); ?>
264
window.location.replace("<?php echo $current_url[0].'&popup_delay=';?>"+n.value);
265
}
266
267
+ var $ = jQuery;
268
+ $(function () {
269
+ var settings =
270
+ {
271
+ 'host': "www.readygraph.com"
272
+ , 'clientId': "9838eb84c6da2fc44ab9"
273
+ };
274
+
275
+ var authHost = "https://" + settings.host;
276
+ var resourceHost = "https://" + settings.host;
277
+
278
+ // OAuth 2.0 Popup
279
+ //
280
+ var popupWindow=null;
281
+ function openPopup(url)
282
+ {
283
+ if(popupWindow && !popupWindow.closed) popupWindow.focus();
284
+ else popupWindow = window.open(url,"_blank","directories=no, status=no, menubar=no, scrollbars=yes, resizable=no,width=515, height=330,top=" + (screen.height - 330)/2 + ",left=" + (screen.width - 515)/2);
285
+ }
286
+ function parent_disable() {
287
+ if(popupWindow && !popupWindow.closed) popupWindow.focus();
288
+ }
289
+
290
+ $("a.connect").click(function() {
291
+ var url = authHost + '/oauth/authenticate?client_id=' + settings.clientId + '&redirect_uri=' + encodeURIComponent(location.href.replace('#' + location.hash,"")) + '&response_type=token';
292
+ openPopup(url);
293
+ $(document.body).bind('focus', parent_disable);
294
+ $(document.body).bind('click', parent_disable);
295
+ });
296
+ $(".change-account").click(function() {
297
+ document.cookie="readygraph_tutorial=true"
298
+ var url = authHost + '/oauth/authenticate?client_id=' + settings.clientId + '&redirect_uri=' + encodeURIComponent(location.href.replace('#' + location.hash,"")) + '&response_type=token';
299
+ var logout = authHost + '/oauth/logout?redirect=' + encodeURIComponent(url);
300
+ openPopup(logout);
301
+ $(document.body).bind('focus', parent_disable);
302
+ $(document.body).bind('click', parent_disable);
303
+ });
304
+
305
+ // User Interface
306
+ //
307
+ $('.template').click(function() {
308
+ $('#preview').attr('src', $(this).find('img').attr('src'));
309
+ });
310
+
311
+ // Manage OAuth 2.0 Redirect
312
+ //
313
+ var extractCode = function(hash) {
314
+ var match = hash.match(/code=(\w+)/);
315
+ return !!match && match[1];
316
+ };
317
+ var extractToken = function(hash) {
318
+ var match = hash.match(/access_token=(\w+)/);
319
+ return !!match && match[1];
320
+ };
321
+ var extractError = function(hash) {
322
+ var match = hash.match(/error=(\w+)/);
323
+ return !!match && match[1];
324
+ };
325
+
326
+ var code = extractCode(window.location.href);
327
+ if (extractError(window.location.href) == 'access_denied') {
328
+ window.close();
329
+ }
330
+ else if(code) {
331
+ try { window.opener.setCode(code); }
332
+ catch(ex) { }
333
+ window.close();
334
+ }
335
+ else {
336
+ $('.rgw-fb-login-button-iframe').hide();
337
+ $('div.authenticate').show();
338
+
339
+ if ($('[name="readygraph_access_token"]').val()) {
340
+ $('.rgw-fb-login-button-iframe').show();
341
+ $('div.authenticate').hide();
342
+ $('div.authenticating').hide();
343
+ $('div.authenticated').show();
344
+
345
+ $('.email-address').text($('[name="readygraph_email"]').val());
346
+
347
+ window.setup_readygraph($('[name="readygraph_application_id"]').val());
348
+ $('.delay').val($('[name="readygraph_delay"]').val());
349
+ $('.sidebar').val($('[name="readygraph_enable_sidebar"]').val());
350
+ $('.notification').val($('[name="readygraph_enable_notification"]').val());
351
+ $('.selectAll').val($('[name="readygraph_auto_select_all"]').val());
352
+ $('.branding').val($('[name="readygraph_enable_branding"]').val());
353
+ $('.blog_updates').val($('[name="readygraph_send_blog_updates"]').val());
354
+ $('.real_time_post_update').val($('[name="readygraph_send_real_time_post_updates"]').val());
355
+ $('.popup_template').val($('[name="readygraph_popup_template"]').val());
356
+
357
+ //$('[name="readygraph_ad_format"][value="' + $('[name="_readygraph_ad_format"]').val() + '"]').parent().click();
358
+ //$('[name="readygraph_ad_timing"][value="' + $('[name="_readygraph_ad_timing"]').val() + '"]').parent().click();
359
+
360
+ //$('[name="readygraph_ad_delay"]').val($('[name="_readygraph_ad_delay"]').val());
361
+ //$('[name="readygraph_ad_scroll"]').val($('[name="_readygraph_ad_scroll"]').val());
362
+
363
+ $('.result').text('...');
364
+ if ($('[name="readygraph_access_token"]').val()) {
365
+ $.ajax({
366
+ url: resourceHost + '/api/v1/insight_info'
367
+ , beforeSend: function (xhr) {
368
+ xhr.setRequestHeader('Authorization', "Bearer " + $('[name="readygraph_access_token"]').val());
369
+ xhr.setRequestHeader('Accept', "application/json");
370
+ }
371
+ , method: 'POST'
372
+ , success: function (response) {
373
+ if (response.data) {
374
+ $('.result').text(response.data.subscribers + ((response.data.subscribers == 0) ? ' Subscriber' : ' Subscribers'));
375
+ } else {
376
+ $('.result').text('Insight');
377
+ }
378
+ }
379
+ , error: function (response) {
380
+ refresh_access_token();
381
+ }
382
+ });
383
+ }
384
+ }
385
+ }
386
+
387
+ // Manage OAuth 2.0 Results
388
+ //
389
+ function refresh_access_token() {
390
+ var refresh_token = $('[name="readygraph_refresh_token"]').val();
391
+ if (refresh_token) {
392
+ $('div.authenticate').hide();
393
+ $('div.authenticating').show();
394
+ $('div.authenticated').hide();
395
+
396
+ $.ajax({
397
+ url: resourceHost + '/oauth/access_token'
398
+ , data: {
399
+ grant_type: 'refresh_token',
400
+ refresh_token: $('[name="readygraph_refresh_token"]').val(),
401
+ redirect_uri: encodeURIComponent(location.href.replace('#' + location.hash,"")),
402
+ client_id: settings.clientId
403
+ }
404
+ , method: 'POST'
405
+ , success: function (response) {
406
+ $('[name="readygraph_access_token"]').val(response.access_token);
407
+ $('[name="readygraph_refresh_token"]').val(response.refresh_token);
408
+ window.setAccessToken(response.access_token);
409
+ $('.result').text(response.data.subscribers + ((response.data.subscribers == 0) ? ' Subscriber' : ' Subscribers'));
410
+ }
411
+ , error: function (response) {
412
+ alert('We couldn\'t authenticate your account. Please check your internet connection.');
413
+ $('div.authenticate').show();
414
+ $('div.authenticating').hide();
415
+ $('div.authenticated').hide();
416
+ }
417
+ });
418
+ }
419
+ }
420
+ window.setCode = function(code) {
421
+ $('.rgw-fb-login-button-iframe').hide();
422
+ $('div.authenticate').hide();
423
+ $('div.authenticating').show();
424
+ $('div.authenticated').hide();
425
+
426
+ $.ajax({
427
+ url: resourceHost + '/oauth/access_token'
428
+ , data: {
429
+ grant_type: 'authorization_code',
430
+ code: code,
431
+ redirect_uri: encodeURIComponent(location.href.replace('#' + location.hash,"")),
432
+ client_id: settings.clientId
433
+ }
434
+ , method: 'POST'
435
+ , success: function (response) {
436
+ if (response) {
437
+ $('[name="readygraph_access_token"]').val(response.access_token);
438
+ $('[name="readygraph_refresh_token"]').val(response.refresh_token);
439
+ window.setAccessToken(response.access_token);
440
+ } else {
441
+ $('div.authenticating').hide();
442
+ $('div.authenticate').show();
443
+ }
444
+ }
445
+ });
446
+ }
447
+ window.setAccessToken = function(token) {
448
+ $('.rgw-fb-login-button-iframe').hide();
449
+ $('div.authenticate').hide();
450
+ $('div.authenticating').show();
451
+ $('div.authenticated').hide();
452
+
453
+ $.ajax({
454
+ url: resourceHost + '/api/v1/account_info'
455
+ , beforeSend: function (xhr) {
456
+ xhr.setRequestHeader('Authorization', "Bearer " + token);
457
+ xhr.setRequestHeader('Accept', "application/json");
458
+ }
459
+ , method: 'POST'
460
+ , success: function (response) {
461
+ if (response.data) {
462
+ $('[name="readygraph_access_token"]').val(token);
463
+ $('[name="readygraph_email"]').val(response.data.email);
464
+ $('[name="readygraph_application_id"]').val(response.data.application_id);
465
+ $('#myForm')[0].submit();
466
+ } else {
467
+ $('div.authenticating').hide();
468
+ $('div.authenticate').show();
469
+ $('.rgw-fb-login-button-iframe').hide();
470
+ }
471
+ }
472
+ });
473
+ }
474
+ });
475
+ </script>
476
+ <script>
477
+ window.setup = false;
478
+ window.refresh_readygraph = function() {};
479
+ window.setup_readygraph = function(app_id) {
480
+ if (window.setup) {
481
+ window.refresh_readygraph();
482
+ return;
483
+ }
484
+ window.setup = true;
485
+ readygraph.setup({
486
+ applicationId: app_id,
487
+ isPreview: true,
488
+ enableLoginWall: false,
489
+ enableDistraction: false,
490
+ enableAutoLogin: false,
491
+ enableSidebar: false,
492
+ enableNotification: false,
493
+ enableInvite: false,
494
+ enableOpenGraph: false,
495
+ enableRgSeo: false
496
+ });
497
+ readygraph.ready(function() {
498
+ readygraph.framework.require(['compact.sdk', 'facebook.sdk'], function() {
499
+ var $ = readygraph.framework.jQuery;
500
+ $.cookie('RGAuth', null);
501
+ readygraph.framework.facebook.logout(function() {
502
+ readygraph.framework.require(['invite'], function() {
503
+ var VIEW_TYPE = {
504
+ LOADING: 0,
505
+ LOGIN_REQUIRE: 1,
506
+ PERMISSION_REQUIRE: 2,
507
+ DEFAULT: 3,
508
+ LOGIN_WITH_EMAIL: 4,
509
+ SIGNUP_WITH_EMAIL: 5,
510
+ IMPORT_WITH_EMAIL: 6,
511
+ FINISH: 10
512
+ };
513
+
514
+ var auth = new readygraph.framework.ui.AuthModel({
515
+ dialog: true,
516
+ 'inviter_profile_picture': 'https://graph.facebook.com/4/picture?type=normal&width=400&height=400'
517
+ });
518
+ $('.rg-preview-widget').html('');
519
+ $('.rg-preview-widget').append(auth.lightbox.view.$el);
520
+ $('.rgw-content').attr('style', 'position: relative !important;');
521
+
522
+ var view = VIEW_TYPE.LOGIN_REQUIRE;
523
+ auth.on('switch', function() {
524
+ if (auth.view.currentView != view) { auth.view.switchView(view); }
525
+ else auth.view.render();
526
+ if (view == VIEW_TYPE.DEFAULT) {
527
+ auth.view.$el.find('.rgw-invite-view').showAndAnimate();
528
+ auth.view.$el.find('.rgw-follow-view').hideAndAnimate();
529
+ auth.view.$el.commitTransition();
530
+ }
531
+ });
532
+ auth.view.switchView(view);
533
+
534
+ $(window).scroll(function() {
535
+ $(window).trigger('rgw-invalidate');
536
+ });
537
+ $('.rg-preview-widget, .content-warp').scroll(function() {
538
+ $(window).trigger('rgw-invalidate');
539
+ });
540
+ $(window).trigger('rgw-invalidate');
541
+
542
+ $('.rg-vertical-tab').click(function() {
543
+ saveContent(auth, $('.rg-preview-widget-container'), true);
544
+
545
+ $('.rg-vertical-tab').removeClass('active');
546
+ $(this).addClass('active');
547
+ view = VIEW_TYPE[$(this).attr('tab')];
548
+ if (auth.view.currentView != view) { auth.view.switchView(view); }
549
+
550
+ $('.rg-preview-widget, .content-warp').scrollTop(10000);
551
+ });
552
+
553
+ enableContentEditable(auth, $('.rg-preview-widget-container'));
554
+ restoreContent(auth, $('.rg-preview-widget-container'));
555
+
556
+ $('.save').click(function() {
557
+ $('.save').css('opacity', 0.4);
558
+ saveContent(auth, $('.rg-preview-widget-container'), false);
559
+ });
560
+
561
+ window.refresh_readygraph = function() {
562
+ restoreContent(auth, $('.rg-preview-widget-container'));
563
+ }
564
+ });
565
+ });
566
+ });
567
+ });
568
+ }
569
+ function enableContentEditable(model, container) {
570
+ model.view.$el.find('[rgw-data-key]').each(function() {
571
+ var element = $(this);
572
+ if (element.attr('rgw-data-editable') == 'false') return;
573
+
574
+ if (element.attr('editing') != null) return;
575
+ container.find('.special-button-container button').attr('disabled', 'disabled');
576
+ element.text(readygraph.getSettings().get(element.attr('rgw-data-key')));
577
+ element.attr('editing', '1');
578
+ element.css({
579
+ 'border': '2px dashed orange',
580
+ 'position': 'relative',
581
+ 'top': '-2px',
582
+ 'margin-bottom': '-4px',
583
+ 'background-color': '#FAFAC5'
584
+ });
585
+ element.attr('contenteditable', true);
586
+ element.bind('paste', function(e) {
587
+ e.preventDefault();
588
+ });
589
+ element.bind('keydown', function() { $('.save').css('opacity', '1.0'); });
590
+ });
591
+ }
592
+ function saveContent(model, container, fake) {
593
+ var settings = {};
594
+ model.view.$el.find('[rgw-data-key]').each(function() {
595
+ var element = $(this);
596
+ if (element.attr('rgw-data-editable') == 'false') return;
597
+ settings[element.attr('rgw-data-key')] = element.text();
598
+ readygraph.getSettings().set(element.attr('rgw-data-key'), element.text());
599
+ });
600
+ if (!fake) {
601
+ $('input[name="readygraph_settings"]').val(JSON.stringify(settings));
602
+ $('#myForm')[0].submit();
603
+ }
604
+ }
605
+ function restoreContent(model, container) {
606
+ eval('window._TEMP='+$('input[name="readygraph_settings"]').val());
607
+ var settings = window._TEMP;
608
+ if (settings) {
609
+ model.view.$el.find('[rgw-data-key]').each(function() {
610
+ var element = $(this);
611
+ if (element.attr('rgw-data-editable') == 'false') return;
612
+ element.text(settings[element.attr('rgw-data-key')]);
613
+ readygraph.getSettings().set(element.attr('rgw-data-key'), element.text());
614
+ });
615
+ }
616
+ }
617
+ </script>
618
+ <style>
619
+ /* FOR INLINE WIDGET */
620
+ .rgw-overlay {
621
+ display: none !important;
622
+ }
623
+ .rgw-content-frame {
624
+ left: 0 !important;
625
+ top: 0 !important;
626
+ position: relative !important;
627
+ margin: 0 auto !important;
628
+ border: solid 1px #cccccc;
629
+ }
630
+ .rgw-preview-warning {
631
+ display: none !important;
632
+ }
633
+ .rgw-content {
634
+ position: relative !important;
635
+ }
636
+ </style>
extension/readygraph/assets/12.png DELETED
Binary file
extension/readygraph/assets/13.png DELETED
Binary file
extension/readygraph/assets/14.png DELETED
Binary file
extension/readygraph/assets/15.png DELETED
Binary file
extension/readygraph/assets/Sign-Alert-icon.png DELETED
Binary file
extension/readygraph/assets/Thumbs.db ADDED
Binary file
extension/readygraph/assets/css/admin.css CHANGED
@@ -33,136 +33,39 @@
33
padding: 16px 30px;
34
text-shadow: none;
35
}
36
-
37
- .alert p {font-style: normal;}
38
-
39
- .alert label {font-size: 14px;font-weight: bold;}
40
-
41
- .wrap1 {width: 100%; display: block; position: relative;}
42
- .save-changes{margin: 15px;}
43
- .rg-small-icon { height: 25px; width: 25px; margin: 5px;vertical-align: middle;}
44
- .rg-big-icon { height: 50px; width: 50px; margin: 15px;vertical-align: middle;}
45
- .rg-h4 { font-weight: normal; margin: 0 auto; }
46
- .save-next a, a:hover, a:active, a:visited {text-decoration: none; }
47
- .readygraph-nav-menu {
48
49
background-color: #093e7d;
50
- color: #b1c1ca;
51
margin-right: 1%;
52
- height:55px;
53
margin-bottom: 1%;
54
- padding-left: 1%;
55
}
56
- .readygraph-nav-menu h4{
57
color: #b1c1ca;
58
}
59
-
60
- .readygraph-nav-menu ul {
61
- text-align: left;
62
- display: inline;
63
- margin: 0;
64
- padding: 15px 4px 17px 0;
65
- list-style: none;
66
- /* -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
67
- -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
68
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);*/
69
- margin-top: 2px;
70
- }
71
- .readygraph-nav-menu ul li {
72
- display: inline-block;
73
- margin-right: -4px;
74
- position: relative;
75
- padding: 15px 30px;
76
- cursor: pointer;
77
- -webkit-transition: all 0.2s;
78
- -moz-transition: all 0.2s;
79
- -ms-transition: all 0.2s;
80
- -o-transition: all 0.2s;
81
- transition: all 0.2s;
82
- margin-bottom: 0px;
83
- width: 150px;
84
- }
85
- .readygraph-nav-menu ul li:hover {
86
- background: #2691CB;
87
- color: #fff;
88
}
89
- .readygraph-nav-menu ul li ul {
90
- padding: 0;
91
- position: absolute;
92
- top: 48px;
93
- left: 0;
94
- -webkit-box-shadow: none;
95
- -moz-box-shadow: none;
96
- box-shadow: none;
97
- display: none;
98
- opacity: 0;
99
- visibility: hidden;
100
- -webkit-transiton: opacity 0.2s;
101
- -moz-transition: opacity 0.2s;
102
- -ms-transition: opacity 0.2s;
103
- -o-transition: opacity 0.2s;
104
- -transition: opacity 0.2s;
105
- background: #2691CB;
106
}
107
- .readygraph-nav-menu ul li ul li {
108
- display: block;
109
- margin: 5px;
110
- width: 140px;
111
- padding: 10px 0;
112
- text-align: center;
113
- }
114
- .readygraph-nav-menu ul li ul a {
115
- color: #fff;
116
}
117
118
- .readygraph-nav-menu ul li ul li:hover{
119
- background: #fff;
120
- }
121
- .readygraph-nav-menu ul li ul li:hover a { color: #2691CB;}
122
- .readygraph-nav-menu ul li:hover ul {
123
- display: block;
124
- opacity: 1;
125
- visibility: visible;
126
- }
127
- .upgrade-notice{
128
- text-align: center;
129
- width: 60%;
130
- margin: 1% auto;
131
- background: #E1EFD4;
132
- border: 1px solid #BFDBA7;
133
- }
134
- .upgrade-notice-text{
135
- margin: 2% 5%;
136
- }
137
- .aa_close {
138
- float: right;
139
- }
140
- .readygraph_upgrade_right_sidebar{
141
- border: 1px solid #BAD6DA;
142
- width: 100%;
143
- text-align: center;
144
- }
145
- .centered-image {
146
- padding:15px;
147
- }
148
- .rg-three-column {
149
- width: 29%;
150
- margin: 1% 2% 1%;
151
- border: 2px solid #2691CB;
152
- }
153
- .rg-signup-icon{
154
- margin: 0 15px 0 5px;
155
- clear:both;
156
- }
157
- .rg-icon-thumb {
158
- float: left;
159
- }
160
- .rg-icon-thumb img {
161
- display: block;
162
- }
163
- .rg-icon-content {
164
- margin-left: 25px;
165
- }
166
- .site_category select{
167
- margin: 5px;
168
- }
33
padding: 16px 30px;
34
text-shadow: none;
35
}
36
+ .readygraph-menu {
37
38
background-color: #093e7d;
39
+ color: #34495E;
40
margin-right: 1%;
41
+ height:150px;
42
margin-bottom: 1%;
43
+ padding-top: 1%;
44
+
45
}
46
+ .menu-tabs h4{
47
color: #b1c1ca;
48
}
49
+ .menu-tabs a:link,a:visited{
50
+ color: #5fb1d8;
51
+ text-decoration: none;
52
}
53
+ .menu-tabs a:hover, a:active {
54
+ color: #ffffff;
55
+ text-decoration: none;
56
}
57
+ .menu-tabs {
58
+ color: #5fb1d8;
59
}
60
+ .alert p {font-style: normal;}
61
62
+ .alert label {font-size: 14px;font-weight: bold;}
63
+
64
+ .wrap1 {width: 100%; display: block; position: relative;}
65
+ .save-changes{margin: 15px;}
66
+ .rg-signup-icon {float:left; margin:0 1.5em 1em 0}
67
+ .menu-tabs {width: 18%; margin: 0 1%; float: left;text-align: center;}
68
+ .rg-small-icon { height: 25px; width: 25px; margin: 5px;vertical-align: middle;}
69
+ .rg-big-icon { height: 50px; width: 50px; margin: 15px;vertical-align: middle;}
70
+ .rg-h4 { font-weight: normal; margin: 0 auto; }
71
+ .save-next a, a:hover, a:active, a:visited {text-decoration: none; }
extension/readygraph/assets/css/upgrade.css DELETED
@@ -1,69 +0,0 @@
1
- /*!
2
- * Bootstrap v3.1.1 (http://getbootstrap.com)
3
- * Copyright 2011-2014 Twitter, Inc.
4
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
- */
6
-
7
- .rg_message{
8
- background-size: 40px 40px;
9
- background-image: linear-gradient(135deg, rgba(255, 255, 255, .05) 25%, transparent 25%,
10
- transparent 50%, rgba(255, 255, 255, .05) 50%, rgba(255, 255, 255, .05) 75%,
11
- transparent 75%, transparent);
12
- box-shadow: inset 0 -1px 0 rgba(255,255,255,.4);
13
- width: 98%;
14
- border: 1px solid;
15
- color: #fff;
16
- padding: 15px;
17
- text-shadow: 0 1px 0 rgba(0,0,0,.5);
18
- animation: animate-bg 5s linear infinite;
19
- border-radius: 5px;
20
- }
21
-
22
- .rg_info{
23
- background-color: #4ea5cd;
24
- border-color: #3b8eb5;
25
- }
26
-
27
- .rg_error{
28
- background-color: #de4343;
29
- border-color: #c43d3d;
30
- }
31
-
32
- .rg_warning{
33
- background-color: #eaaf51;
34
- border-color: #d99a36;
35
- }
36
-
37
- .rg_success{
38
- background-color: #61b832;
39
- border-color: #55a12c;
40
- }
41
-
42
- .rg_message h3{
43
- margin: 0 0 5px 0;
44
- }
45
-
46
- .rg_message p{
47
- margin: 0;
48
- }
49
-
50
- @keyframes animate-bg {
51
- from {
52
- background-position: 0 0;
53
- }
54
- to {
55
- background-position: -80px 0;
56
- }
57
- }
58
- .aa_close {
59
- position: absolute;
60
- right: 18px;
61
- top: 18px;
62
- }
63
- .pure-button{display:inline-block;*display:inline;zoom:1;line-height:normal;white-space:nowrap;vertical-align:baseline;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button{font-family:inherit;font-size:100%;*font-size:90%;*overflow:visible;padding:1em 1em;color:#444;color:rgba(0,0,0,.8);*color:#444;border:1px solid #999;border:0 rgba(0,0,0,0);background-color:#E6E6E6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:hover,.pure-button:focus{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#1a000000', GradientType=0);background-image:-webkit-gradient(linear,0 0,0 100%,from(transparent),color-stop(40%,rgba(0,0,0,.05)),to(rgba(0,0,0,.1)));background-image:-webkit-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:-moz-linear-gradient(top,rgba(0,0,0,.05) 0,rgba(0,0,0,.1));background-image:-o-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 0 6px rgba(0,0,0,.2) inset}.pure-button[disabled],.pure-button-disabled,.pure-button-disabled:hover,.pure-button-disabled:focus,.pure-button-disabled:active{border:0;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);filter:alpha(opacity=40);-khtml-opacity:.4;-moz-opacity:.4;opacity:.4;cursor:not-allowed;box-shadow:none}.pure-button-hidden{display:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#0078e7;color:#fff}
64
- .button-warning {
65
- color: white;
66
- border-radius: 4px;
67
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
68
- background: rgb(223, 117, 20);
69
- }
extension/readygraph/assets/go-premium.png DELETED
Binary file
extension/readygraph/assets/icon_currency.png DELETED
Binary file
extension/readygraph/assets/js/jquery.dependent-selects.js DELETED
@@ -1,278 +0,0 @@
1
- // Generated by CoffeeScript 1.6.3
2
- /*
3
- # jQuery Dependent Selects v1.2.2
4
- # Copyright 2012 Mark J Smith, Simpleweb
5
- # Details on http://github.com/simpleweb/jquery-dependent-selects
6
- */
7
-
8
- (function($) {
9
- return $.fn.dependentSelects = function(options) {
10
- var clearAllSelectsByParent, createNewSelect, createSelectId, findSelectParent, hideSelect, insertLabel, insertPlaceholderSelect, labelAtDepth, placeholderOptionAtDepth, placeholderSelectAtDepth, prepareSelect, selectChange, selectPreSelected, selectedOption, showSelect, splitOptionName;
11
- if (options == null) {
12
- options = {};
13
- }
14
- options = $.extend({
15
- 'separator': ' > ',
16
- 'placeholderOption': '',
17
- 'placeholderSelect': false,
18
- 'class': false,
19
- 'labels': false
20
- }, options);
21
- createSelectId = function() {
22
- var int;
23
- int = parseInt(Math.random() * 1000);
24
- if ($("[data-dependent-id='" + int + "']").length > 0) {
25
- return createSelectId();
26
- } else {
27
- return int;
28
- }
29
- };
30
- splitOptionName = function($option) {
31
- var array, i, item, _i, _len;
32
- array = $.map($option.text().split(options.separator), function(valuePart) {
33
- return $.trim(valuePart);
34
- });
35
- i = 0;
36
- for (_i = 0, _len = array.length; _i < _len; _i++) {
37
- item = array[_i];
38
- if (item === '') {
39
- array.splice(i, 1);
40
- i--;
41
- }
42
- i++;
43
- }
44
- return array;
45
- };
46
- placeholderSelectAtDepth = function(depth, $select) {
47
- var placeholder, text;
48
- depth--;
49
- placeholder = options.placeholderSelect;
50
- if (placeholder) {
51
- if (placeholder === true) {
52
- placeholder = $select.data('dependent-select-placeholders');
53
- }
54
- if (typeof placeholder === 'object') {
55
- if (placeholder[depth]) {
56
- text = placeholder[depth];
57
- } else {
58
- text = placeholder[placeholder.length - 1];
59
- }
60
- } else {
61
- text = placeholder;
62
- }
63
- return $("<select disabled><option>" + text + "</option></select>").attr({
64
- 'data-dependent-depth': depth + 1,
65
- 'data-dependent-placeholder': true,
66
- 'data-dependent-id': $select.attr('data-dependent-id')
67
- });
68
- }
69
- };
70
- placeholderOptionAtDepth = function(depth) {
71
- var placeholder, text;
72
- depth--;
73
- placeholder = options.placeholderOption;
74
- if (typeof placeholder === 'object') {
75
- if (placeholder[depth]) {
76
- text = placeholder[depth];
77
- } else {
78
- text = placeholder[placeholder.length - 1];
79
- }
80
- } else {
81
- text = placeholder;
82
- }
83
- return $("<option>" + text + "</option>");
84
- };
85
- labelAtDepth = function(depth, $select) {
86
- var labels;
87
- depth--;
88
- labels = options.labels;
89
- if (labels) {
90
- if (labels === true) {
91
- labels = $select.data('dependent-labels');
92
- }
93
- if (labels[depth]) {
94
- return labels[depth];
95
- } else {
96
- return labels[labels.length - 1];
97
- }
98
- } else {
99
- return false;
100
- }
101
- };
102
- hideSelect = function($select) {
103
- var label, placeholder_select, select_depth, select_id;
104
- select_id = $select.attr('data-dependent-id');
105
- select_depth = $select.attr('data-dependent-depth');
106
- placeholder_select = $("select[data-dependent-placeholder][data-dependent-id='" + select_id + "'][data-dependent-depth='" + select_depth + "']");
107
- label = $("label[data-dependent-id='" + select_id + "'][data-dependent-depth='" + select_depth + "']").hide();
108
- if (placeholder_select.length > 0) {
109
- placeholder_select.show();
110
- label.show();
111
- }
112
- return $select.hide();
113
- };
114
- showSelect = function($select) {
115
- var label, placeholder_select, select_depth, select_id;
116
- select_id = $select.attr('data-dependent-id');
117
- select_depth = $select.attr('data-dependent-depth');
118
- placeholder_select = $("select[data-dependent-placeholder][data-dependent-id='" + select_id + "'][data-dependent-depth='" + select_depth + "']");
119
- label = $("label[data-dependent-id='" + select_id + "'][data-dependent-depth='" + select_depth + "']").show();
120
- if (placeholder_select.length > 0) {
121
- placeholder_select.hide();
122
- }
123
- return $select.show();
124
- };
125
- insertLabel = function($select, $parent) {
126
- var $label, label, select_depth, select_id;
127
- if (label = labelAtDepth($select.attr('data-dependent-depth'), $select)) {
128
- select_id = $select.attr('data-dependent-id');
129
- select_depth = $select.attr('data-dependent-depth');
130
- $label = $("<label>" + label + "</label>").attr({
131
- 'data-dependent-id': select_id,
132
- 'data-dependent-depth': select_depth
133
- });
134
- if (!($("label[data-dependent-id='" + select_id + "'][data-dependent-depth='" + select_depth + "']").length > 0)) {
135
- if ($parent) {
136
- return $parent.after($label);
137
- } else {
138
- return $select.before($label);
139
- }
140
- }
141
- }
142
- };
143
- insertPlaceholderSelect = function($select, $parent) {
144
- var $placeholderSelect, depth, select_id;
145
- if ($placeholderSelect = placeholderSelectAtDepth($select.attr('data-dependent-depth'), $select)) {
146
- select_id = $select.attr('data-dependent-id');
147
- depth = $select.attr('data-dependent-depth');
148
- if (!($("select[data-dependent-placeholder][data-dependent-id='" + select_id + "'][data-dependent-depth='" + depth + "']").length > 0)) {
149
- return $select.before($placeholderSelect);
150
- }
151
- }
152
- };
153
- clearAllSelectsByParent = function($parent) {
154
- return $(".dependent-sub[data-dependent-id='" + ($parent.attr('data-dependent-id')) + "']").each(function() {
155
- if (parseInt($(this).attr('data-dependent-depth')) > parseInt($parent.attr('data-dependent-depth'))) {
156
- $(this).find('option:first').attr('selected', 'selected');
157
- return hideSelect($(this));
158
- }
159
- });
160
- };
161
- createNewSelect = function(name, $select, depth) {
162
- var $currentSelect, $labels, $newSelect, select_id;
163
- select_id = $select.attr('data-dependent-id');
164
- if (($currentSelect = $("select[data-dependent-parent='" + name + "'][data-dependent-id='" + select_id + "']")).length > 0) {
165
- return $currentSelect;
166
- }
167
- $newSelect = $('<select class="dependent-sub"/>').attr('data-dependent-parent', name).attr('data-dependent-depth', depth).attr('data-dependent-input-name', $select.attr('data-dependent-input-name')).attr('data-dependent-id', select_id).addClass(options["class"]).append(placeholderOptionAtDepth(depth));
168
- if (options.labels === true) {
169
- $newSelect.attr('data-dependent-labels', $select.attr('data-dependent-labels'));
170
- }
171
- if (options.placeholderSelect === true) {
172
- $newSelect.attr('data-dependent-select-placeholders', $select.attr('data-dependent-select-placeholders'));
173
- }
174
- if (($labels = $("label[data-dependent-id='" + select_id + "'][data-dependent-depth='" + depth + "']")).length > 0) {
175
- $newSelect.insertAfter($labels);
176
- } else {
177
- $newSelect.insertAfter($select);
178
- }
179
- insertLabel($newSelect, $select);
180
- insertPlaceholderSelect($newSelect, $select);
181
- return hideSelect($newSelect);
182
- };
183
- selectChange = function($select) {
184
- var $sub, select_id, val, valName;
185
- $("select[data-dependent-id='" + ($select.attr('data-dependent-id')) + "'][name]").removeAttr('name');
186
- valName = $select.find(':selected').html();
187
- val = $select.val();
188
- select_id = $select.attr('data-dependent-id');
189
- clearAllSelectsByParent($select);
190
- if (($sub = $(".dependent-sub[data-dependent-parent='" + valName + "'][data-dependent-id='" + select_id + "']")).length > 0) {
191
- showSelect($sub);
192
- return $sub.attr('name', $select.attr('data-dependent-input-name'));
193
- } else {
194
- return $select.attr('name', $select.attr('data-dependent-input-name'));
195
- }
196
- };
197
- selectedOption = function($select) {
198
- var $selectedOption, val;
199
- $selectedOption = $select.find('option:selected');
200
- val = $selectedOption.val();
201
- if (!(val === '' || val === placeholderOptionAtDepth($select.attr('data-dependent-depth')).val())) {
202
- return $select.attr('data-dependent-selected-id', val);
203
- }
204
- };
205
- findSelectParent = function($select) {
206
- var $all_options, $selects;
207
- $selects = $("select[data-dependent-id='" + ($select.attr('data-dependent-id')) + "']");
208
- $all_options = $selects.find('option');
209
- return $selects.filter(function() {
210
- var vals;
211
- vals = [];
212
- $(this).find('option').each(function() {
213
- return vals.push($(this).html() === $select.attr('data-dependent-parent'));
214
- });
215
- return $.inArray(true, vals) > -1;
216
- });
217
- };
218
- selectPreSelected = function($select) {
219
- var $all_options, $current_select, $selected_option, $selected_select, $selects, current_option_text, i, selected_id, _i, _ref;
220
- if ((selected_id = $select.attr('data-dependent-selected-id'))) {
221
- $selects = $("select[data-dependent-id='" + ($select.attr('data-dependent-id')) + "']");
222
- $all_options = $selects.find('option');
223
- $selected_option = $all_options.filter("[value='" + selected_id + "']");
224
- $selected_select = $selected_option.closest('select');
225
- $current_select = $selected_select;
226
- current_option_text = $selected_option.html();
227
- for (i = _i = _ref = parseInt($selected_select.attr('data-dependent-depth')); _ref <= 0 ? _i <= 0 : _i >= 0; i = _ref <= 0 ? ++_i : --_i) {
228
- $current_select.find('option').each(function() {
229
- if ($(this).html() === current_option_text) {
230
- return $(this).attr('selected', 'selected');
231
- } else {
232
- return $(this).removeAttr('selected');
233
- }
234
- });
235
- showSelect($current_select);
236
- current_option_text = $current_select.attr('data-dependent-parent');
237
- $current_select = findSelectParent($current_select);
238
- }
239
- return $selected_select.trigger('change');
240
- }
241
- };
242
- prepareSelect = function($select, depth, select_id) {
243
- var $options, name;
244
- $select.attr('data-dependent-depth', depth).attr('data-dependent-id', select_id);
245
- $options = $select.children('option');
246
- $options.each(function() {
247
- var $newOption, $option, $subSelect, name, val;
248
- $option = $(this);
249
- name = splitOptionName($option);
250
- val = $option.val();
251
- if (name.length > 1) {
252
- $subSelect = createNewSelect(name[0], $select, depth + 1);
253
- $newOption = $option.clone();
254
- $newOption.html($.trim(splitOptionName($newOption).slice(1).join(options.separator)));
255
- $subSelect.append($newOption);
256
- $option.val('').html(name[0]).attr('data-dependent-name', name[0]);
257
- if ($options.parent().find("[data-dependent-name='" + name[0] + "']").length > 1) {
258
- $option.remove();
259
- }
260
- return prepareSelect($subSelect, depth + 1, select_id);
261
- }
262
- });
263
- name = $select.attr('name');
264
- selectChange($select);
265
- return $select.off('change').on('change', function() {
266
- return selectChange($select);
267
- });
268
- };
269
- return this.each(function() {
270
- var $select;
271
- $select = $(this);
272
- $select.attr('data-dependent-input-name', $select.attr('name'));
273
- selectedOption($select);
274
- prepareSelect($select, 0, createSelectId());
275
- return selectPreSelected($select);
276
- });
277
- };
278
- })(jQuery);