Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram - Version 1.5

Version Description

Easy optin / subscription form parser and many other enhancements. Required update.

Download this release

Release Info

Developer niravmehta
Plugin Icon 128x128 Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram
Version 1.5
Comparing to
See all releases

Code changes from version 1.4 to 1.5

about-icegram.php CHANGED
@@ -268,7 +268,7 @@ if ( !wp_script_is( 'thickbox' ) ) {
268
  <p><?php _e("You can use custom CSS/JS inline in your message HTML. You can also use your theme's custom JS / CSS feature to add your changes.", "icegram"); ?></p>
269
 
270
  <h4><?php _e("Optin Forms / Mailing service integration...", "icegram"); ?></h4>
271
- <p><?php _e("You can embed any optin / subscription form to your Icegram messages using HTML code. You may even use a shortcode if you are using a WP plugin from your newsletter / lead capture service.", "icegram"); ?></p>
272
 
273
  <h4><?php _e("How many messages should I show on a page?", "icegram"); ?></h4>
274
  <p><?php _e("While Icegram provides you lots of different message types and ability to add multiple messages to a campaign, we discourage you to go overboard. We've observed two messages on a page work well, but YMMV!", "icegram"); ?></p>
268
  <p><?php _e("You can use custom CSS/JS inline in your message HTML. You can also use your theme's custom JS / CSS feature to add your changes.", "icegram"); ?></p>
269
 
270
  <h4><?php _e("Optin Forms / Mailing service integration...", "icegram"); ?></h4>
271
+ <p><?php _e("You can embed any optin / subscription form to your Icegram messages using 'Embed Form' button above text editor. Paste in form HTML code and let Icegram clean it up! You may even use a shortcode if you are using a WP plugin from your newsletter / lead capture service.", "icegram"); ?></p>
272
 
273
  <h4><?php _e("How many messages should I show on a page?", "icegram"); ?></h4>
274
  <p><?php _e("While Icegram provides you lots of different message types and ability to add multiple messages to a campaign, we discourage you to go overboard. We've observed two messages on a page work well, but YMMV!", "icegram"); ?></p>
assets/css/admin.css CHANGED
@@ -85,7 +85,7 @@ th.message_header {
85
  }
86
 
87
  .message-row .seconds-text {
88
- width: 40px;
89
  text-align: center;
90
  }
91
 
@@ -612,4 +612,10 @@ CSS for landing page and Help and Support
612
  padding: 3px 10px;
613
  background-color: #FCF0AD;
614
  border: 1px solid #CCC;
 
 
 
 
 
 
615
  }
85
  }
86
 
87
  .message-row .seconds-text {
88
+ width: 40px !important;
89
  text-align: center;
90
  }
91
 
612
  padding: 3px 10px;
613
  background-color: #FCF0AD;
614
  border: 1px solid #CCC;
615
+ }
616
+
617
+
618
+ #embed_form #popup_container {
619
+ width: 500px;
620
+ height: 560px;
621
  }
assets/css/frontend.css CHANGED
@@ -28,7 +28,7 @@ div.icegram input[type="submit"], div.icegram input[type="button"], div.icegram
28
  @media only screen
29
  and (min-device-width : 320px)
