Changeset 924152
- Timestamp:
- 05/31/2014 07:06:40 AM (12 years ago)
- Location:
- advanced-browser-check
- Files:
-
- 7 edited
- 4 copied
-
tags/3.0.3 (copied) (copied from advanced-browser-check/trunk)
-
tags/3.0.3/abc-core.php (copied) (copied from advanced-browser-check/trunk/abc-core.php) (1 diff)
-
tags/3.0.3/abc-output.php (modified) (5 diffs)
-
tags/3.0.3/advanced-browser-check.php (copied) (copied from advanced-browser-check/trunk/advanced-browser-check.php) (1 diff)
-
tags/3.0.3/js/script.js (modified) (1 diff)
-
tags/3.0.3/readme.txt (copied) (copied from advanced-browser-check/trunk/readme.txt) (4 diffs)
-
trunk/abc-core.php (modified) (1 diff)
-
trunk/abc-output.php (modified) (5 diffs)
-
trunk/advanced-browser-check.php (modified) (1 diff)
-
trunk/js/script.js (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-browser-check/tags/3.0.3/abc-core.php
r922854 r924152 59 59 function content_wrapper() 60 60 { 61 echo "<div class='advanced-browser-check' style='display:none;' data-url='".json_encode(array("abc_url" => plugins_url("advanced-browser-check.php",__FILE__)))."'></div>"; 61 echo "<div class='advanced-browser-check' style='display:none;' data-url='".json_encode(array("abc_url" => admin_url('admin-ajax.php')))."'></div>"; 62 63 // echo "<div class='advanced-browser-check' style='display:none;' data-url='".json_encode(array("abc_url" => plugins_url("advanced-browser-check.php",__FILE__)))."'></div>"; 62 64 } 63 65 -
advanced-browser-check/tags/3.0.3/abc-output.php
r921283 r924152 10 10 parent::__construct(); 11 11 12 // Do the magic!13 $this->html();14 15 12 } 16 13 … … 18 15 * Check if we should display the popup 19 16 **/ 20 p rivatefunction html()17 public function html() 21 18 { 22 19 … … 33 30 34 31 $old_ie = ($this->get_short_name($user_browser->Browser) === 'ie' && $user_browser->MajorVer < '8') ? 'old-ie' : ''; 35 $this->build_html($title, $message, $show_browsers, $hide, $old_ie, $user_browser, $debug);32 return $this->build_html($title, $message, $show_browsers, $hide, $old_ie, $user_browser, $debug); 36 33 37 34 } else { … … 48 45 49 46 $old_ie = ($this->get_short_name($user_browser->Browser) === 'ie' && $user_browser->MajorVer < '8') ? 'old-ie' : ''; 50 $this->build_html($title, $message, $show_browsers, $hide, $old_ie, $user_browser);47 return $this->build_html($title, $message, $show_browsers, $hide, $old_ie, $user_browser); 51 48 52 49 } … … 112 109 $html .= '</div>'; 113 110 114 echo$html;111 return $html; 115 112 116 113 } -
advanced-browser-check/tags/3.0.3/advanced-browser-check.php
r922854 r924152 5 5 Description: Tell IE users to change browser? Or is your site for Chrome only? Now you choose what browsers should trigger a warning popup or not on your site. 6 6 Author: Mattias Hedman 7 Version: 3.0. 27 Version: 3.0.3 8 8 Author URI: http://www.darkwhispering.com 9 9 */ 10 10 11 define('ABC_VERSION', '3.0. 2');11 define('ABC_VERSION', '3.0.3'); 12 12 13 // Check if the file is loaded via AJAX14 if (!empty($_POST['abc_ajax'])) {15 13 16 if(!defined('ABSPATH')) require_once("../../../wp-load.php"); 17 include_once('abc-core.php'); 18 include_once('abc-output.php'); 14 add_action('wp_ajax_abc_ajax', 'abc_ajax'); 15 add_action('wp_ajax_nopriv_abc_ajax', 'abc_ajax'); 19 16 20 21 new ABC_Output;22 17 23 } else { 18 // Create html output on ajax request 19 function abc_ajax() { 24 20 25 21 include_once('abc-core.php'); 26 include_once('abc-settings-page.php'); 22 include_once('abc-output.php'); 23 24 $output = new ABC_Output; 25 echo $output->html(); 26 die(); 27 28 } 29 30 // If it's not an ajax request, load settings page 31 if (!defined('DOING_AJAX') || !DOING_AJAX) { 32 33 include_once('abc-core.php'); 34 include_once('abc-settings-page.php'); 27 35 28 36 new ABC_Core; -
advanced-browser-check/tags/3.0.3/js/script.js
r921272 r924152 9 9 if(!$.cookie('abc-hide')) { 10 10 11 $.ajax({ 12 url : url.abc_url, 13 cache: false, 14 type : 'POST', 15 dataType : 'HTML', 16 data : 'abc_ajax=true', 17 success : function(response) { 11 var ajax_action = {'action': 'abc_ajax'}; 18 12 19 if(response) { 13 $.post(url.abc_url, ajax_action, function(response) { 14 15 if(response) { 20 16 21 // We will need to add a css class to the body 22 // if we detect IE 6 for combability css to load 23 // properly 24 if ($(response).find('.old-ie').length > 0) { 25 $('body').addClass('abc-old-ie'); 26 } 27 28 // Put in HTML response into the wrapper container 29 el.html(response).show(); 30 31 // Hide the overlay if the close btn is clicked 32 el.on('click','a.abc-hide',function(e){ 33 e.preventDefault(); 34 35 el.fadeOut('slow'); 36 $.cookie("abc-hide", true, { expires: 1, path: '/' }); 37 }); 17 // We will need to add a css class to the body 18 // if we detect IE 6 for combability css to load 19 // properly 20 if ($(response).find('.old-ie').length > 0) { 21 $('body').addClass('abc-old-ie'); 38 22 } 39 23 24 // Put in HTML response into the wrapper container 25 el.html(response).show(); 26 27 // Hide the overlay if the close btn is clicked 28 el.on('click','a.abc-hide',function(e){ 29 e.preventDefault(); 30 31 el.fadeOut('slow'); 32 $.cookie("abc-hide", true, { expires: 1, path: '/' }); 33 }); 34 40 35 } 36 41 37 }); 42 38 -
advanced-browser-check/tags/3.0.3/readme.txt
r922854 r924152 5 5 Requires at least: 3.0.0 6 6 Tested up to: 3.9.1 7 Stable tag: 3.0. 27 Stable tag: 3.0.3 8 8 9 9 Tell IE users to change browser? Or is your site for Chrome only? Now you choose what browsers should trigger a warning popup or not on your site. 10 10 11 11 == Description == 12 13 **This plugin requires PHP 5.3 or above** 12 14 13 15 This plugin give you the option to give a visitor of your site a warning popup if they use a browser that you don't support. For example, Internet Explorer 9 or lover. … … 26 28 27 29 This plugin is tested and works with the WP Super Cache and W3 Total Cache plugins. It is also tested and working on Wordpress Networks. 30 31 **If you run into problems, please check the [FAQ](http://wordpress.org/plugins/advanced-browser-check/faq/). If you don't find and answer there, look in the [support section](http://wordpress.org/support/plugin/advanced-browser-check) if anyone else have/had the same isssue and if it has been resolved. Creating a new support ticket should always be your last resort for help. Thanks.** 28 32 29 33 *There is versions added of browsers that it not yet released as stable versions. This is to minimize the need of an plugin update in the future when new browsers are released and to let users try the plugin with beta and alpha version of the browsers browsers. I will do my best to keep this plugin updated with the latest versions of available browsers.* … … 57 61 58 62 = I only get a black overlay, no popup = 59 This can get this frommany reasons. It can be any of the plugins you have installed that is not compatible with my plugin. It can also be your theme.63 You can get this for many reasons. It can be any of the plugins you have installed that is not compatible with my plugin. It can also be your theme. 60 64 61 The plugin is tested on the standard theams delivered with Wordpress. I can't guarantee that the plugin will work on 3rd party themes.65 I test the plugin before every update on a clean Wordpress installation with no other plugins activated or custom theme installed. Due to the large amount of 3rd party themes and plugins for Wordpess, it is impossible to guarantee that the plugin will work with them all. 62 66 63 Before posting a support thread, please try to inactivate all your plugins except Advanced Browser Check and try again. If you still have the issue, try with another theme .67 Before posting a support thread, please try to inactivate all your plugins except Advanced Browser Check and try again. If you still have the issue, try with another theme, or install a clean Wordpress is a subfolder so you can test the plugin on your server with a clena Wordpress installation. 64 68 65 69 = I have selected not to block Chrome (or any other browser), but I still get the overlay = 66 Please read the above answer and perform the same tests before you start a new support thread. 70 Please read the above answer and perform the same tests before you start a new support thread. You should also turn on debugging so you see what browser the plugin detects you are using. 67 71 68 72 = I have performed all test above, still not working = 69 73 Okay, might be time to start a support thread, but first, please see if someone else have had your issue and see if they might found a solution before you start a new thread. 70 74 71 If you create a new support post, please provide as much info as possible. Like what Wordpress version you have, version of the plugin, browser you tested and versions on those browser. 75 If you create a new support post, please provide as much info as possible. Like what Wordpress version you have, version of the plugin, browser you tested and versions on those browser. And of course, any error messages you see if you have that. 72 76 73 77 == Screenshots == … … 82 86 83 87 == Changelog == 88 89 = 3.0.3 = 90 * The plugin are now doing AJAX calls "correctly" using the wp_ajax action hook. Hoping this will solve the issue with plugin_dir_path() not working for some users. 84 91 85 92 = 3.0.2 = -
advanced-browser-check/trunk/abc-core.php
r922854 r924152 59 59 function content_wrapper() 60 60 { 61 echo "<div class='advanced-browser-check' style='display:none;' data-url='".json_encode(array("abc_url" => plugins_url("advanced-browser-check.php",__FILE__)))."'></div>"; 61 echo "<div class='advanced-browser-check' style='display:none;' data-url='".json_encode(array("abc_url" => admin_url('admin-ajax.php')))."'></div>"; 62 63 // echo "<div class='advanced-browser-check' style='display:none;' data-url='".json_encode(array("abc_url" => plugins_url("advanced-browser-check.php",__FILE__)))."'></div>"; 62 64 } 63 65 -
advanced-browser-check/trunk/abc-output.php
r921283 r924152 10 10 parent::__construct(); 11 11 12 // Do the magic!13 $this->html();14 15 12 } 16 13 … … 18 15 * Check if we should display the popup 19 16 **/ 20 p rivatefunction html()17 public function html() 21 18 { 22 19 … … 33 30 34 31 $old_ie = ($this->get_short_name($user_browser->Browser) === 'ie' && $user_browser->MajorVer < '8') ? 'old-ie' : ''; 35 $this->build_html($title, $message, $show_browsers, $hide, $old_ie, $user_browser, $debug);32 return $this->build_html($title, $message, $show_browsers, $hide, $old_ie, $user_browser, $debug); 36 33 37 34 } else { … … 48 45 49 46 $old_ie = ($this->get_short_name($user_browser->Browser) === 'ie' && $user_browser->MajorVer < '8') ? 'old-ie' : ''; 50 $this->build_html($title, $message, $show_browsers, $hide, $old_ie, $user_browser);47 return $this->build_html($title, $message, $show_browsers, $hide, $old_ie, $user_browser); 51 48 52 49 } … … 112 109 $html .= '</div>'; 113 110 114 echo$html;111 return $html; 115 112 116 113 } -
advanced-browser-check/trunk/advanced-browser-check.php
r922854 r924152 5 5 Description: Tell IE users to change browser? Or is your site for Chrome only? Now you choose what browsers should trigger a warning popup or not on your site. 6 6 Author: Mattias Hedman 7 Version: 3.0. 27 Version: 3.0.3 8 8 Author URI: http://www.darkwhispering.com 9 9 */ 10 10 11 define('ABC_VERSION', '3.0. 2');11 define('ABC_VERSION', '3.0.3'); 12 12 13 // Check if the file is loaded via AJAX14 if (!empty($_POST['abc_ajax'])) {15 13 16 if(!defined('ABSPATH')) require_once("../../../wp-load.php"); 17 include_once('abc-core.php'); 18 include_once('abc-output.php'); 14 add_action('wp_ajax_abc_ajax', 'abc_ajax'); 15 add_action('wp_ajax_nopriv_abc_ajax', 'abc_ajax'); 19 16 20 21 new ABC_Output;22 17 23 } else { 18 // Create html output on ajax request 19 function abc_ajax() { 24 20 25 21 include_once('abc-core.php'); 26 include_once('abc-settings-page.php'); 22 include_once('abc-output.php'); 23 24 $output = new ABC_Output; 25 echo $output->html(); 26 die(); 27 28 } 29 30 // If it's not an ajax request, load settings page 31 if (!defined('DOING_AJAX') || !DOING_AJAX) { 32 33 include_once('abc-core.php'); 34 include_once('abc-settings-page.php'); 27 35 28 36 new ABC_Core; -
advanced-browser-check/trunk/js/script.js
r921272 r924152 9 9 if(!$.cookie('abc-hide')) { 10 10 11 $.ajax({ 12 url : url.abc_url, 13 cache: false, 14 type : 'POST', 15 dataType : 'HTML', 16 data : 'abc_ajax=true', 17 success : function(response) { 11 var ajax_action = {'action': 'abc_ajax'}; 18 12 19 if(response) { 13 $.post(url.abc_url, ajax_action, function(response) { 14 15 if(response) { 20 16 21 // We will need to add a css class to the body 22 // if we detect IE 6 for combability css to load 23 // properly 24 if ($(response).find('.old-ie').length > 0) { 25 $('body').addClass('abc-old-ie'); 26 } 27 28 // Put in HTML response into the wrapper container 29 el.html(response).show(); 30 31 // Hide the overlay if the close btn is clicked 32 el.on('click','a.abc-hide',function(e){ 33 e.preventDefault(); 34 35 el.fadeOut('slow'); 36 $.cookie("abc-hide", true, { expires: 1, path: '/' }); 37 }); 17 // We will need to add a css class to the body 18 // if we detect IE 6 for combability css to load 19 // properly 20 if ($(response).find('.old-ie').length > 0) { 21 $('body').addClass('abc-old-ie'); 38 22 } 39 23 24 // Put in HTML response into the wrapper container 25 el.html(response).show(); 26 27 // Hide the overlay if the close btn is clicked 28 el.on('click','a.abc-hide',function(e){ 29 e.preventDefault(); 30 31 el.fadeOut('slow'); 32 $.cookie("abc-hide", true, { expires: 1, path: '/' }); 33 }); 34 40 35 } 36 41 37 }); 42 38 -
advanced-browser-check/trunk/readme.txt
r922854 r924152 5 5 Requires at least: 3.0.0 6 6 Tested up to: 3.9.1 7 Stable tag: 3.0. 27 Stable tag: 3.0.3 8 8 9 9 Tell IE users to change browser? Or is your site for Chrome only? Now you choose what browsers should trigger a warning popup or not on your site. 10 10 11 11 == Description == 12 13 **This plugin requires PHP 5.3 or above** 12 14 13 15 This plugin give you the option to give a visitor of your site a warning popup if they use a browser that you don't support. For example, Internet Explorer 9 or lover. … … 26 28 27 29 This plugin is tested and works with the WP Super Cache and W3 Total Cache plugins. It is also tested and working on Wordpress Networks. 30 31 **If you run into problems, please check the [FAQ](http://wordpress.org/plugins/advanced-browser-check/faq/). If you don't find and answer there, look in the [support section](http://wordpress.org/support/plugin/advanced-browser-check) if anyone else have/had the same isssue and if it has been resolved. Creating a new support ticket should always be your last resort for help. Thanks.** 28 32 29 33 *There is versions added of browsers that it not yet released as stable versions. This is to minimize the need of an plugin update in the future when new browsers are released and to let users try the plugin with beta and alpha version of the browsers browsers. I will do my best to keep this plugin updated with the latest versions of available browsers.* … … 57 61 58 62 = I only get a black overlay, no popup = 59 This can get this frommany reasons. It can be any of the plugins you have installed that is not compatible with my plugin. It can also be your theme.63 You can get this for many reasons. It can be any of the plugins you have installed that is not compatible with my plugin. It can also be your theme. 60 64 61 The plugin is tested on the standard theams delivered with Wordpress. I can't guarantee that the plugin will work on 3rd party themes.65 I test the plugin before every update on a clean Wordpress installation with no other plugins activated or custom theme installed. Due to the large amount of 3rd party themes and plugins for Wordpess, it is impossible to guarantee that the plugin will work with them all. 62 66 63 Before posting a support thread, please try to inactivate all your plugins except Advanced Browser Check and try again. If you still have the issue, try with another theme .67 Before posting a support thread, please try to inactivate all your plugins except Advanced Browser Check and try again. If you still have the issue, try with another theme, or install a clean Wordpress is a subfolder so you can test the plugin on your server with a clena Wordpress installation. 64 68 65 69 = I have selected not to block Chrome (or any other browser), but I still get the overlay = 66 Please read the above answer and perform the same tests before you start a new support thread. 70 Please read the above answer and perform the same tests before you start a new support thread. You should also turn on debugging so you see what browser the plugin detects you are using. 67 71 68 72 = I have performed all test above, still not working = 69 73 Okay, might be time to start a support thread, but first, please see if someone else have had your issue and see if they might found a solution before you start a new thread. 70 74 71 If you create a new support post, please provide as much info as possible. Like what Wordpress version you have, version of the plugin, browser you tested and versions on those browser. 75 If you create a new support post, please provide as much info as possible. Like what Wordpress version you have, version of the plugin, browser you tested and versions on those browser. And of course, any error messages you see if you have that. 72 76 73 77 == Screenshots == … … 82 86 83 87 == Changelog == 88 89 = 3.0.3 = 90 * The plugin are now doing AJAX calls "correctly" using the wp_ajax action hook. Hoping this will solve the issue with plugin_dir_path() not working for some users. 84 91 85 92 = 3.0.2 =
Note: See TracChangeset
for help on using the changeset viewer.