ITRO Popup Plugin - Version 4.5.8

Version Description

wp_ prefix bug fixed. Now the table has the right wordpress table prefix. Caching issue resolved (W3 super cache and similar) now "Next visualization time" works

Download this release

Release Info

Developer ITRO
Plugin Icon 128x128 ITRO Popup Plugin
Version 4.5.8
Comparing to
See all releases

Code changes from version 4.5.7 to 4.5.8

functions/core-function.php CHANGED
@@ -52,22 +52,6 @@ function itro_init()
52
  itro_update_option('sample_popup','done');
53
  }
54
 
55
- /* -------- check version */
56
- if( $GLOBALS['ITRO_VER'] != get_option('itro_curr_ver') )
57
- {
58
- $ver = get_option('itro_curr_ver');
59
- update_option('itro_prev_ver',$ver);
60
- update_option('itro_curr_ver', $GLOBALS['ITRO_VER']);
61
- }
62
-
63
-
64
- if ( get_option('itro_prev_ver') <= 3.68 && itro_get_option('version_flag') == false )
65
- {
66
- itro_update_option('popup_border_width',3);
67
- itro_update_option('popup_border_radius',8);
68
- itro_update_option('version_flag', 'true');
69
- }
70
-
71
  /* ---------------create preview page */
72
  switch(WPLANG)
73
  {
@@ -97,6 +81,22 @@ function itro_init()
97
  }
98
  }
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  /* --------------------------DISPLAY THE POPUP */
101
  function itro_display_popup()
102
  {
52
  itro_update_option('sample_popup','done');
53
  }
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  /* ---------------create preview page */
56
  switch(WPLANG)
57
  {
81
  }
82
  }
83
 
84
+ /* --------------------------CHECK THE PLUGIN VERSION */
85
+ function itro_check_ver()
86
+ {
87
+ ob_start();
88
+ if( $GLOBALS['ITRO_VER'] != get_option('itro_curr_ver') )
89
+ {
90
+ /* check and update the db */
91
+ itro_update_db();
92
+
93
+ $ver = get_option('itro_curr_ver');
94
+ update_option('itro_prev_ver',$ver);
95
+ update_option('itro_curr_ver', $GLOBALS['ITRO_VER']);
96
+ }
97
+ ob_end_clean();
98
+ }
99
+
100
  /* --------------------------DISPLAY THE POPUP */
101
  function itro_display_popup()