30
  and (max-device-width : 480px) {
31
- .bold .content, .solid .content {
32
  width: 80%;
33
  display: inline-block;;
34
  }
@@ -40,7 +40,7 @@ and (max-device-width : 480px) {
40
  /* Smartphones (landscape) ----------- */
41
  @media only screen
42
  and (min-width : 321px) {
43
- .bold .content, .solid .content {
44
  width: 85%;
45
  display: inline-block;;
46
  }
@@ -52,7 +52,7 @@ and (min-width : 321px) {
52
  /* Smartphones (portrait) ----------- */
53
  @media only screen
54
  and (max-width : 320px) {
55
- .bold .content, .solid .content {
56
  width: 80%;
57
  display: inline-block;;
58
  }
@@ -65,7 +65,7 @@ and (max-width : 320px) {
65
  @media only screen
66
  and (min-device-width : 768px)
67
  and (max-device-width : 1024px) {
68
- .bold .content, .solid .content {
69
  width: 80%;
70
  display: inline-block;;
71
  }
@@ -79,7 +79,7 @@ and (max-device-width : 1024px) {
79
  and (min-device-width : 768px)
80
  and (max-device-width : 1024px)
81
  and (orientation : landscape) {
82
- .bold .content, .solid .content {
83
  width: 80%;
84
  display: inline-block;;
85
  }
@@ -93,7 +93,7 @@ and (orientation : landscape) {
93
  and (min-device-width : 768px)
94
  and (max-device-width : 1024px)
95
  and (orientation : portrait) {
96
- .bold .content, .solid .content {
97
  width: 80%;
98
  display: inline-block;;
99
  }
@@ -105,7 +105,7 @@ and (orientation : portrait) {
105
  /* Desktops and laptops ----------- */
106
  @media only screen
107
  and (min-width : 1224px) {
108
- .bold .content, .solid .content {
109
  width: 95%;
110
  display: inline-block;;
111
  }
@@ -117,7 +117,7 @@ and (min-width : 1224px) {
117
  /* Large screens ----------- */
118
  @media only screen
119
  and (min-width : 1824px) {
120
- .bold .content, .solid .content {
121
  width: 95%;
122
  display: inline-block;;
123
  }
@@ -130,11 +130,139 @@ and (min-width : 1824px) {
130
  @media
131
  only screen and (-webkit-min-device-pixel-ratio : 1.5),
132
  only screen and (min-device-pixel-ratio : 1.5) {
133
- .bold-bar .con, .solid .content {
134
  width: 80%;
135
  display: inline-block;;
136
  }
137
  .canvas.popup_box {
138
  max-width: 90%;
139
  }
140
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  @media only screen
29
  and (min-device-width : 320px)
30
  and (max-device-width : 480px) {
31
+ .bold .ig_container, .solid .ig_container {
32
  width: 80%;
33
  display: inline-block;;
34
  }
40
  /* Smartphones (landscape) ----------- */
41
  @media only screen
42
  and (min-width : 321px) {
43
+ .bold .ig_container, .solid .ig_container {
44
  width: 85%;
45
  display: inline-block;;
46
  }
52
  /* Smartphones (portrait) ----------- */
53
  @media only screen
54
  and (max-width : 320px) {
55
+ .bold .ig_container, .solid .ig_container {
56
  width: 80%;
57
  display: inline-block;;
58
  }
65
  @media only screen
66
  and (min-device-width : 768px)
67
  and (max-device-width : 1024px) {
68
+ .bold .ig_container, .solid .ig_container {
69
  width: 80%;
70
  display: inline-block;;
71
  }
79
  and (min-device-width : 768px)
80
  and (max-device-width : 1024px)
81
  and (orientation : landscape) {
82
+ .bold .ig_container, .solid .ig_container {
83
  width: 80%;
84
  display: inline-block;;
85
  }
93
  and (min-device-width : 768px)
94
  and (max-device-width : 1024px)
95
  and (orientation : portrait) {
96
+ .bold .ig_container, .solid .ig_container {
97
  width: 80%;
98
  display: inline-block;;
99
  }
105
  /* Desktops and laptops ----------- */
106
  @media only screen
107
  and (min-width : 1224px) {
108
+ .bold .ig_container, .solid .ig_container {
109
  width: 95%;
110
  display: inline-block;;
111
  }
117
  /* Large screens ----------- */
118
  @media only screen
119
  and (min-width : 1824px) {
120
+ .bold .ig_container, .solid .ig_container {
121
  width: 95%;
122
  display: inline-block;;
123
  }
130
  @media
131
  only screen and (-webkit-min-device-pixel-ratio : 1.5),
132
  only screen and (min-device-pixel-ratio : 1.5) {
133
+ .bold .ig_container, .solid .ig_container {
134
  width: 80%;
135
  display: inline-block;;
136
  }
137
  .canvas.popup_box {
138
  max-width: 90%;
139
  }
140
+ }
141
+
142
+ /************* Embeded Form CSS - Start************/
143
+ div.icegram .ig_embed_form{
144
+ text-align: left;
145
+ margin-bottom: 1%;
146
+ }
147
+
148
+ .ig_embed_form ul.ig_embed_form_container{
149
+ list-style-type: none !important;
150
+ margin: 0;
151
+ padding: 1%;
152
+ }
153
+
154
+ div.icegram .ig_embed_form.ig_full .ig_embed_form_container{
155
+ width:100%;
156
+ }
157
+ div.icegram .ig_embed_form.ig_half .ig_embed_form_container{
158
+ width:50%;
159
+ }
160
+ div.icegram .ig_embed_form.ig_quarter .ig_embed_form_container{
161
+ width:25%;
162
+ }
163
+ div.icegram .ig_embed_form.ig_auto .ig_embed_form_container{
164
+ width: 25%;
165
+ margin-right: 2%;
166
+ }
167
+
168
+ div.icegram .ig_embed_form.ig_left .ig_embed_form_container{
169
+ float: left;
170
+ }
171
+ div.icegram .ig_embed_form.ig_right .ig_embed_form_container{
172
+ float: right;
173
+ }
174
+ div.icegram .ig_embed_form.ig_center .ig_embed_form_container{
175
+ margin: 0 auto;
176
+ display: block;
177
+ text-align: center;
178
+ }
179
+ div.icegram .ig_embed_form.ig_inline .ig_embed_form_container{
180
+ display: inline-block;
181
+ margin: 0 1%;
182
+ padding: 0 1%;
183
+ vertical-align: bottom;
184
+ }
185
+
186
+ div.icegram .ig_embed_form input{
187
+ margin-top: 0;
188
+ }
189
+ div.icegram .ig_embed_form .ig_embed_form_container {
190
+ font-size: .9em;
191
+ text-align: left !important;
192
+ }
193
+ div.icegram .ig_embed_form.ig_vertical.ig_quarter label,
194
+ div.icegram .ig_embed_form.ig_vertical.ig_quarter textarea,
195
+ div.icegram .ig_embed_form.ig_vertical.ig_quarter select,
196
+ div.icegram .ig_embed_form.ig_vertical.ig_quarter input{
197
+ /*margin: 0;*/
198
+ }
199
+ div.icegram .ig_embed_form.ig_vertical label,
200
+ div.icegram .ig_embed_form.ig_vertical textarea,
201
+ div.icegram .ig_embed_form.ig_vertical select,
202
+ div.icegram .ig_embed_form.ig_vertical input{
203
+ width: 96%;
204
+ margin-right: 4%;
205
+ }
206
+
207
+ div.icegram .ig_embed_form.ig_horizontal li{
208
+ display: inline-block;
209
+ min-width: 24%;
210
+ }
211
+ div.icegram .ig_embed_form.ig_horizontal label,
212
+ div.icegram .ig_embed_form.ig_horizontal textarea,
213
+ div.icegram .ig_embed_form.ig_horizontal select,
214
+ div.icegram .ig_embed_form.ig_horizontal input{
215
+ width: 96%;
216
+ margin-right: 4%;
217
+ }
218
+
219
+ div.icegram .ig_embed_form .ig_form_el_group.ig_form_el_radio input{
220
+ width: auto;
221
+ }
222
+ div.icegram .ig_embed_form.ig_horizontal .ig_form_el_group.ig_form_el_radio label{
223
+
224
+ }
225
+ div.icegram .ig_embed_form .ig_form_el_group.ig_form_el_radio label{
226
+ width: 92%;
227
+ margin-right: 4%;
228
+ font-size: 1em;
229
+ margin-bottom: 0.2em;
230
+ margin-top: 0.2em;
231
+ }
232
+ div.icegram .ig_embed_form select{
233
+ padding: .3em 0;
234
+
235
+ }
236
+ div.icegram .ig_embed_form select,
237
+ div.icegram .ig_embed_form textarea {
238
+ margin: .2em .2em .2em .5em;
239
+ -moz-box-sizing: border-box;
240
+ -webkit-box-sizing: border-box;
241
+ box-sizing: border-box;
242
+ vertical-align: middle !important;
243
+ }
244
+ div.icegram .ig_embed_form .ig_form_el_group textarea{
245
+ height: 4em;
246
+ }
247
+
248
+ div.icegram .ig_embed_form input[type="submit"],
249
+ div.icegram .ig_embed_form input[type="button"]{
250
+ line-height: 1em;
251
+ font-size: 1em;
252
+ margin: .2em .2em .2em .5em!important;
253
+ }
254
+
255
+ div.icegram .ig_embed_form .ig_detected_bot_fields{
256
+ display: none;
257
+ }
258
+
259
+ /************* Embeded Form - End************/
260
+
261
+ div.icegram .ig_clear:after {
262
+ content: ".";
263
+ display: block;
264
+ clear: both;
265
+ visibility: hidden;
266
+ line-height: 0;
267
+ height: 0;
268
+ }
assets/js/admin.js CHANGED
@@ -4,7 +4,7 @@ jQuery(function() {
4
  var message_type = jQuery(this_data).find('.message_type option:selected').val();
5
  var message_theme = jQuery(this_data).find('.message_row.'+message_type).find('.message_theme').val();
6
  var message_thumb = jQuery(this_data).find('#message_theme_'+message_type).find('.'+message_theme).attr('style');
7
-
8
  jQuery(this_data).find('.message_row, .location').hide();
9
  jQuery(this_data).find('.' + message_type).show();
10
  jQuery(this_data).find('.message_row.'+message_type).find('.message_theme').next().find('.chosen-single span').attr('style',message_thumb);
@@ -25,6 +25,7 @@ jQuery(function() {
25
  }
26
  }
27
 
 
28
  // Type box
29
  jQuery('#campaign_data').find('h3.hndle').hide();
30
  jQuery('.target_rules_desc').appendTo( '#campaign_target_rules h3.hndle span' );
@@ -121,6 +122,128 @@ jQuery(function() {
121
  });
122
  return terms;
123
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
 
125
  var message_rows = jQuery('.message-row').length;
126
  jQuery('.ajax_chosen_select_messages').chosen().on('change', function() {
@@ -206,10 +329,12 @@ jQuery(function() {
206
  disable_search_threshold: 10
207
  });
208
 
209
- jQuery('input#users_logged_in, input#users_all').on('change', function() {
210
- jQuery('select#users_roles').parent('p').slideToggle();
211
  if (jQuery(this).val() == 'logged_in') {
 
212
  jQuery('#users_roles_chosen').find('input').trigger('click');
 
 
213
  }
214
  });
215
 
4
  var message_type = jQuery(this_data).find('.message_type option:selected').val();
5
  var message_theme = jQuery(this_data).find('.message_row.'+message_type).find('.message_theme').val();
6
  var message_thumb = jQuery(this_data).find('#message_theme_'+message_type).find('.'+message_theme).attr('style');
7
+ jQuery(this_data).find('#embed_form_but').hide();
8
  jQuery(this_data).find('.message_row, .location').hide();
9
  jQuery(this_data).find('.' + message_type).show();
10
  jQuery(this_data).find('.message_row.'+message_type).find('.message_theme').next().find('.chosen-single span').attr('style',message_thumb);
25
  }
26
  }
27
 
28
+
29
  // Type box
30
  jQuery('#campaign_data').find('h3.hndle').hide();
31
  jQuery('.target_rules_desc').appendTo( '#campaign_target_rules h3.hndle span' );
122
  });
123
  return terms;
124
  });
125
+
126
+ jQuery('.parse_form').live('click', function(event) {
127
+ var that = this;
128
+ var parent_node = jQuery(that).parent().parent();
129
+ var form_layout = jQuery(parent_node).find('.embed_form_layouts input[type=radio]:checked').val();
130
+ var form_width = jQuery(parent_node).find('#embed_form_width option:selected').val();
131
+ var form_position = jQuery(parent_node).find('#embed_form_positions option:selected').val();
132
+ // var form_container = jQuery('<div class="ig_embed_form_container"></div>').addClass(form_layout);
133
+ var form_container = jQuery('<ul class="ig_embed_form_container"></ul>').addClass('ig_clear');
134
+ var has_label = (jQuery(parent_node).find('.has_label_check input[type=checkbox]:checked').length > 0) ? true : false;
135
+ var form_text = jQuery(parent_node).find('textarea#form_data').val().trim();
136
+
137
+ var form_tags = jQuery('<div/>')
138
+ .html(form_text)
139
+ .find('input, label, select, textarea, button')
140
+ .not('br'); // Get only these tags from the form
141
+
142
+ if(jQuery(parent_node).find('.use_cta_check input[type=checkbox]:checked').length > 0){
143
+ form_tags = form_tags.not('input[type=submit]');
144
+ form_tags = form_tags.not('button[type=submit]');
145
+ }
146
+ var form_html = '';
147
+ var form_object = jQuery('<div/>')
148
+ .html(form_text)
149
+ .find('form')
150
+ .removeAttr('class')
151
+ .addClass('ig_embed_form')
152
+ .addClass(form_layout)
153
+ .addClass(form_layout)
154
+ .addClass(form_width)
155
+ .addClass(form_position)
156
+ .addClass('ig_clear')
157
+ .empty();
158
+ var label_text = null;
159
+ var el_count = 0;
160
+ jQuery.each(form_tags, function(i, form_el){
161
+ var el_obj = jQuery(form_el);
162
+ var el_group = jQuery('<li class="ig_form_el_group"></li>');
163
+ el_obj.removeAttr('class');
164
+ if(el_obj.attr('tabindex') == -1){
165
+ // el_obj.css('display', 'none');
166
+ el_obj.addClass('ig_detected_bot_fields');
167
+ el_count--;
168
+ }
169
+ if(el_obj.is('label')){
170
+ label_text = el_obj.not('input, select, textarea, button, br').text().trim();
171
+ }else if((el_obj.is('input') || el_obj.is('button') || el_obj.is('textarea')) && !el_obj.is('input[type=radio]') ) {
172
+ el_obj.removeAttr('id');
173
+ if(has_label){
174
+ el_obj.removeAttr('placeholder');
175
+ if(label_text){
176
+ jQuery('<label>' + label_text + '</label>').appendTo(el_group);
177
+ label_text = null;
178
+ }
179
+ }else {
180
+ if(label_text){
181
+ el_obj.attr('placeholder', label_text);
182
+ label_text = null;
183
+ }
184
+ }
185
+ el_group.append(el_obj);
186
+ if(el_obj.is('textarea')){
187
+ el_group.append(el_obj).addClass('ig_form_el_textarea');
188
+ }else{
189
+ el_group.append(el_obj).addClass('ig_form_el_input');
190
+ }
191
+ form_container.append(el_group);
192
+ el_count++;
193
+ }else if(el_obj.is('select')) {
194
+ if(label_text){
195
+ if(has_label){
196
+ jQuery('<label>' + label_text + '</label>').appendTo(el_group);
197
+ }else{
198
+ jQuery('<option>' + label_text + '</option>').prependTo(el_obj);
199
+ }
200
+ label_text = null;
201
+ }
202
+ el_group.append(el_obj).addClass('ig_form_el_select');
203
+ form_container.append(el_group);
204
+ el_count++;
205
+ }else if(el_obj.is('input[type=radio]') ) {
206
+ if(label_text){
207
+ jQuery('<label>' + label_text + '</label>').prepend(el_obj).appendTo(el_group);
208
+ label_text = null;
209
+ }
210
+ el_group.addClass('ig_form_el_radio');
211
+ form_container.append(el_group);
212
+ el_count++;
213
+ }
214
+ });
215
+ if(form_layout == 'ig_horizontal'){
216
+ var max_el = (form_width == 'ig_full') ? 4 : ((form_width == 'ig_half') ? 2 : 1);
217
+ el_count = (el_count > max_el ) ? max_el : el_count;
218
+ var li_width = (100 - el_count) / el_count;
219
+ form_container
220
+ .find('input, select, textarea')
221
+ .not('input[type=submit]')
222
+ .not('input[type=radio]')
223
+ .parent()
224
+ .css('width', li_width + '%' );
225
+ form_container
226
+ .find('input[type=radio]')
227
+ .parent()
228
+ .parent()
229
+ .css('width', li_width + '%' );
230
+ }
231
+ form_container.find('.ig_detected_bot_fields').parent().css('display', 'none');
232
+ form_object.append(form_container);
233
+ tb_remove();
234
+ window.send_to_editor(jQuery('<div/>').append(form_object).html());
235
+ // reset all fields of Embed form setting
236
+ // jQuery(document).find('form#embed_form').get(0).reset();
237
+ jQuery(parent_node).find('textarea#form_data').val('');
238
+ jQuery(parent_node).find('.embed_form_layouts input[type=radio]:first').attr('checked', 'checked');
239
+ jQuery(parent_node).find('.use_cta_check input[type=checkbox]').attr('checked', 'checked');
240
+ jQuery(parent_node).find('.has_label_check input[type=checkbox]').attr('checked', 'checked');
241
+ // jQuery(parent_node).find('#embed_form_width option:first').attr('selected', 'selected')
242
+ // jQuery(parent_node).find('#embed_form_positions option:first').attr('selected', 'selected')
243
+
244
+ return false;
245
+ });
246
+
247
 
248
  var message_rows = jQuery('.message-row').length;
249
  jQuery('.ajax_chosen_select_messages').chosen().on('change', function() {
329
  disable_search_threshold: 10
330
  });
331
 
332
+ jQuery('input#users_logged_in, input#users_all ,input#users_not_logged_in').on('change', function() {
 
333
  if (jQuery(this).val() == 'logged_in') {
334
+ jQuery('select#users_roles').parent('p').show();
335
  jQuery('#users_roles_chosen').find('input').trigger('click');
336
+ }else{
337
+ jQuery('select#users_roles').parent('p').hide();
338
  }
339
  });
340
 
assets/js/icegram.js CHANGED
@@ -182,7 +182,6 @@
182
  jQuery(this.root_container).append(html);
183
  this.dom_id = 'icegram_message_'+this.data.id;
184
  this.el = jQuery('#'+this.dom_id);
185
-
186
  this.set_position();
187
 
188
  var pb = window.icegram.get_powered_by( this.type );
@@ -199,6 +198,30 @@
199
  }
200
  if(this.data.message == undefined || this.data.message == '') {
201
  this.el.find('.ig_message').hide();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  }
203
  if(this.data.label == undefined || this.data.label == '') {
204
  this.el.find('.ig_button').hide();
@@ -220,6 +243,8 @@
220
  }else if (this.data.bg_color != undefined && this.data.bg_color != '') {
221
  var hsl_color = window.icegram.get_complementary_color(this.data.bg_color);
222
  this.el.find('.ig_button').css('background-color', "hsl(" + hsl_color.h + "," + hsl_color.s + "%," + hsl_color.l + "%)" );
 
 
223
  }
224
  // Hint clickability for buttons / ctas
225
  if (typeof(this.data.link) === 'string' && this.data.link != '') {
@@ -311,7 +336,7 @@
311
  Icegram_Message_Type.prototype.track = function ( e, params ) {
312
  if (typeof( window.icegram.track ) === 'function' ) {
313
  params = params || {};
314
- jQuery.extend( params, {message_id: this.data.id, campaign_id: this.data.campaign_id } );
315
  window.icegram.track( e, params);
316
  }
317
  };
@@ -337,11 +362,11 @@
337
  e.data.self.hide();
338
  return;
339
  }
 
340
  // Clicking on ig_button or any other link with a class ig_cta will trigger cta click
341
- if(jQuery(e.target).filter('.ig_button, .ig_cta').length || jQuery(e.target).parents('.ig_button, .ig_cta').length){
342
  e.data.self.on_cta_click( e );
343
  }
344
-
345
  };
346
  Icegram_Message_Type.prototype.on_resize = function ( e ) {
347
 
@@ -350,15 +375,14 @@
350
  Icegram_Message_Type.prototype.on_cta_click = function ( e ) {
351
  e.data = e.data || { self: this };
352
  e.data.self.track( 'clicked' );
353
- typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '' ? window.location.href = e.data.self.data.link : e.data.self.hide();
354
- };
355
-
356
- Icegram_Message_Type.prototype.on_cta_click_no_hide = function ( e ) {
357
- e.data = e.data || { self: this };
358
- e.data.self.track( 'clicked' );
359
- if (typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '') {
360
- window.location.href = e.data.self.data.link;
361
- }
362
  };
363
 
364
 
182
  jQuery(this.root_container).append(html);
183
  this.dom_id = 'icegram_message_'+this.data.id;
184
  this.el = jQuery('#'+this.dom_id);
 
185
  this.set_position();
186
 
187
  var pb = window.icegram.get_powered_by( this.type );
198
  }
199
  if(this.data.message == undefined || this.data.message == '') {
200
  this.el.find('.ig_message').hide();
201
+ }else{
202
+ var form_el = this.el.find('.ig_embed_form').get(0);
203
+ if(form_el){
204
+ var form_content = jQuery(form_el).html();
205
+ form_el = jQuery(form_el).empty();
206
+ jQuery(form_el).replaceWith(form_content);
207
+ if(this.data.type == 'messenger'){
208
+ this.el.find('.ig_message_body').html(form_el.append(this.el.find('.ig_message_body').html()));
209
+ }else{
210
+ this.el.find('.ig_message').html(form_el.append(this.el.find('.ig_message').html()));
211
+ }
212
+ var prev_tag = this.el.find('.ig_embed_form_container').prev();
213
+ var next_tag = this.el.find('.ig_embed_form_container').next();
214
+ // var allowed_tags = ['P', 'DIV', 'SPAN']; // dont need this, no working !
215
+ // if(form_el.hasClass('ig_inline') && prev_tag.get(0) && jQuery.inArray(prev_tag.get(0).tagName, allowed_tags) != -1){
216
+ if(form_el.hasClass('ig_inline') && prev_tag.get(0)){
217
+ this.el.find('.ig_embed_form_container')
218
+ .appendTo(prev_tag);
219
+ if(next_tag.get(0) && next_tag.get(0).tagName == prev_tag.get(0).tagName){
220
+ prev_tag.append(next_tag.html());
221
+ next_tag.remove();
222
+ }
223
+ }
224
+ }
225
  }
226
  if(this.data.label == undefined || this.data.label == '') {
227
  this.el.find('.ig_button').hide();
243
  }else if (this.data.bg_color != undefined && this.data.bg_color != '') {
244
  var hsl_color = window.icegram.get_complementary_color(this.data.bg_color);
245
  this.el.find('.ig_button').css('background-color', "hsl(" + hsl_color.h + "," + hsl_color.s + "%," + hsl_color.l + "%)" );
246
+ this.el.find('.ig_embed_form input[type="submit"]').css('background', "hsl(" + hsl_color.h + "," + hsl_color.s + "%," + hsl_color.l + "%)" );
247
+
248
  }
249
  // Hint clickability for buttons / ctas
250
  if (typeof(this.data.link) === 'string' && this.data.link != '') {
336
  Icegram_Message_Type.prototype.track = function ( e, params ) {
337
  if (typeof( window.icegram.track ) === 'function' ) {
338
  params = params || {};
339
+ jQuery.extend( params, {message_id: this.data.id, campaign_id: this.data.campaign_id ,expiry_time:this.data.expiry_time} );
340
  window.icegram.track( e, params);
341
  }
342
  };
362
  e.data.self.hide();
363
  return;
364
  }
365
+ var form = jQuery(e.target).closest('.icegram').find('form').first();
366
  // Clicking on ig_button or any other link with a class ig_cta will trigger cta click
367
+ if(jQuery(e.target).filter('.ig_button, .ig_cta ,:submit').length || jQuery(e.target).parents('.ig_button, .ig_cta ').length && !(form.find('ig_button').length > 0 || form.find('input[type=button]').length > 0 || form.find('input[type=submit]').length > 0 )){
368
  e.data.self.on_cta_click( e );
369
  }
 
370
  };
371
  Icegram_Message_Type.prototype.on_resize = function ( e ) {
372
 
375
  Icegram_Message_Type.prototype.on_cta_click = function ( e ) {
376
  e.data = e.data || { self: this };
377
  e.data.self.track( 'clicked' );
378
+ if(jQuery(e.target).closest('.icegram').find('form').length ){
379
+ var form = jQuery(e.target).closest('.icegram').find('form').first();
380
+ jQuery(form).submit();
381
+ }else if (typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '') {
382
+ window.location.href = e.data.self.data.link;
383
+ }else if(e.data.self.data.hide !== false){
384
+ e.data.self.hide()
385
+ }
 
386
  };
387
 
388
 
classes/class-icegram-campaign-admin.php CHANGED
@@ -40,8 +40,7 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
40
  // Display list of messages of campaign
41
  function campaign_data_content() {
42
  global $post, $icegram;
43
-
44
- $ig_message_admin = new Icegram_Message_Admin();
45
 
46
  $campaign_box = '<select id="icegram_messages" name="icegram_messages[]" class="ajax_chosen_select_messages" data-placeholder="' . __( 'Search to add / Create new&hellip;', 'icegram' ) . '">';
47
  $campaign_box .= '<option value=""></option>';
@@ -252,9 +251,10 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
252
  <?php _e( 'Logged in users only', 'icegram' ); ?>
253
  </label>
254
  </p>
 
255
  <div class="user_roles">
256
  <?php
257
- if ( !empty( $campaign_target_rules['logged_in'] ) && $campaign_target_rules['logged_in'] == 'all' ) {
258
  $campaign_logged_in_user_style = 'style="display: none;"';
259
  } else {
260
  $campaign_logged_in_user_style = 'style="display: block;"';
@@ -279,13 +279,37 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
279
  }
280
  ?>
281
  </div>
 
 
 
 
 
 
 
282
  </div>
 
 
 
 
 
 
 
 
 
283
  <div class="options_group" id="campaign_target_rules_retrageting">
284
  <p class="form-field">
285
  <label class="options_header"><?php _e( 'Retargeting', 'icegram' ); ?></label>
286
  <label for="retargeting">
287
  <input type="checkbox" name="campaign_target_rules[retargeting]" id="retargeting" value="yes" <?php ( !empty( $campaign_target_rules['retargeting'] ) ) ? checked( $campaign_target_rules['retargeting'], 'yes' ) : ''; ?> />
288
- <?php _e( 'Once shown, do NOT show a message again for current session', 'icegram' ); ?>
 
 
 
 
 
 
 
 
289
  </label>
290
  </p>
291
  </div>
@@ -370,7 +394,8 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
370
  // Return html for message row in json encoded format
371
  function get_message_action_row() {
372
 
373
- $ig_message_admin = new Icegram_Message_Admin();
 
374
 
375
  if ( empty( $_POST['message_id'] ) || !is_numeric( $_POST['message_id'] ) ) {
376
 
@@ -418,7 +443,7 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
418
  </td>
419
  </tr>
420
  <?php
421
-
422
  echo json_encode( array( 'id' => $message_id, 'main' => ob_get_clean() ) );
423
  die();
424
 
40
  // Display list of messages of campaign
41
  function campaign_data_content() {
42
  global $post, $icegram;
43
+ $ig_message_admin = Icegram_Message_Admin::getInstance();
 
44
 
45
  $campaign_box = '<select id="icegram_messages" name="icegram_messages[]" class="ajax_chosen_select_messages" data-placeholder="' . __( 'Search to add / Create new&hellip;', 'icegram' ) . '">';
46
  $campaign_box .= '<option value=""></option>';
251
  <?php _e( 'Logged in users only', 'icegram' ); ?>
252
  </label>
253
  </p>
254
+
255
  <div class="user_roles">
256
  <?php
257
+ if ( !empty( $campaign_target_rules['logged_in'] ) && ($campaign_target_rules['logged_in'] == 'all' || $campaign_target_rules['logged_in'] == 'not_logged_in') ) {
258
  $campaign_logged_in_user_style = 'style="display: none;"';
259
  } else {
260
  $campaign_logged_in_user_style = 'style="display: block;"';
279
  }
280
  ?>
281
  </div>
282
+ <p class="form-field">
283
+ <label class="options_header">&nbsp;</label>
284
+ <label for="users_not_logged_in">
285
+ <input type="radio" name="campaign_target_rules[logged_in]" id="users_not_logged_in" value="not_logged_in" <?php ( !empty( $campaign_target_rules['logged_in'] ) ) ? checked( $campaign_target_rules['logged_in'], 'not_logged_in' ) : ''; ?> />
286
+ <?php _e( 'Not Logged in users', 'icegram' ); ?>
287
+ </label>
288
+ </p>
289
  </div>
290
+ <?php $expiry_options = array( 'current_session' => __('Current Session' ,'icegram'),
291
+ 'today' => __('Today' ,'icegram'),
292
+ '+1 week' => __('One week' ,'icegram') ,
293
+ '+2 week' => __('Two week' ,'icegram'),
294
+ '+1 month' => __('One Month ' ,'icegram'),
295
+ '+3 months' => __('Three Months ' ,'icegram') ,
296
+ '+1 year' => __('One year' ,'icegram') ,
297
+ '+2 years' => __('Two Years' ,'icegram'));
298
+ ?>
299
  <div class="options_group" id="campaign_target_rules_retrageting">
300
  <p class="form-field">
301
  <label class="options_header"><?php _e( 'Retargeting', 'icegram' ); ?></label>
302
  <label for="retargeting">
303
  <input type="checkbox" name="campaign_target_rules[retargeting]" id="retargeting" value="yes" <?php ( !empty( $campaign_target_rules['retargeting'] ) ) ? checked( $campaign_target_rules['retargeting'], 'yes' ) : ''; ?> />
304
+ <?php _e( 'Once shown, do NOT show a message again for', 'icegram' ); ?>
305
+ <select name="campaign_target_rules[expiry_time]">
306
+ <?php foreach($expiry_options as $key => $option){
307
+ ?>
308
+ <option value="<?php echo $key; ?>" <?php selected( $campaign_target_rules['expiry_time'], $key ); ?>><?php echo $option; ?></option>
309
+ <?php
310
+ }
311
+ ?>
312
+ </select>
313
  </label>
314
  </p>
315
  </div>
394
  // Return html for message row in json encoded format
395
  function get_message_action_row() {
396
 
397
+ $ig_message_admin = Icegram_Message_Admin::getInstance();
398
+ $ig_message_admin->is_icegram_editor = true;
399
 
400
  if ( empty( $_POST['message_id'] ) || !is_numeric( $_POST['message_id'] ) ) {
401
 
443
  </td>
444
  </tr>
445
  <?php
446
+
447
  echo json_encode( array( 'id' => $message_id, 'main' => ob_get_clean() ) );
448
  die();
449
 
classes/class-icegram-campaign.php CHANGED
@@ -37,9 +37,10 @@ if ( !class_exists( 'Icegram_Campaign' ) ) {
37
  'tablet' => ( !empty( $this->rules['tablet'] ) ) ? $this->rules['tablet'] : '',
38
  'laptop' => ( !empty( $this->rules['laptop'] ) ) ? $this->rules['laptop'] : ''
39
  );
40
- $this->rules_summary['users'] = ( !empty( $this->rules['logged_in'] ) && $this->rules['logged_in'] == 'logged_in' ) ? ( ( !empty( $this->rules['users'] ) ) ? $this->rules['users'] : array( 'none' ) ) : array( 'all' );
41
 
42
- $this->rules_summary['retargeting'] = array( 'retargeting' => ( !empty( $this->rules['retargeting'] ) ) ? $this->rules['retargeting'] : '' );
 
43
 
44
  }
45
 
@@ -73,7 +74,10 @@ if ( !class_exists( 'Icegram_Campaign' ) ) {
73
  if( !$campaign_valid ) {
74
  return $campaign_valid;
75
  }
76
- if ( in_array( 'all', $campaign->rules_summary['users'], true ) ) {
 
 
 
77
  return true;
78
  } elseif ( is_user_logged_in() && !in_array( 'none', $campaign->rules_summary['users'], true ) ) {
79
  $current_user = wp_get_current_user();
37
  'tablet' => ( !empty( $this->rules['tablet'] ) ) ? $this->rules['tablet'] : '',
38
  'laptop' => ( !empty( $this->rules['laptop'] ) ) ? $this->rules['laptop'] : ''
39
  );
40
+ $this->rules_summary['users'] = ( !empty( $this->rules['logged_in'] ) && $this->rules['logged_in'] == 'logged_in' ) ? ( ( !empty( $this->rules['users'] ) ) ? $this->rules['users'] : array( 'none' ) ) : array($this->rules['logged_in']);
41
 
42
+ $this->rules_summary['retargeting'] = array( 'retargeting' => ( !empty( $this->rules['retargeting'] ) ) ? $this->rules['retargeting'] : '' ,
43
+ 'expiry_time' => ( !empty( $this->rules['retargeting']) ) ? $this->rules['expiry_time'] : '' );
44
 
45
  }
46
 
74
  if( !$campaign_valid ) {
75
  return $campaign_valid;
76
  }
77
+ if(in_array( 'not_logged_in', $campaign->rules_summary['users'], true ) && !is_user_logged_in() ){
78
+ return true;
79
+ }
80
+ elseif ( in_array( 'all', $campaign->rules_summary['users'], true ) ) {
81
  return true;
82
  } elseif ( is_user_logged_in() && !in_array( 'none', $campaign->rules_summary['users'], true ) ) {
83
  $current_user = wp_get_current_user();
classes/class-icegram-message-admin.php CHANGED
@@ -8,8 +8,9 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
8
  class Icegram_Message_Admin {
9
 
10
  var $message_themes;
 
11
 
12
- function __construct() {
13
 
14
  add_action( 'add_meta_boxes', array( &$this, 'add_message_meta_boxes' ) );
15
  add_action( 'wp_ajax_get_message_setting', array( &$this , 'message_form_fields' ) );
@@ -20,8 +21,78 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
20
  add_filter( 'manage_edit-ig_message_columns', array( $this, 'edit_columns' ) );
21
  add_action( 'manage_ig_message_posts_custom_column', array( $this, 'custom_columns' ), 2 );
22
  add_filter( 'icegram_available_headlines', array( &$this, 'available_headlines' ) );
 
 
23
 
24
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  // Initialize message metabox
27
  function add_message_meta_boxes() {
@@ -32,6 +103,7 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
32
  <style type="text/css">
33
  <?php
34
  foreach ( $icegram->message_types as $message_type => $message ) {
 
35
  if( !empty( $message['admin_style'] ) ) {
36
  $label_bg_color = $message['admin_style']['label_bg_color'];
37
  $theme_header_height = $message['admin_style']['theme_header_height'];
@@ -53,6 +125,7 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
53
  height: {$thumbnail_height} !important;
54
  }";
55
  }
 
56
  }
57
  ?>
58
  </style>
@@ -72,7 +145,7 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
72
  $message_headlines = $icegram->available_headlines;
73
  $settings = $this->message_settings_to_show();
74
  $positions = $this->message_positions_to_show();
75
-
76
  if ( $pagenow == 'post-new.php' ) {
77
  $message_title_key = array_rand( $message_headlines );
78
  $default_message_title = $message_headlines[$message_title_key];
@@ -157,13 +230,20 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
157
  </label>
158
  <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][label]" id="message_label" value="<?php if( isset( $message_data['label'] ) ) echo esc_attr( $message_data['label'] ); ?>" />
159
  </p>
160
- <p class="message_row <?php echo implode( ' ', $settings['link'] )?>">
161
- <label for="message_link" class="message_label">
162
- <strong><?php _e( 'Target Link', 'icegram' ); ?></strong>
163
- <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Enter destination URL here. Clicking will redirect to this link.', 'icegram' ); ?>"></span>
164
- </label>
165
- <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][link]" id="message_link" value="<?php if( isset( $message_data['link'] ) ) echo esc_attr( $message_data['link'] ); ?>" />
166
- </p>
 
 
 
 
 
 
 
167
  <p class="message_row <?php echo implode( ' ', $settings['icon'] )?>">
168
  <label for="upload_image" class="message_label">
169
  <strong><?php _e( 'Icon / Avatar Image', 'icegram' ); ?></strong>
8
  class Icegram_Message_Admin {
9
 
10
  var $message_themes;
11
+ var $is_icegram_editor;
12
 
13
+ private function __construct() {
14
 
15
  add_action( 'add_meta_boxes', array( &$this, 'add_message_meta_boxes' ) );
16
  add_action( 'wp_ajax_get_message_setting', array( &$this , 'message_form_fields' ) );
21
  add_filter( 'manage_edit-ig_message_columns', array( $this, 'edit_columns' ) );
22
  add_action( 'manage_ig_message_posts_custom_column', array( $this, 'custom_columns' ), 2 );
23
  add_filter( 'icegram_available_headlines', array( &$this, 'available_headlines' ) );
24
+ add_action( 'media_buttons', array(&$this, 'embed_form_button'), 11, 1);
25
+ add_action( 'admin_footer', array(&$this, 'embed_form_popup_content') );
26
 
27
  }
28
+ public static function getInstance(){
29
+ static $ig_message_admin = null;
30
+ if (null === $ig_message_admin) {
31
+ $ig_message_admin = new Icegram_Message_Admin();
32
+ }
33
+ return $ig_message_admin;
34
+ }
35
+
36
+ function embed_form_button($editor_id ){
37
+ global $icegram , $post;
38
+ if( !$this->is_icegram_editor && empty($_POST['message_id']) && !in_array($post->post_type , array('ig_message' , 'ig_campaign') ) ){
39
+ echo "";
40
+ }else{
41
+ foreach ( $icegram->message_types as $type => $value ) {
42
+ if(!empty($value['settings']['embed_form'])){
43
+ $message_types[] = $type;
44
+ }
45
+ }
46
+ echo $out = '<a href="#TB_inline?width=500&height=560&inlineId=popup_container" data-editor="'.$editor_id.'" class="'.implode( ' ', $message_types).' thickbox button" id="embed_form_but" title="'.__('Add an optin / subscription form' , 'icegram' ).'">'.__('Embed Form' , 'icegram' ).'</a>';
47
+ }
48
+ }
49
+
50
+ function embed_form_popup_content(){
51
+ ?>
52
+ <form id="embed_form">
53
+ <div id="popup_container" style="display:none;">
54
+ <!-- <h3 ><?php _e('Add an optin / subscription form', 'icegram' ); ?></h3> -->
55
+ <p>
56
+ <textarea rows="10" autocomplete="off" cols="65" name="form_data" id="form_data" value="" placeholder="<?php _e('Paste HTML code of your form here...', 'icegram' ); ?>"></textarea>
57
+ </p>
58
+ <p class="use_cta_check">
59
+ <label><input type="checkbox" name="use_cta_to_submit" value="" checked> <?php _e('Use message\'s Call to Action button to submit this form' , 'icegram' ); ?></label>
60
+ </p>
61
+ <p class="embed_form_layouts">
62
+ <label class="message_label"><strong><?php _e('Form Layout', 'icegram' ); ?></strong></label>
63
+ <label><input type="radio" name="embed_form_layout" value="ig_horizontal" checked="checked" /> <?php _e('Horizontal', 'icegram' ); ?> </label>
64
+ <label><input type="radio" name="embed_form_layout" value="ig_vertical"/> <?php _e('Vertical', 'icegram' ); ?> </label>
65
+ </p>
66
+ <p>
67
+ <label class="message_label"><strong><?php _e('Width', 'icegram' ); ?></strong></label>
68
+ <select id="embed_form_width" name="embed_form_width" class="icegram_chosen_page">
69
+ <option value="ig_full" selected="selected"><?php _e('Full', 'icegram' ); ?></option>
70
+ <option value="ig_half"><?php _e('Half', 'icegram' ); ?></option>
71
+ <option value="ig_quarter"><?php _e('Quarter', 'icegram' ); ?></option>
72
+ <!-- <option value="ig_auto" selected="selected"><?php _e('Auto', 'icegram' ); ?></option> -->
73
+ </select>
74
+ </p>
75
+ <p>
76
+ <label class="message_label"><strong><?php _e('Position', 'icegram' ); ?></strong></label>
77
+ <select id="embed_form_positions" name="embed_form_positions" class="icegram_chosen_page">
78
+ <option value="ig_left" selected="selected"><?php _e('Left', 'icegram' ); ?></option>
79
+ <option value="ig_right"><?php _e('Right', 'icegram' ); ?></option>
80
+ <option value="ig_center"><?php _e('Center', 'icegram' ); ?></option>
81
+ <option value="ig_inline"><?php _e('Inline', 'icegram' ); ?></option>
82
+ </select>
83
+ </p>
84
+ <p class="has_label_check">
85
+ <label class="message_label"><strong><?php _e('Keep Labels' , 'icegram' ); ?> </strong></label>
86
+ <label><input type="checkbox" name="has_label" value="" checked> <?php _e('Show them above the field.' , 'icegram' ); ?></label>
87
+ </p>
88
+ <div style="padding:15px;">
89
+ <input type="button" name="submit" class="parse_form button-primary" value="Insert Form"/>&nbsp;&nbsp;&nbsp;
90
+ <a class="button" style="color:#bbb;" class="cancel_parse_form" href="#" onclick="tb_remove(); return false;"><?php _e('Cancel', 'icegram' ); ?></a>
91
+ </div>
92
+ </div>
93
+ </form>
94
+ <?php
95
+ }
96
 
97
  // Initialize message metabox
98
  function add_message_meta_boxes() {
103
  <style type="text/css">
104
  <?php
105
  foreach ( $icegram->message_types as $message_type => $message ) {
106
+
107
  if( !empty( $message['admin_style'] ) ) {
108
  $label_bg_color = $message['admin_style']['label_bg_color'];
109
  $theme_header_height = $message['admin_style']['theme_header_height'];
125
  height: {$thumbnail_height} !important;
126
  }";
127
  }
128
+
129
  }
130
  ?>
131
  </style>
145
  $message_headlines = $icegram->available_headlines;
146
  $settings = $this->message_settings_to_show();
147
  $positions = $this->message_positions_to_show();
148
+
149
  if ( $pagenow == 'post-new.php' ) {
150
  $message_title_key = array_rand( $message_headlines );
151
  $default_message_title = $message_headlines[$message_title_key];
230
  </label>
231
  <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][label]" id="message_label" value="<?php if( isset( $message_data['label'] ) ) echo esc_attr( $message_data['label'] ); ?>" />
232
  </p>
233
+ <?php
234
+ $target_link_field = '<p class="message_row '.implode( ' ', $settings['link'] ).'">
235
+ <label for="message_link" class="message_label">
236
+ <strong>'.__('Target Link' ,'icegram').'</strong>
237
+ <span class="help_tip admin_field_icon" data-tip='.__("Enter destination URL here. Clicking will redirect to this link." ,'icegram').'></span>
238
+ </label>
239
+ <input type="text" class="message_field" name="message_data['.$message_id.'][link]" id="message_link" value="'.esc_attr( $message_data['link'] ) .'" />
240
+ </p>';
241
+
242
+ $icegram_message_target_link = apply_filters('icegram_message_field_link' , array( 'html' => $target_link_field ,'message_id' => $message_id ,'message_data' => $message_data) );
243
+ echo $icegram_message_target_link['html'];
244
+ ?>
245
+
246
+
247
  <p class="message_row <?php echo implode( ' ', $settings['icon'] )?>">
248
  <label for="upload_image" class="message_label">
249
  <strong><?php _e( 'Icon / Avatar Image', 'icegram' ); ?></strong>
classes/class-icegram-message-type.php CHANGED
@@ -96,7 +96,8 @@ abstract class Icegram_Message_Type {
96
  'icon' => array( 'type' => 'text' ),
97
  'bg_color' => array( 'type' => 'color' ),
98
  'text_color' => array( 'type' => 'color' ),
99
- 'position' => array( 'type' => 'position' )
 
100
  );
101
 
102
  }
96
  'icon' => array( 'type' => 'text' ),
97
  'bg_color' => array( 'type' => 'color' ),
98
  'text_color' => array( 'type' => 'color' ),
99
+ 'position' => array( 'type' => 'position' ),
100
+ 'embed_form' => array( 'type' => 'form' )
101
  );
102
 
103
  }
icegram.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Icegram
4
  * Plugin URI: http://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
- * Version: 1.4
7
  * Author: Icegram
8
  * Author URI: http://www.icegram.com/
9
  *
@@ -33,7 +33,7 @@ class Icegram {
33
 
34
  function __construct() {
35
 
36
- $this->version = "1.4";
37
  $this->shortcode_instances = array();
38
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
39
  $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
@@ -41,7 +41,7 @@ class Icegram {
41
 
42
  if( is_admin() && current_user_can( 'manage_options' ) ) {
43
  new Icegram_Campaign_Admin();
44
- new Icegram_Message_Admin();
45
  add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_admin_styles_and_scripts' ) );
46
  add_action( 'admin_print_styles', array( &$this, 'remove_preview_button' ) );
47
  add_filter( 'post_row_actions', array( &$this , 'remove_row_actions' ), 10, 2 );
@@ -261,16 +261,23 @@ class Icegram {
261
  }
262
 
263
  public function icegram_event_track() {
264
-
265
  if( !empty( $_POST['event_data'] ) ) {
266
 
267
- $messages_shown = (array) explode(",", html_entity_decode( (!empty($_COOKIE['icegram_messages_shown']) ? stripslashes( $_COOKIE['icegram_messages_shown'] ) : '') ) );
268
-
269
  foreach ( $_POST['event_data'] as $event ) {
270
  switch ($event['type']) {
271
  case 'shown':
272
  if (is_array($event['params']) && !empty($event['params']['message_id'])) {
273
  $messages_shown[] = $event['params']['message_id'];
 
 
 
 
 
 
 
 
 
 
274
  }
275
  break;
276
 
@@ -283,8 +290,6 @@ class Icegram {
283
  do_action('icegram_event_track_'.$event['type'], $event['params']);
284
  }
285
  }
286
- $messages_shown = array_values ( array_filter ( array_unique($messages_shown) ) );
287
- setcookie('icegram_messages_shown', implode(",", $messages_shown), 0, '/');
288
  exit();
289
  }
290
 
@@ -449,19 +454,16 @@ class Icegram {
449
  return;
450
  }
451
 
452
- $messages_shown = (array) explode(",", html_entity_decode( (!empty($_COOKIE['icegram_messages_shown']) ? stripslashes( $_COOKIE['icegram_messages_shown'] ) : '') ) );
453
  $types_shown = array(); $messages_to_show_ids = array();
454
-
455
  foreach ( $messages as $key => $message_data ) {
456
 
457
  if( !is_array( $message_data ) || empty( $message_data ) ) {
458
  continue;
459
  }
460
-
461
  // Don't show a seen message again - if needed
462
  if( !empty( $message_data['id'] ) &&
463
  empty( $_GET['campaign_preview_id'] ) &&
464
- in_array( $message_data['id'], $messages_shown ) &&
465
  !empty( $message_data['retargeting'] ) &&
466
  $message_data['retargeting'] == 'yes'
467
  ) {
@@ -477,7 +479,6 @@ class Icegram {
477
  $messages_to_show_ids[] = $message_data['id'];
478
  }
479
 
480
- $types_shown[] = $message_data['type'];
481
 
482
  /*
483
  // Our own implementation so WP does not mess with script, style and pre tags
@@ -517,6 +518,9 @@ class Icegram {
517
  'preview_id' => !empty( $_GET['campaign_preview_id'] ) ? $_GET['campaign_preview_id'] : '',
518
  'defaults' => $icegram_default
519
  ));
 
 
 
520
  if (empty($icegram['preview_id'])) {
521
  unset($icegram['preview_id']);
522
  }
@@ -528,7 +532,7 @@ class Icegram {
528
 
529
  // Load JS and default CSS
530
  $types_shown = array_unique($types_shown);
531
-
532
  if (in_array('popup', $types_shown)) {
533
  wp_enqueue_script( 'thickbox' );
534
  wp_enqueue_style( 'thickbox' );
@@ -738,6 +742,7 @@ class Icegram {
738
  }
739
  $rule_value = $campaign->get_rule_value('retargeting');
740
  $message_data['retargeting'] = !empty( $rule_value['retargeting'] ) ? $rule_value['retargeting'] : '';
 
741
  }
742
  }
743
  $valid_messages[$id] = $message_data;
3
  * Plugin Name: Icegram
4
  * Plugin URI: http://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
+ * Version: 1.5
7
  * Author: Icegram
8
  * Author URI: http://www.icegram.com/
9
  *
33
 
34
  function __construct() {
35
 
36
+ $this->version = "1.5";
37
  $this->shortcode_instances = array();
38
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
39
  $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
41
 
42
  if( is_admin() && current_user_can( 'manage_options' ) ) {
43
  new Icegram_Campaign_Admin();
44
+ $ig_message_admin = Icegram_Message_Admin::getInstance();
45
  add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_admin_styles_and_scripts' ) );
46
  add_action( 'admin_print_styles', array( &$this, 'remove_preview_button' ) );
47
  add_filter( 'post_row_actions', array( &$this , 'remove_row_actions' ), 10, 2 );
261
  }
262
 
263
  public function icegram_event_track() {
 
264
  if( !empty( $_POST['event_data'] ) ) {
265
 
 
 
266
  foreach ( $_POST['event_data'] as $event ) {
267
  switch ($event['type']) {
268
  case 'shown':
269
  if (is_array($event['params']) && !empty($event['params']['message_id'])) {
270
  $messages_shown[] = $event['params']['message_id'];
271
+ if(!empty($event['params']['expiry_time'])){
272
+ if($event['params']['expiry_time'] =='today'){
273
+ $event['params']['expiry_time'] = strtotime('+1 day', mktime(0, 0, 0));
274
+ }else if($event['params']['expiry_time'] == 'current_session'){
275
+ $event['params']['expiry_time'] = 0;
276
+ }else{
277
+ $event['params']['expiry_time'] = strtotime($event['params']['expiry_time']);
278
+ }
279
+ setcookie('icegram_messages_shown_'.$event['params']['message_id'],true , $event['params']['expiry_time'] , '/');
280
+ }
281
  }
282
  break;
283
 
290
  do_action('icegram_event_track_'.$event['type'], $event['params']);
291
  }
292
  }
 
 
293
  exit();
294
  }
295
 
454
  return;
455
  }
456
 
 
457
  $types_shown = array(); $messages_to_show_ids = array();
 
458
  foreach ( $messages as $key => $message_data ) {
459
 
460
  if( !is_array( $message_data ) || empty( $message_data ) ) {
461
  continue;
462
  }
 
463
  // Don't show a seen message again - if needed
464
  if( !empty( $message_data['id'] ) &&
465
  empty( $_GET['campaign_preview_id'] ) &&
466
+ !empty($_COOKIE['icegram_messages_shown_'.$message_data['id']])&&
467
  !empty( $message_data['retargeting'] ) &&
468
  $message_data['retargeting'] == 'yes'
469
  ) {
479
  $messages_to_show_ids[] = $message_data['id'];
480
  }
481
 
 
482
 
483
  /*
484
  // Our own implementation so WP does not mess with script, style and pre tags
518
  'preview_id' => !empty( $_GET['campaign_preview_id'] ) ? $_GET['campaign_preview_id'] : '',
519
  'defaults' => $icegram_default
520
  ));
521
+ foreach ($icegram['messages'] as $key => $message_data) {
522
+ $types_shown[] = $message_data['type'];
523
+ }
524
  if (empty($icegram['preview_id'])) {
525
  unset($icegram['preview_id']);
526
  }
532
 
533
  // Load JS and default CSS
534
  $types_shown = array_unique($types_shown);
535
+
536
  if (in_array('popup', $types_shown)) {
537
  wp_enqueue_script( 'thickbox' );
538
  wp_enqueue_style( 'thickbox' );
742
  }
743
  $rule_value = $campaign->get_rule_value('retargeting');
744
  $message_data['retargeting'] = !empty( $rule_value['retargeting'] ) ? $rule_value['retargeting'] : '';
745
+ $message_data['expiry_time'] = !empty( $rule_value['retargeting'] ) ? $rule_value['expiry_time'] : '';
746
  }
747
  }
748
  $valid_messages[$id] = $message_data;
message-types/action-bar/default.css CHANGED
@@ -30,9 +30,17 @@
30
  .action_bar .ig_data {
31
  }
32
 
33
- .action_bar .ig_button, .action_bar input[type="submit"], .action_bar input[type="button"] {
 
 
 
34
  cursor: pointer;
35
  }
 
 
 
 
 
36
 
37
  .action_bar .ig_close {
38
  cursor: pointer;
@@ -114,12 +122,11 @@ div.icegram .action_bar form {
114
  div.icegram .action_bar input, div.icegram .action_bar label {
115
  display: inline-block;
116
  }
117
-
118
- div.icegram .action_bar .clear:after {
119
- content: ".";
120
- display: block;
121
- clear: both;
122
- visibility: hidden;
123
- line-height: 0;
124
- height: 0;
125
  }
30
  .action_bar .ig_data {
31
  }
32
 
33
+ .action_bar .ig_button,
34
+ .action_bar input[type="submit"],
35
+ .action_bar input[type="button"] {
36
+ border-bottom : none;
37
  cursor: pointer;
38
  }
39
+ .action_bar .ig_button:active,
40
+ .action_bar input[type="submit"]:active,
41
+ .action_bar input[type="button"]:active {
42
+ border-top : none;
43
+ }
44
 
45
  .action_bar .ig_close {
46
  cursor: pointer;
122
  div.icegram .action_bar input, div.icegram .action_bar label {
123
  display: inline-block;
124
  }
125
+ /* iPhone 4 ----------- */
126
+ @media
127
+ only screen and (-webkit-min-device-pixel-ratio : 1.5),
128
+ only screen and (min-device-pixel-ratio : 1.5) {
129
+ .icegram .action_bar .ig_button{
130
+ margin: .4em !important;
131
+ }
 
132
  }
message-types/action-bar/main.js CHANGED
@@ -11,7 +11,7 @@ Icegram_Message_Type_Action_Bar.prototype.constructor = Icegram_Message_Type_Act
11
  Icegram_Message_Type_Action_Bar.prototype.get_template_default = function () {
12
  return '<div class="icegram action_bar_{{=id}}" >'+
13
  '<div class="action_bar ig_container {{=theme}}" id="icegram_message_{{=id}}">'+
14
- '<div class="ig_content clear">'+
15
  '<div class="ig_arrow_block" id="action_bar_close_{{=id}}">'+
16
  '<span class="ig_arrow"></span>'+
17
  '</div>'+
11
  Icegram_Message_Type_Action_Bar.prototype.get_template_default = function () {
12
  return '<div class="icegram action_bar_{{=id}}" >'+
13
  '<div class="action_bar ig_container {{=theme}}" id="icegram_message_{{=id}}">'+
14
+ '<div class="ig_content ig_clear">'+
15
  '<div class="ig_arrow_block" id="action_bar_close_{{=id}}">'+
16
  '<span class="ig_arrow"></span>'+
17
  '</div>'+
message-types/action-bar/themes/air-mail.css CHANGED
@@ -60,7 +60,9 @@
60
  float: left;
61
  }
62
 
63
- .action_bar.air-mail .ig_button, .action_bar.air-mail input[type="submit"], .action_bar.air-mail input[type="button"] {
 
 
64
  background: hsl(6, 78%, 57%) !important;
65
  -moz-border-radius: 5px;
66
  -webkit-border-radius: 5px;
@@ -77,12 +79,16 @@
77
 
78
  }
79
 
80
- .action_bar.air-mail .ig_button:hover, .action_bar.air-mail input[type="submit"]:hover, .action_bar.air-mail input[type="button"]:hover {
 
 
81
  margin-top: -3px;
82
  border-bottom: 6px solid #c0392b;
83
  }
84
 
85
- .action_bar.air-mail .ig_button:active, .action_bar.air-mail input[type="submit"]:active, .action_bar.air-mail input[type="button"]:active {
 
 
86
  }
87
 
88
  .action_bar.air-mail .ig_close {
60
  float: left;
61
  }
62
 
63
+ .action_bar.air-mail input[type="submit"],
64
+ .action_bar.air-mail input[type="button"],
65
+ .action_bar.air-mail .ig_button{
66
  background: hsl(6, 78%, 57%) !important;
67
  -moz-border-radius: 5px;
68
  -webkit-border-radius: 5px;
79
 
80
  }
81
 
82
+ .action_bar.air-mail input[type="submit"]:hover,
83
+ .action_bar.air-mail input[type="button"]:hover,
84
+ .action_bar.air-mail .ig_button:hover{
85
  margin-top: -3px;
86
  border-bottom: 6px solid #c0392b;
87
  }
88
 
89
+ .action_bar.air-mail input[type="submit"]:active,
90
+ .action_bar.air-mail input[type="button"]:active,
91
+ .action_bar.air-mail .ig_button:active{
92
  }
93
 
94
  .action_bar.air-mail .ig_close {
message-types/action-bar/themes/bold.css CHANGED
@@ -41,7 +41,9 @@
41
  float: left;
42
  }
43
 
44
- .action_bar.bold .ig_button, .action_bar.bold input[type="submit"], .action_bar.bold input[type="button"] {
 
 
45
  display: inline-block;
46
  font-size: 1em;
47
  letter-spacing: 1px;
@@ -58,7 +60,9 @@
58
  padding: .7em 2em;
59
  }
60
 
61
- .action_bar.bold .ig_button:active, .action_bar.bold input[type="submit"]:active, .action_bar.bold input[type="button"]:active {
 
 
62
  position: relative;
63
  top: 3px;
64
  -moz-box-shadow: none;
41
  float: left;
42
  }
43
 
44
+ .action_bar.bold input[type="submit"],
45
+ .action_bar.bold input[type="button"],
46
+ .action_bar.bold .ig_button {
47
  display: inline-block;
48
  font-size: 1em;
49
  letter-spacing: 1px;
60
  padding: .7em 2em;
61
  }
62
 
63
+ .action_bar.bold input[type="submit"]:active,
64
+ .action_bar.bold input[type="button"]:active,
65
+ .action_bar.bold .ig_button:active{
66
  position: relative;
67
  top: 3px;
68
  -moz-box-shadow: none;
message-types/action-bar/themes/hello.css CHANGED
@@ -47,14 +47,16 @@
47
  text-align: center;
48
  }
49
 
50
- .action_bar.hello .ig_button, .action_bar.hello input[type="submit"], .action_bar.hello input[type="button"] {
 
 
51
  display: inline;
52
- background: #4A4844;
53
- background: linear-gradient(top, #4A4844 0%, #2D2C29 100%);
54
- background: -moz-linear-gradient(top, #4A4844 0%, #2D2C29 100%);
55
- background: -o-linear-gradient(top, #4A4844 0%, #2D2C29 100%);
56
- background: -webkit-linear-gradient(top, #4A4844 0%, #2D2C29 100%);
57
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #4A4844 0%), color-stop(1, #2D2C29 100%));
58
  filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr=#4A4844 0%, EndColorStr=#2D2C29 100%)";
59
  -moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.28);
60
  -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.28);
@@ -72,7 +74,9 @@
72
  vertical-align: text-bottom;
73
  }
74
 
75
- .action_bar.hello .ig_button:hover, .action_bar.hello input[type="submit"]:hover, .action_bar.hello input[type="button"]:hover {
 
 
76
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
77
  filter: alpha(opacity=80);
78
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
47
  text-align: center;
48
  }
49
 
50
+ .action_bar.hello .ig_button,
51
+ .action_bar.hello input[type="submit"],
52
+ .action_bar.hello input[type="button"] {
53
  display: inline;
54
+ background: #4A4844 !important;
55
+ background: linear-gradient(top, #4A4844 0%, #2D2C29 100%) !important;
56
+ background: -moz-linear-gradient(top, #4A4844 0%, #2D2C29 100%) !important;
57
+ background: -o-linear-gradient(top, #4A4844 0%, #2D2C29 100%) !important;
58
+ background: -webkit-linear-gradient(top, #4A4844 0%, #2D2C29 100%) !important;
59
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #4A4844 0%), color-stop(1, #2D2C29 100%)) !important;
60
  filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr=#4A4844 0%, EndColorStr=#2D2C29 100%)";
61
  -moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.28);
62
  -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.28);
74
  vertical-align: text-bottom;
75
  }
76
 
77
+ .action_bar.hello .ig_button:hover,
78
+ .action_bar.hello input[type="submit"]:hover,
79
+ .action_bar.hello input[type="button"]:hover {
80
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
81
  filter: alpha(opacity=80);
82
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
message-types/messenger/default.css CHANGED
@@ -108,4 +108,30 @@
108
  .messenger .powered_by {
109
  font-size: 10px;
110
  position: relative;
111
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  .messenger .powered_by {
109
  font-size: 10px;
110
  position: relative;
111
+ }
112
+ .messenger .ig_embed_form.ig_vertical.ig_quarter .ig_embed_form_container,
113
+ .messenger .ig_embed_form.ig_horizontal.ig_quarter .ig_embed_form_container{
114
+ width: 50%!important;
115
+ }
116
+
117
+ .messenger .ig_embed_form.ig_vertical.ig_half li,
118
+ .messenger .ig_embed_form.ig_vertical.ig_quarter li,
119
+ .messenger .ig_embed_form.ig_horizontal.ig_half li,
120
+ .messenger .ig_embed_form.ig_horizontal.ig_quarter li{
121
+ min-width: 96% !important;
122
+ }
123
+
124
+ .messenger .ig_button,
125
+ .messenger input[type="submit"],
126
+ .messenger input[type="button"] {
127
+ border-bottom : none;
128
+ cursor: pointer;
129
+ }
130
+ .messenger .ig_button:active,
131
+ .messenger input[type="submit"]:active,
132
+ .messenger input[type="button"]:active {
133
+ border-top : none;
134
+ }
135
+
136
+
137
+
message-types/popup/default.css CHANGED
@@ -44,13 +44,22 @@
44
  background-position: left top;
45
  }
46
 
47
- .popup .ig_button, .popup input[type="submit"], .popup input[type="button"] {
 
 
48
  cursor: pointer;
49
  display: block;
 
50
  }
51
 
52
- .popup .ig_button:hover, .popup input[type="submit"]:hover, .popup input[type="button"]:hover {
 
 
53
 
 
 
 
 
54
  }
55
 
56
  .popup #TB_ajaxContent {
44
  background-position: left top;
45
  }
46
 
47
+ .popup .ig_button,
48
+ .popup input[type="submit"],
49
+ .popup input[type="button"] {
50
  cursor: pointer;
51
  display: block;
52
+ border-bottom : none;
53
  }
54
 
55
+ .popup .ig_button:hover,
56
+ .popup input[type="submit"]:hover,
57
+ .popup input[type="button"]:hover {
58
 
59
+ }
60
+ .popup .ig_button:active,
61
+ div.popup input[type="submit"]:active,
62
+ div.popup input[type="button"]:active{
63
  }
64
 
65
  .popup #TB_ajaxContent {
message-types/popup/themes/air-mail.css CHANGED
@@ -38,13 +38,15 @@
38
  zoom: 1.5;
39
  }
40
 
41
- .popup.air-mail .ig_button, div.popup.air-mail input[type="submit"], div.popup.air-mail input[type="button"] {
42
- background: hsl(6, 78%, 57%);
 
 
43
  width: 50%;
44
  -moz-border-radius: 5px;
45
  -webkit-border-radius: 5px;
46
  border-radius: 5px;
47
- border-bottom: 3px solid hsl(6, 63%, 46%);
48
  font-size: 16px;
49
  color: hsl(0, 0%, 100%);
50
  text-transform: uppercase;
@@ -53,10 +55,21 @@
53
  margin: 0 auto;
54
  padding: 16px 0 13px;
55
  }
 
 
 
56
 
57
- .popup.air-mail .ig_button:hover, div.popup.air-mail input[type="submit"]:hover, div.popup.air-mail input[type="button"]:hover {
 
 
58
  margin-top: -3px;
59
- border-bottom: 6px solid #c0392b;
 
 
 
 
 
 
60
  }
61
 
62
  .popup.air-mail #TB_ajaxContent {
38
  zoom: 1.5;
39
  }
40
 
41
+ .popup.air-mail .ig_button,
42
+ div.popup.air-mail input[type="submit"],
43
+ div.popup.air-mail input[type="button"] {
44
+ background: hsl(6, 78%, 57%) !important;
45
  width: 50%;
46
  -moz-border-radius: 5px;
47
  -webkit-border-radius: 5px;
48
  border-radius: 5px;
49
+ border-bottom: 3px solid hsl(6, 63%, 46%) !important;
50
  font-size: 16px;
51
  color: hsl(0, 0%, 100%);
52
  text-transform: uppercase;
55
  margin: 0 auto;
56
  padding: 16px 0 13px;
57
  }
58
+ div.popup.air-mail input[type="submit"]{
59
+ width: auto;
60
+ }
61
 
62
+ .popup.air-mail .ig_button:hover,
63
+ div.popup.air-mail input[type="submit"]:hover,
64
+ div.popup.air-mail input[type="button"]:hover {
65
  margin-top: -3px;
66
+ border-bottom: 6px solid #c0392b !important;
67
+ }
68
+
69
+ .popup.air-mail .ig_button:active,
70
+ div.popup.air-mail input[type="submit"]:active,
71
+ div.popup.air-mail input[type="button"]:active{
72
+ border-top: none;
73
  }
74
 
75
  .popup.air-mail #TB_ajaxContent {
message-types/popup/themes/amaze.css CHANGED
@@ -28,8 +28,10 @@
28
  right: -15px;
29
  }
30
 
31
- .popup.amaze .ig_button, .popup.amaze input[type="submit"], .popup.amaze input[type="button"] {
32
- background: hsl(145, 63%, 49%);
 
 
33
  color: hsl(0, 100%, 100%);
34
  font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
35
  font-size: 1.3em;
@@ -51,7 +53,10 @@
51
  padding: 0.3em 1em;
52
  }
53
 
54
- .popup.amaze .ig_button:active, .popup.amaze input[type="submit"]:active, .popup.amaze input[type="button"]:active {
 
 
 
55
  position: relative;
56
  top: 3px;
57
  -moz-box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
28
  right: -15px;
29
  }
30
 
31
+ .popup.amaze .ig_button,
32
+ .popup.amaze input[type="submit"],
33
+ .popup.amaze input[type="button"] {
34
+ background: hsl(145, 63%, 49%) !important;
35
  color: hsl(0, 100%, 100%);
36
  font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
37
  font-size: 1.3em;
53
  padding: 0.3em 1em;
54
  }
55
 
56
+ .popup.amaze .ig_button:active,
57
+ .popup.amaze input[type="submit"]:active,
58
+ .popup.amaze input[type="button"]:active {
59
+ border-top: none;
60
  position: relative;
61
  top: 3px;
62
  -moz-box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
message-types/popup/themes/compel.css CHANGED
@@ -40,13 +40,15 @@
40
  zoom: 1.5;
41
  }
42
 
43
- .popup.compel .ig_button, .popup.compel input[type="submit"], .popup.compel input[type="button"] {
44
- background: hsl(6, 78%, 57%);
 
 
45
  width: 50%;
46
  -moz-border-radius: 5px;
47
  -webkit-border-radius: 5px;
48
  border-radius: 5px;
49
- border-bottom: 3px solid hsl(6, 63%, 46%);
50
  font-size: 16px;
51
  color: hsl(0, 0%, 100%);
52
  text-transform: uppercase;
@@ -56,10 +58,18 @@
56
  padding: 16px 0 13px;
57
  }
58
 
59
- .popup.compel .ig_button:hover, .popup.compel input[type="submit"]:hover, .popup.compel input[type="button"]:hover {
 
 
60
  margin-top: -3px;
61
- border-bottom: 6px solid #c0392b;
62
  }
 
 
 
 
 
 
63
 
64
  .popup.compel #TB_ajaxContent {
65
  }
40
  zoom: 1.5;
41
  }
42
 
43
+ .popup.compel .ig_button,
44
+ .popup.compel input[type="submit"],
45
+ .popup.compel input[type="button"] {
46
+ background: hsl(6, 78%, 57%) !important;
47
  width: 50%;
48
  -moz-border-radius: 5px;
49
  -webkit-border-radius: 5px;
50
  border-radius: 5px;
51
+ border-bottom: 3px solid hsl(6, 63%, 46%) !important;
52
  font-size: 16px;
53
  color: hsl(0, 0%, 100%);
54
  text-transform: uppercase;
58
  padding: 16px 0 13px;
59
  }
60
 
61
+ .popup.compel .ig_button:hover,
62
+ .popup.compel input[type="submit"]:hover,
63
+ .popup.compel input[type="button"]:hover {
64
  margin-top: -3px;
65
+ border-bottom: 6px solid #c0392b !important;
66
  }
67
+ .popup.compel .ig_button:active,
68
+ div.popup.compel input[type="submit"]:active,
69
+ div.popup.compel input[type="button"]:active{
70
+ border-top: none;
71
+ }
72
+
73
 
74
  .popup.compel #TB_ajaxContent {
75
  }
message-types/popup/themes/convert.css CHANGED
@@ -26,14 +26,17 @@
26
  right: -15px;
27
  }
28
 
29
- .popup.convert .ig_button, .popup.convert input[type="submit"], .popup.convert input[type="button"] {
 
 
30
  text-transform: uppercase;
31
  font-weight: 700;
32
  text-decoration: none;
33
- background-color: hsl(0, 94%, 41%);
 
34
  font-size: 1.75em;
35
  color: hsl(0, 33%, 98%);
36
- border: .3em solid hsl(0, 6%, 71%);
37
  width: 50%;
38
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
39
  -moz-border-radius: 1em;
@@ -48,6 +51,16 @@
48
  clear: both;
49
  }
50
 
 
 
 
 
 
 
 
 
 
 
51
  .popup.convert #TB_ajaxContent {
52
  }
53
 
26
  right: -15px;
27
  }
28
 
29
+ .popup.convert .ig_button,
30
+ .popup.convert input[type="submit"],
31
+ .popup.convert input[type="button"] {
32
  text-transform: uppercase;
33
  font-weight: 700;
34
  text-decoration: none;
35
+ background-color: hsl(0, 94%, 41%) !important;
36
+ background: hsl(0, 94%, 41%) !important;
37
  font-size: 1.75em;
38
  color: hsl(0, 33%, 98%);
39
+ border: .3em solid hsl(0, 6%, 71%) !important;
40
  width: 50%;
41
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
42
  -moz-border-radius: 1em;
51
  clear: both;
52
  }
53
 
54
+ .popup.convert .ig_button,
55
+ .popup.convertinput[type="submit"]:active,
56
+ .popup.convert input[type="button"]:active{
57
+ border-top: .3em solid hsl(0, 6%, 71%) !important;
58
+ -moz-border-radius: 1em;
59
+ -webkit-border-radius: 1em;
60
+ border-radius: 1em;
61
+
62
+ }
63
+
64
  .popup.convert #TB_ajaxContent {
65
  }
66
 
message-types/popup/themes/inspire.css CHANGED
@@ -32,9 +32,12 @@
32
  right: -15px;
33
  }
34
 
35
- .popup.inspire .ig_button, .popup.inspire input[type="submit"], .popup.inspire input[type="button"] {
 
 
36
  vertical-align: middle;
37
- background-color: hsl(79, 93%, 35%);
 
38
  font-size: 2em;
39
  font-weight: 700;
40
  font-style: normal;
@@ -43,13 +46,19 @@
43
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
44
  filter: alpha(opacity=100);
45
  opacity: 1;
46
- color: hsl(0, 100%, 100%);
47
  width: 50%;
48
- border-color: hsl(79, 93%, 35%);
49
  margin: .25em auto;
50
  padding: 0.5em;
51
  line-height: 1.2em;
52
  }
 
 
 
 
 
 
53
 
54
  .popup.inspire #TB_ajaxContent {
55
  }
32
  right: -15px;
33
  }
34
 
35
+ .popup.inspire .ig_button,
36
+ .popup.inspire input[type="submit"],
37
+ .popup.inspire input[type="button"] {
38
  vertical-align: middle;
39
+ background-color: hsl(79, 93%, 35%) !important;
40
+ background: hsl(79, 93%, 35%) !important;
41
  font-size: 2em;
42
  font-weight: 700;
43
  font-style: normal;
46
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
47
  filter: alpha(opacity=100);
48
  opacity: 1;
49
+ color: hsl(0, 100%, 100%)!important;
50
  width: 50%;
51
+ border-color: hsl(79, 93%, 35%) !important;
52
  margin: .25em auto;
53
  padding: 0.5em;
54
  line-height: 1.2em;
55
  }
56
+ .popup.inspire .ig_button:active,
57
+ .popup.inspire input[type="submit"]:active,
58
+ .popup.inspire input[type="button"]:active{
59
+ border-top: none;
60
+ }
61
+
62
 
63
  .popup.inspire #TB_ajaxContent {
64
  }
message-types/popup/themes/persuade.css CHANGED
@@ -26,10 +26,13 @@
26
  right: -15px;
27
  }
28
 
29
- .popup.persuade .ig_button, .popup.persuade input[type="submit"], .popup.persuade input[type="button"] {
 
 
30
  color: hsl(0, 100%, 100%);
31
  text-decoration: none;
32
- background-color: hsl(0, 0%, 26%);
 
33
  font-size: 2em;
34
  font-weight: 400;
35
  width: 60%;
@@ -50,7 +53,9 @@
50
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
51
  }
52
 
53
- .popup.persuade .ig_button:hover, .popup.persuade input[type="submit"]:hover, .popup.persuade input[type="button"]:hover {
 
 
54
  -moz-box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
55
  -webkit-box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
56
  box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
@@ -60,6 +65,11 @@
60
  position: relative;
61
  top: .2em
62
  }
 
 
 
 
 
63
 
64
  .popup.persuade #TB_ajaxContent {
65
  border: .6em dashed hsl(0, 100%, 100%);
26
  right: -15px;
27
  }
28
 
29
+ .popup.persuade .ig_button,
30
+ .popup.persuade input[type="submit"],
31
+ .popup.persuade input[type="button"] {
32
  color: hsl(0, 100%, 100%);
33
  text-decoration: none;
34
+ background-color: hsl(0, 0%, 26%) !important;
35
+ background: hsl(0, 0%, 26%) !important;
36
  font-size: 2em;
37
  font-weight: 400;
38
  width: 60%;
53
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
54
  }
55
 
56
+ .popup.persuade .ig_button:hover,
57
+ .popup.persuade input[type="submit"]:hover,
58
+ .popup.persuade input[type="button"]:hover {
59
  -moz-box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
60
  -webkit-box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
61
  box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
65
  position: relative;
66
  top: .2em
67
  }
68
+ .popup.persuade .ig_button:active,
69
+ .popup.persuade input[type="submit"]:active,
70
+ .popup.persuade input[type="button"]:active {
71
+ border-top: none;
72
+ }
73
 
74
  .popup.persuade #TB_ajaxContent {
75
  border: .6em dashed hsl(0, 100%, 100%);
message-types/toast/main.js CHANGED
@@ -66,14 +66,9 @@
66
  }, this.data.delay_time);
67
 
68
  !sticky && duration > 0 && (setTimeout(function() {
69
- self.el.animate({
70
- height: 0,
71
- opacity: 0
72
- }, 'fast', function() {
73
  self.hide();
74
  self.root_container.children().length || self.root_container.removeClass('active').hide();
75
- });
76
-
77
  }, duration));
78
 
79
  };
66
  }, this.data.delay_time);
67
 
68
  !sticky && duration > 0 && (setTimeout(function() {
69
+ self.el.fadeOut('slow');
 
 
 
70
  self.hide();
71
  self.root_container.children().length || self.root_container.removeClass('active').hide();
 
 
72
  }, duration));
73
 
74
  };
message-types/toast/main.php CHANGED
@@ -26,7 +26,8 @@ class Icegram_Message_Type_Toast extends Icegram_Message_Type {
26
  $this->settings['theme']['default'] = 'announce';
27
  unset ( $this->settings['text_color'],
28
  $this->settings['bg_color'],
29
- $this->settings['label']
 
30
  );
31
  }
32
 
26
  $this->settings['theme']['default'] = 'announce';
27
  unset ( $this->settings['text_color'],
28
  $this->settings['bg_color'],
29
+ $this->settings['label'],
30
+ $this->settings['embed_form']
31
  );
32
  }
33
 
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
  === Icegram ===
2
  Contributors: storeapps, nareshvachhani, niravmehta, ratnakardubey, putler
3
  Donate link: http://www.icegram.com/
4
- Tags: popup, window, hellobar, optin, lead capture, marketing, header, footer, notification, messenger, targeting, segment, responsive
5
  Requires at least: 3.9
6
  Tested up to: 4.0
7
- Stable tag: 1.4
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
- All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more.
12
 
13
  == Description ==
14
 
@@ -16,21 +16,29 @@ All in one solution to inspire, convert and engage your audiences. Action bars,
16
 
17
  Decrease bounce rates, increase engagement and grab your visitors' attention with this unique marketing plugin.
18
 
 
 
19
  = Includes: =
20
- * Popups, header / footer bars, notifications, messengers
21
  * Powerful targeting rules
22
  * All-in-one, fully integrated WordPress plugin
23
  * Compatible with auto responders, other plugins and themes
 
 
 
24
 
25
  [youtube http://www.youtube.com/watch?v=89N0SXDDvOI]
26
 
27
  = Proven to Engage & Convert =
28
- Icegram is based on time tested marketing and behavior science principles. Icegram messages have given phenomenal 60% click through rates to people and they never fail to deliver. When you use Icegram, you don't need to learn all those marketing secrets.. Icegram does that for you...
 
 
 
29
 
30
  = Beautiful, Customizable Theme Designs =
31
  Icegram comes with 20 beautiful themes. They integrate well with your favorite WordPress theme and do not slow down your site. When you want to customize override styling with custom CSS.
32
 
33
- = Complete Control Over Message Delivery & Content =
34
  Determine where, when and how to show on-site marketing messages to visitors. Use fine grained targeting rules for niche segmentation. Plus, Icegram gives you the fully powered WordPress editor for your content. You can use any layout and formatting for content within each message container.
35
 
36
  * Continue using powerful **short codes your theme provides** for layout and styling
@@ -38,13 +46,53 @@ Determine where, when and how to show on-site marketing messages to visitors. Us
38
  * Embed subscription forms from **mailing list service of your choice**
39
  * Use short codes **other plugins** provide – embed forms, widgets, social sharing buttons, twitter feed…
40
  * Add **inline JavaScript or CSS** for customizations
 
41
  * **Full HTML** editing capability for maximum control
42
 
43
- = Learn More =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- * **[Discover all features and see demos on official Icegram website](http://www.icegram.com/)**
46
- * **[Free and paid add-ons](http://www.icegram.com/addons/)**
47
- * Follow us on Twitter [@icegram](https://twitter.com/icegram/)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
 
50
  == Installation ==
@@ -69,7 +117,9 @@ You can use custom CSS/JS inline in your message HTML. You can also use your the
69
 
70
  = Optin Forms / Mailing service integration... =
71
 
72
- You can embed any optin / subscription form to your Icegram messages using HTML code. You may even use a shortcode if you are using a WP plugin from your newsletter / lead capture service.
 
 
73
 
74
  = Preview does not work / not refreshing... =
75
 
@@ -93,6 +143,8 @@ Contact Us, provide as much detail of the problem as you can. We will try to sol
93
  3. Editing an Icegram campaign - add multiple messages, edit them, targeting rules, full HTML editor, themes and more
94
 
95
  == Upgrade Notice ==
 
 
96
 
97
  = 1.4 =
98
  Many small improvements. Support for analytics added. WordPress 4.0 compatible.
@@ -114,6 +166,13 @@ Initial Release
114
 
115
 
116
  == Changelog ==
 
 
 
 
 
 
 
117
  = 1.4 =
118
  * NEW: Targeting Rule: "Exclude pages" from a site wide campaign
119
  * NEW: Options to cleanup Icegram data and remove shortcodes from content
@@ -163,3 +222,4 @@ Initial Release
163
 
164
  = 1.0 =
165
  * Initial Release
 
1
  === Icegram ===
2
  Contributors: storeapps, nareshvachhani, niravmehta, ratnakardubey, putler
3
  Donate link: http://www.icegram.com/
4
+ Tags: popup, window, hellobar, optin, lead capture, marketing, form, notification, messenger, targeting, monster, ninja
5
  Requires at least: 3.9
6
  Tested up to: 4.0
7
+ Stable tag: 1.5
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
+ Popup windows, floating action bars, messengers, toast notifications and more. Capture leads, optins and grab visitors attention. All in one solution.
12
 
13
  == Description ==
14
 
16
 
17
  Decrease bounce rates, increase engagement and grab your visitors' attention with this unique marketing plugin.
18
 
19
+ Most similar plugins are paid and still offer a lot less. Icegram is full featured, easy to use, and still free!
20
+
21
  = Includes: =
22
+ * Popups, header / footer bars, toast notifications, messengers - everything!
23
  * Powerful targeting rules
24
  * All-in-one, fully integrated WordPress plugin
25
  * Compatible with auto responders, other plugins and themes
26
+ * Unique headline generator for ideas
27
+ * No forceful display of Icegram branding in your messages!
28
+ * And a lot more...
29
 
30
  [youtube http://www.youtube.com/watch?v=89N0SXDDvOI]
31
 
32
  = Proven to Engage & Convert =
33
+ Icegram is based on time tested marketing and behavior science principles. Icegram messages have given **phenomenal 60% click through rates** to people and they never fail to deliver. When you use Icegram, you don't need to learn all those marketing secrets.. Icegram does that for you...
34
+
35
+ = Zero Learning Curve =
36
+ Most other plugins are full of complicated screens and options. Icegram was designed to be easy from the ground up. You can manage campaigns and messages from a single screen. And most importantly, you won't have to call a tech friend to understand a thing!
37
 
38
  = Beautiful, Customizable Theme Designs =
39
  Icegram comes with 20 beautiful themes. They integrate well with your favorite WordPress theme and do not slow down your site. When you want to customize override styling with custom CSS.
40
 
41
+ = Complete Control Over Message Content & Delivery =
42
  Determine where, when and how to show on-site marketing messages to visitors. Use fine grained targeting rules for niche segmentation. Plus, Icegram gives you the fully powered WordPress editor for your content. You can use any layout and formatting for content within each message container.
43
 
44
  * Continue using powerful **short codes your theme provides** for layout and styling
46
  * Embed subscription forms from **mailing list service of your choice**
47
  * Use short codes **other plugins** provide – embed forms, widgets, social sharing buttons, twitter feed…
48
  * Add **inline JavaScript or CSS** for customizations
49
+ * Compatible with WPML for multilingual, translated messages
50
  * **Full HTML** editing capability for maximum control
51
 
52
+ = Icegram is a Good Neighbour =
53
+ Icegram works with most WordPress plugins and themes. It can integrate with all mailing list / newsletter / optin / CRM / form services that provide embeddable HTML form too.
54
+
55
+ Icegram works with MailChimp, Aweber, Constant Contact, MadMimi, Campaign Monitor, Get Response, Klawoo, iContact, e-GOI, SendPress, MailPoet, Infusion Soft, Email Buddy, My Mail and all others..
56
+
57
+ Similarly, you can embed forms in Icegram messages using shortcodes / HTML from Gravity Forms, Contact Form 7, Ninja Forms, JetPack, Formidable Pro, Inbound Now, Quform, Fast Secure Form, Visual Form Builder and many others...
58
+
59
+ Icegram campaigns and messages can be shown anywhere in WordPress using shortcodes. And Icegram has a fairly extensive API for creating new message types, themes and addons.
60
+
61
+
62
+ = Do More with Addons =
63
+ Icegram is an open platform. The core is already powerful, but you can do even more with free and premium addons.
64
+
65
+ * Analytics - track impressions, click throughs and conversions with a free addon
66
+ * Exit Intent, Scroll Position, Time Delay, JavaScript, Another Message... Show and Hide messages based on user behavior
67
+ * Geo Targeting - based on visitor's location - continent, country, city, region or IP address
68
+ * Additional message types - Overlay, Inline, Sidebars, Ribbons, Stickies, Badges...
69
+
70
+ = Ok, there is even more =
71
+ There is no end to Icegram's awesomeness!!
72
 
73
+ * Unlimited campaigns
74
+ * Unlimited messages
75
+ * Breakthrough conversions
76
+ * Smart, Responsive template designs
77
+ * Display animations
78
+ * Time delayed message display
79
+ * Multiple display positions - top, middle, bottom, left, right, center...
80
+ * Reuse messages across campaigns
81
+ * Automatic Updates
82
+ * Professional Support
83
+
84
+ = Leave Us a Review Please =
85
+
86
+ If you like Icegram, please leave a five star review on WordPress. That helps fellow website owners assess Icegram easily and benefit from it!
87
+
88
+
89
+ = Website, Demos, Shop, Social, Love =
90
+
91
+ * [Official Icegram website](http://www.icegram.com/)
92
+ * **[Dozens of Demos](http://www.icegram.com/demos/)** of different Icegram messages
93
+ * **[Shop for free and paid add-ons](http://www.icegram.com/addons/)**
94
+ * [A few customer reviews](http://www.icegram.com/customers/)
95
+ * Follow Icegram on Twitter [@icegram](https://twitter.com/icegram/)
96
 
97
 
98
  == Installation ==
117
 
118
  = Optin Forms / Mailing service integration... =
119
 
120
+ You can embed any optin / subscription form to your Icegram messages using HTML code. You may even use a shortcode if you are using a WP plugin from your newsletter / lead capture service.
121
+
122
+ Use the "Embed Form" button above the text editor to paste in HTML code from your mailing list service and let Icegram automatically "clean it up" for usage in Icegram messages.
123
 
124
  = Preview does not work / not refreshing... =
125
 
143
  3. Editing an Icegram campaign - add multiple messages, edit them, targeting rules, full HTML editor, themes and more
144
 
145
  == Upgrade Notice ==
146
+ = 1.5 =
147
+ Easy optin / subscription form parser and many other enhancements. Required update.
148
 
149
  = 1.4 =
150
  Many small improvements. Support for analytics added. WordPress 4.0 compatible.
166
 
167
 
168
  == Changelog ==
169
+ = 1.5 =
170
+ * NEW: "Embed Form" option for easy integration with optin / mailing list / subscription form / CRM services
171
+ * NEW: Retargeting Rule: Do not show again for X number of days
172
+ * NEW: Targeting Rule: "Not Logged In" visitor
173
+ * NEW: Added support for submitting form on CTA click
174
+ * NEW: "CTA Actions" premium addon
175
+
176
  = 1.4 =
177
  * NEW: Targeting Rule: "Exclude pages" from a site wide campaign
178
  * NEW: Options to cleanup Icegram data and remove shortcodes from content
222
 
223
  = 1.0 =
224
  * Initial Release
225
+