Popups – WordPress Popup - Version 1.2

Version Description

  • Fixed permissions to edit popups settings
  • Update Mobile detect class
  • Added safe mode
  • Added js to fix facebook width bug "failed to resize in 45s"
  • Added qTranslate support
  • Fixed bug when disabling shortcodes js in settings page
  • General js fixes
Download this release

Release Info

Developer timersys
Plugin Icon 128x128 Popups – WordPress Popup
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: timersys
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4T6L69EV9G2Q
4
  Tags: twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, popup, facebook popup, scroll popups, popups, wordpress popup, wp popups
5
  Requires at least: 3.6
6
- Tested up to: 4.0.0
7
- Stable tag: 1.1
8
  Text Domain: spucpt
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -37,10 +37,18 @@ There are multiple display filters that can be combined:
37
  * You can also configure background opacity.
38
  * Days until popup shows again
39
 
40
- = Premium Version =
41
-
42
- Check the **new premium version** available in ([http://wp.timersys.com/popups/](http://wp.timersys.com/popups/))
43
-
 
 
 
 
 
 
 
 
44
 
45
  = Plugin's Official Site =
46
 
@@ -87,6 +95,20 @@ Yes if you need to debug you can use uncompressed javascript by addings ([this c
87
 
88
  == Changelog ==
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  = 1.1 =
91
 
92
  * Added settings page
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4T6L69EV9G2Q
4
  Tags: twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, popup, facebook popup, scroll popups, popups, wordpress popup, wp popups
5
  Requires at least: 3.6
6
+ Tested up to: 4.0
7
+ Stable tag: 1.2
8
  Text Domain: spucpt
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
37
  * You can also configure background opacity.
38
  * Days until popup shows again
39
 
40
+ > <strong>Premium Version</strong><br>
41
+ >
42
+ > Check the **new premium version** available in ([http://wp.timersys.com/popups/](http://wp.timersys.com/popups/))
43
+ >
44
+ > * 8 New animations effects
45
+ > * Exit Intent technology
46
+ > * New trigger methods
47
+ > * Timer for auto closing
48
+ > * Ability to disable close button
49
+ > * Ability to disable Advanced close methods like esc or clicking outside of the popup
50
+ > * Premium support
51
+ >
52
 
53
  = Plugin's Official Site =
54
 
95
 
96
  == Changelog ==
97
 
98
+ = 1.2 =
99
+
100
+ * Fixed permissions to edit popups settings
101
+ * Update Mobile detect class
102
+ * Added safe mode
103
+ * Added js to fix facebook width bug "failed to resize in 45s"
104
+ * Added qTranslate support
105
+ * Fixed bug when disabling shortcodes js in settings page
106
+ * General js fixes
107
+
108
+ = 1.1.1 =
109
+
110
+ * Sorry!! fixed bug in settings page and js file
111
+
112
  = 1.1 =
113
 
114
  * Added settings page
admin/assets/js/min/admin-ck.js ADDED
@@ -0,0 +1 @@
 
1
+ var spu={rules:null};SPU_ADMIN=function($){function t(t){"percentage"==t?$("tr.auto_hide").fadeIn("fast"):$("tr.auto_hide").fadeOut("fast")}function r(t,r){return t.val()?parseInt(t.val()):void 0!==r?r+"px":0}function e(t,r){return t.val().length>0?t.wpColorPicker("color"):void 0!==r?r:""}function n(){var t=$("#content_ifr").contents().find("html");t.css({background:"white"}),t.find("#tinymce").css({padding:"25px","background-color":e($("#spu-background-color")),"border-color":e($("#spu-border-color")),"border-width":r($("#spu-border-width")),"border-style":"solid",display:"inline-block",width:$("#spu-width").val(),color:e($("#spu-color")),height:"auto","min-width":"200px"})}return $(document).ready(function(){spu.rules.init(),$("#spu-options input.spu-color-field").wpColorPicker({change:n,clear:n}),$("#spu-options :input").not(".spu-color-field").change(n),checkTriggerMethod($("#spu_trigger").val()),$("#spu_trigger").change(function(){checkTriggerMethod($(this).val())})}),spu.rules={$el:null,init:function(){var t=this;t.$el=$("#spu-rules"),t.$el.on("click",".rules-add-rule",function(){return t.add_rule($(this).closest("tr")),!1}),t.$el.on("click",".rules-remove-rule",function(){return t.remove_rule($(this).closest("tr")),!1}),t.$el.on("click",".rules-add-group",function(){return t.add_group(),!1}),t.$el.on("change",".param select",function(){var t=$(this).closest("tr"),r=t.attr("data-id"),e=t.closest(".rules-group"),n=e.attr("data-id"),i={action:"spu/field_group/render_rules",nonce:spu_js.nonce,rule_id:r,group_id:n,value:"",param:$(this).val()},o=$('<div class="spu-loading"><img src="'+spu_js.admin_url+'/images/wpspin_light.gif"/> </div>');t.find("td.value").html(o),$.ajax({url:ajaxurl,data:i,type:"post",dataType:"html",success:function(t){o.replaceWith(t)}})})},add_rule:function(t){var r=t.clone(),e=r.attr("data-id"),n="rule_"+(parseInt(e.replace("rule_",""),10)+1);return r.find("[name]").each(function(){$(this).attr("name",$(this).attr("name").replace(e,n)),$(this).attr("id",$(this).attr("id").replace(e,n))}),r.attr("data-id",n),t.after(r),!1},remove_rule:function(t){var r=t.siblings("tr").length;0==r?this.remove_group(t.closest(".rules-group")):t.remove()},add_group:function(){var t=this.$el.find(".rules-group:last"),r=t.clone(),e=r.attr("data-id"),n="group_"+(parseInt(e.replace("group_",""),10)+1);r.find("[name]").each(function(){$(this).attr("name",$(this).attr("name").replace(e,n)),$(this).attr("id",$(this).attr("id").replace(e,n))}),r.attr("data-id",n),r.find("h4").text(spu_js.l10n.or),r.find("tr:not(:first)").remove(),t.after(r)},remove_group:function(t){t.remove()}},{onTinyMceInit:function(){n()}}}(jQuery);
admin/assets/js/min/admin-min.js ADDED
@@ -0,0 +1 @@
 
1
+ var spu={rules:null};SPU_ADMIN=function($){function t(t){"percentage"==t?$("tr.auto_hide").fadeIn("fast"):$("tr.auto_hide").fadeOut("fast")}function r(t,r){return t.val()?parseInt(t.val()):void 0!==r?r+"px":0}function e(t,r){return t.val().length>0?t.wpColorPicker("color"):void 0!==r?r:""}function n(){var t=$("#content_ifr").contents().find("html");t.css({background:"white"}),t.find("#tinymce").css({padding:"25px","background-color":e($("#spu-background-color")),"border-color":e($("#spu-border-color")),"border-width":r($("#spu-border-width")),"border-style":"solid",display:"inline-block",width:$("#spu-width").val(),color:e($("#spu-color")),height:"auto","min-width":"200px"})}return $(document).ready(function(){spu.rules.init(),$("#spu-options input.spu-color-field").wpColorPicker({change:n,clear:n}),$("#spu-options :input").not(".spu-color-field").change(n),t($("#spu_trigger").val()),$("#spu_trigger").change(function(){t($(this).val())})}),spu.rules={$el:null,init:function(){var t=this;t.$el=$("#spu-rules"),t.$el.on("click",".rules-add-rule",function(){return t.add_rule($(this).closest("tr")),!1}),t.$el.on("click",".rules-remove-rule",function(){return t.remove_rule($(this).closest("tr")),!1}),t.$el.on("click",".rules-add-group",function(){return t.add_group(),!1}),t.$el.on("change",".param select",function(){var t=$(this).closest("tr"),r=t.attr("data-id"),e=t.closest(".rules-group"),n=e.attr("data-id"),i={action:"spu/field_group/render_rules",nonce:spu_js.nonce,rule_id:r,group_id:n,value:"",param:$(this).val()},a=$('<div class="spu-loading"><img src="'+spu_js.admin_url+'/images/wpspin_light.gif"/> </div>');t.find("td.value").html(a),$.ajax({url:ajaxurl,data:i,type:"post",dataType:"html",success:function(t){a.replaceWith(t)}})})},add_rule:function(t){var r=t.clone(),e=r.attr("data-id"),n="rule_"+(parseInt(e.replace("rule_",""),10)+1);return r.find("[name]").each(function(){$(this).attr("name",$(this).attr("name").replace(e,n)),$(this).attr("id",$(this).attr("id").replace(e,n))}),r.attr("data-id",n),t.after(r),!1},remove_rule:function(t){var r=t.siblings("tr").length;0==r?this.remove_group(t.closest(".rules-group")):t.remove()},add_group:function(){var t=this.$el.find(".rules-group:last"),r=t.clone(),e=r.attr("data-id"),n="group_"+(parseInt(e.replace("group_",""),10)+1);r.find("[name]").each(function(){$(this).attr("name",$(this).attr("name").replace(e,n)),$(this).attr("id",$(this).attr("id").replace(e,n))}),r.attr("data-id",n),r.find("h4").text(spu_js.l10n.or),r.find("tr:not(:first)").remove(),t.after(r)},remove_group:function(t){t.remove()}},{onTinyMceInit:function(){n()}}}(jQuery);
admin/class-social-popup-admin.php CHANGED
@@ -160,15 +160,15 @@ class SocialPopup_Admin {
160
  'rewrite' => array( 'slug' => 'spucpt' ),
161
  'capability_type' => 'post',
162
  'capabilities' => array(
163
- 'publish_posts' => 'manage_options',
164
- 'edit_posts' => 'manage_options',
165
- 'edit_others_posts' => 'manage_options',
166
- 'delete_posts' => 'manage_options',
167
- 'delete_others_posts' => 'manage_options',
168
- 'read_private_posts' => 'manage_options',
169
- 'edit_post' => 'manage_options',
170
- 'delete_post' => 'manage_options',
171
- 'read_post' => 'manage_options',
172
  ),
173
  'has_archive' => false,
174
  'hierarchical' => false,
@@ -188,7 +188,7 @@ class SocialPopup_Admin {
188
  */
189
  public function add_settings_menu() {
190
 
191
- add_submenu_page('edit.php?post_type=spucpt', 'Settings', 'Settings', 'edit_posts', 'spu_settings', array( $this, 'settings_page' ) );
192
 
193
  }
194
 
160
  'rewrite' => array( 'slug' => 'spucpt' ),
161
  'capability_type' => 'post',
162
  'capabilities' => array(
163
+ 'publish_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
164
+ 'edit_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
165
+ 'edit_others_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
166
+ 'delete_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
167
+ 'delete_others_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
168
+ 'read_private_posts' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
169
+ 'edit_post' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
170
+ 'delete_post' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
171
+ 'read_post' => apply_filters( 'spu/settings_page/roles', 'manage_options'),
172
  ),
173
  'has_archive' => false,
174
  'hierarchical' => false,
188
  */
189
  public function add_settings_menu() {
190
 
191
+ add_submenu_page('edit.php?post_type=spucpt', 'Settings', 'Settings', apply_filters( 'spu/settings_page/roles', 'manage_options'), 'spu_settings', array( $this, 'settings_page' ) );
192
 
193
  }
194
 
admin/views/settings-page.php CHANGED
@@ -16,6 +16,14 @@
16
  <p class="help"><?php _e( 'Will use uncompressed js', $this->plugin_slug ); ?></p>
17
  </td>
18
 
 
 
 
 
 
 
 
 
19
  </tr>
20
  <tr valign="top" class="">
21
  <th><label for="style"><?php _e( 'Remove shortcodes style', $this->plugin_slug ); ?></label></th>
16
  <p class="help"><?php _e( 'Will use uncompressed js', $this->plugin_slug ); ?></p>
17
  </td>
18
 
19
+ </tr>
20
+ <tr valign="top" class="">
21
+ <th><label for="safe"><?php _e( 'Enable safe mode?', $this->plugin_slug ); ?></label></th>
22
+ <td colspan="3">
23
+ <label><input type="checkbox" id="safe" name="spu_settings[safe]" value="1" <?php checked($opts['safe'], 1); ?> />
24
+ <p class="help"><?php _e( 'Will move all popups to top of the screen.', $this->plugin_slug ); ?></p>
25
+ </td>
26
+
27
  </tr>
28
  <tr valign="top" class="">
29
  <th><label for="style"><?php _e( 'Remove shortcodes style', $this->plugin_slug ); ?></label></th>
includes/class-spu-helper.php CHANGED
@@ -76,7 +76,7 @@ class Spu_Helper {
76
  case "page":
77
 
78
  $post_type = 'page';
79
- $posts = get_posts(array(
80
  'posts_per_page' => -1,
81
  'post_type' => $post_type,
82
  'orderby' => 'menu_order title',
@@ -84,7 +84,9 @@ class Spu_Helper {
84
  'post_status' => 'any',
85
  'suppress_filters' => false,
86
  'update_post_meta_cache' => false,
87
- ));
 
 
88
 
89
  if( $posts )
90
  {
@@ -162,13 +164,13 @@ class Spu_Helper {
162
  {
163
  foreach( $post_types as $post_type )
164
  {
165
-
166
- $posts = get_posts(array(
167
  'numberposts' => '-1',
168
  'post_type' => $post_type,
169
  'post_status' => array('publish', 'private', 'draft', 'inherit', 'future'),
170
  'suppress_filters' => false,
171
- ));
 
172
 
173
  if( $posts)
174
  {
@@ -200,7 +202,8 @@ class Spu_Helper {
200
 
201
  case "post_category" :
202
 
203
- $category_ids = get_all_category_ids();
 
204
 
205
  foreach($category_ids as $cat_id)
206
  {
76
  case "page":
77
 
78
  $post_type = 'page';
79
+ $args = array(
80
  'posts_per_page' => -1,
81
  'post_type' => $post_type,
82
  'orderby' => 'menu_order title',
84
  'post_status' => 'any',
85
  'suppress_filters' => false,
86
  'update_post_meta_cache' => false,
87
+ );
88
+
89
+ $posts = get_posts( apply_filters('spu/rules/page_args', $args ) );
90
 
91
  if( $posts )
92
  {
164
  {
165
  foreach( $post_types as $post_type )
166
  {
167
+ $args = array(
 
168
  'numberposts' => '-1',
169
  'post_type' => $post_type,
170
  'post_status' => array('publish', 'private', 'draft', 'inherit', 'future'),
171
  'suppress_filters' => false,
172
+ );
173
+ $posts = get_posts(apply_filters('spu/rules/post_args', $args ));
174
 
175
  if( $posts)
176
  {
202
 
203
  case "post_category" :
204
 
205
+ $ids = get_all_category_ids();
206
+ $category_ids = apply_filters('spu/rules/category_ids', $ids );
207
 
208
  foreach($category_ids as $cat_id)
209
  {
popups.php CHANGED
@@ -11,7 +11,7 @@
11
  * @socialpopup
12
  * Plugin Name: Popups
13
  * Plugin URI: http://www.timersys.com/free-plugins/social-popup/
14
- * Version: 1.1
15
  * Description: This plugin will display a popup or splash screen when a new user visit your site showing a Google+, twitter and facebook follow links. This will increase you followers ratio in a 40%. Popup will be close depending on your settings. Check readme.txt for full details.
16
  * Author: Damian Logghe
17
  * Author URI: http://wp.timersys.com
11
  * @socialpopup
12
  * Plugin Name: Popups
13
  * Plugin URI: http://www.timersys.com/free-plugins/social-popup/
14
+ * Version: 1.2
15
  * Description: This plugin will display a popup or splash screen when a new user visit your site showing a Google+, twitter and facebook follow links. This will increase you followers ratio in a 40%. Popup will be close depending on your settings. Check readme.txt for full details.
16
  * Author: Damian Logghe
17
  * Author URI: http://wp.timersys.com
public/assets/js/min/public-ck.js DELETED
@@ -1 +0,0 @@
1
- function spuCreateCookie(t,i,n){if(n){var e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3);var o="; expires="+e.toGMTString()}else var o="";document.cookie=t+"="+i+o+"; path=/"}function spuReadCookie(t){for(var i=t+"=",n=document.cookie.split(";"),e=0;e<n.length;e++){for(var o=n[e];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(i))return o.substring(i.length,o.length)}return null}jQuery(window).load(function(){window.SPU=function($){function t(t){var i=o[t],n=$(window).width(),e=$(window).height(),s=i.height(),a=i.width();i.css({position:"fixed",top:e/2-s/2,left:n/2-a/2})}function i(i,n){var e=o[i],s=$("#spu-bg-"+i),a=e.data("bgopa");if(e.is(":animated"))return!1;if(n===!0&&e.is(":visible")||n===!1&&e.is(":hidden"))return!1;if(n===!1){var r=parseInt(e.data("cookie"));r>0&&spuCreateCookie("spu_box_"+i,!0,r)}e.hasClass("spu-centered")&&t(i);var d=e.data("animation");return"fade"===d?e.fadeToggle("slow"):e.slideToggle("slow"),n===!0&&a>0?s.fadeIn():s.fadeOut(),n}var n=$(window).height(),e=spuvar.is_admin,o=[];return $(".spu-content").children().first().css({"margin-top":0,"padding-top":0}).end().last().css({"margin-bottom":0,"padding-bottom":0}),$(".spu-box").each(function(){var t=$(this),s=t.data("trigger"),a=0,r=1===parseInt(t.data("test-mode")),d=t.data("box-id"),u=1===parseInt(t.data("auto-hide")),c=parseInt(t.data("seconds-close")),h=parseInt(t.data("trigger-number"),10),f="percentage"==s?parseInt(t.data("trigger-number"),10)/100:.8,l=f*$(document).height();$(".spu-google").width($(".spu-google").width()-20),$(".spu-twitter").width($(".spu-twitter").width()-12);var g=0,p=0,w=$(this).find(".spu-content").width(),m=t.data("total");m&&($(this).find(".spu-shortcode").each(function(){g+=$(this).width()}),p=w-g),p>0&&($(this).find(".spu-shortcode").each(function(){3==m?$(this).css("margin-left",p/(m-1)):$(this).css("margin-left",p/2)}),2==m?$(this).find(".spu-shortcode").last().css("margin-left",0):3==m&&$(this).find(".spu-shortcode").first().css("margin-left",0)),$(document).keyup(function(t){27==t.keyCode&&i(d,!1)});var v=navigator.userAgent,b=v.match(/iPad/i)||v.match(/iPhone/i)?"touchstart":"click";$("body").on(b,function(t){console.log(b.target),i(d,!1)}),$(".spu-box").on(b,function(t){t.stopPropagation()}),t.hide().css("left",""),o[d]=t;var k=function(){a&&clearTimeout(a),a=window.setTimeout(function(){var t=$(window).scrollTop(),e=t+n>=l;e?(u||$(window).unbind("scroll",k),i(d,!0)):i(d,!1)},100)},T=function(){a&&clearTimeout(a),a=window.setTimeout(function(){i(d,!0)},1e3*h)},x=spuReadCookie("spu_box_"+d);if((void 0==x||e&&r)&&("seconds"==s?T():($(window).bind("scroll",k),k()),window.location.hash&&window.location.hash.length>0)){var C=window.location.hash,I;C.substring(1)===t.attr("id")&&setTimeout(function(){i(d,!0)},100)}t.find(".spu-close").click(function(){i(d,!1),"percentage"==s&&$(window).unbind("scroll",k)}),$('a[href="#'+t.attr("id")+'"]').click(function(){return i(d,!0),!1})}),{show:function(t){return i(t,!0)},hide:function(t){return i(t,!1)}}}(window.jQuery)});
 
public/assets/js/min/public-min.js ADDED
@@ -0,0 +1 @@
 
1
+ function spuCreateCookie(t,i,e){if(e){var n=new Date;n.setTime(n.getTime()+24*e*60*60*1e3);var o="; expires="+n.toGMTString()}else var o="";document.cookie=t+"="+i+o+"; path=/"}function spuReadCookie(t){for(var i=t+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var o=e[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(i))return o.substring(i.length,o.length)}return null}jQuery(window).load(function(){window.SPU=function($){function t(t){var i=a[t],e=$(window).width(),n=$(window).height(),o=i.height(),s=i.width();i.css({position:"fixed",top:n/2-o/2,left:e/2-s/2})}function i(t){var i=$(t).find(".spu-facebook");if(i.length){var e=i.find(".fb-like > span").width();if(0==e){var n=i.find(".fb-like").data("layout");i.append("box_count"==n?'<style type="text/css"> #'+$(t).attr("id")+" .fb-like iframe, #"+$(t).attr("id")+" .fb_iframe_widget span, #"+$(t).attr("id")+" .fb_iframe_widget{ height: 63px !important;width: 80px !important;}</style>":'<style type="text/css"> #'+$(t).attr("id")+" .fb-like iframe, #"+$(t).attr("id")+" .fb_iframe_widget span, #"+$(t).attr("id")+" .fb_iframe_widget{ height: 20px !important;width: 80px !important;}</style>")}}}function e(i,e){var n=a[i],o=$("#spu-bg-"+i),s=n.data("bgopa");if(n.is(":animated"))return!1;if(e===!0&&n.is(":visible")||e===!1&&n.is(":hidden"))return!1;if(e===!1){var r=parseInt(n.data("cookie"));r>0&&spuCreateCookie("spu_box_"+i,!0,r)}else n.hasClass("spu-centered")&&t(i);var d=n.data("spuanimation");return"fade"===d?n.fadeToggle("slow"):n.slideToggle("slow"),e===!0&&s>0?o.fadeIn():o.fadeOut(),e}var n=$(window).height(),o=spuvar.is_admin,a=[];return $(".spu-content").children().first().css({"margin-top":0,"padding-top":0}).end().last().css({"margin-bottom":0,"padding-bottom":0}),$(".spu-box").each(function(){spuvar.safe_mode&&$(this).prependTo("body");var t=$(this),s=t.data("trigger"),r=0,d=1===parseInt(t.data("test-mode")),u=t.data("box-id"),c=1===parseInt(t.data("auto-hide")),f=parseInt(t.data("seconds-close")),h=parseInt(t.data("trigger-number"),10),p="percentage"==s?parseInt(t.data("trigger-number"),10)/100:.8,l=p*$(document).height();i(t),$(".spu-google").width($(".spu-google").width()-20),$(".spu-twitter").width($(".spu-twitter").width()-12);var g=0,w=0,m=$(this).find(".spu-content").width(),b=t.data("total");b&&!spuvar.disable_style&&($(this).find(".spu-shortcode").each(function(){g+=$(this).width()}),w=m-g),w>0&&($(this).find(".spu-shortcode").each(function(){3==b?$(this).css("margin-left",w/(b-1)):$(this).css("margin-left",w/2)}),2==b?$(this).find(".spu-shortcode").last().css("margin-left",0):3==b&&$(this).find(".spu-shortcode").first().css("margin-left",0)),$(document).keyup(function(t){27==t.keyCode&&e(u,!1)});var v=navigator.userAgent,k=v.match(/iPad/i)||v.match(/iPhone/i)?"touchstart":"click";$("body").on(k,function(t){console.log(k.target),e(u,!1)}),$("body").on(k,".spu-box",function(t){t.stopPropagation()}),t.hide().css("left",""),a[u]=t;var _=function(){r&&clearTimeout(r),r=window.setTimeout(function(){var t=$(window).scrollTop(),i=t+n>=l;i?(c||$(window).unbind("scroll",_),e(u,!0)):e(u,!1)},100)},x=function(){r&&clearTimeout(r),r=window.setTimeout(function(){e(u,!0)},1e3*h)},y=spuReadCookie("spu_box_"+u);if((void 0==y||o&&d)&&("seconds"==s?x():($(window).bind("scroll",_),_()),window.location.hash&&window.location.hash.length>0)){var T=window.location.hash,C;T.substring(1)===t.attr("id")&&setTimeout(function(){e(u,!0)},100)}t.find(".spu-close").click(function(){e(u,!1),"percentage"==s&&$(window).unbind("scroll",_)}),$('a[href="#'+t.attr("id")+'"]').click(function(){return e(u,!0),!1})}),{show:function(t){return e(t,!0)},hide:function(t){return e(t,!1)}}}(window.jQuery)});
public/assets/js/public.js CHANGED
@@ -18,6 +18,12 @@ jQuery(window).load(function() {
18
  // loop through boxes
19
  $(".spu-box").each(function() {
20
 
 
 
 
 
 
 
21
 
22
  // vars
23
  var $box = $(this);
@@ -31,6 +37,7 @@ jQuery(window).load(function() {
31
  var triggerPercentage = ( triggerMethod == 'percentage' ) ? ( parseInt( $box.data('trigger-number'), 10 ) / 100 ) : 0.8;
32
  var triggerHeight = ( triggerPercentage * $(document).height() );
33
 
 
34
  //correct widths of sharing icons
35
  $('.spu-google').width($('.spu-google').width()-20);
36
  $('.spu-twitter').width($('.spu-twitter').width()-12);
@@ -92,7 +99,7 @@ jQuery(window).load(function() {
92
  toggleBox( id, false );
93
  });
94
  //not on the box
95
- $('.spu-box' ).on(event, function(event) {
96
  event.stopPropagation();
97
  });
98
 
@@ -189,6 +196,7 @@ jQuery(window).load(function() {
189
  });
190
 
191
  });
 
192
  //function that center popup on screen
193
  function centerBox( id ) {
194
  var $box = $boxes[id];
@@ -203,6 +211,29 @@ jQuery(window).load(function() {
203
  });
204
  }
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  //function that show/hide box
207
  function toggleBox( id, show ) {
208
  var $box = $boxes[id];
@@ -226,29 +257,32 @@ jQuery(window).load(function() {
226
  if( days > 0 ) {
227
  spuCreateCookie( 'spu_box_' + id, true, days );
228
  }
229
- }
230
-
231
- //if is a centered popup, center it
232
- if( $box.hasClass('spu-centered') ) {
233
 
234
- centerBox( id );
235
-
236
- }
237
 
 
 
 
 
 
 
238
  // show box
239
- var animation = $box.data('animation');
240
 
241
  if( animation === 'fade' ) {
242
  $box.fadeToggle( 'slow' );
243
  } else {
244
  $box.slideToggle( 'slow' );
245
  }
 
 
246
  if( show === true && $bgopa > 0 ){
247
  $bg.fadeIn();
248
  } else {
249
  $bg.fadeOut();
250
  }
251
-
252
  return show;
253
  }
254
 
18
  // loop through boxes
19
  $(".spu-box").each(function() {
20
 
21
+ // move to parent in safe mode
22
+ if( spuvar.safe_mode ){
23
+
24
+ $(this).prependTo('body');
25
+
26
+ }
27
 
28
  // vars
29
  var $box = $(this);
37
  var triggerPercentage = ( triggerMethod == 'percentage' ) ? ( parseInt( $box.data('trigger-number'), 10 ) / 100 ) : 0.8;
38
  var triggerHeight = ( triggerPercentage * $(document).height() );
39
 
40
+ facebookFix( $box );
41
  //correct widths of sharing icons
42
  $('.spu-google').width($('.spu-google').width()-20);
43
  $('.spu-twitter').width($('.spu-twitter').width()-12);
99
  toggleBox( id, false );
100
  });
101
  //not on the box
102
+ $('body' ).on(event,'.spu-box', function(event) {
103
  event.stopPropagation();
104
  });
105
 
196
  });
197
 
198
  });
199
+
200
  //function that center popup on screen
201
  function centerBox( id ) {
202
  var $box = $boxes[id];
211
  });
212
  }
213
 
214
+ //facebookBugFix
215
+ function facebookFix( box ) {
216
+
217
+ // Facebook bug that fails to resize
218
+ var $fbbox = $(box).find('.spu-facebook');
219
+ if( $fbbox.length ){
220
+ //if exist and width is 0
221
+ var $fbwidth = $fbbox.find('.fb-like > span').width();
222
+ if ( $fbwidth == 0 ) {
223
+ var $fblayout = $fbbox.find('.fb-like').data('layout');
224
+ if( $fblayout == 'box_count' ) {
225
+
226
+ $fbbox.append('<style type="text/css"> #'+$(box).attr('id')+' .fb-like iframe, #'+$(box).attr('id')+' .fb_iframe_widget span, #'+$(box).attr('id')+' .fb_iframe_widget{ height: 63px !important;width: 80px !important;}</style>');
227
+
228
+ } else {
229
+
230
+ $fbbox.append('<style type="text/css"> #'+$(box).attr('id')+' .fb-like iframe, #'+$(box).attr('id')+' .fb_iframe_widget span, #'+$(box).attr('id')+' .fb_iframe_widget{ height: 20px !important;width: 80px !important;}</style>');
231
+
232
+ }
233
+ }
234
+ }
235
+ }
236
+
237
  //function that show/hide box
238
  function toggleBox( id, show ) {
239
  var $box = $boxes[id];
257
  if( days > 0 ) {
258
  spuCreateCookie( 'spu_box_' + id, true, days );
259
  }
260
+ } else {
 
 
 
261
 
262
+ //if is a centered popup, center it
263
+ if( $box.hasClass('spu-centered') ) {
 
264
 
265
+ centerBox( id );
266
+
267
+ }
268
+
269
+ }
270
+
271
  // show box
272
+ var animation = $box.data('spuanimation');
273
 
274
  if( animation === 'fade' ) {
275
  $box.fadeToggle( 'slow' );
276
  } else {
277
  $box.slideToggle( 'slow' );
278
  }
279
+
280
+ //background
281
  if( show === true && $bgopa > 0 ){
282
  $bg.fadeIn();
283
  } else {
284
  $bg.fadeOut();
285
  }
 
286
  return show;
287
  }
288
 
public/class-social-popup.php CHANGED
@@ -23,7 +23,7 @@ class SocialPopup {
23
  *
24
  * @var string
25
  */
26
- const VERSION = '1.1';
27
 
28
  /**
29
  * Popups to use acrros files
@@ -324,7 +324,7 @@ class SocialPopup {
324
  */
325
  public function register_scripts() {
326
 
327
- $js_url = plugins_url( 'assets/js/min/public-ck.js', __FILE__ );
328
 
329
  $opts = $this->spu_settings;
330
 
@@ -335,17 +335,17 @@ class SocialPopup {
335
 
336
  wp_register_script( 'spu-public', $js_url, array( 'jquery' ), self::VERSION, true );
337
 
338
- if( ! defined( 'SPU_UNLOAD_FB_JS') || !empty( $opts['facebook'] ) ) {
339
 
340
  wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.get_locale().'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);
341
 
342
  }
343
- if( ! defined( 'SPU_UNLOAD_TW_JS') || !empty( $opts['google'] ) ) {
344
 
345
  wp_register_script( 'spu-twitter', 'http://platform.twitter.com/widgets.js', array('jquery'), self::VERSION, FALSE);
346
 
347
  }
348
- if( ! defined( 'SPU_UNLOAD_GO_JS') || !empty( $opts['twitter'] ) ) {
349
 
350
  wp_register_script( 'spu-google', 'https://apis.google.com/js/plusone.js', array('jquery'), self::VERSION, FALSE);
351
 
@@ -404,7 +404,7 @@ class SocialPopup {
404
 
405
  wp_enqueue_script('spu-public');
406
  wp_enqueue_style('spu-public-css');
407
- wp_localize_script( 'spu-public', 'spuvar', array( 'is_admin' => current_user_can( 'administrator' ), 'disable_style' => $this->spu_settings['shortcodes_style'] ) );
408
 
409
  if( $facebook ){
410
  wp_enqueue_script( 'spu-facebook' );
23
  *
24
  * @var string
25
  */
26
+ const VERSION = '1.2';
27
 
28
  /**
29
  * Popups to use acrros files
324
  */
325
  public function register_scripts() {
326
 
327
+ $js_url = plugins_url( 'assets/js/min/public-min.js', __FILE__ );
328
 
329
  $opts = $this->spu_settings;
330
 
335
 
336
  wp_register_script( 'spu-public', $js_url, array( 'jquery' ), self::VERSION, true );
337
 
338
+ if( !defined( 'SPU_UNLOAD_FB_JS') && empty( $opts['facebook'] ) ) {
339
 
340
  wp_register_script( 'spu-facebook', 'http://connect.facebook.net/'.get_locale().'/all.js#xfbml=1', array('jquery'), self::VERSION, FALSE);
341
 
342
  }
343
+ if( ! defined( 'SPU_UNLOAD_TW_JS') && empty( $opts['twitter'] ) ) {
344
 
345
  wp_register_script( 'spu-twitter', 'http://platform.twitter.com/widgets.js', array('jquery'), self::VERSION, FALSE);
346
 
347
  }
348
+ if( ! defined( 'SPU_UNLOAD_GO_JS') && empty( $opts['google'] ) ) {
349
 
350
  wp_register_script( 'spu-google', 'https://apis.google.com/js/plusone.js', array('jquery'), self::VERSION, FALSE);
351
 
404
 
405
  wp_enqueue_script('spu-public');
406
  wp_enqueue_style('spu-public-css');
407
+ wp_localize_script( 'spu-public', 'spuvar', array( 'is_admin' => current_user_can( 'administrator' ), 'disable_style' => $this->spu_settings['shortcodes_style'], 'safe_mode' => $this->spu_settings['safe'] ) );
408
 
409
  if( $facebook ){
410
  wp_enqueue_script( 'spu-facebook' );
public/includes/Mobile_Detect.php CHANGED
@@ -20,7 +20,7 @@
20
  * README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md
21
  * HOWTO: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples
22
  *
23
- * @version 2.8.3
24
  */
25
 
26
  class Mobile_Detect
@@ -64,7 +64,7 @@ class Mobile_Detect
64
  /**
65
  * Stores the version number of the current release.
66
  */
67
- const VERSION = '2.8.3';
68
 
69
  /**
70
  * A type for the version() method indicating a string return value.
@@ -139,16 +139,16 @@ class Mobile_Detect
139
  * @var array
140
  */
141
  protected static $phoneDevices = array(
142
- 'iPhone' => '\biPhone.*(Mobile|PhoneGap)|\biPod', // |\biTunes
143
  'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+',
144
  'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m',
145
  'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile',
146
  // @todo: Is 'Dell Streak' a tablet or a phone? ;)
147
  'Dell' => 'Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b',
148
  'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925',
149
- 'Samsung' => 'Samsung|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E',
150
  'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802)',
151
- 'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i',
152
  'Asus' => 'Asus.*Galaxy|PadFone.*Mobile',
153
  // @ref: http://www.micromaxinfo.com/mobiles/smartphones
154
  // Added because the codes might conflict with Acer Tablets.
@@ -164,8 +164,16 @@ class Mobile_Detect
164
  // Added simvalley mobile just for fun. They have some interesting devices.
165
  // @ref: http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html
166
  'SimValley' => '\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b',
 
 
 
 
 
 
 
 
167
  // @Tapatalk is a mobile app; @ref: http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
168
- 'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser'
169
  );
170
 
171
  /**
@@ -176,25 +184,26 @@ class Mobile_Detect
176
  protected static $tabletDevices = array(
177
  'iPad' => 'iPad|iPad.*Mobile', // @todo: check for mobile friendly emails topic.
178
  'NexusTablet' => 'Android.*Nexus[\s]+(7|10)|^.*Android.*Nexus(?:(?!Mobile).)*$',
179
- 'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-I9205|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705C|SM-T535|SM-T331', // SCH-P709|SCH-P729|SM-T2558 - Samsung Mega - treat them like a regular phone.
180
  // @reference: http://www.labnol.org/software/kindle-user-agent-string/20378/
181
  'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE)\b',
182
  // Only the Surface tablets with Windows RT are considered mobile.
183
  // @ref: http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx
184
- 'SurfaceTablet' => 'Windows NT [0-9.]+; ARM;',
185
  // @ref: http://shopping1.hp.com/is-bin/INTERSHOP.enfinity/WFS/WW-USSMBPublicStore-Site/en_US/-/USD/ViewStandardCatalog-Browse?CatalogCategoryID=JfIQ7EN5lqMAAAEyDcJUDwMT
186
- 'HPTablet' => 'HP Slate 7|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8',
187
  // @note: watch out for PadFone, see #132
188
- 'AsusTablet' => '^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\bK00F\b|TX201LA',
 
189
  'BlackBerryTablet' => 'PlayBook|RIM Tablet',
190
- 'HTCtablet' => 'HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200',
191
  'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617',
192
  'NookTablet' => 'Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2',
193
  // @ref: http://www.acer.ro/ac/ro/RO/content/drivers
194
  // @ref: http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell is part of Acer)
195
  // @ref: http://us.acer.com/ac/en/US/content/group/tablets
196
  // @note: Can conflict with Micromax and Motorola phones codes.
197
- 'AcerTablet' => 'Android.*; \b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-830)\b|W3-810|\bA3-A10\b',
198
  // @ref: http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/
199
  // @ref: http://us.toshiba.com/tablets/tablet-finder
200
  // @ref: http://www.toshiba.co.jp/regza/tablet/
@@ -206,14 +215,14 @@ class Mobile_Detect
206
  // Prestigio Tablets http://www.prestigio.com/support
207
  'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD',
208
  // @ref: http://support.lenovo.com/en_GB/downloads/default.page?#
209
- 'LenovoTablet' => 'IdeaTab|ThinkPad([ ]+)?Tablet|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A1000|A2107|A2109|A1107|B6000|B8000|B8080-F)',
210
  // @ref: http://www.yarvik.com/en/matrix/tablets/
211
  'YarvikTablet' => 'Android.*\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\b',
212
  'MedionTablet' => 'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB',
213
  'ArnovaTablet' => 'AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT',
214
  // http://www.intenso.de/kategorie_en.php?kategorie=33
215
  // @todo: http://www.nbhkdz.com/read/b8e64202f92a2df129126bff.html - investigate
216
- 'IntensoTablet' => 'INM8002KP|INM1010FP|INM805ND|Intenso Tab',
217
  // IRU.ru Tablets http://www.iru.ru/catalog/soho/planetable/
218
  'IRUTablet' => 'M702pro',
219
  'MegafonTablet' => 'MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b',
@@ -222,19 +231,24 @@ class Mobile_Detect
222
  // @ref: http://www.allview.ro/produse/droseries/lista-tablete-pc/
223
  'AllViewTablet' => 'Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)',
224
  // @reference: http://wiki.archosfans.com/index.php?title=Main_Page
225
- 'ArchosTablet' => '\b(101G9|80G9|A101IT)\b|Qilive 97R|ARCHOS 101G10|Archos 101 Neon',
226
  // @ref: http://www.ainol.com/plugin.php?identifier=ainol&module=product
227
  'AinolTablet' => 'NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark',
228
  // @todo: inspect http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER
229
  // @ref: Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser
230
  // @ref: http://www.sony.jp/support/tablet/
231
  'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551',
 
 
232
  // @ref: db + http://www.cube-tablet.com/buy-products.html
233
  'CubeTablet' => 'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT',
234
  // @ref: http://www.cobyusa.com/?p=pcat&pcat_id=3001
235
  'CobyTablet' => 'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010',
236
  // @ref: http://www.match.net.cn/products.asp
237
  'MIDTablet' => 'M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733',
 
 
 
238
  // @ref: http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese Tablets)
239
  // @ref: http://www.imp3.net/14/show.php?itemid=20454
240
  'SMiTTablet' => 'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)',
@@ -269,7 +283,7 @@ class Mobile_Detect
269
  // @note: Avoid detecting 'PLAYSTATION 3' as mobile.
270
  'PlaystationTablet' => 'Playstation.*(Portable|Vita)',
271
  // @ref: http://www.trekstor.de/surftabs.html
272
- 'TrekstorTablet' => 'ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A',
273
  // @ref: http://www.pyleaudio.com/Products.aspx?%2fproducts%2fPersonal-Electronics%2fTablets
274
  'PyleAudioTablet' => '\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b',
275
  // @ref: http://www.advandigital.com/index.php?link=content-product&jns=JP001
@@ -327,7 +341,7 @@ class Mobile_Detect
327
  // @note: no need to add all the tablet codes since they are guided by the first regex.
328
  'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab',
329
  // Generic Vodafone tablets.
330
- 'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10',
331
  // French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb
332
  // Aka: http://www.essentielb.fr/
333
  'EssentielBTablet' => 'Smart[ \']?TAB[ ]+?[0-9]+|Family[ \']?TAB2',
@@ -359,16 +373,29 @@ class Mobile_Detect
359
  // http://www1.viewsonic.com/products/computing/tablets/
360
  'ViewsonicTablet' => 'ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a',
361
  // http://www.odys.de/web/internet-tablet_en.html
362
- 'OdysTablet' => 'LOOX|XENO10|ODYS Space',
363
  // http://www.captiva-power.de/products.html#tablets-en
364
  'CaptivaTablet' => 'CAPTIVA PAD',
365
  // IconBIT - http://www.iconbit.com/products/tablets/
366
  'IconbitTablet' => 'NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S',
 
 
 
 
 
 
 
 
 
 
 
 
 
367
  // @ref: http://www.tesco.com/direct/hudl/
368
  'Hudl' => 'Hudl HT7S3',
369
  // @ref: http://www.telstra.com.au/home-phone/thub-2/
370
  'TelstraTablet' => 'T-Hub2',
371
- 'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4',
372
  );
373
 
374
  /**
@@ -386,7 +413,8 @@ class Mobile_Detect
386
  // @reference: http://en.wikipedia.org/wiki/Windows_Phone
387
  // http://wifeng.cn/?r=blog&a=view&id=106
388
  // http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx
389
- 'WindowsPhoneOS' => 'Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7',
 
390
  'iOS' => '\biPhone.*Mobile|\biPod|\biPad',
391
  // http://en.wikipedia.org/wiki/MeeGo
392
  // @todo: research MeeGo in UAs
@@ -417,20 +445,26 @@ class Mobile_Detect
417
  'TeaShark' => 'teashark',
418
  'Blazer' => 'Blazer',
419
  // @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3
420
- 'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile',
421
  // @ref: http://en.wikipedia.org/wiki/Midori_(web_browser)
422
  //'Midori' => 'midori',
423
  'Tizen' => 'Tizen',
424
  'UCBrowser' => 'UC.*Browser|UCWEB',
 
 
425
  // @ref: https://github.com/serbanghita/Mobile-Detect/issues/7
426
  'DiigoBrowser' => 'DiigoBrowser',
427
  // http://www.puffinbrowser.com/index.php
428
  'Puffin' => 'Puffin',
429
  // @ref: http://mercury-browser.com/index.html
430
  'Mercury' => '\bMercury\b',
 
 
 
 
431
  // @reference: http://en.wikipedia.org/wiki/Minimo
432
  // http://en.wikipedia.org/wiki/Vision_Mobile_Browser
433
- 'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger'
434
  );
435
 
436
  /**
@@ -511,6 +545,8 @@ class Mobile_Detect
511
  'UC Browser' => 'UC Browser[VER]',
512
  'MQQBrowser' => 'MQQBrowser/[VER]',
513
  'MicroMessenger' => 'MicroMessenger/[VER]',
 
 
514
  // @note: Safari 7534.48.3 is actually Version 5.1.
515
  // @note: On BlackBerry the Version is overwriten by the OS.
516
  'Safari' => array( 'Version/[VER]', 'Safari/[VER]' ),
@@ -543,15 +579,15 @@ class Mobile_Detect
543
  /**
544
  * Construct an instance of this class.
545
  *
546
- * @param array $headers Specify the headers as injection. Should be PHP _SERVER flavored.
547
- * If left empty, will use the global _SERVER['HTTP_*'] vars instead.
548
  * @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT
549
  * from the $headers array instead.
550
  */
551
  public function __construct(
552
  array $headers = null,
553
  $userAgent = null
554
- ){
555
  $this->setHttpHeaders($headers);
556
  $this->setUserAgent($userAgent);
557
  }
@@ -666,8 +702,8 @@ class Mobile_Detect
666
 
667
  $this->userAgent = null;
668
 
669
- foreach($this->getUaHttpHeaders() as $altHeader){
670
- if(!empty($this->httpHeaders[$altHeader])){ // @todo: should use getHttpHeader(), but it would be slow. (Serban)
671
  $this->userAgent .= $this->httpHeaders[$altHeader] . " ";
672
  }
673
  }
@@ -847,14 +883,15 @@ class Mobile_Detect
847
  public function checkHttpHeadersForMobile()
848
  {
849
 
850
- foreach($this->getMobileHeaders() as $mobileHeader => $matchType){
851
- if( isset($this->httpHeaders[$mobileHeader]) ){
852
- if( is_array($matchType['matches']) ){
853
- foreach($matchType['matches'] as $_match){
854
- if( strpos($this->httpHeaders[$mobileHeader], $_match) !== false ){
855
  return true;
856
  }
857
  }
 
858
  return false;
859
  } else {
860
  return true;
@@ -1072,11 +1109,11 @@ class Mobile_Detect
1072
  * Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31)
1073
  *
1074
  * @param string $propertyName The name of the property. See self::getProperties() array
1075
- * keys for all possible properties.
1076
- * @param string $type Either self::VERSION_TYPE_STRING to get a string value or
1077
- * self::VERSION_TYPE_FLOAT indicating a float value. This parameter
1078
- * is optional and defaults to self::VERSION_TYPE_STRING. Passing an
1079
- * invalid parameter will default to the this type as well.
1080
  *
1081
  * @return string|float The version of the property we are trying to extract.
1082
  */
@@ -1245,4 +1282,4 @@ class Mobile_Detect
1245
  //will receive the basic, C grade experience.
1246
  return self::MOBILE_GRADE_C;
1247
  }
1248
- }
20
  * README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md
21
  * HOWTO: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples
22
  *
23
+ * @version 2.8.4
24
  */
25
 
26
  class Mobile_Detect
64
  /**
65
  * Stores the version number of the current release.
66
  */
67
+ const VERSION = '2.8.4';
68
 
69
  /**
70
  * A type for the version() method indicating a string return value.
139
  * @var array
140
  */
141
  protected static $phoneDevices = array(
142
+ 'iPhone' => '\biPhone\b|\biPod\b', // |\biTunes
143
  'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+',
144
  'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m',
145
  'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile',
146
  // @todo: Is 'Dell Streak' a tablet or a phone? ;)
147
  'Dell' => 'Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b',
148
  'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925',
149
+ 'Samsung' => 'Samsung|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750',
150
  'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802)',
151
+ 'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C6902|C6903|C6906|C6943',
152
  'Asus' => 'Asus.*Galaxy|PadFone.*Mobile',
153
  // @ref: http://www.micromaxinfo.com/mobiles/smartphones
154
  // Added because the codes might conflict with Acer Tablets.
164
  // Added simvalley mobile just for fun. They have some interesting devices.
165
  // @ref: http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html
166
  'SimValley' => '\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b',
167
+ // Wolfgang - a brand that is sold by Aldi supermarkets
168
+ // http://www.wolfgangmobile.com/
169
+ 'Wolfgang' => 'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q',
170
+ 'Alcatel' => 'Alcatel',
171
+ // @ref: http://en.wikipedia.org/wiki/Amoi
172
+ 'Amoi' => 'Amoi',
173
+ // @ref: http://en.wikipedia.org/wiki/INQ
174
+ 'INQ' => 'INQ',
175
  // @Tapatalk is a mobile app; @ref: http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
176
+ 'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser',
177
  );
178
 
179
  /**
184
  protected static $tabletDevices = array(
185
  'iPad' => 'iPad|iPad.*Mobile', // @todo: check for mobile friendly emails topic.
186
  'NexusTablet' => 'Android.*Nexus[\s]+(7|10)|^.*Android.*Nexus(?:(?!Mobile).)*$',
187
+ 'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-I9205|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700', // SCH-P709|SCH-P729|SM-T2558 - Samsung Mega - treat them like a regular phone.
188
  // @reference: http://www.labnol.org/software/kindle-user-agent-string/20378/
189
  'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE)\b',
190
  // Only the Surface tablets with Windows RT are considered mobile.
191
  // @ref: http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx
192
+ 'SurfaceTablet' => 'Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)',
193
  // @ref: http://shopping1.hp.com/is-bin/INTERSHOP.enfinity/WFS/WW-USSMBPublicStore-Site/en_US/-/USD/ViewStandardCatalog-Browse?CatalogCategoryID=JfIQ7EN5lqMAAAEyDcJUDwMT
194
+ 'HPTablet' => 'HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10',
195
  // @note: watch out for PadFone, see #132
196
+ // http://www.asus.com/de/Tablets_Mobile/Memo_Pad_Products/
197
+ 'AsusTablet' => '^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\bK00F\b|\bK00C\b|\bK00E\b|\bK00L\b|TX201LA|ME176C|ME102A|\bM80TA\b|ME372CL|ME560CG|ME372CG',
198
  'BlackBerryTablet' => 'PlayBook|RIM Tablet',
199
+ 'HTCtablet' => 'HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410',
200
  'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617',
201
  'NookTablet' => 'Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2',
202
  // @ref: http://www.acer.ro/ac/ro/RO/content/drivers
203
  // @ref: http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell is part of Acer)
204
  // @ref: http://us.acer.com/ac/en/US/content/group/tablets
205
  // @note: Can conflict with Micromax and Motorola phones codes.
206
+ 'AcerTablet' => 'Android.*; \b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\b|W3-810|\bA3-A10\b',
207
  // @ref: http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/
208
  // @ref: http://us.toshiba.com/tablets/tablet-finder
209
  // @ref: http://www.toshiba.co.jp/regza/tablet/
215
  // Prestigio Tablets http://www.prestigio.com/support
216
  'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD',
217
  // @ref: http://support.lenovo.com/en_GB/downloads/default.page?#
218
+ 'LenovoTablet' => 'Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)',
219
  // @ref: http://www.yarvik.com/en/matrix/tablets/
220
  'YarvikTablet' => 'Android.*\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\b',
221
  'MedionTablet' => 'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB',
222
  'ArnovaTablet' => 'AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT',
223
  // http://www.intenso.de/kategorie_en.php?kategorie=33
224
  // @todo: http://www.nbhkdz.com/read/b8e64202f92a2df129126bff.html - investigate
225
+ 'IntensoTablet' => 'INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004',
226
  // IRU.ru Tablets http://www.iru.ru/catalog/soho/planetable/
227
  'IRUTablet' => 'M702pro',
228
  'MegafonTablet' => 'MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b',
231
  // @ref: http://www.allview.ro/produse/droseries/lista-tablete-pc/
232
  'AllViewTablet' => 'Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)',
233
  // @reference: http://wiki.archosfans.com/index.php?title=Main_Page
234
+ 'ArchosTablet' => '\b(101G9|80G9|A101IT)\b|Qilive 97R|Archos5|\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\b',
235
  // @ref: http://www.ainol.com/plugin.php?identifier=ainol&module=product
236
  'AinolTablet' => 'NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark',
237
  // @todo: inspect http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER
238
  // @ref: Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser
239
  // @ref: http://www.sony.jp/support/tablet/
240
  'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551',
241
+ // http://www.support.philips.com/support/catalog/worldproducts.jsp?userLanguage=en&userCountry=cn&categoryid=3G_LTE_TABLET_SU_CN_CARE&title=3G%20tablets%20/%20LTE%20range&_dyncharset=UTF-8
242
+ 'PhilipsTablet' => '\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b',
243
  // @ref: db + http://www.cube-tablet.com/buy-products.html
244
  'CubeTablet' => 'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT',
245
  // @ref: http://www.cobyusa.com/?p=pcat&pcat_id=3001
246
  'CobyTablet' => 'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010',
247
  // @ref: http://www.match.net.cn/products.asp
248
  'MIDTablet' => 'M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733',
249
+ // http://www.msi.com/support
250
+ // @todo Research the Windows Tablets.
251
+ 'MSITablet' => 'MSI \b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\b',
252
  // @ref: http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese Tablets)
253
  // @ref: http://www.imp3.net/14/show.php?itemid=20454
254
  'SMiTTablet' => 'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)',
283
  // @note: Avoid detecting 'PLAYSTATION 3' as mobile.
284
  'PlaystationTablet' => 'Playstation.*(Portable|Vita)',
285
  // @ref: http://www.trekstor.de/surftabs.html
286
+ 'TrekstorTablet' => 'ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab',
287
  // @ref: http://www.pyleaudio.com/Products.aspx?%2fproducts%2fPersonal-Electronics%2fTablets
288
  'PyleAudioTablet' => '\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b',
289
  // @ref: http://www.advandigital.com/index.php?link=content-product&jns=JP001
341
  // @note: no need to add all the tablet codes since they are guided by the first regex.
342
  'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab',
343
  // Generic Vodafone tablets.
344
+ 'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7',
345
  // French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb
346
  // Aka: http://www.essentielb.fr/
347
  'EssentielBTablet' => 'Smart[ \']?TAB[ ]+?[0-9]+|Family[ \']?TAB2',
373
  // http://www1.viewsonic.com/products/computing/tablets/
374
  'ViewsonicTablet' => 'ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a',
375
  // http://www.odys.de/web/internet-tablet_en.html
376
+ 'OdysTablet' => 'LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10',
377
  // http://www.captiva-power.de/products.html#tablets-en
378
  'CaptivaTablet' => 'CAPTIVA PAD',
379
  // IconBIT - http://www.iconbit.com/products/tablets/
380
  'IconbitTablet' => 'NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S',
381
+ // @ref: http://www.teclast.com/topic.php?channelID=70&topicID=140&pid=63
382
+ 'TeclastTablet' => '\(Linux;\sAndroid\s[\d\.]+;\s[PXGAT]\d{2,}.*\sBuild/.*?\)',
383
+ 'JaytechTablet' => 'TPC-PA762',
384
+ 'BlaupunktTablet' => 'Endeavour 800NG|Endeavour 1010',
385
+ // @ref: http://www.digma.ru/support/download/
386
+ // @todo: Ebooks also (if requested)
387
+ 'DigmaTablet' => '\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b',
388
+ // http://www.evolioshop.com/ro/tablete-pc.html
389
+ // http://www.evolio.ro/support/downloads_static.html?cat=2
390
+ // @todo: Research some more
391
+ 'EvolioTablet' => 'ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b',
392
+ // http://www.pocketbook-int.com/ru/support
393
+ 'PocketBookTablet' => 'Pocketbook',
394
  // @ref: http://www.tesco.com/direct/hudl/
395
  'Hudl' => 'Hudl HT7S3',
396
  // @ref: http://www.telstra.com.au/home-phone/thub-2/
397
  'TelstraTablet' => 'T-Hub2',
398
+ 'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\bM6pro\b|CT1020W'
399
  );
400
 
401
  /**
413
  // @reference: http://en.wikipedia.org/wiki/Windows_Phone
414
  // http://wifeng.cn/?r=blog&a=view&id=106
415
  // http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx
416
+ // http://msdn.microsoft.com/library/ms537503.aspx
417
+ 'WindowsPhoneOS' => 'Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;',
418
  'iOS' => '\biPhone.*Mobile|\biPod|\biPad',
419
  // http://en.wikipedia.org/wiki/MeeGo
420
  // @todo: research MeeGo in UAs
445
  'TeaShark' => 'teashark',
446
  'Blazer' => 'Blazer',
447
  // @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3
448
+ 'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari',
449
  // @ref: http://en.wikipedia.org/wiki/Midori_(web_browser)
450
  //'Midori' => 'midori',
451
  'Tizen' => 'Tizen',
452
  'UCBrowser' => 'UC.*Browser|UCWEB',
453
+ 'baiduboxapp' => 'baiduboxapp',
454
+ 'baidubrowser' => 'baidubrowser',
455
  // @ref: https://github.com/serbanghita/Mobile-Detect/issues/7
456
  'DiigoBrowser' => 'DiigoBrowser',
457
  // http://www.puffinbrowser.com/index.php
458
  'Puffin' => 'Puffin',
459
  // @ref: http://mercury-browser.com/index.html
460
  'Mercury' => '\bMercury\b',
461
+ // @ref: http://en.wikipedia.org/wiki/Obigo_Browser
462
+ 'ObigoBrowser' => 'Obigo',
463
+ // @ref: http://en.wikipedia.org/wiki/NetFront
464
+ 'NetFront' => 'NF-Browser',
465
  // @reference: http://en.wikipedia.org/wiki/Minimo
466
  // http://en.wikipedia.org/wiki/Vision_Mobile_Browser
467
+ 'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger',
468
  );
469
 
470
  /**
545
  'UC Browser' => 'UC Browser[VER]',
546
  'MQQBrowser' => 'MQQBrowser/[VER]',
547
  'MicroMessenger' => 'MicroMessenger/[VER]',
548
+ 'baiduboxapp' => 'baiduboxapp/[VER]',
549
+ 'baidubrowser' => 'baidubrowser/[VER]',
550
  // @note: Safari 7534.48.3 is actually Version 5.1.
551
  // @note: On BlackBerry the Version is overwriten by the OS.
552
  'Safari' => array( 'Version/[VER]', 'Safari/[VER]' ),
579
  /**
580
  * Construct an instance of this class.
581
  *
582
+ * @param array $headers Specify the headers as injection. Should be PHP _SERVER flavored.
583
+ * If left empty, will use the global _SERVER['HTTP_*'] vars instead.
584
  * @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT
585
  * from the $headers array instead.
586
  */
587
  public function __construct(
588
  array $headers = null,
589
  $userAgent = null
590
+ ) {
591
  $this->setHttpHeaders($headers);
592
  $this->setUserAgent($userAgent);
593
  }
702
 
703
  $this->userAgent = null;
704
 
705
+ foreach ($this->getUaHttpHeaders() as $altHeader) {
706
+ if (!empty($this->httpHeaders[$altHeader])) { // @todo: should use getHttpHeader(), but it would be slow. (Serban)
707
  $this->userAgent .= $this->httpHeaders[$altHeader] . " ";
708
  }
709
  }
883
  public function checkHttpHeadersForMobile()
884
  {
885
 
886
+ foreach ($this->getMobileHeaders() as $mobileHeader => $matchType) {
887
+ if ( isset($this->httpHeaders[$mobileHeader]) ) {
888
+ if ( is_array($matchType['matches']) ) {
889
+ foreach ($matchType['matches'] as $_match) {
890
+ if ( strpos($this->httpHeaders[$mobileHeader], $_match) !== false ) {
891
  return true;
892
  }
893
  }
894
+
895
  return false;
896
  } else {
897
  return true;
1109
  * Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31)
1110
  *
1111
  * @param string $propertyName The name of the property. See self::getProperties() array
1112
+ * keys for all possible properties.
1113
+ * @param string $type Either self::VERSION_TYPE_STRING to get a string value or
1114
+ * self::VERSION_TYPE_FLOAT indicating a float value. This parameter
1115
+ * is optional and defaults to self::VERSION_TYPE_STRING. Passing an
1116
+ * invalid parameter will default to the this type as well.
1117
  *
1118
  * @return string|float The version of the property we are trying to extract.
1119
  */
1282
  //will receive the basic, C grade experience.
1283
  return self::MOBILE_GRADE_C;
1284
  }
1285
+ }
public/views/popup.php CHANGED
@@ -24,6 +24,12 @@ $content = $box->post_content;
24
  // run filters on content
25
  $content = apply_filters( 'spu/popup/content', $content, $box );
26
 
 
 
 
 
 
 
27
  do_action( 'spu/popup/before_popup', $box, $opts, $css);
28
 
29
  ?>
@@ -42,7 +48,7 @@ do_action( 'spu/popup/before_popup', $box, $opts, $css);
42
  <div class="spu-box spu-<?php echo esc_attr( $opts['css']['position'] ); ?> spu-total-<?php echo $total_shortcodes[$box->ID];?> <?php echo isset( $total_shortcodes['google'] ) ? 'spu-gogl' : '';?>" id="spu-<?php echo $box->ID; ?>"
43
  data-box-id="<?php echo $box->ID ; ?>" data-trigger="<?php echo esc_attr( $opts['trigger'] ); ?>"
44
  data-trigger-number="<?php echo esc_attr( absint( $opts['trigger_number'] ) ); ?>"
45
- data-animation="<?php echo esc_attr($opts['animation']); ?>" data-cookie="<?php echo esc_attr( absint ( $opts['cookie'] ) ); ?>" data-test-mode="<?php echo esc_attr($opts['test_mode']); ?>"
46
  data-auto-hide="<?php echo esc_attr($opts['auto_hide']); ?>" data-bgopa="<?php echo esc_attr($css['bgopacity']);?>" data-total="<?php echo $total_shortcodes[$box->ID];?>"
47
  style="left:-99999px" <?php echo apply_filters( 'spu/popup/data_attrs', $data_attrs, $opts);?>>
48
  <div class="spu-content"><?php echo $content; ?></div>
24
  // run filters on content
25
  $content = apply_filters( 'spu/popup/content', $content, $box );
26
 
27
+ // Qtranslate support
28
+ if ( function_exists('qtrans_useCurrentLanguageIfNotFoundShowAvailable') ) {
29
+ $content = qtrans_useCurrentLanguageIfNotFoundShowAvailable( $content );
30
+ }
31
+
32
+
33
  do_action( 'spu/popup/before_popup', $box, $opts, $css);
34
 
35
  ?>
48
  <div class="spu-box spu-<?php echo esc_attr( $opts['css']['position'] ); ?> spu-total-<?php echo $total_shortcodes[$box->ID];?> <?php echo isset( $total_shortcodes['google'] ) ? 'spu-gogl' : '';?>" id="spu-<?php echo $box->ID; ?>"
49
  data-box-id="<?php echo $box->ID ; ?>" data-trigger="<?php echo esc_attr( $opts['trigger'] ); ?>"
50
  data-trigger-number="<?php echo esc_attr( absint( $opts['trigger_number'] ) ); ?>"
51
+ data-spuanimation="<?php echo esc_attr($opts['animation']); ?>" data-cookie="<?php echo esc_attr( absint ( $opts['cookie'] ) ); ?>" data-test-mode="<?php echo esc_attr($opts['test_mode']); ?>"
52
  data-auto-hide="<?php echo esc_attr($opts['auto_hide']); ?>" data-bgopa="<?php echo esc_attr($css['bgopacity']);?>" data-total="<?php echo $total_shortcodes[$box->ID];?>"
53
  style="left:-99999px" <?php echo apply_filters( 'spu/popup/data_attrs', $data_attrs, $opts);?>>
54
  <div class="spu-content"><?php echo $content; ?></div>