102
  {
functions/database-function.php CHANGED
@@ -4,8 +4,9 @@ Copyright 2013 I.T.RO.® (email : support.itro@live.com)
4
  This file is part of ITRO Popup Plugin.
5
  */
6
  global $wpdb;
7
- define ('OPTION_TABLE_NAME', 'wp_itro_plugin_option');
8
- define ('FIELD_TABLE_NAME', 'wp_itro_plugin_field');
 
9
  /* -------Create plugin tables */
10
  function itro_db_init()
11
  {
@@ -35,6 +36,23 @@ function itro_db_init()
35
  dbDelta( $sql );
36
  }
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  /* ------------------ PLUGIN OPTION DB MANAGEMENT -------------- */
39
  function itro_update_option($opt_name,$opt_val)
40
  {
4
  This file is part of ITRO Popup Plugin.
5
  */
6
  global $wpdb;
7
+ define ('OPTION_TABLE_NAME', $wpdb->prefix . 'itro_plugin_option');
8
+ define ('FIELD_TABLE_NAME', $wpdb->prefix . 'itro_plugin_field');
9
+
10
  /* -------Create plugin tables */
11
  function itro_db_init()
12
  {
36
  dbDelta( $sql );
37
  }
38
 
39
+ /* update old fixed 'wp_' prefix to the current one' */
40
+ function itro_update_db()
41
+ {
42
+ global $wpdb;
43
+ if ( get_option('itro_prev_ver') <= 3.68 )
44
+ {
45
+ itro_update_option('popup_border_width',3);
46
+ itro_update_option('popup_border_radius',8);
47
+ }
48
+
49
+ if( get_option('itro_prev_ver') <= 4.58 && $wpdb->prefix != 'wp_' )
50
+ {
51
+ $wpdb->query("RENAME TABLE wp_itro_plugin_option TO ". $wpdb->prefix ."itro_plugin_option");
52
+ $wpdb->query("RENAME TABLE wp_itro_plugin_field TO ". $wpdb->prefix ."itro_plugin_field");
53
+ }
54
+ }
55
+
56
  /* ------------------ PLUGIN OPTION DB MANAGEMENT -------------- */
57
  function itro_update_option($opt_name,$opt_val)
58
  {
functions/js-function.php CHANGED
@@ -8,7 +8,8 @@ This file is part of ITRO Popup Plugin.
8
  function itro_popup_js()
9
  { ?>
10
  <script type="text/javascript">
11
-
 
12
  <?php
13
  if (itro_get_option('age_restriction') == NULL) /* OFF age validation */
14
  {
8
  function itro_popup_js()
9
  { ?>
10
  <script type="text/javascript">
11
+ /* pass true if is the preview page. used for cookie control via js due W3 total cache or similar */
12
+ itro_is_preview = <?php if( itro_get_option('preview_id') == get_the_id() ){ echo 'true'; }else{ echo 'false'; } ?>;
13
  <?php
14
  if (itro_get_option('age_restriction') == NULL) /* OFF age validation */
15
  {
mc-main.php CHANGED
@@ -8,12 +8,12 @@ Plugin URI: http://www.itro.eu/
8
  Description: EN - Show a perfecly centered customizable popup and a popup-system for age-restricted site and allow to insert own HTML code. IT - Visualizza un popup perfettamente centrato e personalizzabile con possibile blocco per i siti con restrizioni di eta' e permette di inserire il proprio codice HTML.
9
  Author: I.T.RO.(c) Sez. Informatica
10
  E-mail: support@itro.eu
11
- Version: 4.5.7
12
  Author URI: http://www.itro.eu/
13
  */
14
 
15
  global $ITRO_VER;
16
- $ITRO_VER = 4.57;
17
 
18
  define('itroPath', plugins_url() . '/itro-popup/');
19
  define('itroImages', plugins_url() . '/itro-popup/images/');
8
  Description: EN - Show a perfecly centered customizable popup and a popup-system for age-restricted site and allow to insert own HTML code. IT - Visualizza un popup perfettamente centrato e personalizzabile con possibile blocco per i siti con restrizioni di eta' e permette di inserire il proprio codice HTML.
9
  Author: I.T.RO.(c) Sez. Informatica
10
  E-mail: support@itro.eu
11
+ Version: 4.5.8
12
  Author URI: http://www.itro.eu/
13
  */
14
 
15
  global $ITRO_VER;
16
+ $ITRO_VER = 4.58;
17
 
18
  define('itroPath', plugins_url() . '/itro-popup/');
19
  define('itroImages', plugins_url() . '/itro-popup/images/');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.itro.eu/index.php/donate/
4
  Tags: popup, popup message, popup box, popup ads, popup advertising, jquery popup, popup jquery, automatic popup, age restriction, popup block, popup violence, age validation popup, adult, adult content, content warning, content warning popup, fancy box, fancy popup, custom popup, advertising popup, pop-up, lightbox, lightbox popup
5
  Requires at least: 3.0.1
6
  Tested up to: 3.8.1
7
- Stable tag: 4.5.7
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -98,6 +98,10 @@ DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itro.eu/?page_
98
  no screenshot avaliable
99
 
100
  == Changelog ==
 
 
 
 
101
  = 4.5.7 =
102
  Content warnig button centerd in the popup
103
 
@@ -266,8 +270,9 @@ bug fixed: color table now works in admin pannel.
266
  First released version.
267
 
268
  == Upgrade Notice ==
269
- = 4.5.7 =
270
- Content warnig button centerd in the popup
 
271
 
272
  == Notes ==
273
  FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itro.eu/?page_id=390)
4
  Tags: popup, popup message, popup box, popup ads, popup advertising, jquery popup, popup jquery, automatic popup, age restriction, popup block, popup violence, age validation popup, adult, adult content, content warning, content warning popup, fancy box, fancy popup, custom popup, advertising popup, pop-up, lightbox, lightbox popup
5
  Requires at least: 3.0.1
6
  Tested up to: 3.8.1
7
+ Stable tag: 4.5.8
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
98
  no screenshot avaliable
99
 
100
  == Changelog ==
101
+ = 4.5.8 =
102
+ wp_ prefix bug fixed. Now the table has the right wordpress table prefix.
103
+ Caching issue resolved (W3 super cache and similar) now "Next visualization time" works
104
+
105
  = 4.5.7 =
106
  Content warnig button centerd in the popup
107
 
270
  First released version.
271
 
272
  == Upgrade Notice ==
273
+ = 4.5.8 =
274
+ wp_ prefix bug fixed. Now the table has the right wordpress table prefix.
275
+ Caching issue resolved (W3 super cache and similar) now "Next visualization time" works
276
 
277
  == Notes ==
278
  FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itro.eu/?page_id=390)
scripts/itro-scripts.js CHANGED
@@ -1,11 +1,21 @@
 
 
 
1
  /* manage fade in animation */
2
  function itro_enter_anim()
3
  {
4
- itro_popup.style.visibility = '';
5
- itro_opaco.style.visibility = '';
6
- itro_popup.style.display = 'none';
7
- itro_opaco.style.display = 'none';
8
- jQuery("#itro_opaco").fadeIn(function() {jQuery("#itro_popup").fadeIn();});
 
 
 
 
 
 
 
9
  }
10
 
11
  /* function for automatic top margin refresh, to center the popup vertically */
1
+ /* init variables */
2
+ var itro_is_preview;
3
+
4
  /* manage fade in animation */
5
  function itro_enter_anim()
6
  {
7
+ if( !document.cookie.indexOf("popup_cookie") >= 0 || itro_is_preview === true )
8
+ {
9
+ itro_popup.style.visibility = '';
10
+ itro_opaco.style.visibility = '';
11
+ itro_popup.style.display = 'none';
12
+ itro_opaco.style.display = 'none';
13
+ jQuery("#itro_opaco").fadeIn(function()
14
+ {
15
+ jQuery("#itro_popup").fadeIn();
16
+ });
17
+ }
18
+
19
  }
20
 
21
  /* function for automatic top margin refresh, to center the popup vertically */