Popups – WordPress Popup - Version 1.9

Version Description

  • Added German language
  • Fixed messages not showing for mailchinp for wordpress
  • Fixed preview mode with ajax mode turned on
  • Fixed browser rule
  • Fixed taxonomies archives rule
  • Improved performance with rules
  • Youtube/vimeo videos are automatically removed when popup it's closed
  • Updated CF7 events
Download this release

Release Info

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

Code changes from version 1.8 to 1.9

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: popup,twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, postmatic, mailpoet, facebook popup, scroll popups, popups, wordpress popup, wp popups, cf7, gf, gravity forms, contact form 7, ifs, infusion soft, subscribe, login popup, ajax login popups, popupmaker
5
  Requires at least: 3.6
6
- Tested up to: 4.8.2
7
- Stable tag: 1.8
8
  Text Domain: popups
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -65,7 +65,7 @@ There are multiple display filters that can be combined:
65
  > Check the **new premium version** available in ([https://timersys.com/popups/](https://timersys.com/popups/?utm_source=readme%20file&utm_medium=readme%20links&utm_campaign=Popups%20Premium))
66
  >
67
  > * Beautiful optin forms for popular mail providers
68
- > * Currently supporting MailChimp, Aweber, Postmatic, Mailpoet, Constant Contact, Newsletter plugin, Activecampaign
69
  > * New popup positions: top/bottoms bars , fullscreen mode, after post content
70
  > * A/B testing. Explore which popup perform better for you
71
  > * More Display Rules: Show after N(numbers) of pages viewed
@@ -98,21 +98,15 @@ Fork me in https://github.com/timersys/popups/
98
  * Russian
99
  * Serbo-Croatian - Borisa - http://www.webhostinghub.com/
100
  * Spanish - Andrew Kurtis - http://www.webhostinghub.com/
 
101
 
102
  = Beautiful WordPress Emails =
103
  Now you can send html email in WordPress with [https://wordpress.org/plugins/email-templates/](https://wordpress.org/plugins/email-templates/)
 
104
  = Install Multiple plugins at once with WpFavs =
105
 
106
  Bulk plugin installation tool, import WP favorites and create your own lists ([http://wordpress.org/extend/plugins/wpfavs/](http://wordpress.org/extend/plugins/wpfavs/))
107
 
108
- = Increase your twitter followers =
109
-
110
- Increase your Twitter followers with Twitter likebox Plugin ([http://wordpress.org/extend/plugins/twitter-like-box-reloaded/](http://wordpress.org/extend/plugins/twitter-like-box-reloaded/))
111
-
112
- = Wordpress Social Invitations =
113
-
114
- Enhance your site by letting your users send Social Invitations ([https://timersys.com/wordpress-social-invitations/](https://timersys.com/wordpress-social-invitations/?utm_source=social-popup&utm_medium=readme))
115
-
116
  == Installation ==
117
 
118
  1. Unzip and Upload the directory 'social-popup' to the '/wp-content/plugins/' directory
@@ -159,17 +153,12 @@ You can modify everything with css. If your popup id is 120 you can add some css
159
  = Can I give other roles permissions to edit popups ? =
160
  You need to add [this code](https://gist.github.com/timersys/03067ac7594fdce288ca) to your functions.php
161
 
162
-
163
- = How to close the popup is a user clicks on a regular link ? =
164
- To use custom conversions check [this code](https://gist.github.com/timersys/7facec9c80935a0df1c6) . You need to add it in your theme javascript files
165
-
166
  = If I have multiple Gravity forms on my page, form is not working =
167
  On certain occasions multiple GF instances can cause problems. There is a plugin that fixes that https://wordpress.org/plugins/gravity-forms-multiple-form-instances/
168
 
169
  = How to make Popups plugin compatible with Maxbuttons Plugin (https://es.wordpress.org/plugins/maxbuttons/) =
170
  Check the following gists ( https://gist.github.com/timersys/e3648ba93955ddef4087 )
171
 
172
-
173
  = I closed the popup but youtube video is still playing. How I fix it? =
174
  Check [this](https://gist.github.com/timersys/d3cde5a27e9f2ae4ac83d5c619e6ebfa) or [this gist](https://gist.github.com/timersys/99db1a8d2c8db74cb954) for instructions
175
 
@@ -200,6 +189,16 @@ If you have cache be sure to enable AJAX mode in the plugin settings page
200
 
201
  == Changelog ==
202
 
 
 
 
 
 
 
 
 
 
 
203
  = 1.8 =
204
  * Redesigned popups admin pages
205
  * Added lot of new appearance options
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4T6L69EV9G2Q
4
  Tags: popup,twitter,google+, facebook,Popups, twitter follow, facebook like, google plus,social boost, social splash, postmatic, mailpoet, facebook popup, scroll popups, popups, wordpress popup, wp popups, cf7, gf, gravity forms, contact form 7, ifs, infusion soft, subscribe, login popup, ajax login popups, popupmaker
5
  Requires at least: 3.6
6
+ Tested up to: 4.9.3
7
+ Stable tag: 1.9
8
  Text Domain: popups
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
65
  > Check the **new premium version** available in ([https://timersys.com/popups/](https://timersys.com/popups/?utm_source=readme%20file&utm_medium=readme%20links&utm_campaign=Popups%20Premium))
66
  >
67
  > * Beautiful optin forms for popular mail providers
68
+ > * Currently supporting MailChimp, Aweber, Postmatic, Mailpoet, Constant Contact, Newsletter plugin, Activecampaign, InfusionSoft, etc
69
  > * New popup positions: top/bottoms bars , fullscreen mode, after post content
70
  > * A/B testing. Explore which popup perform better for you
71
  > * More Display Rules: Show after N(numbers) of pages viewed
98
  * Russian
99
  * Serbo-Croatian - Borisa - http://www.webhostinghub.com/
100
  * Spanish - Andrew Kurtis - http://www.webhostinghub.com/
101
+ * German
102
 
103
  = Beautiful WordPress Emails =
104
  Now you can send html email in WordPress with [https://wordpress.org/plugins/email-templates/](https://wordpress.org/plugins/email-templates/)
105
+
106
  = Install Multiple plugins at once with WpFavs =
107
 
108
  Bulk plugin installation tool, import WP favorites and create your own lists ([http://wordpress.org/extend/plugins/wpfavs/](http://wordpress.org/extend/plugins/wpfavs/))
109
 
 
 
 
 
 
 
 
 
110
  == Installation ==
111
 
112
  1. Unzip and Upload the directory 'social-popup' to the '/wp-content/plugins/' directory
153
  = Can I give other roles permissions to edit popups ? =
154
  You need to add [this code](https://gist.github.com/timersys/03067ac7594fdce288ca) to your functions.php
155
 
 
 
 
 
156
  = If I have multiple Gravity forms on my page, form is not working =
157
  On certain occasions multiple GF instances can cause problems. There is a plugin that fixes that https://wordpress.org/plugins/gravity-forms-multiple-form-instances/
158
 
159
  = How to make Popups plugin compatible with Maxbuttons Plugin (https://es.wordpress.org/plugins/maxbuttons/) =
160
  Check the following gists ( https://gist.github.com/timersys/e3648ba93955ddef4087 )
161
 
 
162
  = I closed the popup but youtube video is still playing. How I fix it? =
163
  Check [this](https://gist.github.com/timersys/d3cde5a27e9f2ae4ac83d5c619e6ebfa) or [this gist](https://gist.github.com/timersys/99db1a8d2c8db74cb954) for instructions
164
 
189
 
190
  == Changelog ==
191
 
192
+ = 1.9 =
193
+ * Added German language
194
+ * Fixed messages not showing for mailchinp for wordpress
195
+ * Fixed preview mode with ajax mode turned on
196
+ * Fixed browser rule
197
+ * Fixed taxonomies archives rule
198
+ * Improved performance with rules
199
+ * Youtube/vimeo videos are automatically removed when popup it's closed
200
+ * Updated CF7 events
201
+
202
  = 1.8 =
203
  * Redesigned popups admin pages
204
  * Added lot of new appearance options
admin/class-social-popup-admin.php CHANGED
@@ -926,7 +926,8 @@ class SocialPopup_Admin {
926
  * Extra checks needed on admin init
927
  */
928
  public function extra_checks(){
929
- if( defined('SPUP_VERSION') && version_compare(SPUP_VERSION, '1.9.1', '<') ){
 
930
  deactivate_plugins( array('popups-premium/popups-premium.php'));
931
  update_option('spu_pair_plugins',true);
932
  add_action( 'admin_notices', array('SocialPopup_Notices','pair_plugins' ));
926
  * Extra checks needed on admin init
927
  */
928
  public function extra_checks(){
929
+ // second check it's because on 1.9 by mistake was not added SPUP_VERSION
930
+ if( ( defined('SPUP_VERSION') && version_compare(SPUP_VERSION, '1.9.1', '<') ) || ( defined( 'SPUP_PLUGIN_FILE') && ! defined('SPUP_VERSION') ) ){
931
  deactivate_plugins( array('popups-premium/popups-premium.php'));
932
  update_option('spu_pair_plugins',true);
933
  add_action( 'admin_notices', array('SocialPopup_Notices','pair_plugins' ));
admin/views/metaboxes/metabox-premium.php CHANGED
@@ -17,7 +17,7 @@ if($today > $blackbegin && $today < $blackend) : ?>
17
  <h2><?php _e( 'Popups Premium Features:', 'popups' );?></h2>
18
  <ul>
19
  <li><?php _e( 'Beautiful optin forms for popular mail providers', 'popups' );?></li>
20
- <li><?php _e( 'Currently supporting MailChimp, Aweber, Postmatic, Mailpoet, Constant Contact, ActiveCampaign, Newsletter plugin', 'popups' );?></li>
21
  <li><?php _e( 'A/B testing. Explore which popup perform better for you.', 'popups' );?></li>
22
  <li><?php _e( 'Track impressions and Conversions of social likes and forms submissions like Contact Form 7, Gravity forms, etc', 'popups' );?></li>
23
  <li><?php _e( 'Track impressions and Conversions in Google Analytics ande define custom events', 'popups' );?></li>
17
  <h2><?php _e( 'Popups Premium Features:', 'popups' );?></h2>
18
  <ul>
19
  <li><?php _e( 'Beautiful optin forms for popular mail providers', 'popups' );?></li>
20
+ <li><?php _e( 'Currently supporting MailChimp, Aweber, Postmatic, Mailpoet, Constant Contact, ActiveCampaign, Newsletter plugin, InfusionSoft, etc', 'popups' );?></li>
21
  <li><?php _e( 'A/B testing. Explore which popup perform better for you.', 'popups' );?></li>
22
  <li><?php _e( 'Track impressions and Conversions of social likes and forms submissions like Contact Form 7, Gravity forms, etc', 'popups' );?></li>
23
  <li><?php _e( 'Track impressions and Conversions in Google Analytics ande define custom events', 'popups' );?></li>
languages/popups-de_DE.mo ADDED
Binary file
languages/popups-de_DE.po ADDED
@@ -0,0 +1,870 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 TODO
2
+ # This file is distributed under the same license as the TODO package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Popups\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
7
+ "POT-Creation-Date: 2016-02-04 13:02+0100\n"
8
+ "PO-Revision-Date: 2018-01-22 16:35+0000\n"
9
+ "Language-Team: Timersys <info@timersys.com>\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.0.6\n"
14
+ "X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
15
+ "esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
16
+ "X-Poedit-Basepath: ..\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "Last-Translator: \n"
19
+ "Language: de_DE@formal\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+
22
+ #: admin/class-social-popup-admin.php:159
23
+ msgctxt "post type singular name"
24
+ msgid "Popups"
25
+ msgstr "PopUps"
26
+
27
+ #: admin/class-social-popup-admin.php:160
28
+ msgctxt "admin menu"
29
+ msgid "Popups"
30
+ msgstr "PopUps"
31
+
32
+ #: admin/class-social-popup-admin.php:161
33
+ msgctxt "add new on admin bar"
34
+ msgid "Popups"
35
+ msgstr "PopUps"
36
+
37
+ #: admin/class-social-popup-admin.php:162
38
+ msgctxt "Popups"
39
+ msgid "Add New"
40
+ msgstr "Neues hinzufügen"
41
+
42
+ #: admin/class-social-popup-admin.php:163
43
+ msgid "Add New Popups"
44
+ msgstr "Neue Popups hinzufügen"
45
+
46
+ #: admin/class-social-popup-admin.php:164
47
+ msgid "New Popups"
48
+ msgstr "Neue Popups"
49
+
50
+ #: admin/class-social-popup-admin.php:165
51
+ msgid "Edit Popups"
52
+ msgstr "Popups bearbeiten"
53
+
54
+ #: admin/class-social-popup-admin.php:166
55
+ msgid "View Popups"
56
+ msgstr "Popups anzeigen"
57
+
58
+ #: admin/class-social-popup-admin.php:167
59
+ msgid "All Popups"
60
+ msgstr "Alle Popups"
61
+
62
+ #: admin/class-social-popup-admin.php:168
63
+ msgid "Search Popups"
64
+ msgstr "Suche Popups"
65
+
66
+ #: admin/class-social-popup-admin.php:169
67
+ msgid "Parent Popups:"
68
+ msgstr "Übergeordnete Popups:"
69
+
70
+ #: admin/class-social-popup-admin.php:170
71
+ msgid "No Popups found."
72
+ msgstr "Keine Popups gefunden."
73
+
74
+ #: admin/class-social-popup-admin.php:171
75
+ msgid "No Popups found in Trash."
76
+ msgstr "Keine Popups im Papierkorb gefunden."
77
+
78
+ #: admin/class-social-popup-admin.php:212
79
+ msgid "Settings"
80
+ msgstr "Einstellungen"
81
+
82
+ #: admin/class-social-popup-admin.php:260
83
+ msgid "Popups Premium"
84
+ msgstr "Popups Premium"
85
+
86
+ #: admin/class-social-popup-admin.php:271
87
+ msgid "PopUp Shortcodes"
88
+ msgstr "PopUp Shortcodes"
89
+
90
+ #: admin/class-social-popup-admin.php:280
91
+ msgid "PopUp Appearance"
92
+ msgstr "Popup Stil"
93
+
94
+ #: admin/class-social-popup-admin.php:289
95
+ msgid "PopUp Display Rules"
96
+ msgstr "Popup-Anzeigeregeln"
97
+
98
+ #: admin/class-social-popup-admin.php:298
99
+ msgid "Display Options"
100
+ msgstr "Anzeige-Optionen"
101
+
102
+ #: admin/class-social-popup-admin.php:307
103
+ msgid "Need support?"
104
+ msgstr "Unterstützung benötigt?"
105
+
106
+ #: admin/class-social-popup-admin.php:315
107
+ msgid "Donate & support"
108
+ msgstr "Spenden & unterstützen"
109
+
110
+ #: admin/class-social-popup-admin.php:323
111
+ msgid "About the developer"
112
+ msgstr "Über den Hersteller"
113
+
114
+ #: admin/class-social-popup-admin.php:589
115
+ #: admin/views/metaboxes/metabox-rules.php:33
116
+ #: admin/views/metaboxes/metabox-rules.php:106
117
+ msgid "or"
118
+ msgstr "oder"
119
+
120
+ #: admin/class-social-popup-admin.php:616
121
+ msgid "Add a Popup"
122
+ msgstr "Ein PopUp zufügen"
123
+
124
+ #: admin/class-social-popup-admin.php:740
125
+ msgid "User"
126
+ msgstr "Benutzer"
127
+
128
+ #: admin/class-social-popup-admin.php:741
129
+ msgid "User role"
130
+ msgstr "Benutzer Rolle"
131
+
132
+ #: admin/class-social-popup-admin.php:742
133
+ msgid "User is logged"
134
+ msgstr "Benutzer ist angemeldet"
135
+
136
+ #: admin/class-social-popup-admin.php:743
137
+ msgid "User never left a comment"
138
+ msgstr "Benutzer hat nie einen Kommentar verfasst"
139
+
140
+ #: admin/class-social-popup-admin.php:744
141
+ msgid "User came via a search engine"
142
+ msgstr "Benutzer kam über eine Suchmaschine"
143
+
144
+ #: admin/class-social-popup-admin.php:745
145
+ msgid "User did not arrive via another page on your site"
146
+ msgstr "Benutzer kam nicht über eine andere Seite Ihrer Webseite"
147
+
148
+ #: admin/class-social-popup-admin.php:747
149
+ #: admin/class-social-popup-admin.php:748
150
+ msgid "Post"
151
+ msgstr "Beitrag"
152
+
153
+ #: admin/class-social-popup-admin.php:749
154
+ msgid "Post ID"
155
+ msgstr "Beitrags ID"
156
+
157
+ #: admin/class-social-popup-admin.php:750
158
+ msgid "Post Type"
159
+ msgstr "Beitragstyp"
160
+
161
+ #: admin/class-social-popup-admin.php:751
162
+ msgid "Post Category"
163
+ msgstr "Beitragskategorie"
164
+
165
+ #: admin/class-social-popup-admin.php:752
166
+ msgid "Post Format"
167
+ msgstr "Beitragsformat"
168
+
169
+ #: admin/class-social-popup-admin.php:753
170
+ msgid "Post Status"
171
+ msgstr "Veröffentlichungsstatus"
172
+
173
+ #: admin/class-social-popup-admin.php:754
174
+ msgid "Post Taxonomy"
175
+ msgstr "Beitragsklassifizierung"
176
+
177
+ #: admin/class-social-popup-admin.php:756
178
+ #: admin/class-social-popup-admin.php:757
179
+ msgid "Page"
180
+ msgstr "Seite"
181
+
182
+ #: admin/class-social-popup-admin.php:758
183
+ msgid "Page Type"
184
+ msgstr "Seitentyp"
185
+
186
+ #: admin/class-social-popup-admin.php:759
187
+ msgid "Page Parent"
188
+ msgstr "Übergeordnete Seite"
189
+
190
+ #: admin/class-social-popup-admin.php:760
191
+ msgid "Page Template"
192
+ msgstr "Seitentemplate"
193
+
194
+ #: admin/class-social-popup-admin.php:762
195
+ msgid "Other"
196
+ msgstr "Sonstiges"
197
+
198
+ #: admin/class-social-popup-admin.php:763
199
+ msgid "Referrer"
200
+ msgstr "Empfehler"
201
+
202
+ #: admin/class-social-popup-admin.php:764
203
+ msgid "Mobile Phone"
204
+ msgstr "Mobil Nummer"
205
+
206
+ #: admin/class-social-popup-admin.php:765
207
+ msgid "Tablet"
208
+ msgstr "Tablet"
209
+
210
+ #: admin/class-social-popup-admin.php:813
211
+ msgid "ID"
212
+ msgstr "ID"
213
+
214
+ #: admin/includes/class-spu-notices.php:30
215
+ #, php-format
216
+ msgid ""
217
+ "We noticed that you have been using our plugin for a while and we would like "
218
+ "to ask you a little favour. If you are happy with it and can take a minute "
219
+ "please <a href=\"%s\" target=\"_blank\">leave a nice review</a> on "
220
+ "WordPress. It will be a tremendous help for us!"
221
+ msgstr ""
222
+ "Wir haben festgestellt, dass Sie unser Plugin bereits für eine Weile "
223
+ "verwendet haben und möchten Sie um einen Gefallen bitten. Wenn Sie mit "
224
+ "unserem Plugin zufrieden sind, nehmen Sie sich bitte eine Minute Zeit und <a "
225
+ "href=\"%s\" target=\"_blank\">hinterlassen eine positive Rezension</a> auf "
226
+ "WordPress. Es wird für uns eine große Hilfe sein!"
227
+
228
+ #: admin/includes/class-spu-notices.php:32
229
+ #, php-format
230
+ msgid "<a href=\"%s\" target=\"_blank\">Leave a nice review</a>"
231
+ msgstr "<a href=\"%s\" target=\"_blank\">Eine positive Rezension verfassen</a>"
232
+
233
+ #: admin/includes/class-spu-notices.php:33
234
+ #, php-format
235
+ msgid "<a href=\"%s\">No, thanks</a>"
236
+ msgstr "<a href=\"%s\">Nein Danke!</a>"
237
+
238
+ #: admin/views/metaboxes/metabox-appearance.php:10
239
+ msgid "Background opacity"
240
+ msgstr "Hintergrund Transparenz"
241
+
242
+ #: admin/views/metaboxes/metabox-appearance.php:12
243
+ msgid "Leave at 0 for no background. Max value is 1"
244
+ msgstr "0 für keinen Hintergrund. Max ist 1"
245
+
246
+ #: admin/views/metaboxes/metabox-appearance.php:18
247
+ msgid "Background color"
248
+ msgstr "Hintergrundfarbe"
249
+
250
+ #: admin/views/metaboxes/metabox-appearance.php:22
251
+ msgid "Text color"
252
+ msgstr "Text Farbe"
253
+
254
+ #: admin/views/metaboxes/metabox-appearance.php:26
255
+ msgid "Box width"
256
+ msgstr "Breite des Inhalts-Blocks"
257
+
258
+ #: admin/views/metaboxes/metabox-appearance.php:32
259
+ msgid "Border color"
260
+ msgstr "Rahmenfarbe"
261
+
262
+ #: admin/views/metaboxes/metabox-appearance.php:36
263
+ msgid "Border width"
264
+ msgstr "Rahmenbreite"
265
+
266
+ #: admin/views/metaboxes/metabox-donate.php:6
267
+ msgid "If you like this plugin, consider supporting it by donating."
268
+ msgstr ""
269
+ "Wenn Ihnen dieses Plugin gefällt, unterstützen Sie es mit einer Spende."
270
+
271
+ #: admin/views/metaboxes/metabox-donate.php:8
272
+ msgid "Donate with PayPal"
273
+ msgstr "Mit PayPal spenden"
274
+
275
+ #: admin/views/metaboxes/metabox-donate.php:10
276
+ msgid "Some other ways to support this plugin"
277
+ msgstr "Einige andere Möglichkeiten, dieses Plugin zu unterstützen"
278
+
279
+ #: admin/views/metaboxes/metabox-donate.php:12
280
+ msgid "Leave a &#9733;&#9733;&#9733;&#9733;&#9733; review on WordPress.org"
281
+ msgstr ""
282
+ "Hinterlassen Sie eine &#9733;&#9733;&#9733;&#9733;&#9733; Bewertung auf "
283
+ "WordPress.org"
284
+
285
+ #: admin/views/metaboxes/metabox-donate.php:13
286
+ msgid "Write about Popups on your blog"
287
+ msgstr "Über Popups in Ihrem Blog schreiben"
288
+
289
+ #: admin/views/metaboxes/metabox-donate.php:14
290
+ msgid "Tweet about Popups"
291
+ msgstr "Tweet über Popups"
292
+
293
+ #: admin/views/metaboxes/metabox-donate.php:15
294
+ msgid "Vote \"works\" on the WordPress.org plugin page"
295
+ msgstr ""
296
+ "Stimmen Sie mit &quot;funktioniert&quot; auf der WordPress.org Plugin Seite"
297
+
298
+ #: admin/views/metaboxes/metabox-help.php:6
299
+ msgid ""
300
+ "You have some social shortcodes to use that will print a Facebook like, a "
301
+ "Google+ Follow and a Twitter follow. Check the available options and "
302
+ "<strong>configure them with your social accounts</strong>:"
303
+ msgstr ""
304
+ "Sie haben einige Shortcodes zur Verfügung, die: Facebook like, Google + "
305
+ "folgen und ein Twitter folgen auf der Seite anzeigen können. Überprüfen Sie "
306
+ "die verfügbaren Optionen um <strong>sie mit Ihren sozialen Netzwerkkonten zu "
307
+ "konfigurieren</strong>:"
308
+
309
+ #: admin/views/metaboxes/metabox-help.php:8
310
+ msgid "Facebook Page"
311
+ msgstr "Facebook-Seite"
312
+
313
+ #: admin/views/metaboxes/metabox-help.php:12
314
+ msgid "View Facebook Page Options"
315
+ msgstr "Zeige Facebook-Seitenoptionen"
316
+
317
+ #: admin/views/metaboxes/metabox-help.php:14
318
+ #: admin/views/metaboxes/metabox-help.php:27
319
+ msgid "Your Facebook page url"
320
+ msgstr "Ihre Facebook-URL"
321
+
322
+ #: admin/views/metaboxes/metabox-help.php:15
323
+ msgid "Your page name"
324
+ msgstr "Ihr Seitenname"
325
+
326
+ #: admin/views/metaboxes/metabox-help.php:16
327
+ msgid "true|false <b>Default value:</b> true"
328
+ msgstr "richtig|falsch <b>Standart-Einstellung</b> richtig"
329
+
330
+ #: admin/views/metaboxes/metabox-help.php:17
331
+ msgid "true|false <b>Default value:</b> false"
332
+ msgstr "richtig|falsch <b>Standart-Einstellung</b> falsch"
333
+
334
+ #: admin/views/metaboxes/metabox-help.php:18
335
+ msgid "number <b>Default value:</b> 500"
336
+ msgstr "Anzahl <b>Standart-Wert:</b> 500"
337
+
338
+ #: admin/views/metaboxes/metabox-help.php:21
339
+ msgid "Facebook Button"
340
+ msgstr "Facebook Taste"
341
+
342
+ #: admin/views/metaboxes/metabox-help.php:25
343
+ msgid "View Facebook Options"
344
+ msgstr "Zeige Facebook-Optionen"
345
+
346
+ #: admin/views/metaboxes/metabox-help.php:28
347
+ msgid "standard, box_count, button <b>Default value:</b> button_count"
348
+ msgstr "standart, box_drücke, taste <b>Standard Wert:</b> tasten_drücke"
349
+
350
+ #: admin/views/metaboxes/metabox-help.php:29
351
+ #: admin/views/metaboxes/metabox-help.php:30
352
+ msgid "true <b>Default value:</b> false"
353
+ msgstr "richtig <b>Standart-Einstellung</b> falsch"
354
+
355
+ #: admin/views/metaboxes/metabox-help.php:31
356
+ msgid "recommend <b>Default value:</b> like"
357
+ msgstr "empfohlen <b>Default-Wert:</b> like"
358
+
359
+ #: admin/views/metaboxes/metabox-help.php:32
360
+ msgid "number <b>Default value:</b>"
361
+ msgstr "Anzahl <b>Standart-Wert:</b>"
362
+
363
+ #: admin/views/metaboxes/metabox-help.php:34
364
+ msgid "Google+ Button"
365
+ msgstr "Google+Taste"
366
+
367
+ #: admin/views/metaboxes/metabox-help.php:38
368
+ msgid "View Google+ Options"
369
+ msgstr "Zeige Google +-Optionen"
370
+
371
+ #: admin/views/metaboxes/metabox-help.php:40
372
+ msgid "Your Google+ url"
373
+ msgstr "Geben Sie Ihren Google+-Link an."
374
+
375
+ #: admin/views/metaboxes/metabox-help.php:41
376
+ msgid "small, standard, tall <b>Default value:</b> medium"
377
+ msgstr "klein, standart, groß <b>Standart-Wert:</b> medium"
378
+
379
+ #: admin/views/metaboxes/metabox-help.php:42
380
+ msgid "inline, none <b>Default value:</b> bubble"
381
+ msgstr "inline, none <b>Standartt-Wert:</b> bubble"
382
+
383
+ #: admin/views/metaboxes/metabox-help.php:44
384
+ msgid "Twitter Button"
385
+ msgstr "Twitter Taste"
386
+
387
+ #: admin/views/metaboxes/metabox-help.php:48
388
+ msgid "View Twitter Options"
389
+ msgstr "Zeige Twitter Optionen"
390
+
391
+ #: admin/views/metaboxes/metabox-help.php:50
392
+ msgid "Your Twitter user <b>Default chifliiiii</b>"
393
+ msgstr "Ihr Twitter Benutzername <b>Standard-chifliiiii</b>"
394
+
395
+ #: admin/views/metaboxes/metabox-help.php:51
396
+ msgid "false <b>Default value:</b> true"
397
+ msgstr "falsch <b>Standart-Einstellung</b> richtig"
398
+
399
+ #: admin/views/metaboxes/metabox-help.php:52
400
+ msgid "large <b>Default value:</b> \"\""
401
+ msgstr "groß <b>Standart-Wert:</b> \"\""
402
+
403
+ #: admin/views/metaboxes/metabox-help.php:55
404
+ msgid "Other available Shortcodes:"
405
+ msgstr "Weitere Shortcodes:"
406
+
407
+ #: admin/views/metaboxes/metabox-help.php:56
408
+ msgid "Close Button"
409
+ msgstr "Schließen-Schaltfläche"
410
+
411
+ #: admin/views/metaboxes/metabox-help.php:60
412
+ msgid "View Close shortcode Options"
413
+ msgstr "Zeige Shortcodes-Optionen zu: Schließen"
414
+
415
+ #: admin/views/metaboxes/metabox-help.php:62
416
+ msgid "Pass a custom class to style your button"
417
+ msgstr ""
418
+ "Bestimmen Sie eine benutzerdefinierte CSS-Klasse, zu Ihrer Schaltfläche"
419
+
420
+ #: admin/views/metaboxes/metabox-help.php:63
421
+ msgid "Button label - <b>Default value:</b> Close"
422
+ msgstr "Schaltflächentext - <b>Default-Wert:</b> Schließen"
423
+
424
+ #: admin/views/metaboxes/metabox-help.php:64
425
+ msgid "left, right, center, none - <b>Default value:</b> center"
426
+ msgstr "links, rechts, mittig, ohne - <b>Default-Wert:</b> mittig"
427
+
428
+ #: admin/views/metaboxes/metabox-links.php:6
429
+ msgid "My name is"
430
+ msgstr "Mein Name ist"
431
+
432
+ #: admin/views/metaboxes/metabox-links.php:6
433
+ msgid "I develop WordPress plugins and themes."
434
+ msgstr "Ich entwickle WordPress Plugins und Themes."
435
+
436
+ #: admin/views/metaboxes/metabox-links.php:7
437
+ #, php-format
438
+ msgid ""
439
+ "Take a look at my <a href=\"%s\">site</a> to see my other plugins or hire "
440
+ "me. Subscribe to get updates!"
441
+ msgstr ""
442
+ "Werfen Sie einen Blick auf meine <a href=\"%s\">Website</a>, um andere "
443
+ "Plugins von mir zu sehen oder mir direkt einen Kundenauftrag zu erteilen. "
444
+ "Abonnieren Sie meine Newsletter für Updates!"
445
+
446
+ #: admin/views/metaboxes/metabox-links.php:8
447
+ msgid "Other plugins I built:"
448
+ msgstr "Andere Plugins von mir:"
449
+
450
+ #: admin/views/metaboxes/metabox-links.php:10
451
+ msgid "Install multiple plugins and create collections"
452
+ msgstr "Mehrere Plugins installieren und Sammlungen erstellen"
453
+
454
+ #: admin/views/metaboxes/metabox-links.php:11
455
+ msgid "Geotarget your content"
456
+ msgstr "Geotarget Ihrer Inhalte"
457
+
458
+ #: admin/views/metaboxes/metabox-links.php:12
459
+ msgid "Invite your network friends and import contacts"
460
+ msgstr "Lade Freunde ein und importiere Kontakte"
461
+
462
+ #: admin/views/metaboxes/metabox-options.php:9
463
+ msgid "Box Position"
464
+ msgstr "Position der Box"
465
+
466
+ #: admin/views/metaboxes/metabox-options.php:12
467
+ msgid "Centered"
468
+ msgstr "Zentriert"
469
+
470
+ #: admin/views/metaboxes/metabox-options.php:13
471
+ msgid "Top Left"
472
+ msgstr "Oben links"
473
+
474
+ #: admin/views/metaboxes/metabox-options.php:14
475
+ msgid "Top Right"
476
+ msgstr "Oben rechts"
477
+
478
+ #: admin/views/metaboxes/metabox-options.php:15
479
+ msgid "Bottom Left"
480
+ msgstr "Unten links"
481
+
482
+ #: admin/views/metaboxes/metabox-options.php:16
483
+ msgid "Bottom Right"
484
+ msgstr "Unten rechts"
485
+
486
+ #: admin/views/metaboxes/metabox-options.php:23
487
+ msgid "Trigger action"
488
+ msgstr "Auslöseaktion"
489
+
490
+ #: admin/views/metaboxes/metabox-options.php:27
491
+ msgid "seconds after page load"
492
+ msgstr "Sekunden nach dem Laden der Seite"
493
+
494
+ #: admin/views/metaboxes/metabox-options.php:28
495
+ msgid "of page height"
496
+ msgstr "der Seitenhöhe"
497
+
498
+ #: admin/views/metaboxes/metabox-options.php:38
499
+ msgid "Auto-hide?"
500
+ msgstr "Automatisch ausblenden?"
501
+
502
+ #: admin/views/metaboxes/metabox-options.php:40
503
+ #: admin/views/metaboxes/metabox-options.php:68
504
+ #: admin/views/metaboxes/metabox-options.php:76
505
+ #: admin/views/metaboxes/metabox-options.php:84
506
+ msgid "Yes"
507
+ msgstr "Ja"
508
+
509
+ #: admin/views/metaboxes/metabox-options.php:41
510
+ #: admin/views/metaboxes/metabox-options.php:69
511
+ #: admin/views/metaboxes/metabox-options.php:77
512
+ #: admin/views/metaboxes/metabox-options.php:85
513
+ msgid "No"
514
+ msgstr "Nein"
515
+
516
+ #: admin/views/metaboxes/metabox-options.php:42
517
+ msgid "Hide box again when visitors scroll back up?"
518
+ msgstr ""
519
+ "Soll die Box wieder versteckt werden, wenn Besucher zurück nach oben "
520
+ "scrollen?"
521
+
522
+ #: admin/views/metaboxes/metabox-options.php:46
523
+ msgid "Animation"
524
+ msgstr "Animieren"
525
+
526
+ #: admin/views/metaboxes/metabox-options.php:49
527
+ msgid "Fade In"
528
+ msgstr "Einblenden"
529
+
530
+ #: admin/views/metaboxes/metabox-options.php:50
531
+ msgid "Slide In"
532
+ msgstr "Seitlich einfahren"
533
+
534
+ #: admin/views/metaboxes/metabox-options.php:53
535
+ msgid "Slide will only apply when popup is on the corners"
536
+ msgstr "Seitliches Einfahren nur: wenn das Popup in den Ecken platziert ist"
537
+
538
+ #: admin/views/metaboxes/metabox-options.php:58
539
+ msgid "Cookie expiration days"
540
+ msgstr "Cookie läuft aus in Tagen"
541
+
542
+ #: admin/views/metaboxes/metabox-options.php:61
543
+ msgid "After closing the box, how many days should it stay hidden?"
544
+ msgstr "Wie viele Tage sollte das Popup nach Schließen nicht angezeigt werden?"
545
+
546
+ #: admin/views/metaboxes/metabox-options.php:66
547
+ msgid "Enable test mode?"
548
+ msgstr "Testmodus aktivieren?"
549
+
550
+ #: admin/views/metaboxes/metabox-options.php:70
551
+ msgid ""
552
+ "If test mode is enabled, the box will show up regardless of whether a cookie "
553
+ "has been set. (To admins only)"
554
+ msgstr ""
555
+ "Wenn Test-Modus aktiviert ist, wird das Popup angezeigt. Unabhängig davon, "
556
+ "ob ein Cookie festgelegt wurde. (Nur für Admins)"
557
+
558
+ #: admin/views/metaboxes/metabox-options.php:74
559
+ msgid "Close on conversion?"
560
+ msgstr "Schließen nach Konvertierung?"
561
+
562
+ #: admin/views/metaboxes/metabox-options.php:78
563
+ msgid ""
564
+ "If you have a form or social shortcode, by default popup will close on "
565
+ "submission/conversion"
566
+ msgstr ""
567
+ "Wenn Sie ein Formular oder ein Shortcode für soziale Netzwerkehaben, wird "
568
+ "standardmäßig das Popup nach Anmeldung/Konversion geschlossen"
569
+
570
+ #: admin/views/metaboxes/metabox-options.php:82
571
+ msgid "Show powered by link?"
572
+ msgstr "Mit Unterstützung von Link anzeigen?"
573
+
574
+ #: admin/views/metaboxes/metabox-options.php:86
575
+ #, php-format
576
+ msgid ""
577
+ "Shows a \"powered by\" link below your popup. If your affiliate link is set "
578
+ "in the <a href=\"%s\">settings</a>, it will be used."
579
+ msgstr ""
580
+ "Zeigt einen \"powered by\" Link unten in Ihrem Popup. Wenn Ihr Affiliate-"
581
+ "Link in den <a href=\"%s\">Einstellungen</a> festgelegt ist, wird dieser "
582
+ "verwendet."
583
+
584
+ #: admin/views/metaboxes/metabox-premium.php:16
585
+ msgid ""
586
+ "Take the best WordPress Popups plugin to the next level with Popups Premium "
587
+ "extension."
588
+ msgstr ""
589
+ "Bringen Sie das beste WordPress Popups-Plugin auf den nächsten Level mit der "
590
+ "Popups Premium-Erweiterung."
591
+
592
+ #: admin/views/metaboxes/metabox-premium.php:17
593
+ msgid "Popups Premium Features:"
594
+ msgstr "Popups Premium Features:"
595
+
596
+ #: admin/views/metaboxes/metabox-premium.php:19
597
+ msgid "Beautiful optin forms for popular mail providers"
598
+ msgstr "Schöne Opt-In Formulare für die bekanntesten E-Mail-Anbieter"
599
+
600
+ #: admin/views/metaboxes/metabox-premium.php:20
601
+ msgid "Currently supporting MailChimp, Aweber, Postmatic, Mailpoet"
602
+ msgstr "Aktuell unterstützt: MailChimp, Aweber, Postmatic, Mailpoet"
603
+
604
+ #: admin/views/metaboxes/metabox-premium.php:21
605
+ msgid ""
606
+ "Track impressions and Conversions of social likes and forms submissions like "
607
+ "Contact Form 7, Gravity forms, etc"
608
+ msgstr ""
609
+ "Verfolge Impressionen und Konversionen von sozialen Likes und "
610
+ "Formularübermittlungen wie: Contact Form 7, Gravity forms, etc."
611
+
612
+ #: admin/views/metaboxes/metabox-premium.php:22
613
+ msgid "Track impressions and Conversions also in Google Analytics"
614
+ msgstr "Verfolge Impressionen und Conversions auch in Google Analytics"
615
+
616
+ #: admin/views/metaboxes/metabox-premium.php:23
617
+ #: admin/views/metaboxes/metabox-premium.php:25
618
+ msgid "Exit Intent technology"
619
+ msgstr "\"Beim Verlassen der Seite\" Technologie"
620
+
621
+ #: admin/views/metaboxes/metabox-premium.php:24
622
+ msgid "8 New animations effects"
623
+ msgstr "8 neue Animationen"
624
+
625
+ #: admin/views/metaboxes/metabox-premium.php:26
626
+ msgid "New trigger methods"
627
+ msgstr "Neue Trigger-Methoden"
628
+
629
+ #: admin/views/metaboxes/metabox-premium.php:27
630
+ msgid "Timer for auto closing"
631
+ msgstr "Timer für automatische Schließung"
632
+
633
+ #: admin/views/metaboxes/metabox-premium.php:28
634
+ msgid "Ability to disable close button"
635
+ msgstr "Möglichkeit zum Deaktivieren der Schaltfläche \"schließen\""
636
+
637
+ #: admin/views/metaboxes/metabox-premium.php:29
638
+ msgid ""
639
+ "Ability to disable Advanced close methods like esc or clicking outside of "
640
+ "the popup"
641
+ msgstr ""
642
+ "Möglichkeit, fortschrittliche \"Schließen\" Methoden wie ESC oder Klicken "
643
+ "außerhalb des Popups zu deaktivieren"
644
+
645
+ #: admin/views/metaboxes/metabox-premium.php:30
646
+ msgid "Premium support"
647
+ msgstr "Premium-Support"
648
+
649
+ #: admin/views/metaboxes/metabox-premium.php:34
650
+ msgid "Buy Now!"
651
+ msgstr "Sofort Kaufen!"
652
+
653
+ #: admin/views/metaboxes/metabox-rules.php:19
654
+ msgid "Rules"
655
+ msgstr "Regeln"
656
+
657
+ #: admin/views/metaboxes/metabox-rules.php:20
658
+ msgid "Create a set of rules to determine where the popup will show"
659
+ msgstr ""
660
+ "Erstellen Sie einen Satz von Regeln, um festzustellen, wo das Popup "
661
+ "angezeigt wird"
662
+
663
+ #: admin/views/metaboxes/metabox-rules.php:31
664
+ msgid "Show this popup if"
665
+ msgstr "Zeigen Sie dieses Popup wenn"
666
+
667
+ #: admin/views/metaboxes/metabox-rules.php:61
668
+ msgid "is equal to"
669
+ msgstr "ist gleich"
670
+
671
+ #: admin/views/metaboxes/metabox-rules.php:62
672
+ msgid "is not equal to"
673
+ msgstr "ist nicht gleich"
674
+
675
+ #: admin/views/metaboxes/metabox-rules.php:93
676
+ msgid "and"
677
+ msgstr "und"
678
+
679
+ #: admin/views/metaboxes/metabox-rules.php:108
680
+ msgid "Add rule group"
681
+ msgstr "Regelgruppe hinzufügen"
682
+
683
+ #: admin/views/metaboxes/metabox-support.php:6
684
+ #, php-format
685
+ msgid "You are using Popups plugin v%s"
686
+ msgstr "Sie verwenden Popups Plugin v%s"
687
+
688
+ #: admin/views/metaboxes/metabox-support.php:7
689
+ #, php-format
690
+ msgid ""
691
+ "If you need support please go to the WordPress.org <a href=\"%s\">support "
692
+ "forums</a>"
693
+ msgstr ""
694
+ "Wenn Sie Unterstützung benötigen, gehen Sie bitte auf WordPress.org <a href="
695
+ "\"%s\">Support-Foren</a>"
696
+
697
+ #: admin/views/settings-page.php:17
698
+ msgid "Affiliate link"
699
+ msgstr "Affiliate Link"
700
+
701
+ #: admin/views/settings-page.php:20
702
+ #, php-format
703
+ msgid ""
704
+ "You can earn money by promoting the plugin! Join <a href=\"%s\">our "
705
+ "affiliate program</a> and paste your affiliate link here to earn 35&#37; in "
706
+ "commissions . Once entered, it will replace the default \"Powered by\" on "
707
+ "the popups."
708
+ msgstr ""
709
+ "Sie können Geld verdienen durch Promotion des Plugin! Treten Sie <a href=\"%s"
710
+ "\">unserem Affiliate-Programm</a> bei und fügen Sie Ihren Affiliate-Link "
711
+ "hier ein, um 35&#37; an Provisionen zu verdienen. Einmal eingegeben, und der "
712
+ "Standardwert \"Powered by\" wird mit Ihrem Link in den Popups ersetzt."
713
+
714
+ #: admin/views/settings-page.php:24
715
+ msgid "Ajax mode?"
716
+ msgstr "Ajax-Modus?"
717
+
718
+ #: admin/views/settings-page.php:27
719
+ msgid ""
720
+ "Load popups using ajax. Compatible with cache plugins, but might not work "
721
+ "with all plugins"
722
+ msgstr ""
723
+ "Laden Sie Popups mit Ajax. Kompatibel mit Cache-Plugins, aber funktioniert "
724
+ "möglicherweise nicht mit allen Plugins"
725
+
726
+ #: admin/views/settings-page.php:32
727
+ msgid "Enable Debug mode?"
728
+ msgstr "Fehlersuche aktivieren?"
729
+
730
+ #: admin/views/settings-page.php:35
731
+ msgid "Will use uncompressed js"
732
+ msgstr "Unkomprimierte Js verwenden"
733
+
734
+ #: admin/views/settings-page.php:40
735
+ msgid "Enable safe mode?"
736
+ msgstr "Aktivieren abgesicherter Modus?"
737
+
738
+ #: admin/views/settings-page.php:43
739
+ msgid "Will move all popups to top of the screen."
740
+ msgstr "Alle Popups wird zum oberen Rand des Bildschirms verschoben werden."
741
+
742
+ #: admin/views/settings-page.php:48
743
+ msgid "Remove shortcodes style"
744
+ msgstr "Shortcodes Stil entfernen"
745
+
746
+ #: admin/views/settings-page.php:51
747
+ msgid ""
748
+ "By default the plugin will apply some style to shortcodes. Check here if you "
749
+ "want to manually style them"
750
+ msgstr ""
751
+ "Standardmäßig wird das Plugin eigene Stil-Shortcodes zuweisen. Aktivieren, "
752
+ "wenn Sie Stile manuell erzeugen wollen"
753
+
754
+ #: admin/views/settings-page.php:56
755
+ msgid "Unload Facebook javascript"
756
+ msgstr "Facebook Javascript nicht laden"
757
+
758
+ #: admin/views/settings-page.php:59
759
+ msgid "If you use your own Facebook script, check this"
760
+ msgstr ""
761
+ "Wenn Sie Ihr eigenes Facebook-Skript verwenden, aktivieren Sie dies hier"
762
+
763
+ #: admin/views/settings-page.php:64
764
+ msgid "Unload Google javascript"
765
+ msgstr "Google Javascript nicht laden"
766
+
767
+ #: admin/views/settings-page.php:67
768
+ msgid "If you use your own Google script, check this"
769
+ msgstr "Wenn Sie Ihre eigenes Google-Skript verwenden, aktivieren Sie dies"
770
+
771
+ #: admin/views/settings-page.php:72
772
+ msgid "Unload Twitter javascript"
773
+ msgstr "Twitter-Javascript nicht laden"
774
+
775
+ #: admin/views/settings-page.php:75
776
+ msgid "If you use your own Twitter script, check this"
777
+ msgstr ""
778
+ "Wenn Sie Ihr eigenes Twitter-Skript verwenden, aktivieren Sie dies hier"
779
+
780
+ #: admin/views/settings-page.php:82
781
+ msgid "Delete all data on Uninstall"
782
+ msgstr "Alle Daten bei der Deinstallation löschen"
783
+
784
+ #: admin/views/settings-page.php:85
785
+ msgid ""
786
+ "When you uninstall the plugin all popups, settings and stats will be deleted "
787
+ "from your db"
788
+ msgstr ""
789
+ "Wenn Sie das Plugin deinstallieren werden alle Popups, Einstellungen und "
790
+ "Statistiken aus der Datenbank gelöscht"
791
+
792
+ #: admin/views/settings-page.php:89
793
+ msgid "Save settings"
794
+ msgstr "Einstellungen speichern"
795
+
796
+ #: includes/class-spu-helper.php:131
797
+ msgid "All Pages"
798
+ msgstr "Alle Seiten"
799
+
800
+ #: includes/class-spu-helper.php:132
801
+ msgid "Front Page"
802
+ msgstr "Startseite"
803
+
804
+ #: includes/class-spu-helper.php:133
805
+ msgid "Posts Page"
806
+ msgstr "Beiträge Seite"
807
+
808
+ #: includes/class-spu-helper.php:134
809
+ msgid "Category Page"
810
+ msgstr "Kategorie Seite"
811
+
812
+ #: includes/class-spu-helper.php:135
813
+ msgid "Search Page"
814
+ msgstr "Suche-Seite"
815
+
816
+ #: includes/class-spu-helper.php:136
817
+ msgid "Archives Page"
818
+ msgstr "Archivseite"
819
+
820
+ #: includes/class-spu-helper.php:137
821
+ msgid "Top Level Page (parent of 0)"
822
+ msgstr "Hauptseite (nicht übergeordnet)"
823
+
824
+ #: includes/class-spu-helper.php:138
825
+ msgid "Parent Page (has children)"
826
+ msgstr "Eltern-Seite (mit Kind-Seiten darunter)"
827
+
828
+ #: includes/class-spu-helper.php:139
829
+ msgid "Child Page (has parent)"
830
+ msgstr "Kind-Seite (hat Eltern)"
831
+
832
+ #: includes/class-spu-helper.php:147
833
+ msgid "Default Template"
834
+ msgstr "Standardvorlage"
835
+
836
+ #: includes/class-spu-helper.php:220
837
+ msgid "Publish"
838
+ msgstr "Veröffentlichen"
839
+
840
+ #: includes/class-spu-helper.php:221
841
+ msgid "Pending Review"
842
+ msgstr "Ausstehende Bewertung"
843
+
844
+ #: includes/class-spu-helper.php:222
845
+ msgid "Draft"
846
+ msgstr "Entwurf"
847
+
848
+ #: includes/class-spu-helper.php:223
849
+ msgid "Future"
850
+ msgstr "Zukunft"
851
+
852
+ #: includes/class-spu-helper.php:224
853
+ msgid "Private"
854
+ msgstr "Privat"
855
+
856
+ #: includes/class-spu-helper.php:225
857
+ msgid "Revision"
858
+ msgstr "Revision"
859
+
860
+ #: includes/class-spu-helper.php:226
861
+ msgid "Trash"
862
+ msgstr "Papierkorb"
863
+
864
+ #: includes/class-spu-helper.php:239
865
+ msgid "Super Admin"
866
+ msgstr "Super Administrator"
867
+
868
+ #: includes/class-spu-helper.php:259
869
+ msgid "True"
870
+ msgstr "Richtig"
popups.php CHANGED
@@ -11,7 +11,7 @@
11
  * @socialpopup
12
  * Plugin Name: Popups - WordPress Popup
13
  * Plugin URI: http://www.timersys.com/free-plugins/social-popup/
14
- * Version: 1.8
15
  * Description: Most complete free Popups plugin, scroll triggered popups, compatible with social networks, Gravity Forms, Ninja Forms, Contact form 7, Mailpoet, Mailchimp for WP, Postmatic, etc
16
  * Author: Damian Logghe
17
  * Author URI: https://timersys.com
@@ -30,7 +30,7 @@ if ( ! defined( 'WPINC' ) ) {
30
  * Public-Facing Functionality
31
  *----------------------------------------------------------------------------*/
32
 
33
- define( 'SPU_VERSION' , '1.8' );
34
  define( 'SPU_PLUGIN_DIR' , plugin_dir_path(__FILE__) );
35
  define( 'SPU_PLUGIN_URL' , plugin_dir_url(__FILE__) );
36
  define( 'SPU_PLUGIN_HOOK' , basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ) );
11
  * @socialpopup
12
  * Plugin Name: Popups - WordPress Popup
13
  * Plugin URI: http://www.timersys.com/free-plugins/social-popup/
14
+ * Version: 1.9
15
  * Description: Most complete free Popups plugin, scroll triggered popups, compatible with social networks, Gravity Forms, Ninja Forms, Contact form 7, Mailpoet, Mailchimp for WP, Postmatic, etc
16
  * Author: Damian Logghe
17
  * Author URI: https://timersys.com
30
  * Public-Facing Functionality
31
  *----------------------------------------------------------------------------*/
32
 
33
+ define( 'SPU_VERSION' , '1.9' );
34
  define( 'SPU_PLUGIN_DIR' , plugin_dir_path(__FILE__) );
35
  define( 'SPU_PLUGIN_URL' , plugin_dir_url(__FILE__) );
36
  define( 'SPU_PLUGIN_HOOK' , basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ) );
public/assets/js/min/public-min.js CHANGED
@@ -1 +1 @@
1
- (function(){function t(){}function e(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function n(t){return function(){return this[t].apply(this,arguments)}}var i=t.prototype,r=this,o=r.EventEmitter;i.getListeners=function(t){var e,n,i=this._getEvents();if("object"==typeof t){e={};for(n in i)i.hasOwnProperty(n)&&t.test(n)&&(e[n]=i[n])}else e=i[t]||(i[t]=[]);return e},i.flattenListeners=function(t){var e,n=[];for(e=0;t.length>e;e+=1)n.push(t[e].listener);return n},i.getListenersAsObject=function(t){var e,n=this.getListeners(t);return n instanceof Array&&(e={},e[t]=n),e||n},i.addListener=function(t,n){var i,r=this.getListenersAsObject(t),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===e(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(t){return this.getListeners(t),this},i.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},i.removeListener=function(t,n){var i,r,o=this.getListenersAsObject(t);for(r in o)o.hasOwnProperty(r)&&(i=e(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},i.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},i.manipulateListeners=function(t,e,n){var i,r,o=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(i=n.length;i--;)o.call(this,e,n[i]);else for(i in e)e.hasOwnProperty(i)&&(r=e[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(t){var e,n=typeof t,i=this._getEvents();if("string"===n)delete i[t];else if("object"===n)for(e in i)i.hasOwnProperty(e)&&t.test(e)&&delete i[e];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(t,e){var n,i,r,o,s=this.getListenersAsObject(t);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(t,n.listener),o=n.listener.apply(this,e||[]),o===this._getOnceReturnValue()&&this.removeListener(t,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},i.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return r.EventEmitter=o,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}).call(this),function(t){function e(e){var n=t.event;return n.target=n.target||n.srcElement||e,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(t,e,n){t.addEventListener(e,n,!1)}:n.attachEvent&&(i=function(t,n,i){t[n+i]=i.handleEvent?function(){var n=e(t);i.handleEvent.call(i,n)}:function(){var n=e(t);i.call(t,n)},t.attachEvent("on"+n,t[n+i])});var r=function(){};n.removeEventListener?r=function(t,e,n){t.removeEventListener(e,n,!1)}:n.detachEvent&&(r=function(t,e,n){t.detachEvent("on"+e,t[e+n]);try{delete t[e+n]}catch(i){t[e+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):t.eventie=o}(this),function(t,e){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return e(t,n,i)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("eventie")):t.imagesLoaded=e(t,t.EventEmitter,t.eventie)}(window,function(t,e,n){function i(t,e){for(var n in e)t[n]=e[n];return t}function r(t){return"[object Array]"===p.call(t)}function o(t){var e=[];if(r(t))e=t;else if("number"==typeof t.length)for(var n=0,i=t.length;i>n;n++)e.push(t[n]);else e.push(t);return e}function s(t,e,n){if(!(this instanceof s))return new s(t,e);"string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=o(t),this.options=i({},this.options),"function"==typeof e?n=e:i(this.options,e),n&&this.on("always",n),this.getImages(),f&&(this.jqDeferred=new f.Deferred);var r=this;setTimeout(function(){r.check()})}function a(t){this.img=t}function u(t){this.src=t,l[t]=this}var f=t.jQuery,c=t.console,d=void 0!==c,p=Object.prototype.toString;s.prototype=new e,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var t=0,e=this.elements.length;e>t;t++){var n=this.elements[t];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var a=r[o];this.addImage(a)}}},s.prototype.addImage=function(t){var e=new a(t);this.images.push(e)},s.prototype.check=function(){function t(t,r){return e.options.debug&&d&&c.log("confirm",t,r),e.progress(t),n++,n===i&&e.complete(),!0}var e=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return void this.complete();for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",t),o.check()}},s.prototype.progress=function(t){this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded;var e=this;setTimeout(function(){e.emit("progress",e,t),e.jqDeferred&&e.jqDeferred.notify&&e.jqDeferred.notify(e,t)})},s.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var e=this;setTimeout(function(){if(e.emit(t,e),e.emit("always",e),e.jqDeferred){var n=e.hasAnyBroken?"reject":"resolve";e.jqDeferred[n](e)}})},f&&(f.fn.imagesLoaded=function(t,e){var n=new s(this,t,e);return n.jqDeferred.promise(f(this))}),a.prototype=new e,a.prototype.check=function(){var t=l[this.img.src]||new u(this.img.src);if(t.isConfirmed)return void this.confirm(t.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var e=this;t.on("confirm",function(t,n){return e.confirm(t.isLoaded,n),!0}),t.check()},a.prototype.confirm=function(t,e){this.isLoaded=t,this.emit("confirm",this,e)};var l={};return u.prototype=new e,u.prototype.check=function(){if(!this.isChecked){var t=new Image;n.bind(t,"load",this),n.bind(t,"error",this),t.src=this.src,this.isChecked=!0}},u.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},u.prototype.onload=function(t){this.confirm(!0,"onload"),this.unbindProxyEvents(t)},u.prototype.onerror=function(t){this.confirm(!1,"onerror"),this.unbindProxyEvents(t)},u.prototype.confirm=function(t,e){this.isConfirmed=!0,this.isLoaded=t,this.emit("confirm",this,e)},u.prototype.unbindProxyEvents=function(t){n.unbind(t.target,"load",this),n.unbind(t.target,"error",this)},s}),function($){"use strict";function t(t,e,n,i,r){var o={url:spuvar.ajax_url,data:t,cache:!1,type:"POST",dataType:"json",timeout:3e4},r=r||!1,n=n||!1,i=i||!1;e&&(o.url=e),n&&(o.success=n),i&&(o.error=i),r&&(o.dataType=r),$.ajax(o)}function e(t,e,n){if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3);var r="; expires="+i.toGMTString()}else var r="";document.cookie=t+"="+e+r+"; path=/"}function n(t){for(var e=t+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "==r.charAt(0);)r=r.substring(1,r.length);if(0==r.indexOf(e))return r.substring(e.length,r.length)}return null}function i(){try{FB.Event.subscribe("edge.create",function(t,e){var n=$(e).parents(".spu-box").data("box-id");n&&SPU.hide(n,!1,!0)})}catch(t){}l=!0,clearInterval(h)}function r(t){var e=$(t.target).parents(".spu-box").data("box-id");e&&SPU.hide(e,!1,!0)}function o(t){if("on"==t.state){var e=jQuery(".spu-gogl").data("box-id");e&&SPU.hide(e,!1,!0)}}function s(t){if("confirm"==t.type){var e=jQuery(".spu-gogl").data("box-id");e&&SPU.hide(e,!1,!0)}}function a(){if("undefined"!=typeof spuvar_social&&spuvar_social.facebook)try{FB.XFBML.parse()}catch(t){}if("undefined"!=typeof spuvar_social&&spuvar_social.google)try{gapi.plusone.go()}catch(t){}if("undefined"!=typeof spuvar_social&&spuvar_social.twitter)try{twttr.widgets.load()}catch(t){}}function u(){$(".spu-box form").each(function(){var t=$(this).attr("action");t&&$(this).attr("action",t.replace("?spu_action=spu_load",""))}),$.fn.wpcf7InitForm&&$(".spu-box div.wpcf7 > form").wpcf7InitForm()}var f=function(){function i(t){var e=d[t],n=$(window).width(),i=$(window).height(),r=e.outerHeight(),o=e.outerWidth(),s=e.data("width"),a=0,u=i/2-r/2,f="fixed",c=$(document).scrollTop();e.hasClass("spu-centered")&&(s<n&&(a=n/2-o/2),e.css({left:a,position:f,top:u})),r+50>i&&(f="absolute",u=c,e.css({position:f,top:u,bottom:"auto"}))}function r(t){var e=$(t).find(".spu-facebook");if(e.length){var n=e.find(".fb-like > span").width();if(0==n){var i=e.find(".fb-like").data("layout");"box_count"==i?e.append('<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>"):"button_count"==i?e.append('<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;min-width: 120px !important;}</style>"):e.append('<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 o(t){var e=t,n=e.data("total");if(n){a();var i=0,r=0,o=e.outerWidth(),s=e.find(".spu-content").width();!spuvar.disable_style&&$(window).width()>o&&(e.find(".spu-shortcode").wrapAll('<div class="spu_shortcodes"/>'),e.find(".spu-shortcode").each(function(){i+=$(this).outerWidth()}),r=s-i-20*n),r>0&&(e.find(".spu-shortcode").each(function(){$(this).css("margin-left",r/2)}),2==n?e.find(".spu-shortcode").last().css("margin-left",0):3==n&&e.find(".spu-shortcode").first().css("margin-left",0))}}function s(t,n,r){var s=d[t],a=$("#spu-bg-"+t),u=s.data("bgopa");if(s.is(":animated"))return!1;if(n===!0&&s.is(":visible")||n===!1&&s.is(":hidden"))return!1;if(n===!1){var f=parseFloat(s.data("close-cookie"));r===!0&&(f=parseFloat(s.data("cookie"))),f>0&&e("spu_box_"+t,!0,f),s.trigger("spu.box_close",[t])}else setTimeout(function(){o(s)},1500),s.trigger("spu.box_open",[t]),$(window).resize(function(){i(t)}),i(t);var c=s.data("spuanimation"),p=s.data("close-on-conversion");return"fade"===c?n===!0?s.fadeIn("slow"):n===!1&&(p&&r||!r)&&s.fadeOut("slow"):"disable"===c?n===!0?s.show():n===!1&&(p&&r||!r)&&s.hide():n===!0?s.slideDown("slow"):n===!1&&(p&&r||!r)&&s.slideUp("slow"),n===!0&&u>0?"disable"===c?a.show():a.fadeIn():n===!1&&(p&&r||!r)&&("disable"===c?a.hide():a.fadeOut()),n}var u=$(window).height(),f=spuvar.is_admin,c=spuvar.is_preview,d=[];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 e=$(this),i=e.data("trigger"),o=0,a=1===parseInt(e.data("test-mode")),p=e.data("box-id"),l=1===parseInt(e.data("auto-hide")),h=parseInt(e.data("seconds-close")),m=parseInt(e.data("trigger-number"),10),v="percentage"==i?parseInt(e.data("trigger-number"),10)/100:.8,g=v*$(document).height();r(e),e.on("click",'a:not(".spu-close-popup, .flp_wrapper a, .spu-not-close, .spu-not-close a")',function(){s(p,!1,!0)}),$(document).keyup(function(t){27==t.keyCode&&s(p,!1,!1)});var w=navigator.userAgent,b=w.match(/iPad/i)||w.match(/iPhone/i)?"touchstart":"click";$("body").on(b,function(t){void 0!==t.originalEvent&&s(p,!1,!1)}),$("body").on(b,".spu-box,.spu-clickable",function(t){t.stopPropagation()}),e.hide().css("left",""),d[p]=e;var y=function(){o&&clearTimeout(o),o=window.setTimeout(function(){var t=$(window).scrollTop(),e=t+u>=g;e?(l||$(window).unbind("scroll",y),s(p,!0,!1)):s(p,!1,!1)},100)},_=function(){o&&clearTimeout(o),o=window.setTimeout(function(){var t=$(window).scrollTop(),e=t>=m;e?(l||$(window).unbind("scroll",_),s(p,!0,!1)):s(p,!1,!1)},100)},x=function(){o&&clearTimeout(o),o=window.setTimeout(function(){s(p,!0,!1)},1e3*m)},E=n("spu_box_"+p);if((void 0==E||""==E||f&&a||c)&&("seconds"==i&&x(),"percentage"==i&&($(window).bind("scroll",y),y()),"pixels"==i&&($(window).bind("scroll",_),_()),window.location.hash&&window.location.hash.length>0)){var L=window.location.hash,j;L.substring(1)===e.attr("id")&&setTimeout(function(){s(p,!0,!1)},100)}e.on("click",".spu-close-popup",function(){s(p,!1,!1),"percentage"==i&&$(window).unbind("scroll",y)}),$(document.body).on("click",'a[href="#spu-'+p+'"], .spu-open-'+p,function(t){t.preventDefault(),s(p,!0,!1)}),$('a[href="#spu-'+p+'"], .spu-open-'+p).css("cursor","pointer").addClass("spu-clickable"),e.find(".gform_wrapper form").addClass("gravity-form"),e.find(".mc4wp-form form").addClass("mc4wp-form"),e.find(".newsletter form").addClass("newsletter-form");var k=e.find("form");if(k.length){if(!k.is(".newsletter-form, .wpcf7-form, .gravity-form, .infusion-form, .widget_wysija, .ninja-forms-form")){var T=k.attr("action"),O=new RegExp(spuvar.site_url,"i");T&&T.length&&(O.test(T)||k.addClass("spu-disable-ajax"))}$(".spu-disable-ajax form").length&&$(".spu-disable-ajax form").addClass("spu-disable-ajax"),e.on("submit",'form.spu-disable-ajax:not(".flp_form")',function(){e.trigger("spu.form_submitted",[p]),s(p,!1,!0)}),e.on("submit",'form:not(".newsletter-form, .wpcf7-form, .gravity-form, .infusion-form, .spu-disable-ajax, .widget_wysija, .ninja-forms-form, .flp_form")',function(n){n.preventDefault();var i=!0,r=$(this),o=r.serialize(),a=r.hasClass("mc4wp-form")?spuvar.site_url+"/":r.attr("action"),u=function(t,e,n){console.log("Spu Form error: "+e+" - "+n)},f=function(t){var e=$(t).filter("#spu-"+p).html();$("#spu-"+p).html(e),$("#spu-"+p).find(".mc4wp-form-error").length||setTimeout(function(){s(p,!1,!0)},1e3*spuvar.seconds_confirmation_close)};return t(o,a,f,u,"html"),e.trigger("spu.form_submitted",[p]),i}),$("body").on("mailsent.wpcf7",function(){e.trigger("spu.form_submitted",[p]),s(p,!1,!0)}),$(document).on("gform_confirmation_loaded",function(){e.trigger("spu.form_submitted",[p]),s(p,!1,!0)}),e.on("submit",".infusion-form",function(t){t.preventDefault(),e.trigger("spu.form_submitted",[p]),s(p,!1,!0),this.submit()}),e.on("submit",".newsletter-form",function(t){t.preventDefault(),e.trigger("spu.form_submitted",[p]),s(p,!1,!0),this.submit()}),$("body").on("submitResponse.default",function(){e.trigger("spu.form_submitted",[p]),s(p,!1,!0)})}}),{show:function(t){return s(t,!0,!1)},hide:function(t,e,n){return s(t,!1,n)},request:function(e,n,i,r){return t(e,n,i,r)}}};if(spuvar.ajax_mode){var c={pid:spuvar.pid,referrer:document.referrer,query_string:document.location.search,is_category:spuvar.is_category,is_archive:spuvar.is_archive},d=function(t){$("body").append(t),$(".spu-box").imagesLoaded(function(){window.SPU=f(),u()})},p=function(t,e,n){console.log("Problem loading popups - error: "+e+" - "+n)};t(c,spuvar.ajax_mode_url,d,p,"html")}else $(".spu-box").imagesLoaded(function(){window.SPU=f()});var l=!1,h=setInterval(function(){"undefined"==typeof FB||l||i()},1e3);if("undefined"!=typeof twttr)try{twttr.ready(function(t){t.events.bind("tweet",r),t.events.bind("follow",r)})}catch(t){}}(jQuery);
1
+ (function(){function t(){}function e(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function n(t){return function(){return this[t].apply(this,arguments)}}var i=t.prototype,r=this,o=r.EventEmitter;i.getListeners=function(t){var e,n,i=this._getEvents();if("object"==typeof t){e={};for(n in i)i.hasOwnProperty(n)&&t.test(n)&&(e[n]=i[n])}else e=i[t]||(i[t]=[]);return e},i.flattenListeners=function(t){var e,n=[];for(e=0;t.length>e;e+=1)n.push(t[e].listener);return n},i.getListenersAsObject=function(t){var e,n=this.getListeners(t);return n instanceof Array&&(e={},e[t]=n),e||n},i.addListener=function(t,n){var i,r=this.getListenersAsObject(t),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===e(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(t){return this.getListeners(t),this},i.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},i.removeListener=function(t,n){var i,r,o=this.getListenersAsObject(t);for(r in o)o.hasOwnProperty(r)&&(i=e(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},i.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},i.manipulateListeners=function(t,e,n){var i,r,o=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(i=n.length;i--;)o.call(this,e,n[i]);else for(i in e)e.hasOwnProperty(i)&&(r=e[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(t){var e,n=typeof t,i=this._getEvents();if("string"===n)delete i[t];else if("object"===n)for(e in i)i.hasOwnProperty(e)&&t.test(e)&&delete i[e];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(t,e){var n,i,r,o,s=this.getListenersAsObject(t);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(t,n.listener),o=n.listener.apply(this,e||[]),o===this._getOnceReturnValue()&&this.removeListener(t,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},i.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return r.EventEmitter=o,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}).call(this),function(t){function e(e){var n=t.event;return n.target=n.target||n.srcElement||e,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(t,e,n){t.addEventListener(e,n,!1)}:n.attachEvent&&(i=function(t,n,i){t[n+i]=i.handleEvent?function(){var n=e(t);i.handleEvent.call(i,n)}:function(){var n=e(t);i.call(t,n)},t.attachEvent("on"+n,t[n+i])});var r=function(){};n.removeEventListener?r=function(t,e,n){t.removeEventListener(e,n,!1)}:n.detachEvent&&(r=function(t,e,n){t.detachEvent("on"+e,t[e+n]);try{delete t[e+n]}catch(i){t[e+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):t.eventie=o}(this),function(t,e){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return e(t,n,i)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("eventie")):t.imagesLoaded=e(t,t.EventEmitter,t.eventie)}(window,function(t,e,n){function i(t,e){for(var n in e)t[n]=e[n];return t}function r(t){return"[object Array]"===p.call(t)}function o(t){var e=[];if(r(t))e=t;else if("number"==typeof t.length)for(var n=0,i=t.length;i>n;n++)e.push(t[n]);else e.push(t);return e}function s(t,e,n){if(!(this instanceof s))return new s(t,e);"string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=o(t),this.options=i({},this.options),"function"==typeof e?n=e:i(this.options,e),n&&this.on("always",n),this.getImages(),f&&(this.jqDeferred=new f.Deferred);var r=this;setTimeout(function(){r.check()})}function a(t){this.img=t}function u(t){this.src=t,l[t]=this}var f=t.jQuery,c=t.console,d=void 0!==c,p=Object.prototype.toString;s.prototype=new e,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var t=0,e=this.elements.length;e>t;t++){var n=this.elements[t];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var a=r[o];this.addImage(a)}}},s.prototype.addImage=function(t){var e=new a(t);this.images.push(e)},s.prototype.check=function(){function t(t,r){return e.options.debug&&d&&c.log("confirm",t,r),e.progress(t),n++,n===i&&e.complete(),!0}var e=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return void this.complete();for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",t),o.check()}},s.prototype.progress=function(t){this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded;var e=this;setTimeout(function(){e.emit("progress",e,t),e.jqDeferred&&e.jqDeferred.notify&&e.jqDeferred.notify(e,t)})},s.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var e=this;setTimeout(function(){if(e.emit(t,e),e.emit("always",e),e.jqDeferred){var n=e.hasAnyBroken?"reject":"resolve";e.jqDeferred[n](e)}})},f&&(f.fn.imagesLoaded=function(t,e){var n=new s(this,t,e);return n.jqDeferred.promise(f(this))}),a.prototype=new e,a.prototype.check=function(){var t=l[this.img.src]||new u(this.img.src);if(t.isConfirmed)return void this.confirm(t.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var e=this;t.on("confirm",function(t,n){return e.confirm(t.isLoaded,n),!0}),t.check()},a.prototype.confirm=function(t,e){this.isLoaded=t,this.emit("confirm",this,e)};var l={};return u.prototype=new e,u.prototype.check=function(){if(!this.isChecked){var t=new Image;n.bind(t,"load",this),n.bind(t,"error",this),t.src=this.src,this.isChecked=!0}},u.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},u.prototype.onload=function(t){this.confirm(!0,"onload"),this.unbindProxyEvents(t)},u.prototype.onerror=function(t){this.confirm(!1,"onerror"),this.unbindProxyEvents(t)},u.prototype.confirm=function(t,e){this.isConfirmed=!0,this.isLoaded=t,this.emit("confirm",this,e)},u.prototype.unbindProxyEvents=function(t){n.unbind(t.target,"load",this),n.unbind(t.target,"error",this)},s}),function($){"use strict";function t(t,e,n,i,r){var o={url:spuvar.ajax_url,data:t,cache:!1,type:"POST",dataType:"json",timeout:3e4},r=r||!1,n=n||!1,i=i||!1;e&&(o.url=e),n&&(o.success=n),i&&(o.error=i),r&&(o.dataType=r),$.ajax(o)}function e(t,e,n){if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3);var r="; expires="+i.toGMTString()}else var r="";document.cookie=t+"="+e+r+"; path=/"}function n(t){for(var e=t+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "==r.charAt(0);)r=r.substring(1,r.length);if(0==r.indexOf(e))return r.substring(e.length,r.length)}return null}function i(){try{FB.Event.subscribe("edge.create",function(t,e){var n=$(e).parents(".spu-box").data("box-id");n&&SPU.hide(n,!1,!0)})}catch(t){}l=!0,clearInterval(h)}function r(t){var e=$(t.target).parents(".spu-box").data("box-id");e&&SPU.hide(e,!1,!0)}function o(t){if("on"==t.state){var e=jQuery(".spu-gogl").data("box-id");e&&SPU.hide(e,!1,!0)}}function s(t){if("confirm"==t.type){var e=jQuery(".spu-gogl").data("box-id");e&&SPU.hide(e,!1,!0)}}function a(){if("undefined"!=typeof spuvar_social&&spuvar_social.facebook)try{FB.XFBML.parse()}catch(t){}if("undefined"!=typeof spuvar_social&&spuvar_social.google)try{gapi.plusone.go()}catch(t){}if("undefined"!=typeof spuvar_social&&spuvar_social.twitter)try{twttr.widgets.load()}catch(t){}}function u(){$(".spu-box form").each(function(){var t=$(this).attr("action");t&&$(this).attr("action",t.replace("?spu_action=spu_load",""))}),$.fn.wpcf7InitForm&&$(".spu-box div.wpcf7 > form").wpcf7InitForm()}var f=function(){function i(t){var e=d[t],n=$(window).width(),i=$(window).height(),r=e.outerHeight(),o=e.outerWidth(),s=e.data("width"),a=0,u=i/2-r/2,f="fixed",c=$(document).scrollTop();e.hasClass("spu-centered")&&(s<n&&(a=n/2-o/2),e.css({left:a,position:f,top:u})),r+50>i&&(f="absolute",u=c,e.css({position:f,top:u,bottom:"auto"}))}function r(t){var e=$(t).find(".spu-facebook");if(e.length){var n=e.find(".fb-like > span").width();if(0==n){var i=e.find(".fb-like").data("layout");"box_count"==i?e.append('<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>"):"button_count"==i?e.append('<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;min-width: 120px !important;}</style>"):e.append('<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 o(t){var e=t,n=e.data("total");if(n){a();var i=0,r=0,o=e.outerWidth(),s=e.find(".spu-content").width();!spuvar.disable_style&&$(window).width()>o&&(e.find(".spu-shortcode").wrapAll('<div class="spu_shortcodes"/>'),e.find(".spu-shortcode").each(function(){i+=$(this).outerWidth()}),r=s-i-20*n),r>0&&(e.find(".spu-shortcode").each(function(){$(this).css("margin-left",r/2)}),2==n?e.find(".spu-shortcode").last().css("margin-left",0):3==n&&e.find(".spu-shortcode").first().css("margin-left",0))}}function s(t,n,r){var s=d[t],a=$("#spu-bg-"+t),u=s.data("bgopa");if(s.is(":animated"))return!1;if(n===!0&&s.is(":visible")||n===!1&&s.is(":hidden"))return!1;if(n===!1){var f=parseFloat(s.data("close-cookie"));r===!0&&(f=parseFloat(s.data("cookie"))),f>0&&e("spu_box_"+t,!0,f),s.trigger("spu.box_close",[t]);var c=s.find('iframe[src*="vimeo"],iframe[src*="youtube"]');c&&s.remove()}else setTimeout(function(){o(s)},1500),s.trigger("spu.box_open",[t]),$(window).resize(function(){i(t)}),i(t);var p=s.data("spuanimation"),l=s.data("close-on-conversion");return"fade"===p?n===!0?s.fadeIn("slow"):n===!1&&(l&&r||!r)&&s.fadeOut("slow"):"disable"===p?n===!0?s.show():n===!1&&(l&&r||!r)&&s.hide():n===!0?s.slideDown("slow"):n===!1&&(l&&r||!r)&&s.slideUp("slow"),n===!0&&u>0?"disable"===p?a.show():a.fadeIn():n===!1&&(l&&r||!r)&&("disable"===p?a.hide():a.fadeOut()),n}var u=$(window).height(),f=spuvar.is_admin,c=spuvar.is_preview,d=[];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 e=$(this),i=e.data("trigger"),o=0,a=1===parseInt(e.data("test-mode")),p=e.data("box-id"),l=1===parseInt(e.data("auto-hide")),h=parseInt(e.data("seconds-close")),m=parseInt(e.data("trigger-number"),10),v="percentage"==i?parseInt(e.data("trigger-number"),10)/100:.8,g=v*$(document).height();r(e),e.on("click",'a:not(".spu-close-popup, .flp_wrapper a, .spu-not-close, .spu-not-close a")',function(){s(p,!1,!0)}),$(document).keyup(function(t){27==t.keyCode&&s(p,!1,!1)});var w=navigator.userAgent,b=w.match(/iPad/i)||w.match(/iPhone/i)?"touchstart":"click";$("body").on(b,function(t){void 0!==t.originalEvent&&s(p,!1,!1)}),$("body").on(b,".spu-box,.spu-clickable",function(t){t.stopPropagation()}),e.hide().css("left",""),d[p]=e;var y=function(){o&&clearTimeout(o),o=window.setTimeout(function(){var t=$(window).scrollTop(),e=t+u>=g;e?(l||$(window).unbind("scroll",y),s(p,!0,!1)):s(p,!1,!1)},100)},_=function(){o&&clearTimeout(o),o=window.setTimeout(function(){var t=$(window).scrollTop(),e=t>=m;e?(l||$(window).unbind("scroll",_),s(p,!0,!1)):s(p,!1,!1)},100)},x=function(){o&&clearTimeout(o),o=window.setTimeout(function(){s(p,!0,!1)},1e3*m)},E=n("spu_box_"+p);if((void 0==E||""==E||f&&a||c)&&("seconds"==i&&x(),"percentage"==i&&($(window).bind("scroll",y),y()),"pixels"==i&&($(window).bind("scroll",_),_()),window.location.hash&&window.location.hash.length>0)){var L=window.location.hash,j;L.substring(1)===e.attr("id")&&setTimeout(function(){s(p,!0,!1)},100)}e.on("click",".spu-close-popup",function(){s(p,!1,!1),"percentage"==i&&$(window).unbind("scroll",y)}),$(document.body).on("click",'a[href="#spu-'+p+'"], .spu-open-'+p,function(t){t.preventDefault(),s(p,!0,!1)}),$('a[href="#spu-'+p+'"], .spu-open-'+p).css("cursor","pointer").addClass("spu-clickable"),e.find(".gform_wrapper form").addClass("gravity-form"),e.find(".mc4wp-form form").addClass("mc4wp-form"),e.find(".newsletter form").addClass("newsletter-form");var k=e.find("form");if(k.length){if(!k.is(".newsletter-form, .wpcf7-form, .gravity-form, .infusion-form, .widget_wysija, .ninja-forms-form")){var T=k.attr("action"),O=new RegExp(spuvar.site_url,"i");T&&T.length&&(O.test(T)||k.addClass("spu-disable-ajax"))}$(".spu-disable-ajax form").length&&$(".spu-disable-ajax form").addClass("spu-disable-ajax"),e.on("submit",'form.spu-disable-ajax:not(".flp_form")',function(){e.trigger("spu.form_submitted",[p]),s(p,!1,!0)}),e.on("submit",'form:not(".newsletter-form, .wpcf7-form, .gravity-form, .infusion-form, .spu-disable-ajax, .widget_wysija, .ninja-forms-form, .flp_form")',function(n){n.preventDefault();var i=!0,r=$(this),o=r.serialize(),a=r.hasClass("mc4wp-form")?spuvar.site_url+"/":r.attr("action"),u=function(t,e,n){console.log("Spu Form error: "+e+" - "+n)},f=function(t){var e=$(t).filter("#spu-"+p).html();$("#spu-"+p).html(e),$("#spu-"+p).find(".mc4wp-alert").length||setTimeout(function(){s(p,!1,!0)},1e3*spuvar.seconds_confirmation_close)};return t(o,a,f,u,"html"),e.trigger("spu.form_submitted",[p]),i}),$(document).on("wpcf7mailsent",function(){e.trigger("spu.form_submitted",[p]),s(p,!1,!0)}),$(document).on("gform_confirmation_loaded",function(){e.trigger("spu.form_submitted",[p]),s(p,!1,!0)}),e.on("submit",".infusion-form",function(t){t.preventDefault(),e.trigger("spu.form_submitted",[p]),s(p,!1,!0),this.submit()}),e.on("submit",".newsletter-form",function(t){t.preventDefault(),e.trigger("spu.form_submitted",[p]),s(p,!1,!0),this.submit()}),$("body").on("submitResponse.default",function(){e.trigger("spu.form_submitted",[p]),s(p,!1,!0)})}}),{show:function(t){return s(t,!0,!1)},hide:function(t,e,n){return s(t,!1,n)},request:function(e,n,i,r){return t(e,n,i,r)}}};if(spuvar.ajax_mode){var c={pid:spuvar.pid,referrer:document.referrer,query_string:document.location.search,is_category:spuvar.is_category,is_archive:spuvar.is_archive},d=function(t){$("body").append(t),$(".spu-box").imagesLoaded(function(){window.SPU=f(),u()})},p=function(t,e,n){console.log("Problem loading popups - error: "+e+" - "+n)};t(c,spuvar.ajax_mode_url,d,p,"html")}else $(".spu-box").imagesLoaded(function(){window.SPU=f()});var l=!1,h=setInterval(function(){"undefined"==typeof FB||l||i()},1e3);if("undefined"!=typeof twttr)try{twttr.ready(function(t){t.events.bind("tweet",r),t.events.bind("follow",r)})}catch(t){}}(jQuery);
public/assets/js/public.js CHANGED
@@ -249,7 +249,7 @@ var SPU_master = function() {
249
  $('#spu-' + id ).html(response);
250
 
251
  // check if an error was returned for m4wp
252
- if( ! $('#spu-' + id ).find('.mc4wp-form-error').length ) {
253
 
254
  // give 2 seconds for response
255
  setTimeout( function(){
@@ -258,7 +258,7 @@ var SPU_master = function() {
258
 
259
  }, spuvar.seconds_confirmation_close * 1000);
260
 
261
- }
262
  };
263
  // Send form by ajax and replace popup with response
264
  request(data, url, success_cb, error_cb, 'html');
@@ -269,7 +269,7 @@ var SPU_master = function() {
269
  });
270
 
271
  // CF7 support
272
- $('body').on('mailsent.wpcf7', function(){
273
  $box.trigger('spu.form_submitted', [id]);
274
  toggleBox(id, false, true );
275
  });
@@ -453,6 +453,11 @@ var SPU_master = function() {
453
  spuCreateCookie( 'spu_box_' + id, true, days );
454
  }
455
  $box.trigger('spu.box_close', [id]);
 
 
 
 
 
456
  } else {
457
  setTimeout(function(){
458
  centerShortcodes($box);
249
  $('#spu-' + id ).html(response);
250
 
251
  // check if an error was returned for m4wp
252
+ if( ! $('#spu-' + id ).find('.mc4wp-alert').length ) {
253
 
254
  // give 2 seconds for response
255
  setTimeout( function(){
258
 
259
  }, spuvar.seconds_confirmation_close * 1000);
260
 
261
+ }
262
  };
263
  // Send form by ajax and replace popup with response
264
  request(data, url, success_cb, error_cb, 'html');
269
  });
270
 
271
  // CF7 support
272
+ $(document).on('wpcf7mailsent', function(){
273
  $box.trigger('spu.form_submitted', [id]);
274
  toggleBox(id, false, true );
275
  });
453
  spuCreateCookie( 'spu_box_' + id, true, days );
454
  }
455
  $box.trigger('spu.box_close', [id]);
456
+ // check for videos inside and destroy it
457
+ var iframe = $box.find('iframe[src*="vimeo"],iframe[src*="youtube"]');
458
+ if( iframe ){
459
+ $box.remove();
460
+ }
461
  } else {
462
  setTimeout(function(){
463
  centerShortcodes($box);
public/class-social-popup.php CHANGED
@@ -440,7 +440,7 @@ class SocialPopup {
440
  }
441
  }
442
  // check if we are viewing a popup, and only show that one (preview mode)
443
- $viewing_id = get_queried_object_id();
444
  foreach ( $spu_ids as $spu ) {
445
  if ( $spu->ID == $viewing_id ) {
446
  $spu_matches = array();
@@ -715,6 +715,8 @@ class SocialPopup {
715
  */
716
  function print_boxes( ) {
717
 
 
 
718
  $spu_matches = $this->check_for_matches();
719
 
720
  //if we have matches continue
@@ -762,8 +764,6 @@ class SocialPopup {
762
  if ( empty( $_REQUEST['spu_action'] ) || $_REQUEST['spu_action'] != 'spu_load' )
763
  return;
764
 
765
- do_action('spu/print_boxes');
766
-
767
  define( 'DOING_AJAX', TRUE );
768
 
769
  $this->print_boxes();
440
  }
441
  }
442
  // check if we are viewing a popup, and only show that one (preview mode)
443
+ $viewing_id = defined('DOING_AJAX') && isset($_REQUEST['pid']) ? $_REQUEST['pid'] : get_queried_object_id();
444
  foreach ( $spu_ids as $spu ) {
445
  if ( $spu->ID == $viewing_id ) {
446
  $spu_matches = array();
715
  */
716
  function print_boxes( ) {
717
 
718
+ do_action('spu/print_boxes');
719
+
720
  $spu_matches = $this->check_for_matches();
721
 
722
  //if we have matches continue
764
  if ( empty( $_REQUEST['spu_action'] ) || $_REQUEST['spu_action'] != 'spu_load' )
765
  return;
766
 
 
 
767
  define( 'DOING_AJAX', TRUE );
768
 
769
  $this->print_boxes();
public/includes/class-spu-rules.php CHANGED
@@ -78,7 +78,7 @@ class Spu_Rules
78
  add_filter('spu/rules/rule_match/query_string', array($this, 'rule_match_query_string'), 10, 2);
79
 
80
  $this->post_id = get_queried_object_id();
81
- $this->referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
82
  $this->query_string = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '';
83
 
84
  if( defined('DOING_AJAX') ) {
@@ -139,6 +139,9 @@ class Spu_Rules
139
  if( !$match )
140
  {
141
  $match_group = false;
 
 
 
142
  }
143
 
144
  }
@@ -209,15 +212,16 @@ class Spu_Rules
209
  */
210
  function rule_match_browser( $match, $rule ) {
211
 
212
- $detect = new Mobile_Detect;
 
213
  //check $detect $browsers for valid keys
214
  if ( $rule['operator'] == "==" ) {
215
 
216
- return $detect->is($rule['value']);
217
 
218
  } else {
219
 
220
- return !$detect->is($rule['value']);
221
 
222
  }
223
 
@@ -384,7 +388,6 @@ class Spu_Rules
384
  return !preg_match( '~' . $internal . '~i', $ref );
385
 
386
  } else {
387
-
388
  return preg_match( '~' . $internal . '~i', $ref );
389
 
390
  }
@@ -987,13 +990,31 @@ class Spu_Rules
987
  {
988
  return false;
989
  }
 
 
 
 
 
 
 
990
 
 
991
 
992
- // post type
993
- $post_type = $this->get_post_type();
 
 
 
 
 
 
 
 
 
 
 
 
994
 
995
- // vars
996
- $taxonomies = get_object_taxonomies( $post_type );
997
 
998
  if( is_array($taxonomies) )
999
  {
78
  add_filter('spu/rules/rule_match/query_string', array($this, 'rule_match_query_string'), 10, 2);
79
 
80
  $this->post_id = get_queried_object_id();
81
+ $this->referrer = isset($_SERVER['HTTP_REFERER']) && !defined('DOING_AJAX') ? $_SERVER['HTTP_REFERER'] : '';
82
  $this->query_string = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '';
83
 
84
  if( defined('DOING_AJAX') ) {
139
  if( !$match )
140
  {
141
  $match_group = false;
142
+ // if one rule fails we don't need to check the rest of the rules in the group
143
+ // that way if we add geo rules down it won't get executed and will save credits
144
+ break;
145
  }
146
 
147
  }
212
  */
213
  function rule_match_browser( $match, $rule ) {
214
 
215
+ $detect = new Browser();
216
+
217
  //check $detect $browsers for valid keys
218
  if ( $rule['operator'] == "==" ) {
219
 
220
+ return $detect->getBrowser() == $rule['value'];
221
 
222
  } else {
223
 
224
+ return $detect->getBrowser() != $rule['value'];
225
 
226
  }
227
 
388
  return !preg_match( '~' . $internal . '~i', $ref );
389
 
390
  } else {
 
391
  return preg_match( '~' . $internal . '~i', $ref );
392
 
393
  }
990
  {
991
  return false;
992
  }
993
+ // if we are inside taxonomy archive page (Ajax mode)
994
+ if( $this->is_archive ){
995
+ if($rule['operator'] == "==")
996
+ return $rule['value'] == $this->post_id;
997
+ else
998
+ return $rule['value'] != $this->post_id;
999
+ }
1000
 
1001
+ $qo = get_queried_object();
1002
 
1003
+ // if we are inside taxonomy archive page
1004
+ if( isset($qo->term_id) && $qo->term_id == $this->post_id ){
1005
+ if($rule['operator'] == "==")
1006
+ return $rule['value'] == $qo->term_id;
1007
+ else
1008
+ return $rule['value'] != $qo->term_id;
1009
+ } else {
1010
+ // post type
1011
+ $post_type = $this->get_post_type();
1012
+ // vars
1013
+ $taxonomies = get_object_taxonomies( $post_type );
1014
+ }
1015
+
1016
+ $terms = array();
1017
 
 
 
1018
 
1019
  if( is_array($taxonomies) )
1020
  {
vendor/autoload.php CHANGED
@@ -2,6 +2,6 @@
2
 
3
  // autoload.php @generated by Composer
4
 
5
- require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
  return ComposerAutoloaderInit28a0833b49959d9021dc40cd45dfc52b::getLoader();
2
 
3
  // autoload.php @generated by Composer
4
 
5
+ require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
  return ComposerAutoloaderInit28a0833b49959d9021dc40cd45dfc52b::getLoader();
vendor/cbschuld/browser.php/.gitignore ADDED
File without changes
vendor/cbschuld/browser.php/.travis.yml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ language: php
2
+
3
+ php:
4
+ - 7.0
5
+ - 5.6
6
+ - 5.5
7
+ - 5.4
8
+ - 5.3
9
+
10
+ script: phpunit --configuration phpunit.xml.dist
vendor/cbschuld/browser.php/LICENSE.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ Copyright (c) 2013 Chris Schuld
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
vendor/cbschuld/browser.php/README.md ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Browser.php
2
+ =============
3
+
4
+ [![Build Status](https://travis-ci.org/cbschuld/Browser.php.png?branch=master)](https://travis-ci.org/cbschuld/Browser.php)
5
+
6
+ Helps detect the user's browser and platform at the PHP level via the user agent
7
+
8
+
9
+ Installation
10
+ ============
11
+
12
+ To install, simply `require` the `Browser.php` file under `lib`.
13
+
14
+ You can also install it via `Composer` by using the [Packagist archive](https://packagist.org/packages/cbschuld/browser.php).
15
+
16
+
17
+ Background
18
+ ============
19
+
20
+ Detecting the user's browser type and version is helpful in web applications that harness some of the newer bleeding edge concepts. With the browser type and version you can notify users about challenges they may experience and suggest they upgrade before using such application. Not a great idea on a large scale public site; but on a private application this type of check can be helpful.
21
+
22
+ In an active project of mine we have a pretty graphically intensive and visually appealing user interface which leverages a lot of transparent PNG files. Because we all know how great IE6 supports PNG files it was necessary for us to tell our users the lack of power their browser has in a kind way.
23
+
24
+ Searching for a way to do this at the PHP layer and not at the client layer was more of a challenge than I would have guessed; the only script available was written by Gary White and Gary no longer maintains this script because of reliability. I do agree 100% with Gary about the readability; however, there are realistic reasons to desire the user.s browser and browser version and if your visitor is not echoing a false user agent we can take an educated guess.
25
+
26
+ I based this solution off of Gary White.s original solution but added a few things:
27
+
28
+ I added the ability to view the return values as class constants to increase the readability
29
+
30
+ * Added version detectionf for edge via [pixelbacon](https://github.com/pixelbacon)
31
+ * Updated the version detection for Amaya
32
+ * Updated the version detection for Firefox
33
+ * Updated the version detection for Lynx
34
+ * Updated the version detection for WebTV
35
+ * Updated the version detection for NetPositive
36
+ * Updated the version detection for IE
37
+ * Updated the version detection for OmniWeb
38
+ * Updated the version detection for iCab
39
+ * Updated the version detection for Safari
40
+ * Added detection for Chrome
41
+ * Added detection for iPhone
42
+ * Added detection for robots
43
+ * Added detection for mobile devices
44
+ * Added detection for BlackBerry
45
+ * Added detection for iPhone
46
+ * Added detection for iPad
47
+ * Added detection for Android
48
+ * Removed Netscape checks
49
+ * Updated Safari to remove mobile devices (iPhone)
50
+
51
+ **This solution identifies the following Operating Systems:**
52
+
53
+ * Windows (Browser::PLATFORM_WINDOWS)
54
+ * Windows CE (Browser::PLATFORM_WINDOWS_CE)
55
+ * Apple (Browser::PLATFORM_APPLE)
56
+ * Linux (Browser::PLATFORM_LINUX)
57
+ * Android (Browser::PLATFORM_ANDROID)
58
+ * OS/2 (Browser::PLATFORM_OS2)
59
+ * BeOS (Browser::PLATFORM_BEOS)
60
+ * iPhone (Browser::PLATFORM_IPHONE)
61
+ * iPod (Browser::PLATFORM_IPOD)
62
+ * BlackBerry (Browser::PLATFORM_BLACKBERRY)
63
+ * FreeBSD (Browser::PLATFORM_FREEBSD)
64
+ * OpenBSD (Browser::PLATFORM_OPENBSD)
65
+ * NetBSD (Browser::PLATFORM_NETBSD)
66
+ * SunOS (Browser::PLATFORM_SUNOS)
67
+ * OpenSolaris (Browser::PLATFORM_OPENSOLARIS)
68
+ * iPad (Browser::PLATFORM_IPAD)
69
+
70
+ **This solution identifies the following Browsers and does a best-guess on the version:**
71
+
72
+ * Opera (Browser::BROWSER_OPERA)
73
+ * WebTV (Browser::BROWSER_WEBTV)
74
+ * NetPositive (Browser::BROWSER_NETPOSITIVE)
75
+ * Edge (Browser::BROWSER_EDGE)
76
+ * Internet Explorer (Browser::BROWSER_IE)
77
+ * Pocket Internet Explorer (Browser::BROWSER_POCKET_IE)
78
+ * Galeon (Browser::BROWSER_GALEON)
79
+ * Konqueror (Browser::BROWSER_KONQUEROR)
80
+ * iCab (Browser::BROWSER_ICAB)
81
+ * OmniWeb (Browser::BROWSER_OMNIWEB)
82
+ * Phoenix (Browser::BROWSER_PHOENIX)
83
+ * Firebird (Browser::BROWSER_FIREBIRD)
84
+ * Firefox (Browser::BROWSER_FIREFOX)
85
+ * Mozilla (Browser::BROWSER_MOZILLA)
86
+ * Amaya (Browser::BROWSER_AMAYA)
87
+ * Lynx (Browser::BROWSER_LYNX)
88
+ * Safari (Browser::BROWSER_SAFARI)
89
+ * iPhone (Browser::BROWSER_IPHONE)
90
+ * iPod (Browser::BROWSER_IPOD)
91
+ * Google.s Android(Browser::BROWSER_ANDROID)
92
+ * Google.s Chrome(Browser::BROWSER_CHROME)
93
+ * GoogleBot(Browser::BROWSER_GOOGLEBOT)
94
+ * Yahoo!.s Slurp(Browser::BROWSER_SLURP)
95
+ * W3C.s Validator(Browser::BROWSER_W3CVALIDATOR)
96
+ * BlackBerry(Browser::BROWSER_BLACKBERRY)
97
+
98
+ **Typical Usage:**
99
+
100
+ ```php
101
+ $browser = new Browser();
102
+ if( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >= 2 ) {
103
+ echo 'You have FireFox version 2 or greater';
104
+ }
105
+ ```
106
+
107
+ 12/9/2008 Update
108
+ * removed an unused constant and renamed the constructor to use the PHP magic method __construct (thanks to Robin for locating the legacy constant and suggesting the use of the magic method).
109
+
110
+ 2/19/2009 Update
111
+ * updated typical usage to show a correct example! (thanks David!)
112
+
113
+ 2/24/2009 Update
114
+ * fixed typo in the usage! (thanks Adam!)
115
+
116
+ 3/14/2009 Update
117
+ * added support for the iPod; added iPod and iPhone as platforms; added Google.s Android
118
+
119
+ 4/22/2009 Update
120
+ * added support for GoogleBot, the W3C Validator and Yahoo! Slurp
121
+
122
+ 4/27/2009 Update
123
+ * John pointed out a terrible typo (see below) . removed the typo
124
+
125
+ 11/08/2009 Update
126
+ * A lot of changes to the script, thank you to everyone for the suggestions and emails. This release should add all of the requested features. Added BlackBerry, mobile detection, Opera Mini support, robot detection, Opera 10.s UserAgent .mess., detection for IceCat and Shiretoko!
127
+
128
+ 3/7/2010 Update
129
+ * Version 1.7 was a *MAJOR* Rebuild (preg_match and other .slow. routine removal(s)) included the following changes:
130
+ * Almost allof Gary.s original code has been replaced
131
+ * Large PHPUNIT testing environment created to validate new releases and additions
132
+ * Added FreeBSD Platform
133
+ * Added OpenBSD Platform
134
+ * Added NetBSD Platform
135
+ * Added SunOS Platform
136
+ * Added OpenSolaris Platform
137
+ * Added support of the Iceweazel Browser
138
+ * Added isChromeFrame() call to check if chromeframe is in use
139
+ * Moved the Opera check in front of the Firefox check due to legacy Opera User Agents
140
+ * Added the __toString() method (Thanks Deano)
141
+
142
+ 4/27/2010: Update (Version 1.8)
143
+ * Added iPad support
144
+
145
+ 8/20/2010: Update (Version 1.9)
146
+ * Added MSN Explorer Browser
147
+ * Added Bing/MSN Robot
148
+ * Added the Android Platform
149
+ * Fixed issue with Android 1.6/2.2
vendor/cbschuld/browser.php/composer.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "cbschuld/browser.php",
3
+ "description": "A PHP Class to detect a user's Browser",
4
+ "keywords": ["browser", "user agent", "detection"],
5
+ "homepage": "http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php.html",
6
+ "license": "MIT",
7
+ "authors": [
8
+ {
9
+ "name": "Chris Schuld",
10
+ "email": "chris@chrisschuld.com",
11
+ "homepage": "http://chrisschuld.com"
12
+ }
13
+ ],
14
+ "autoload": {
15
+ "files": ["lib/Browser.php"]
16
+ },
17
+ "extra": {
18
+ "branch-alias": {
19
+ "dev-master": "1.95-dev"
20
+ }
21
+ }
22
+ }
vendor/cbschuld/browser.php/lib/Browser.php ADDED
@@ -0,0 +1,1732 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * File: Browser.php
5
+ * Author: Chris Schuld (http://chrisschuld.com/)
6
+ * Last Modified: July 22nd, 2016
7
+ * @version 2.0
8
+ * @package PegasusPHP
9
+ *
10
+ * Copyright (C) 2008-2010 Chris Schuld (chris@chrisschuld.com)
11
+ *
12
+ * This program is free software; you can redistribute it and/or
13
+ * modify it under the terms of the GNU General Public License as
14
+ * published by the Free Software Foundation; either version 2 of
15
+ * the License, or (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details at:
21
+ * http://www.gnu.org/copyleft/gpl.html
22
+ *
23
+ *
24
+ * Typical Usage:
25
+ *
26
+ * $browser = new Browser();
27
+ * if( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >= 2 ) {
28
+ * echo 'You have FireFox version 2 or greater';
29
+ * }
30
+ *
31
+ * User Agents Sampled from: http://www.useragentstring.com/
32
+ *
33
+ * This implementation is based on the original work from Gary White
34
+ * http://apptools.com/phptools/browser/
35
+ *
36
+ */
37
+ class Browser
38
+ {
39
+ private $_agent = '';
40
+ private $_browser_name = '';
41
+ private $_version = '';
42
+ private $_platform = '';
43
+ private $_os = '';
44
+ private $_is_aol = false;
45
+ private $_is_mobile = false;
46
+ private $_is_tablet = false;
47
+ private $_is_robot = false;
48
+ private $_is_facebook = false;
49
+ private $_aol_version = '';
50
+
51
+ const BROWSER_UNKNOWN = 'unknown';
52
+ const VERSION_UNKNOWN = 'unknown';
53
+
54
+ const BROWSER_OPERA = 'Opera'; // http://www.opera.com/
55
+ const BROWSER_OPERA_MINI = 'Opera Mini'; // http://www.opera.com/mini/
56
+ const BROWSER_WEBTV = 'WebTV'; // http://www.webtv.net/pc/
57
+ const BROWSER_EDGE = 'Edge'; // https://www.microsoft.com/edge
58
+ const BROWSER_IE = 'Internet Explorer'; // http://www.microsoft.com/ie/
59
+ const BROWSER_POCKET_IE = 'Pocket Internet Explorer'; // http://en.wikipedia.org/wiki/Internet_Explorer_Mobile
60
+ const BROWSER_KONQUEROR = 'Konqueror'; // http://www.konqueror.org/
61
+ const BROWSER_ICAB = 'iCab'; // http://www.icab.de/
62
+ const BROWSER_OMNIWEB = 'OmniWeb'; // http://www.omnigroup.com/applications/omniweb/
63
+ const BROWSER_FIREBIRD = 'Firebird'; // http://www.ibphoenix.com/
64
+ const BROWSER_FIREFOX = 'Firefox'; // http://www.mozilla.com/en-US/firefox/firefox.html
65
+ const BROWSER_ICEWEASEL = 'Iceweasel'; // http://www.geticeweasel.org/
66
+ const BROWSER_SHIRETOKO = 'Shiretoko'; // http://wiki.mozilla.org/Projects/shiretoko
67
+ const BROWSER_MOZILLA = 'Mozilla'; // http://www.mozilla.com/en-US/
68
+ const BROWSER_AMAYA = 'Amaya'; // http://www.w3.org/Amaya/
69
+ const BROWSER_LYNX = 'Lynx'; // http://en.wikipedia.org/wiki/Lynx
70
+ const BROWSER_SAFARI = 'Safari'; // http://apple.com
71
+ const BROWSER_IPHONE = 'iPhone'; // http://apple.com
72
+ const BROWSER_IPOD = 'iPod'; // http://apple.com
73
+ const BROWSER_IPAD = 'iPad'; // http://apple.com
74
+ const BROWSER_CHROME = 'Chrome'; // http://www.google.com/chrome
75
+ const BROWSER_ANDROID = 'Android'; // http://www.android.com/
76
+ const BROWSER_GOOGLEBOT = 'GoogleBot'; // http://en.wikipedia.org/wiki/Googlebot
77
+
78
+ const BROWSER_YANDEXBOT = 'YandexBot'; // http://yandex.com/bots
79
+ const BROWSER_YANDEXIMAGERESIZER_BOT = 'YandexImageResizer'; // http://yandex.com/bots
80
+ const BROWSER_YANDEXIMAGES_BOT = 'YandexImages'; // http://yandex.com/bots
81
+ const BROWSER_YANDEXVIDEO_BOT = 'YandexVideo'; // http://yandex.com/bots
82
+ const BROWSER_YANDEXMEDIA_BOT = 'YandexMedia'; // http://yandex.com/bots
83
+ const BROWSER_YANDEXBLOGS_BOT = 'YandexBlogs'; // http://yandex.com/bots
84
+ const BROWSER_YANDEXFAVICONS_BOT = 'YandexFavicons'; // http://yandex.com/bots
85
+ const BROWSER_YANDEXWEBMASTER_BOT = 'YandexWebmaster'; // http://yandex.com/bots
86
+ const BROWSER_YANDEXDIRECT_BOT = 'YandexDirect'; // http://yandex.com/bots
87
+ const BROWSER_YANDEXMETRIKA_BOT = 'YandexMetrika'; // http://yandex.com/bots
88
+ const BROWSER_YANDEXNEWS_BOT = 'YandexNews'; // http://yandex.com/bots
89
+ const BROWSER_YANDEXCATALOG_BOT = 'YandexCatalog'; // http://yandex.com/bots
90
+
91
+ const BROWSER_SLURP = 'Yahoo! Slurp'; // http://en.wikipedia.org/wiki/Yahoo!_Slurp
92
+ const BROWSER_W3CVALIDATOR = 'W3C Validator'; // http://validator.w3.org/
93
+ const BROWSER_BLACKBERRY = 'BlackBerry'; // http://www.blackberry.com/
94
+ const BROWSER_ICECAT = 'IceCat'; // http://en.wikipedia.org/wiki/GNU_IceCat
95
+ const BROWSER_NOKIA_S60 = 'Nokia S60 OSS Browser'; // http://en.wikipedia.org/wiki/Web_Browser_for_S60
96
+ const BROWSER_NOKIA = 'Nokia Browser'; // * all other WAP-based browsers on the Nokia Platform
97
+ const BROWSER_MSN = 'MSN Browser'; // http://explorer.msn.com/
98
+ const BROWSER_MSNBOT = 'MSN Bot'; // http://search.msn.com/msnbot.htm
99
+ const BROWSER_BINGBOT = 'Bing Bot'; // http://en.wikipedia.org/wiki/Bingbot
100
+ const BROWSER_VIVALDI = 'Vivalidi'; // https://vivaldi.com/
101
+ const BROWSER_YANDEX = 'Yandex'; // https://browser.yandex.ua/
102
+
103
+ const BROWSER_NETSCAPE_NAVIGATOR = 'Netscape Navigator'; // http://browser.netscape.com/ (DEPRECATED)
104
+ const BROWSER_GALEON = 'Galeon'; // http://galeon.sourceforge.net/ (DEPRECATED)
105
+ const BROWSER_NETPOSITIVE = 'NetPositive'; // http://en.wikipedia.org/wiki/NetPositive (DEPRECATED)
106
+ const BROWSER_PHOENIX = 'Phoenix'; // http://en.wikipedia.org/wiki/History_of_Mozilla_Firefox (DEPRECATED)
107
+ const BROWSER_PLAYSTATION = "PlayStation";
108
+ const BROWSER_SAMSUNG = "SamsungBrowser";
109
+ const BROWSER_SILK = "Silk";
110
+ const BROWSER_I_FRAME = "Iframely";
111
+ const BROWSER_COCOA = "CocoaRestClient";
112
+
113
+ const PLATFORM_UNKNOWN = 'unknown';
114
+ const PLATFORM_WINDOWS = 'Windows';
115
+ const PLATFORM_WINDOWS_CE = 'Windows CE';
116
+ const PLATFORM_APPLE = 'Apple';
117
+ const PLATFORM_LINUX = 'Linux';
118
+ const PLATFORM_OS2 = 'OS/2';
119
+ const PLATFORM_BEOS = 'BeOS';
120
+ const PLATFORM_IPHONE = 'iPhone';
121
+ const PLATFORM_IPOD = 'iPod';
122
+ const PLATFORM_IPAD = 'iPad';
123
+ const PLATFORM_BLACKBERRY = 'BlackBerry';
124
+ const PLATFORM_NOKIA = 'Nokia';
125
+ const PLATFORM_FREEBSD = 'FreeBSD';
126
+ const PLATFORM_OPENBSD = 'OpenBSD';
127
+ const PLATFORM_NETBSD = 'NetBSD';
128
+ const PLATFORM_SUNOS = 'SunOS';
129
+ const PLATFORM_OPENSOLARIS = 'OpenSolaris';
130
+ const PLATFORM_ANDROID = 'Android';
131
+ const PLATFORM_PLAYSTATION = "Sony PlayStation";
132
+ const PLATFORM_ROKU = "Roku";
133
+ const PLATFORM_APPLE_TV = "Apple TV";
134
+ const PLATFORM_TERMINAL = "Terminal";
135
+ const PLATFORM_FIRE_OS = "Fire OS";
136
+ const PLATFORM_SMART_TV = "SMART-TV";
137
+ const PLATFORM_CHROME_OS = "Chrome OS";
138
+ const PLATFORM_JAVA_ANDROID = "Java/Android";
139
+ const PLATFORM_POSTMAN = "Postman";
140
+ const PLATFORM_I_FRAME = "Iframely";
141
+
142
+ const OPERATING_SYSTEM_UNKNOWN = 'unknown';
143
+
144
+ /**
145
+ * Class constructor
146
+ */
147
+ public function __construct($userAgent = "")
148
+ {
149
+ $this->reset();
150
+ if ($userAgent != "") {
151
+ $this->setUserAgent($userAgent);
152
+ } else {
153
+ $this->determine();
154
+ }
155
+ }
156
+
157
+ /**
158
+ * Reset all properties
159
+ */
160
+ public function reset()
161
+ {
162
+ $this->_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
163
+ $this->_browser_name = self::BROWSER_UNKNOWN;
164
+ $this->_version = self::VERSION_UNKNOWN;
165
+ $this->_platform = self::PLATFORM_UNKNOWN;
166
+ $this->_os = self::OPERATING_SYSTEM_UNKNOWN;
167
+ $this->_is_aol = false;
168
+ $this->_is_mobile = false;
169
+ $this->_is_tablet = false;
170
+ $this->_is_robot = false;
171
+ $this->_is_facebook = false;
172
+ $this->_aol_version = self::VERSION_UNKNOWN;
173
+ }
174
+
175
+ /**
176
+ * Check to see if the specific browser is valid
177
+ * @param string $browserName
178
+ * @return bool True if the browser is the specified browser
179
+ */
180
+ function isBrowser($browserName)
181
+ {
182
+ return (0 == strcasecmp($this->_browser_name, trim($browserName)));
183
+ }
184
+
185
+ /**
186
+ * The name of the browser. All return types are from the class contants
187
+ * @return string Name of the browser
188
+ */
189
+ public function getBrowser()
190
+ {
191
+ return $this->_browser_name;
192
+ }
193
+
194
+ /**
195
+ * Set the name of the browser
196
+ * @param $browser string The name of the Browser
197
+ */
198
+ public function setBrowser($browser)
199
+ {
200
+ $this->_browser_name = $browser;
201
+ }
202
+
203
+ /**
204
+ * The name of the platform. All return types are from the class contants
205
+ * @return string Name of the browser
206
+ */
207
+ public function getPlatform()
208
+ {
209
+ return $this->_platform;
210
+ }
211
+
212
+ /**
213
+ * Set the name of the platform
214
+ * @param string $platform The name of the Platform
215
+ */
216
+ public function setPlatform($platform)
217
+ {
218
+ $this->_platform = $platform;
219
+ }
220
+
221
+ /**
222
+ * The version of the browser.
223
+ * @return string Version of the browser (will only contain alpha-numeric characters and a period)
224
+ */
225
+ public function getVersion()
226
+ {
227
+ return $this->_version;
228
+ }
229
+
230
+ /**
231
+ * Set the version of the browser
232
+ * @param string $version The version of the Browser
233
+ */
234
+ public function setVersion($version)
235
+ {
236
+ $this->_version = preg_replace('/[^0-9,.,a-z,A-Z-]/', '', $version);
237
+ }
238
+
239
+ /**
240
+ * The version of AOL.
241
+ * @return string Version of AOL (will only contain alpha-numeric characters and a period)
242
+ */
243
+ public function getAolVersion()
244
+ {
245
+ return $this->_aol_version;
246
+ }
247
+
248
+ /**
249
+ * Set the version of AOL
250
+ * @param string $version The version of AOL
251
+ */
252
+ public function setAolVersion($version)
253
+ {
254
+ $this->_aol_version = preg_replace('/[^0-9,.,a-z,A-Z]/', '', $version);
255
+ }
256
+
257
+ /**
258
+ * Is the browser from AOL?
259
+ * @return boolean True if the browser is from AOL otherwise false
260
+ */
261
+ public function isAol()
262
+ {
263
+ return $this->_is_aol;
264
+ }
265
+
266
+ /**
267
+ * Is the browser from a mobile device?
268
+ * @return boolean True if the browser is from a mobile device otherwise false
269
+ */
270
+ public function isMobile()
271
+ {
272
+ return $this->_is_mobile;
273
+ }
274
+
275
+ /**
276
+ * Is the browser from a tablet device?
277
+ * @return boolean True if the browser is from a tablet device otherwise false
278
+ */
279
+ public function isTablet()
280
+ {
281
+ return $this->_is_tablet;
282
+ }
283
+
284
+ /**
285
+ * Is the browser from a robot (ex Slurp,GoogleBot)?
286
+ * @return boolean True if the browser is from a robot otherwise false
287
+ */
288
+ public function isRobot()
289
+ {
290
+ return $this->_is_robot;
291
+ }
292
+
293
+ /**
294
+ * Is the browser from facebook?
295
+ * @return boolean True if the browser is from facebook otherwise false
296
+ */
297
+ public function isFacebook()
298
+ {
299
+ return $this->_is_facebook;
300
+ }
301
+
302
+ /**
303
+ * Set the browser to be from AOL
304
+ * @param $isAol
305
+ */
306
+ public function setAol($isAol)
307
+ {
308
+ $this->_is_aol = $isAol;
309
+ }
310
+
311
+ /**
312
+ * Set the Browser to be mobile
313
+ * @param boolean $value is the browser a mobile browser or not
314
+ */
315
+ protected function setMobile($value = true)
316
+ {
317
+ $this->_is_mobile = $value;
318
+ }
319
+
320
+ /**
321
+ * Set the Browser to be tablet
322
+ * @param boolean $value is the browser a tablet browser or not
323
+ */
324
+ protected function setTablet($value = true)
325
+ {
326
+ $this->_is_tablet = $value;
327
+ }
328
+
329
+ /**
330
+ * Set the Browser to be a robot
331
+ * @param boolean $value is the browser a robot or not
332
+ */
333
+ protected function setRobot($value = true)
334
+ {
335
+ $this->_is_robot = $value;
336
+ }
337
+
338
+ /**
339
+ * Set the Browser to be a Facebook request
340
+ * @param boolean $value is the browser a robot or not
341
+ */
342
+ protected function setFacebook($value = true)
343
+ {
344
+ $this->_is_facebook = $value;
345
+ }
346
+
347
+ /**
348
+ * Get the user agent value in use to determine the browser
349
+ * @return string The user agent from the HTTP header
350
+ */
351
+ public function getUserAgent()
352
+ {
353
+ return $this->_agent;
354
+ }
355
+
356
+ /**
357
+ * Set the user agent value (the construction will use the HTTP header value - this will overwrite it)
358
+ * @param string $agent_string The value for the User Agent
359
+ */
360
+ public function setUserAgent($agent_string)
361
+ {
362
+ $this->reset();
363
+ $this->_agent = $agent_string;
364
+ $this->determine();
365
+ }
366
+
367
+ /**
368
+ * Used to determine if the browser is actually "chromeframe"
369
+ * @since 1.7
370
+ * @return boolean True if the browser is using chromeframe
371
+ */
372
+ public function isChromeFrame()
373
+ {
374
+ return (strpos($this->_agent, "chromeframe") !== false);
375
+ }
376
+
377
+ /**
378
+ * Returns a formatted string with a summary of the details of the browser.
379
+ * @return string formatted string with a summary of the browser
380
+ */
381
+ public function __toString()
382
+ {
383
+ return "<strong>Browser Name:</strong> {$this->getBrowser()}<br/>\n" .
384
+ "<strong>Browser Version:</strong> {$this->getVersion()}<br/>\n" .
385
+ "<strong>Browser User Agent String:</strong> {$this->getUserAgent()}<br/>\n" .
386
+ "<strong>Platform:</strong> {$this->getPlatform()}<br/>";
387
+ }
388
+
389
+ /**
390
+ * Protected routine to calculate and determine what the browser is in use (including platform)
391
+ */
392
+ protected function determine()
393
+ {
394
+ $this->checkPlatform();
395
+ $this->checkBrowsers();
396
+ $this->checkForAol();
397
+ }
398
+
399
+ /**
400
+ * Protected routine to determine the browser type
401
+ * @return boolean True if the browser was detected otherwise false
402
+ */
403
+ protected function checkBrowsers()
404
+ {
405
+ return (
406
+ // well-known, well-used
407
+ // Special Notes:
408
+ // (1) Opera must be checked before FireFox due to the odd
409
+ // user agents used in some older versions of Opera
410
+ // (2) WebTV is strapped onto Internet Explorer so we must
411
+ // check for WebTV before IE
412
+ // (3) (deprecated) Galeon is based on Firefox and needs to be
413
+ // tested before Firefox is tested
414
+ // (4) OmniWeb is based on Safari so OmniWeb check must occur
415
+ // before Safari
416
+ // (5) Netscape 9+ is based on Firefox so Netscape checks
417
+ // before FireFox are necessary
418
+ // (6) Vivalid is UA contains both Firefox and Chrome so Vivalid checks
419
+ // before Firefox and Chrome
420
+ $this->checkBrowserWebTv() ||
421
+ $this->checkBrowserEdge() ||
422
+ $this->checkBrowserInternetExplorer() ||
423
+ $this->checkBrowserOpera() ||
424
+ $this->checkBrowserGaleon() ||
425
+ $this->checkBrowserNetscapeNavigator9Plus() ||
426
+ $this->checkBrowserVivaldi() ||
427
+ $this->checkBrowserYandex() ||
428
+ $this->checkBrowserFirefox() ||
429
+ $this->checkBrowserChrome() ||
430
+ $this->checkBrowserOmniWeb() ||
431
+
432
+ // common mobile
433
+ $this->checkBrowserAndroid() ||
434
+ $this->checkBrowseriPad() ||
435
+ $this->checkBrowseriPod() ||
436
+ $this->checkBrowseriPhone() ||
437
+ $this->checkBrowserBlackBerry() ||
438
+ $this->checkBrowserNokia() ||
439
+
440
+ // common bots
441
+ $this->checkBrowserGoogleBot() ||
442
+ $this->checkBrowserMSNBot() ||
443
+ $this->checkBrowserBingBot() ||
444
+ $this->checkBrowserSlurp() ||
445
+
446
+ // Yandex bots
447
+ $this->checkBrowserYandexBot() ||
448
+ $this->checkBrowserYandexImageResizerBot() ||
449
+ $this->checkBrowserYandexBlogsBot() ||
450
+ $this->checkBrowserYandexCatalogBot() ||
451
+ $this->checkBrowserYandexDirectBot() ||
452
+ $this->checkBrowserYandexFaviconsBot() ||
453
+ $this->checkBrowserYandexImagesBot() ||
454
+ $this->checkBrowserYandexMediaBot() ||
455
+ $this->checkBrowserYandexMetrikaBot() ||
456
+ $this->checkBrowserYandexNewsBot() ||
457
+ $this->checkBrowserYandexVideoBot() ||
458
+ $this->checkBrowserYandexWebmasterBot() ||
459
+
460
+ // check for facebook external hit when loading URL
461
+ $this->checkFacebookExternalHit() ||
462
+
463
+ // WebKit base check (post mobile and others)
464
+ $this->checkBrowserSamsung() ||
465
+ $this->checkBrowserSilk() ||
466
+ $this->checkBrowserSafari() ||
467
+
468
+ // everyone else
469
+ $this->checkBrowserNetPositive() ||
470
+ $this->checkBrowserFirebird() ||
471
+ $this->checkBrowserKonqueror() ||
472
+ $this->checkBrowserIcab() ||
473
+ $this->checkBrowserPhoenix() ||
474
+ $this->checkBrowserAmaya() ||
475
+ $this->checkBrowserLynx() ||
476
+ $this->checkBrowserShiretoko() ||
477
+ $this->checkBrowserIceCat() ||
478
+ $this->checkBrowserIceweasel() ||
479
+ $this->checkBrowserW3CValidator() ||
480
+ $this->checkBrowserPlayStation() ||
481
+ $this->checkBrowserIframely() ||
482
+ $this->checkBrowserCocoa() ||
483
+ $this->checkBrowserMozilla() /* Mozilla is such an open standard that you must check it last */
484
+
485
+
486
+ );
487
+ }
488
+
489
+ /**
490
+ * Determine if the user is using a BlackBerry (last updated 1.7)
491
+ * @return boolean True if the browser is the BlackBerry browser otherwise false
492
+ */
493
+ protected function checkBrowserBlackBerry()
494
+ {
495
+ if (stripos($this->_agent, 'blackberry') !== false) {
496
+ $aresult = explode("/", stristr($this->_agent, "BlackBerry"));
497
+ if (isset($aresult[1])) {
498
+ $aversion = explode(' ', $aresult[1]);
499
+ $this->setVersion($aversion[0]);
500
+ $this->_browser_name = self::BROWSER_BLACKBERRY;
501
+ $this->setMobile(true);
502
+ return true;
503
+ }
504
+ }
505
+ return false;
506
+ }
507
+
508
+ /**
509
+ * Determine if the user is using an AOL User Agent (last updated 1.7)
510
+ * @return boolean True if the browser is from AOL otherwise false
511
+ */
512
+ protected function checkForAol()
513
+ {
514
+ $this->setAol(false);
515
+ $this->setAolVersion(self::VERSION_UNKNOWN);
516
+
517
+ if (stripos($this->_agent, 'aol') !== false) {
518
+ $aversion = explode(' ', stristr($this->_agent, 'AOL'));
519
+ if (isset($aversion[1])) {
520
+ $this->setAol(true);
521
+ $this->setAolVersion(preg_replace('/[^0-9\.a-z]/i', '', $aversion[1]));
522
+ return true;
523
+ }
524
+ }
525
+ return false;
526
+ }
527
+
528
+ /**
529
+ * Determine if the browser is the GoogleBot or not (last updated 1.7)
530
+ * @return boolean True if the browser is the GoogletBot otherwise false
531
+ */
532
+ protected function checkBrowserGoogleBot()
533
+ {
534
+ if (stripos($this->_agent, 'googlebot') !== false) {
535
+ $aresult = explode('/', stristr($this->_agent, 'googlebot'));
536
+ if (isset($aresult[1])) {
537
+ $aversion = explode(' ', $aresult[1]);
538
+ $this->setVersion(str_replace(';', '', $aversion[0]));
539
+ $this->_browser_name = self::BROWSER_GOOGLEBOT;
540
+ $this->setRobot(true);
541
+ return true;
542
+ }
543
+ }
544
+ return false;
545
+ }
546
+
547
+ /**
548
+ * Determine if the browser is the YandexBot or not
549
+ * @return boolean True if the browser is the YandexBot otherwise false
550
+ */
551
+ protected function checkBrowserYandexBot()
552
+ {
553
+ if (stripos($this->_agent, 'YandexBot') !== false) {
554
+ $aresult = explode('/', stristr($this->_agent, 'YandexBot'));
555
+ if (isset($aresult[1])) {
556
+ $aversion = explode(' ', $aresult[1]);
557
+ $this->setVersion(str_replace(';', '', $aversion[0]));
558
+ $this->_browser_name = self::BROWSER_YANDEXBOT;
559
+ $this->setRobot(true);
560
+ return true;
561
+ }
562
+ }
563
+ return false;
564
+ }
565
+
566
+ /**
567
+ * Determine if the browser is the YandexImageResizer or not
568
+ * @return boolean True if the browser is the YandexImageResizer otherwise false
569
+ */
570
+ protected function checkBrowserYandexImageResizerBot()
571
+ {
572
+ if (stripos($this->_agent, 'YandexImageResizer') !== false) {
573
+ $aresult = explode('/', stristr($this->_agent, 'YandexImageResizer'));
574
+ if (isset($aresult[1])) {
575
+ $aversion = explode(' ', $aresult[1]);
576
+ $this->setVersion(str_replace(';', '', $aversion[0]));
577
+ $this->_browser_name = self::BROWSER_YANDEXIMAGERESIZER_BOT;
578
+ $this->setRobot(true);
579
+ return true;
580
+ }
581
+ }
582
+ return false;
583
+ }
584
+
585
+ /**
586
+ * Determine if the browser is the YandexCatalog or not
587
+ * @return boolean True if the browser is the YandexCatalog otherwise false
588
+ */
589
+ protected function checkBrowserYandexCatalogBot()
590
+ {
591
+ if (stripos($this->_agent, 'YandexCatalog') !== false) {
592
+ $aresult = explode('/', stristr($this->_agent, 'YandexCatalog'));
593
+ if (isset($aresult[1])) {
594
+ $aversion = explode(' ', $aresult[1]);
595
+ $this->setVersion(str_replace(';', '', $aversion[0]));
596
+ $this->_browser_name = self::BROWSER_YANDEXCATALOG_BOT;
597
+ $this->setRobot(true);
598
+ return true;
599
+ }
600
+ }
601
+ return false;
602
+ }
603
+
604
+ /**
605
+ * Determine if the browser is the YandexNews or not
606
+ * @return boolean True if the browser is the YandexNews otherwise false
607
+ */
608
+ protected function checkBrowserYandexNewsBot()
609
+ {
610
+ if (stripos($this->_agent, 'YandexNews') !== false) {
611
+ $aresult = explode('/', stristr($this->_agent, 'YandexNews'));
612
+ if (isset($aresult[1])) {
613
+ $aversion = explode(' ', $aresult[1]);
614
+ $this->setVersion(str_replace(';', '', $aversion[0]));
615
+ $this->_browser_name = self::BROWSER_YANDEXNEWS_BOT;
616
+ $this->setRobot(true);
617
+ return true;
618
+ }
619
+ }
620
+ return false;
621
+ }
622
+
623
+ /**
624
+ * Determine if the browser is the YandexMetrika or not
625
+ * @return boolean True if the browser is the YandexMetrika otherwise false
626
+ */
627
+ protected function checkBrowserYandexMetrikaBot()
628
+ {
629
+ if (stripos($this->_agent, 'YandexMetrika') !== false) {
630
+ $aresult = explode('/', stristr($this->_agent, 'YandexMetrika'));
631
+ if (isset($aresult[1])) {
632
+ $aversion = explode(' ', $aresult[1]);
633
+ $this->setVersion(str_replace(';', '', $aversion[0]));
634
+ $this->_browser_name = self::BROWSER_YANDEXMETRIKA_BOT;
635
+ $this->setRobot(true);
636
+ return true;
637
+ }
638
+ }
639
+ return false;
640
+ }
641
+
642
+ /**
643
+ * Determine if the browser is the YandexDirect or not
644
+ * @return boolean True if the browser is the YandexDirect otherwise false
645
+ */
646
+ protected function checkBrowserYandexDirectBot()
647
+ {
648
+ if (stripos($this->_agent, 'YandexDirect') !== false) {
649
+ $aresult = explode('/', stristr($this->_agent, 'YandexDirect'));
650
+ if (isset($aresult[1])) {
651
+ $aversion = explode(' ', $aresult[1]);
652
+ $this->setVersion(str_replace(';', '', $aversion[0]));
653
+ $this->_browser_name = self::BROWSER_YANDEXDIRECT_BOT;
654
+ $this->setRobot(true);
655
+ return true;
656
+ }
657
+ }
658
+ return false;
659
+ }
660
+
661
+ /**
662
+ * Determine if the browser is the YandexWebmaster or not
663
+ * @return boolean True if the browser is the YandexWebmaster otherwise false
664
+ */
665
+ protected function checkBrowserYandexWebmasterBot()
666
+ {
667
+ if (stripos($this->_agent, 'YandexWebmaster') !== false) {
668
+ $aresult = explode('/', stristr($this->_agent, 'YandexWebmaster'));
669
+ if (isset($aresult[1])) {
670
+ $aversion = explode(' ', $aresult[1]);
671
+ $this->setVersion(str_replace(';', '', $aversion[0]));
672
+ $this->_browser_name = self::BROWSER_YANDEXWEBMASTER_BOT;
673
+ $this->setRobot(true);
674
+ return true;
675
+ }
676
+ }
677
+ return false;
678
+ }
679
+
680
+ /**
681
+ * Determine if the browser is the YandexFavicons or not
682
+ * @return boolean True if the browser is the YandexFavicons otherwise false
683
+ */
684
+ protected function checkBrowserYandexFaviconsBot()
685
+ {
686
+ if (stripos($this->_agent, 'YandexFavicons') !== false) {
687
+ $aresult = explode('/', stristr($this->_agent, 'YandexFavicons'));
688
+ if (isset($aresult[1])) {
689
+ $aversion = explode(' ', $aresult[1]);
690
+ $this->setVersion(str_replace(';', '', $aversion[0]));
691
+ $this->_browser_name = self::BROWSER_YANDEXFAVICONS_BOT;
692
+ $this->setRobot(true);
693
+ return true;
694
+ }
695
+ }
696
+ return false;
697
+ }
698
+
699
+ /**
700
+ * Determine if the browser is the YandexBlogs or not
701
+ * @return boolean True if the browser is the YandexBlogs otherwise false
702
+ */
703
+ protected function checkBrowserYandexBlogsBot()
704
+ {
705
+ if (stripos($this->_agent, 'YandexBlogs') !== false) {
706
+ $aresult = explode('/', stristr($this->_agent, 'YandexBlogs'));
707
+ if (isset($aresult[1])) {
708
+ $aversion = explode(' ', $aresult[1]);
709
+ $this->setVersion(str_replace(';', '', $aversion[0]));
710
+ $this->_browser_name = self::BROWSER_YANDEXBLOGS_BOT;
711
+ $this->setRobot(true);
712
+ return true;
713
+ }
714
+ }
715
+ return false;
716
+ }
717
+
718
+ /**
719
+ * Determine if the browser is the YandexMedia or not
720
+ * @return boolean True if the browser is the YandexMedia otherwise false
721
+ */
722
+ protected function checkBrowserYandexMediaBot()
723
+ {
724
+ if (stripos($this->_agent, 'YandexMedia') !== false) {
725
+ $aresult = explode('/', stristr($this->_agent, 'YandexMedia'));
726
+ if (isset($aresult[1])) {
727
+ $aversion = explode(' ', $aresult[1]);
728
+ $this->setVersion(str_replace(';', '', $aversion[0]));
729
+ $this->_browser_name = self::BROWSER_YANDEXMEDIA_BOT;
730
+ $this->setRobot(true);
731
+ return true;
732
+ }
733
+ }
734
+ return false;
735
+ }
736
+
737
+ /**
738
+ * Determine if the browser is the YandexVideo or not
739
+ * @return boolean True if the browser is the YandexVideo otherwise false
740
+ */
741
+ protected function checkBrowserYandexVideoBot()
742
+ {
743
+ if (stripos($this->_agent, 'YandexVideo') !== false) {
744
+ $aresult = explode('/', stristr($this->_agent, 'YandexVideo'));
745
+ if (isset($aresult[1])) {
746
+ $aversion = explode(' ', $aresult[1]);
747
+ $this->setVersion(str_replace(';', '', $aversion[0]));
748
+ $this->_browser_name = self::BROWSER_YANDEXVIDEO_BOT;
749
+ $this->setRobot(true);
750
+ return true;
751
+ }
752
+ }
753
+ return false;
754
+ }
755
+
756
+ /**
757
+ * Determine if the browser is the YandexImages or not
758
+ * @return boolean True if the browser is the YandexImages otherwise false
759
+ */
760
+ protected function checkBrowserYandexImagesBot()
761
+ {
762
+ if (stripos($this->_agent, 'YandexImages') !== false) {
763
+ $aresult = explode('/', stristr($this->_agent, 'YandexImages'));
764
+ if (isset($aresult[1])) {
765
+ $aversion = explode(' ', $aresult[1]);
766
+ $this->setVersion(str_replace(';', '', $aversion[0]));
767
+ $this->_browser_name = self::BROWSER_YANDEXIMAGES_BOT;
768
+ $this->setRobot(true);
769
+ return true;
770
+ }
771
+ }
772
+ return false;
773
+ }
774
+
775
+ /**
776
+ * Determine if the browser is the MSNBot or not (last updated 1.9)
777
+ * @return boolean True if the browser is the MSNBot otherwise false
778
+ */
779
+ protected function checkBrowserMSNBot()
780
+ {
781
+ if (stripos($this->_agent, "msnbot") !== false) {
782
+ $aresult = explode("/", stristr($this->_agent, "msnbot"));
783
+ if (isset($aresult[1])) {
784
+ $aversion = explode(" ", $aresult[1]);
785
+ $this->setVersion(str_replace(";", "", $aversion[0]));
786
+ $this->_browser_name = self::BROWSER_MSNBOT;
787
+ $this->setRobot(true);
788
+ return true;
789
+ }
790
+ }
791
+ return false;
792
+ }
793
+
794
+ /**
795
+ * Determine if the browser is the BingBot or not (last updated 1.9)
796
+ * @return boolean True if the browser is the BingBot otherwise false
797
+ */
798
+ protected function checkBrowserBingBot()
799
+ {
800
+ if (stripos($this->_agent, "bingbot") !== false) {
801
+ $aresult = explode("/", stristr($this->_agent, "bingbot"));
802
+ if (isset($aresult[1])) {
803
+ $aversion = explode(" ", $aresult[1]);
804
+ $this->setVersion(str_replace(";", "", $aversion[0]));
805
+ $this->_browser_name = self::BROWSER_BINGBOT;
806
+ $this->setRobot(true);
807
+ return true;
808
+ }
809
+ }
810
+ return false;
811
+ }
812
+
813
+ /**
814
+ * Determine if the browser is the W3C Validator or not (last updated 1.7)
815
+ * @return boolean True if the browser is the W3C Validator otherwise false
816
+ */
817
+ protected function checkBrowserW3CValidator()
818
+ {
819
+ if (stripos($this->_agent, 'W3C-checklink') !== false) {
820
+ $aresult = explode('/', stristr($this->_agent, 'W3C-checklink'));
821
+ if (isset($aresult[1])) {
822
+ $aversion = explode(' ', $aresult[1]);
823
+ $this->setVersion($aversion[0]);
824
+ $this->_browser_name = self::BROWSER_W3CVALIDATOR;
825
+ return true;
826
+ }
827
+ } else if (stripos($this->_agent, 'W3C_Validator') !== false) {
828
+ // Some of the Validator versions do not delineate w/ a slash - add it back in
829
+ $ua = str_replace("W3C_Validator ", "W3C_Validator/", $this->_agent);
830
+ $aresult = explode('/', stristr($ua, 'W3C_Validator'));
831
+ if (isset($aresult[1])) {
832
+ $aversion = explode(' ', $aresult[1]);
833
+ $this->setVersion($aversion[0]);
834
+ $this->_browser_name = self::BROWSER_W3CVALIDATOR;
835
+ return true;
836
+ }
837
+ } else if (stripos($this->_agent, 'W3C-mobileOK') !== false) {
838
+ $this->_browser_name = self::BROWSER_W3CVALIDATOR;
839
+ $this->setMobile(true);
840
+ return true;
841
+ }
842
+ return false;
843
+ }
844
+
845
+ /**
846
+ * Determine if the browser is the Yahoo! Slurp Robot or not (last updated 1.7)
847
+ * @return boolean True if the browser is the Yahoo! Slurp Robot otherwise false
848
+ */
849
+ protected function checkBrowserSlurp()
850
+ {
851
+ if (stripos($this->_agent, 'slurp') !== false) {
852
+ $aresult = explode('/', stristr($this->_agent, 'Slurp'));
853
+ if (isset($aresult[1])) {
854
+ $aversion = explode(' ', $aresult[1]);
855
+ $this->setVersion($aversion[0]);
856
+ $this->_browser_name = self::BROWSER_SLURP;
857
+ $this->setRobot(true);
858
+ $this->setMobile(false);
859
+ return true;
860
+ }
861
+ }
862
+ return false;
863
+ }
864
+
865
+ /**
866
+ * Determine if the browser is Edge or not
867
+ * @return boolean True if the browser is Edge otherwise false
868
+ */
869
+ protected function checkBrowserEdge()
870
+ {
871
+ if (stripos($this->_agent, 'Edge/') !== false) {
872
+ $aresult = explode('/', stristr($this->_agent, 'Edge'));
873
+ if (isset($aresult[1])) {
874
+ $aversion = explode(' ', $aresult[1]);
875
+ $this->setVersion($aversion[0]);
876
+ $this->setBrowser(self::BROWSER_EDGE);
877
+ if (stripos($this->_agent, 'Windows Phone') !== false || stripos($this->_agent, 'Android') !== false) {
878
+ $this->setMobile(true);
879
+ }
880
+ return true;
881
+ }
882
+ }
883
+ return false;
884
+ }
885
+
886
+ /**
887
+ * Determine if the browser is Internet Explorer or not (last updated 1.7)
888
+ * @return boolean True if the browser is Internet Explorer otherwise false
889
+ */
890
+ protected function checkBrowserInternetExplorer()
891
+ {
892
+ // Test for IE11
893
+ if (stripos($this->_agent, 'Trident/7.0; rv:11.0') !== false) {
894
+ $this->setBrowser(self::BROWSER_IE);
895
+ $this->setVersion('11.0');
896
+ return true;
897
+ } // Test for v1 - v1.5 IE
898
+ else if (stripos($this->_agent, 'microsoft internet explorer') !== false) {
899
+ $this->setBrowser(self::BROWSER_IE);
900
+ $this->setVersion('1.0');
901
+ $aresult = stristr($this->_agent, '/');
902
+ if (preg_match('/308|425|426|474|0b1/i', $aresult)) {
903
+ $this->setVersion('1.5');
904
+ }
905
+ return true;
906
+ } // Test for versions > 1.5
907
+ else if (stripos($this->_agent, 'msie') !== false && stripos($this->_agent, 'opera') === false) {
908
+ // See if the browser is the odd MSN Explorer
909
+ if (stripos($this->_agent, 'msnb') !== false) {
910
+ $aresult = explode(' ', stristr(str_replace(';', '; ', $this->_agent), 'MSN'));
911
+ if (isset($aresult[1])) {
912
+ $this->setBrowser(self::BROWSER_MSN);
913
+ $this->setVersion(str_replace(array('(', ')', ';'), '', $aresult[1]));
914
+ return true;
915
+ }
916
+ }
917
+ $aresult = explode(' ', stristr(str_replace(';', '; ', $this->_agent), 'msie'));
918
+ if (isset($aresult[1])) {
919
+ $this->setBrowser(self::BROWSER_IE);
920
+ $this->setVersion(str_replace(array('(', ')', ';'), '', $aresult[1]));
921
+ if(preg_match('#trident/([0-9\.]+);#i', $this->_agent, $aresult)){
922
+ if($aresult[1] == '3.1'){
923
+ $this->setVersion('7.0');
924
+ }
925
+ else if($aresult[1] == '4.0'){
926
+ $this->setVersion('8.0');
927
+ }
928
+ else if($aresult[1] == '5.0'){
929
+ $this->setVersion('9.0');
930
+ }
931
+ else if($aresult[1] == '6.0'){
932
+ $this->setVersion('10.0');
933
+ }
934
+ else if($aresult[1] == '7.0'){
935
+ $this->setVersion('11.0');
936
+ }
937
+ else if($aresult[1] == '8.0'){
938
+ $this->setVersion('11.0');
939
+ }
940
+ }
941
+ if(stripos($this->_agent, 'IEMobile') !== false) {
942
+ $this->setBrowser(self::BROWSER_POCKET_IE);
943
+ $this->setMobile(true);
944
+ }
945
+ return true;
946
+ }
947
+ } // Test for versions > IE 10
948
+ else if (stripos($this->_agent, 'trident') !== false) {
949
+ $this->setBrowser(self::BROWSER_IE);
950
+ $result = explode('rv:', $this->_agent);
951
+ if (isset($result[1])) {
952
+ $this->setVersion(preg_replace('/[^0-9.]+/', '', $result[1]));
953
+ $this->_agent = str_replace(array("Mozilla", "Gecko"), "MSIE", $this->_agent);
954
+ }
955
+ } // Test for Pocket IE
956
+ else if (stripos($this->_agent, 'mspie') !== false || stripos($this->_agent, 'pocket') !== false) {
957
+ $aresult = explode(' ', stristr($this->_agent, 'mspie'));
958
+ if (isset($aresult[1])) {
959
+ $this->setPlatform(self::PLATFORM_WINDOWS_CE);
960
+ $this->setBrowser(self::BROWSER_POCKET_IE);
961
+ $this->setMobile(true);
962
+
963
+ if (stripos($this->_agent, 'mspie') !== false) {
964
+ $this->setVersion($aresult[1]);
965
+ } else {
966
+ $aversion = explode('/', $this->_agent);
967
+ if (isset($aversion[1])) {
968
+ $this->setVersion($aversion[1]);
969
+ }
970
+ }
971
+ return true;
972
+ }
973
+ }
974
+ return false;
975
+ }
976
+
977
+ /**
978
+ * Determine if the browser is Opera or not (last updated 1.7)
979
+ * @return boolean True if the browser is Opera otherwise false
980
+ */
981
+ protected function checkBrowserOpera()
982
+ {
983
+ if (stripos($this->_agent, 'opera mini') !== false) {
984
+ $resultant = stristr($this->_agent, 'opera mini');
985
+ if (preg_match('/\//', $resultant)) {
986
+ $aresult = explode('/', $resultant);
987
+ if (isset($aresult[1])) {
988
+ $aversion = explode(' ', $aresult[1]);
989
+ $this->setVersion($aversion[0]);
990
+ }
991
+ } else {
992
+ $aversion = explode(' ', stristr($resultant, 'opera mini'));
993
+ if (isset($aversion[1])) {
994
+ $this->setVersion($aversion[1]);
995
+ }
996
+ }
997
+ $this->_browser_name = self::BROWSER_OPERA_MINI;
998
+ $this->setMobile(true);
999
+ return true;
1000
+ } else if (stripos($this->_agent, 'opera') !== false) {
1001
+ $resultant = stristr($this->_agent, 'opera');
1002
+ if (preg_match('/Version\/(1*.*)$/', $resultant, $matches)) {
1003
+ $this->setVersion($matches[1]);
1004
+ } else if (preg_match('/\//', $resultant)) {
1005
+ $aresult = explode('/', str_replace("(", " ", $resultant));
1006
+ if (isset($aresult[1])) {
1007
+ $aversion = explode(' ', $aresult[1]);
1008
+ $this->setVersion($aversion[0]);
1009
+ }
1010
+ } else {
1011
+ $aversion = explode(' ', stristr($resultant, 'opera'));
1012
+ $this->setVersion(isset($aversion[1]) ? $aversion[1] : "");
1013
+ }
1014
+ if (stripos($this->_agent, 'Opera Mobi') !== false) {
1015
+ $this->setMobile(true);
1016
+ }
1017
+ $this->_browser_name = self::BROWSER_OPERA;
1018
+ return true;
1019
+ } else if (stripos($this->_agent, 'OPR') !== false) {
1020
+ $resultant = stristr($this->_agent, 'OPR');
1021
+ if (preg_match('/\//', $resultant)) {
1022
+ $aresult = explode('/', str_replace("(", " ", $resultant));
1023
+ if (isset($aresult[1])) {
1024
+ $aversion = explode(' ', $aresult[1]);
1025
+ $this->setVersion($aversion[0]);
1026
+ }
1027
+ }
1028
+ if (stripos($this->_agent, 'Mobile') !== false) {
1029
+ $this->setMobile(true);
1030
+ }
1031
+ $this->_browser_name = self::BROWSER_OPERA;
1032
+ return true;
1033
+ }
1034
+ return false;
1035
+ }
1036
+
1037
+ /**
1038
+ * Determine if the browser is Chrome or not (last updated 1.7)
1039
+ * @return boolean True if the browser is Chrome otherwise false
1040
+ */
1041
+ protected function checkBrowserChrome()
1042
+ {
1043
+ if (stripos($this->_agent, 'Chrome') !== false) {
1044
+ $aresult = explode('/', stristr($this->_agent, 'Chrome'));
1045
+ if (isset($aresult[1])) {
1046
+ $aversion = explode(' ', $aresult[1]);
1047
+ $this->setVersion($aversion[0]);
1048
+ $this->setBrowser(self::BROWSER_CHROME);
1049
+ //Chrome on Android
1050
+ if (stripos($this->_agent, 'Android') !== false) {
1051
+ if (stripos($this->_agent, 'Mobile') !== false) {
1052
+ $this->setMobile(true);
1053
+ } else {
1054
+ $this->setTablet(true);
1055
+ }
1056
+ }
1057
+ return true;
1058
+ }
1059
+ }
1060
+ return false;
1061
+ }
1062
+
1063
+
1064
+ /**
1065
+ * Determine if the browser is WebTv or not (last updated 1.7)
1066
+ * @return boolean True if the browser is WebTv otherwise false
1067
+ */
1068
+ protected function checkBrowserWebTv()
1069
+ {
1070
+ if (stripos($this->_agent, 'webtv') !== false) {
1071
+ $aresult = explode('/', stristr($this->_agent, 'webtv'));
1072
+ if (isset($aresult[1])) {
1073
+ $aversion = explode(' ', $aresult[1]);
1074
+ $this->setVersion($aversion[0]);
1075
+ $this->setBrowser(self::BROWSER_WEBTV);
1076
+ return true;
1077
+ }
1078
+ }
1079
+ return false;
1080
+ }
1081
+
1082
+ /**
1083
+ * Determine if the browser is NetPositive or not (last updated 1.7)
1084
+ * @return boolean True if the browser is NetPositive otherwise false
1085
+ */
1086
+ protected function checkBrowserNetPositive()
1087
+ {
1088
+ if (stripos($this->_agent, 'NetPositive') !== false) {
1089
+ $aresult = explode('/', stristr($this->_agent, 'NetPositive'));
1090
+ if (isset($aresult[1])) {
1091
+ $aversion = explode(' ', $aresult[1]);
1092
+ $this->setVersion(str_replace(array('(', ')', ';'), '', $aversion[0]));
1093
+ $this->setBrowser(self::BROWSER_NETPOSITIVE);
1094
+ return true;
1095
+ }
1096
+ }
1097
+ return false;
1098
+ }
1099
+
1100
+ /**
1101
+ * Determine if the browser is Galeon or not (last updated 1.7)
1102
+ * @return boolean True if the browser is Galeon otherwise false
1103
+ */
1104
+ protected function checkBrowserGaleon()
1105
+ {
1106
+ if (stripos($this->_agent, 'galeon') !== false) {
1107
+ $aresult = explode(' ', stristr($this->_agent, 'galeon'));
1108
+ $aversion = explode('/', $aresult[0]);
1109
+ if (isset($aversion[1])) {
1110
+ $this->setVersion($aversion[1]);
1111
+ $this->setBrowser(self::BROWSER_GALEON);
1112
+ return true;
1113
+ }
1114
+ }
1115
+ return false;
1116
+ }
1117
+
1118
+ /**
1119
+ * Determine if the browser is Konqueror or not (last updated 1.7)
1120
+ * @return boolean True if the browser is Konqueror otherwise false
1121
+ */
1122
+ protected function checkBrowserKonqueror()
1123
+ {
1124
+ if (stripos($this->_agent, 'Konqueror') !== false) {
1125
+ $aresult = explode(' ', stristr($this->_agent, 'Konqueror'));
1126
+ $aversion = explode('/', $aresult[0]);
1127
+ if (isset($aversion[1])) {
1128
+ $this->setVersion($aversion[1]);
1129
+ $this->setBrowser(self::BROWSER_KONQUEROR);
1130
+ return true;
1131
+ }
1132
+ }
1133
+ return false;
1134
+ }
1135
+
1136
+ /**
1137
+ * Determine if the browser is iCab or not (last updated 1.7)
1138
+ * @return boolean True if the browser is iCab otherwise false
1139
+ */
1140
+ protected function checkBrowserIcab()
1141
+ {
1142
+ if (stripos($this->_agent, 'icab') !== false) {
1143
+ $aversion = explode(' ', stristr(str_replace('/', ' ', $this->_agent), 'icab'));
1144
+ if (isset($aversion[1])) {
1145
+ $this->setVersion($aversion[1]);
1146
+ $this->setBrowser(self::BROWSER_ICAB);
1147
+ return true;
1148
+ }
1149
+ }
1150
+ return false;
1151
+ }
1152
+
1153
+ /**
1154
+ * Determine if the browser is OmniWeb or not (last updated 1.7)
1155
+ * @return boolean True if the browser is OmniWeb otherwise false
1156
+ */
1157
+ protected function checkBrowserOmniWeb()
1158
+ {
1159
+ if (stripos($this->_agent, 'omniweb') !== false) {
1160
+ $aresult = explode('/', stristr($this->_agent, 'omniweb'));
1161
+ $aversion = explode(' ', isset($aresult[1]) ? $aresult[1] : "");
1162
+ $this->setVersion($aversion[0]);
1163
+ $this->setBrowser(self::BROWSER_OMNIWEB);
1164
+ return true;
1165
+ }
1166
+ return false;
1167
+ }
1168
+
1169
+ /**
1170
+ * Determine if the browser is Phoenix or not (last updated 1.7)
1171
+ * @return boolean True if the browser is Phoenix otherwise false
1172
+ */
1173
+ protected function checkBrowserPhoenix()
1174
+ {
1175
+ if (stripos($this->_agent, 'Phoenix') !== false) {
1176
+ $aversion = explode('/', stristr($this->_agent, 'Phoenix'));
1177
+ if (isset($aversion[1])) {
1178
+ $this->setVersion($aversion[1]);
1179
+ $this->setBrowser(self::BROWSER_PHOENIX);
1180
+ return true;
1181
+ }
1182
+ }
1183
+ return false;
1184
+ }
1185
+
1186
+ /**
1187
+ * Determine if the browser is Firebird or not (last updated 1.7)
1188
+ * @return boolean True if the browser is Firebird otherwise false
1189
+ */
1190
+ protected function checkBrowserFirebird()
1191
+ {
1192
+ if (stripos($this->_agent, 'Firebird') !== false) {
1193
+ $aversion = explode('/', stristr($this->_agent, 'Firebird'));
1194
+ if (isset($aversion[1])) {
1195
+ $this->setVersion($aversion[1]);
1196
+ $this->setBrowser(self::BROWSER_FIREBIRD);
1197
+ return true;
1198
+ }
1199
+ }
1200
+ return false;
1201
+ }
1202
+
1203
+ /**
1204
+ * Determine if the browser is Netscape Navigator 9+ or not (last updated 1.7)
1205
+ * NOTE: (http://browser.netscape.com/ - Official support ended on March 1st, 2008)
1206
+ * @return boolean True if the browser is Netscape Navigator 9+ otherwise false
1207
+ */
1208
+ protected function checkBrowserNetscapeNavigator9Plus()
1209
+ {
1210
+ if (stripos($this->_agent, 'Firefox') !== false && preg_match('/Navigator\/([^ ]*)/i', $this->_agent, $matches)) {
1211
+ $this->setVersion($matches[1]);
1212
+ $this->setBrowser(self::BROWSER_NETSCAPE_NAVIGATOR);
1213
+ return true;
1214
+ } else if (stripos($this->_agent, 'Firefox') === false && preg_match('/Netscape6?\/([^ ]*)/i', $this->_agent, $matches)) {
1215
+ $this->setVersion($matches[1]);
1216
+ $this->setBrowser(self::BROWSER_NETSCAPE_NAVIGATOR);
1217
+ return true;
1218
+ }
1219
+ return false;
1220
+ }
1221
+
1222
+ /**
1223
+ * Determine if the browser is Shiretoko or not (https://wiki.mozilla.org/Projects/shiretoko) (last updated 1.7)
1224
+ * @return boolean True if the browser is Shiretoko otherwise false
1225
+ */
1226
+ protected function checkBrowserShiretoko()
1227
+ {
1228
+ if (stripos($this->_agent, 'Mozilla') !== false && preg_match('/Shiretoko\/([^ ]*)/i', $this->_agent, $matches)) {
1229
+ $this->setVersion($matches[1]);
1230
+ $this->setBrowser(self::BROWSER_SHIRETOKO);
1231
+ return true;
1232
+ }
1233
+ return false;
1234
+ }
1235
+
1236
+ /**
1237
+ * Determine if the browser is Ice Cat or not (http://en.wikipedia.org/wiki/GNU_IceCat) (last updated 1.7)
1238
+ * @return boolean True if the browser is Ice Cat otherwise false
1239
+ */
1240
+ protected function checkBrowserIceCat()
1241
+ {
1242
+ if (stripos($this->_agent, 'Mozilla') !== false && preg_match('/IceCat\/([^ ]*)/i', $this->_agent, $matches)) {
1243
+ $this->setVersion($matches[1]);
1244
+ $this->setBrowser(self::BROWSER_ICECAT);
1245
+ return true;
1246
+ }
1247
+ return false;
1248
+ }
1249
+
1250
+ /**
1251
+ * Determine if the browser is Nokia or not (last updated 1.7)
1252
+ * @return boolean True if the browser is Nokia otherwise false
1253
+ */
1254
+ protected function checkBrowserNokia()
1255
+ {
1256
+ if (preg_match("/Nokia([^\/]+)\/([^ SP]+)/i", $this->_agent, $matches)) {
1257
+ $this->setVersion($matches[2]);
1258
+ if (stripos($this->_agent, 'Series60') !== false || strpos($this->_agent, 'S60') !== false) {
1259
+ $this->setBrowser(self::BROWSER_NOKIA_S60);
1260
+ } else {
1261
+ $this->setBrowser(self::BROWSER_NOKIA);
1262
+ }
1263
+ $this->setMobile(true);
1264
+ return true;
1265
+ }
1266
+ return false;
1267
+ }
1268
+
1269
+ /**
1270
+ * Determine if the browser is Firefox or not (last updated 1.7)
1271
+ * @return boolean True if the browser is Firefox otherwise false
1272
+ */
1273
+ protected function checkBrowserFirefox()
1274
+ {
1275
+ if (stripos($this->_agent, 'safari') === false) {
1276
+ if (preg_match("/Firefox[\/ \(]([^ ;\)]+)/i", $this->_agent, $matches)) {
1277
+ $this->setVersion($matches[1]);
1278
+ $this->setBrowser(self::BROWSER_FIREFOX);
1279
+ //Firefox on Android
1280
+ if (stripos($this->_agent, 'Android') !== false) {
1281
+ if (stripos($this->_agent, 'Mobile') !== false) {
1282
+ $this->setMobile(true);
1283
+ } else {
1284
+ $this->setTablet(true);
1285
+ }
1286
+ }
1287
+ return true;
1288
+ } else if (preg_match("/Firefox$/i", $this->_agent, $matches)) {
1289
+ $this->setVersion("");
1290
+ $this->setBrowser(self::BROWSER_FIREFOX);
1291
+ return true;
1292
+ }
1293
+ }
1294
+ return false;
1295
+ }
1296
+
1297
+ /**
1298
+ * Determine if the browser is Firefox or not (last updated 1.7)
1299
+ * @return boolean True if the browser is Firefox otherwise false
1300
+ */
1301
+ protected function checkBrowserIceweasel()
1302
+ {
1303
+ if (stripos($this->_agent, 'Iceweasel') !== false) {
1304
+ $aresult = explode('/', stristr($this->_agent, 'Iceweasel'));
1305
+ if (isset($aresult[1])) {
1306
+ $aversion = explode(' ', $aresult[1]);
1307
+ $this->setVersion($aversion[0]);
1308
+ $this->setBrowser(self::BROWSER_ICEWEASEL);
1309
+ return true;
1310
+ }
1311
+ }
1312
+ return false;
1313
+ }
1314
+
1315
+ /**
1316
+ * Determine if the browser is Mozilla or not (last updated 1.7)
1317
+ * @return boolean True if the browser is Mozilla otherwise false
1318
+ */
1319
+ protected function checkBrowserMozilla()
1320
+ {
1321
+ if (stripos($this->_agent, 'mozilla') !== false && preg_match('/rv:[0-9].[0-9][a-b]?/i', $this->_agent) && stripos($this->_agent, 'netscape') === false) {
1322
+ $aversion = explode(' ', stristr($this->_agent, 'rv:'));
1323
+ preg_match('/rv:[0-9].[0-9][a-b]?/i', $this->_agent, $aversion);
1324
+ $this->setVersion(str_replace('rv:', '', $aversion[0]));
1325
+ $this->setBrowser(self::BROWSER_MOZILLA);
1326
+ return true;
1327
+ } else if (stripos($this->_agent, 'mozilla') !== false && preg_match('/rv:[0-9]\.[0-9]/i', $this->_agent) && stripos($this->_agent, 'netscape') === false) {
1328
+ $aversion = explode('', stristr($this->_agent, 'rv:'));
1329
+ $this->setVersion(str_replace('rv:', '', $aversion[0]));
1330
+ $this->setBrowser(self::BROWSER_MOZILLA);
1331
+ return true;
1332
+ } else if (stripos($this->_agent, 'mozilla') !== false && preg_match('/mozilla\/([^ ]*)/i', $this->_agent, $matches) && stripos($this->_agent, 'netscape') === false) {
1333
+ $this->setVersion($matches[1]);
1334
+ $this->setBrowser(self::BROWSER_MOZILLA);
1335
+ return true;
1336
+ }
1337
+ return false;
1338
+ }
1339
+
1340
+ /**
1341
+ * Determine if the browser is Lynx or not (last updated 1.7)
1342
+ * @return boolean True if the browser is Lynx otherwise false
1343
+ */
1344
+ protected function checkBrowserLynx()
1345
+ {
1346
+ if (stripos($this->_agent, 'lynx') !== false) {
1347
+ $aresult = explode('/', stristr($this->_agent, 'Lynx'));
1348
+ $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : ""));
1349
+ $this->setVersion($aversion[0]);
1350
+ $this->setBrowser(self::BROWSER_LYNX);
1351
+ return true;
1352
+ }
1353
+ return false;
1354
+ }
1355
+
1356
+ /**
1357
+ * Determine if the browser is Amaya or not (last updated 1.7)
1358
+ * @return boolean True if the browser is Amaya otherwise false
1359
+ */
1360
+ protected function checkBrowserAmaya()
1361
+ {
1362
+ if (stripos($this->_agent, 'amaya') !== false) {
1363
+ $aresult = explode('/', stristr($this->_agent, 'Amaya'));
1364
+ if (isset($aresult[1])) {
1365
+ $aversion = explode(' ', $aresult[1]);
1366
+ $this->setVersion($aversion[0]);
1367
+ $this->setBrowser(self::BROWSER_AMAYA);
1368
+ return true;
1369
+ }
1370
+ }
1371
+ return false;
1372
+ }
1373
+
1374
+ /**
1375
+ * Determine if the browser is Safari or not (last updated 1.7)
1376
+ * @return boolean True if the browser is Safari otherwise false
1377
+ */
1378
+ protected function checkBrowserSafari()
1379
+ {
1380
+ if (stripos($this->_agent, 'Safari') !== false
1381
+ && stripos($this->_agent, 'iPhone') === false
1382
+ && stripos($this->_agent, 'iPod') === false
1383
+ ) {
1384
+
1385
+ $aresult = explode('/', stristr($this->_agent, 'Version'));
1386
+ if (isset($aresult[1])) {
1387
+ $aversion = explode(' ', $aresult[1]);
1388
+ $this->setVersion($aversion[0]);
1389
+ } else {
1390
+ $this->setVersion(self::VERSION_UNKNOWN);
1391
+ }
1392
+ $this->setBrowser(self::BROWSER_SAFARI);
1393
+ return true;
1394
+ }
1395
+ return false;
1396
+ }
1397
+
1398
+ protected function checkBrowserSamsung()
1399
+ {
1400
+ if (stripos($this->_agent, 'SamsungBrowser') !== false) {
1401
+
1402
+ $aresult = explode('/', stristr($this->_agent, 'SamsungBrowser'));
1403
+ if (isset($aresult[1])) {
1404
+ $aversion = explode(' ', $aresult[1]);
1405
+ $this->setVersion($aversion[0]);
1406
+ } else {
1407
+ $this->setVersion(self::VERSION_UNKNOWN);
1408
+ }
1409
+ $this->setBrowser(self::BROWSER_SAMSUNG);
1410
+ return true;
1411
+ }
1412
+ return false;
1413
+ }
1414
+
1415
+ protected function checkBrowserSilk()
1416
+ {
1417
+ if (stripos($this->_agent, 'Silk') !== false) {
1418
+ $aresult = explode('/', stristr($this->_agent, 'Silk'));
1419
+ if (isset($aresult[1])) {
1420
+ $aversion = explode(' ', $aresult[1]);
1421
+ $this->setVersion($aversion[0]);
1422
+ } else {
1423
+ $this->setVersion(self::VERSION_UNKNOWN);
1424
+ }
1425
+ $this->setBrowser(self::BROWSER_SILK);
1426
+ return true;
1427
+ }
1428
+ return false;
1429
+ }
1430
+
1431
+ protected function checkBrowserIframely()
1432
+ {
1433
+ if (stripos($this->_agent, 'Iframely') !== false) {
1434
+ $aresult = explode('/', stristr($this->_agent, 'Iframely'));
1435
+ if (isset($aresult[1])) {
1436
+ $aversion = explode(' ', $aresult[1]);
1437
+ $this->setVersion($aversion[0]);
1438
+ } else {
1439
+ $this->setVersion(self::VERSION_UNKNOWN);
1440
+ }
1441
+ $this->setBrowser(self::BROWSER_I_FRAME);
1442
+ return true;
1443
+ }
1444
+ return false;
1445
+ }
1446
+
1447
+ protected function checkBrowserCocoa()
1448
+ {
1449
+ if (stripos($this->_agent, 'CocoaRestClient') !== false) {
1450
+ $aresult = explode('/', stristr($this->_agent, 'CocoaRestClient'));
1451
+ if (isset($aresult[1])) {
1452
+ $aversion = explode(' ', $aresult[1]);
1453
+ $this->setVersion($aversion[0]);
1454
+ } else {
1455
+ $this->setVersion(self::VERSION_UNKNOWN);
1456
+ }
1457
+ $this->setBrowser(self::BROWSER_COCOA);
1458
+ return true;
1459
+ }
1460
+ return false;
1461
+ }
1462
+
1463
+ /**
1464
+ * Detect if URL is loaded from FacebookExternalHit
1465
+ * @return boolean True if it detects FacebookExternalHit otherwise false
1466
+ */
1467
+ protected function checkFacebookExternalHit()
1468
+ {
1469
+ if (stristr($this->_agent, 'FacebookExternalHit')) {
1470
+ $this->setRobot(true);
1471
+ $this->setFacebook(true);
1472
+ return true;
1473
+ }
1474
+ return false;
1475
+ }
1476
+
1477
+ /**
1478
+ * Detect if URL is being loaded from internal Facebook browser
1479
+ * @return boolean True if it detects internal Facebook browser otherwise false
1480
+ */
1481
+ protected function checkForFacebookIos()
1482
+ {
1483
+ if (stristr($this->_agent, 'FBIOS')) {
1484
+ $this->setFacebook(true);
1485
+ return true;
1486
+ }
1487
+ return false;
1488
+ }
1489
+
1490
+ /**
1491
+ * Detect Version for the Safari browser on iOS devices
1492
+ * @return boolean True if it detects the version correctly otherwise false
1493
+ */
1494
+ protected function getSafariVersionOnIos()
1495
+ {
1496
+ $aresult = explode('/', stristr($this->_agent, 'Version'));
1497
+ if (isset($aresult[1])) {
1498
+ $aversion = explode(' ', $aresult[1]);
1499
+ $this->setVersion($aversion[0]);
1500
+ return true;
1501
+ }
1502
+ return false;
1503
+ }
1504
+
1505
+ /**
1506
+ * Detect Version for the Chrome browser on iOS devices
1507
+ * @return boolean True if it detects the version correctly otherwise false
1508
+ */
1509
+ protected function getChromeVersionOnIos()
1510
+ {
1511
+ $aresult = explode('/', stristr($this->_agent, 'CriOS'));
1512
+ if (isset($aresult[1])) {
1513
+ $aversion = explode(' ', $aresult[1]);
1514
+ $this->setVersion($aversion[0]);
1515
+ $this->setBrowser(self::BROWSER_CHROME);
1516
+ return true;
1517
+ }
1518
+ return false;
1519
+ }
1520
+
1521
+ /**
1522
+ * Determine if the browser is iPhone or not (last updated 1.7)
1523
+ * @return boolean True if the browser is iPhone otherwise false
1524
+ */
1525
+ protected function checkBrowseriPhone()
1526
+ {
1527
+ if (stripos($this->_agent, 'iPhone') !== false) {
1528
+ $this->setVersion(self::VERSION_UNKNOWN);
1529
+ $this->setBrowser(self::BROWSER_IPHONE);
1530
+ $this->getSafariVersionOnIos();
1531
+ $this->getChromeVersionOnIos();
1532
+ $this->checkForFacebookIos();
1533
+ $this->setMobile(true);
1534
+ return true;
1535
+
1536
+ }
1537
+ return false;
1538
+ }
1539
+
1540
+ /**
1541
+ * Determine if the browser is iPad or not (last updated 1.7)
1542
+ * @return boolean True if the browser is iPad otherwise false
1543
+ */
1544
+ protected function checkBrowseriPad()
1545
+ {
1546
+ if (stripos($this->_agent, 'iPad') !== false) {
1547
+ $this->setVersion(self::VERSION_UNKNOWN);
1548
+ $this->setBrowser(self::BROWSER_IPAD);
1549
+ $this->getSafariVersionOnIos();
1550
+ $this->getChromeVersionOnIos();
1551
+ $this->checkForFacebookIos();
1552
+ $this->setTablet(true);
1553
+ return true;
1554
+ }
1555
+ return false;
1556
+ }
1557
+
1558
+ /**
1559
+ * Determine if the browser is iPod or not (last updated 1.7)
1560
+ * @return boolean True if the browser is iPod otherwise false
1561
+ */
1562
+ protected function checkBrowseriPod()
1563
+ {
1564
+ if (stripos($this->_agent, 'iPod') !== false) {
1565
+ $this->setVersion(self::VERSION_UNKNOWN);
1566
+ $this->setBrowser(self::BROWSER_IPOD);
1567
+ $this->getSafariVersionOnIos();
1568
+ $this->getChromeVersionOnIos();
1569
+ $this->checkForFacebookIos();
1570
+ $this->setMobile(true);
1571
+ return true;
1572
+ }
1573
+ return false;
1574
+ }
1575
+
1576
+ /**
1577
+ * Determine if the browser is Android or not (last updated 1.7)
1578
+ * @return boolean True if the browser is Android otherwise false
1579
+ */
1580
+ protected function checkBrowserAndroid()
1581
+ {
1582
+ if (stripos($this->_agent, 'Android') !== false) {
1583
+ $aresult = explode(' ', stristr($this->_agent, 'Android'));
1584
+ if (isset($aresult[1])) {
1585
+ $aversion = explode(' ', $aresult[1]);
1586
+ $this->setVersion($aversion[0]);
1587
+ } else {
1588
+ $this->setVersion(self::VERSION_UNKNOWN);
1589
+ }
1590
+ if (stripos($this->_agent, 'Mobile') !== false) {
1591
+ $this->setMobile(true);
1592
+ } else {
1593
+ $this->setTablet(true);
1594
+ }
1595
+ $this->setBrowser(self::BROWSER_ANDROID);
1596
+ return true;
1597
+ }
1598
+ return false;
1599
+ }
1600
+
1601
+ /**
1602
+ * Determine if the browser is Vivaldi
1603
+ * @return boolean True if the browser is Vivaldi otherwise false
1604
+ */
1605
+ protected function checkBrowserVivaldi()
1606
+ {
1607
+ if (stripos($this->_agent, 'Vivaldi') !== false) {
1608
+ $aresult = explode('/', stristr($this->_agent, 'Vivaldi'));
1609
+ if (isset($aresult[1])) {
1610
+ $aversion = explode(' ', $aresult[1]);
1611
+ $this->setVersion($aversion[0]);
1612
+ $this->setBrowser(self::BROWSER_VIVALDI);
1613
+ return true;
1614
+ }
1615
+ }
1616
+ return false;
1617
+ }
1618
+
1619
+ /**
1620
+ * Determine if the browser is Yandex
1621
+ * @return boolean True if the browser is Yandex otherwise false
1622
+ */
1623
+ protected function checkBrowserYandex()
1624
+ {
1625
+ if (stripos($this->_agent, 'YaBrowser') !== false) {
1626
+ $aresult = explode('/', stristr($this->_agent, 'YaBrowser'));
1627
+ if (isset($aresult[1])) {
1628
+ $aversion = explode(' ', $aresult[1]);
1629
+ $this->setVersion($aversion[0]);
1630
+ $this->setBrowser(self::BROWSER_YANDEX);
1631
+
1632
+ if (stripos($this->_agent, 'iPad') !== false) {
1633
+ $this->setTablet(true);
1634
+ } elseif (stripos($this->_agent, 'Mobile') !== false) {
1635
+ $this->setMobile(true);
1636
+ } elseif (stripos($this->_agent, 'Android') !== false) {
1637
+ $this->setTablet(true);
1638
+ }
1639
+
1640
+ return true;
1641
+ }
1642
+ }
1643
+
1644
+ return false;
1645
+ }
1646
+
1647
+ /**
1648
+ * Determine if the browser is a PlayStation
1649
+ * @return boolean True if the browser is PlayStation otherwise false
1650
+ */
1651
+ protected function checkBrowserPlayStation()
1652
+ {
1653
+ if (stripos($this->_agent, 'PlayStation ') !== false) {
1654
+ $aresult = explode(' ', stristr($this->_agent, 'PlayStation '));
1655
+ $this->setBrowser(self::BROWSER_PLAYSTATION);
1656
+ if (isset($aresult[0])) {
1657
+ $aversion = explode(')', $aresult[2]);
1658
+ $this->setVersion($aversion[0]);
1659
+ if (stripos($this->_agent, 'Portable)') !== false || stripos($this->_agent, 'Vita') !== false) {
1660
+ $this->setMobile(true);
1661
+ }
1662
+ return true;
1663
+ }
1664
+ }
1665
+ return false;
1666
+ }
1667
+
1668
+ /**
1669
+ * Determine the user's platform (last updated 2.0)
1670
+ */
1671
+ protected function checkPlatform()
1672
+ {
1673
+ if (stripos($this->_agent, 'windows') !== false) {
1674
+ $this->_platform = self::PLATFORM_WINDOWS;
1675
+ } else if (stripos($this->_agent, 'iPad') !== false) {
1676
+ $this->_platform = self::PLATFORM_IPAD;
1677
+ } else if (stripos($this->_agent, 'iPod') !== false) {
1678
+ $this->_platform = self::PLATFORM_IPOD;
1679
+ } else if (stripos($this->_agent, 'iPhone') !== false) {
1680
+ $this->_platform = self::PLATFORM_IPHONE;
1681
+ } elseif (stripos($this->_agent, 'mac') !== false) {
1682
+ $this->_platform = self::PLATFORM_APPLE;
1683
+ } elseif (stripos($this->_agent, 'android') !== false) {
1684
+ $this->_platform = self::PLATFORM_ANDROID;
1685
+ } elseif (stripos($this->_agent, 'Silk') !== false) {
1686
+ $this->_platform = self::PLATFORM_FIRE_OS;
1687
+ } elseif (stripos($this->_agent, 'linux') !== false && stripos($this->_agent, 'SMART-TV') !== false ) {
1688
+ $this->_platform = self::PLATFORM_LINUX .'/'.self::PLATFORM_SMART_TV;
1689
+ } elseif (stripos($this->_agent, 'linux') !== false) {
1690
+ $this->_platform = self::PLATFORM_LINUX;
1691
+ } else if (stripos($this->_agent, 'Nokia') !== false) {
1692
+ $this->_platform = self::PLATFORM_NOKIA;
1693
+ } else if (stripos($this->_agent, 'BlackBerry') !== false) {
1694
+ $this->_platform = self::PLATFORM_BLACKBERRY;
1695
+ } elseif (stripos($this->_agent, 'FreeBSD') !== false) {
1696
+ $this->_platform = self::PLATFORM_FREEBSD;
1697
+ } elseif (stripos($this->_agent, 'OpenBSD') !== false) {
1698
+ $this->_platform = self::PLATFORM_OPENBSD;
1699
+ } elseif (stripos($this->_agent, 'NetBSD') !== false) {
1700
+ $this->_platform = self::PLATFORM_NETBSD;
1701
+ } elseif (stripos($this->_agent, 'OpenSolaris') !== false) {
1702
+ $this->_platform = self::PLATFORM_OPENSOLARIS;
1703
+ } elseif (stripos($this->_agent, 'SunOS') !== false) {
1704
+ $this->_platform = self::PLATFORM_SUNOS;
1705
+ } elseif (stripos($this->_agent, 'OS\/2') !== false) {
1706
+ $this->_platform = self::PLATFORM_OS2;
1707
+ } elseif (stripos($this->_agent, 'BeOS') !== false) {
1708
+ $this->_platform = self::PLATFORM_BEOS;
1709
+ } elseif (stripos($this->_agent, 'win') !== false) {
1710
+ $this->_platform = self::PLATFORM_WINDOWS;
1711
+ } elseif (stripos($this->_agent, 'Playstation') !== false) {
1712
+ $this->_platform = self::PLATFORM_PLAYSTATION;
1713
+ } elseif (stripos($this->_agent, 'Roku') !== false) {
1714
+ $this->_platform = self::PLATFORM_ROKU;
1715
+ } elseif (stripos($this->_agent, 'iOS') !== false) {
1716
+ $this->_platform = self::PLATFORM_IPHONE . '/' . self::PLATFORM_IPAD;
1717
+ } elseif (stripos($this->_agent, 'tvOS') !== false) {
1718
+ $this->_platform = self::PLATFORM_APPLE_TV;
1719
+ } elseif (stripos($this->_agent, 'curl') !== false) {
1720
+ $this->_platform = self::PLATFORM_TERMINAL;
1721
+ } elseif (stripos($this->_agent, 'CrOS') !== false) {
1722
+ $this->_platform = self::PLATFORM_CHROME_OS;
1723
+ } elseif (stripos($this->_agent, 'okhttp') !== false) {
1724
+ $this->_platform = self::PLATFORM_JAVA_ANDROID;
1725
+ } elseif (stripos($this->_agent, 'PostmanRuntime') !== false) {
1726
+ $this->_platform = self::PLATFORM_POSTMAN;
1727
+ } elseif (stripos($this->_agent, 'Iframely') !== false) {
1728
+ $this->_platform = self::PLATFORM_I_FRAME;
1729
+ }
1730
+
1731
+ }
1732
+ }
vendor/cbschuld/browser.php/phpunit.xml.dist ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phpunit backupGlobals="true"
3
+ backupStaticAttributes="false"
4
+ bootstrap="lib/Browser.php"
5
+ colors="false"
6
+ convertErrorsToExceptions="true"
7
+ convertNoticesToExceptions="true"
8
+ convertWarningsToExceptions="true"
9
+ forceCoversAnnotation="false"
10
+ mapTestClassNameToCoveredClassName="false"
11
+ processIsolation="false"
12
+ stopOnError="false"
13
+ stopOnFailure="false"
14
+ stopOnIncomplete="false"
15
+ stopOnSkipped="false"
16
+ testSuiteLoaderFile="phpunit/src/Runner/StandardTestSuiteLoader.php"
17
+ strict="false"
18
+ verbose="false">
19
+ <testsuites>
20
+ <testsuite name="Unit">
21
+ <directory>test/Unit</directory>
22
+ </testsuite>
23
+ </testsuites>
24
+ <filter>
25
+ <whitelist>
26
+ <directory suffix=".php">lib/</directory>
27
+ </whitelist>
28
+ </filter>
29
+ </phpunit>
vendor/composer/ClassLoader.php CHANGED
@@ -53,8 +53,9 @@ class ClassLoader
53
 
54
  private $useIncludePath = false;
55
  private $classMap = array();
56
-
57
  private $classMapAuthoritative = false;
 
 
58
 
59
  public function getPrefixes()
60
  {
@@ -271,6 +272,26 @@ class ClassLoader
271
  return $this->classMapAuthoritative;
272
  }
273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  /**
275
  * Registers this instance as an autoloader.
276
  *
@@ -313,29 +334,34 @@ class ClassLoader
313
  */
314
  public function findFile($class)
315
  {
316
- // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
317
- if ('\\' == $class[0]) {
318
- $class = substr($class, 1);
319
- }
320
-
321
  // class map lookup
322
  if (isset($this->classMap[$class])) {
323
  return $this->classMap[$class];
324
  }
325
- if ($this->classMapAuthoritative) {
326
  return false;
327
  }
 
 
 
 
 
 
328
 
329
  $file = $this->findFileWithExtension($class, '.php');
330
 
331
  // Search for Hack files if we are running on HHVM
332
- if ($file === null && defined('HHVM_VERSION')) {
333
  $file = $this->findFileWithExtension($class, '.hh');
334
  }
335
 
336
- if ($file === null) {
 
 
 
 
337
  // Remember that this class does not exist.
338
- return $this->classMap[$class] = false;
339
  }
340
 
341
  return $file;
@@ -399,6 +425,8 @@ class ClassLoader
399
  if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
400
  return $file;
401
  }
 
 
402
  }
403
  }
404
 
53
 
54
  private $useIncludePath = false;
55
  private $classMap = array();
 
56
  private $classMapAuthoritative = false;
57
+ private $missingClasses = array();
58
+ private $apcuPrefix;
59
 
60
  public function getPrefixes()
61
  {
272
  return $this->classMapAuthoritative;
273
  }
274
 
275
+ /**
276
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
+ *
278
+ * @param string|null $apcuPrefix
279
+ */
280
+ public function setApcuPrefix($apcuPrefix)
281
+ {
282
+ $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
283
+ }
284
+
285
+ /**
286
+ * The APCu prefix in use, or null if APCu caching is not enabled.
287
+ *
288
+ * @return string|null
289
+ */
290
+ public function getApcuPrefix()
291
+ {
292
+ return $this->apcuPrefix;
293
+ }
294
+
295
  /**
296
  * Registers this instance as an autoloader.
297
  *
334
  */
335
  public function findFile($class)
336
  {
 
 
 
 
 
337
  // class map lookup
338
  if (isset($this->classMap[$class])) {
339
  return $this->classMap[$class];
340
  }
341
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
342
  return false;
343
  }
344
+ if (null !== $this->apcuPrefix) {
345
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346
+ if ($hit) {
347
+ return $file;
348
+ }
349
+ }
350
 
351
  $file = $this->findFileWithExtension($class, '.php');
352
 
353
  // Search for Hack files if we are running on HHVM
354
+ if (false === $file && defined('HHVM_VERSION')) {
355
  $file = $this->findFileWithExtension($class, '.hh');
356
  }
357
 
358
+ if (null !== $this->apcuPrefix) {
359
+ apcu_add($this->apcuPrefix.$class, $file);
360
+ }
361
+
362
+ if (false === $file) {
363
  // Remember that this class does not exist.
364
+ $this->missingClasses[$class] = true;
365
  }
366
 
367
  return $file;
425
  if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
426
  return $file;
427
  }
428
+
429
+ return false;
430
  }
431
  }
432
 
vendor/composer/autoload_files.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_files.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'f15d016d70663d5e96ccd2b863511eb8' => $vendorDir . '/cbschuld/browser.php/lib/Browser.php',
10
+ );
vendor/composer/autoload_real.php CHANGED
@@ -23,23 +23,48 @@ class ComposerAutoloaderInit28a0833b49959d9021dc40cd45dfc52b
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
  spl_autoload_unregister(array('ComposerAutoloaderInit28a0833b49959d9021dc40cd45dfc52b', 'loadClassLoader'));
25
 
26
- $map = require __DIR__ . '/autoload_namespaces.php';
27
- foreach ($map as $namespace => $path) {
28
- $loader->set($namespace, $path);
29
- }
30
 
31
- $map = require __DIR__ . '/autoload_psr4.php';
32
- foreach ($map as $namespace => $path) {
33
- $loader->setPsr4($namespace, $path);
34
- }
 
 
 
 
 
 
 
35
 
36
- $classMap = require __DIR__ . '/autoload_classmap.php';
37
- if ($classMap) {
38
- $loader->addClassMap($classMap);
 
39
  }
40
 
41
  $loader->register(true);
42
 
 
 
 
 
 
 
 
 
 
43
  return $loader;
44
  }
45
  }
 
 
 
 
 
 
 
 
 
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
  spl_autoload_unregister(array('ComposerAutoloaderInit28a0833b49959d9021dc40cd45dfc52b', 'loadClassLoader'));
25
 
26
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
+ if ($useStaticLoader) {
28
+ require_once __DIR__ . '/autoload_static.php';
 
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit28a0833b49959d9021dc40cd45dfc52b::getInitializer($loader));
31
+ } else {
32
+ $map = require __DIR__ . '/autoload_namespaces.php';
33
+ foreach ($map as $namespace => $path) {
34
+ $loader->set($namespace, $path);
35
+ }
36
+
37
+ $map = require __DIR__ . '/autoload_psr4.php';
38
+ foreach ($map as $namespace => $path) {
39
+ $loader->setPsr4($namespace, $path);
40
+ }
41
 
42
+ $classMap = require __DIR__ . '/autoload_classmap.php';
43
+ if ($classMap) {
44
+ $loader->addClassMap($classMap);
45
+ }
46
  }
47
 
48
  $loader->register(true);
49
 
50
+ if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit28a0833b49959d9021dc40cd45dfc52b::$files;
52
+ } else {
53
+ $includeFiles = require __DIR__ . '/autoload_files.php';
54
+ }
55
+ foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire28a0833b49959d9021dc40cd45dfc52b($fileIdentifier, $file);
57
+ }
58
+
59
  return $loader;
60
  }
61
  }
62
+
63
+ function composerRequire28a0833b49959d9021dc40cd45dfc52b($fileIdentifier, $file)
64
+ {
65
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
+ require $file;
67
+
68
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
69
+ }
70
+ }
vendor/composer/autoload_static.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_static.php @generated by Composer
4
+
5
+ namespace Composer\Autoload;
6
+
7
+ class ComposerStaticInit28a0833b49959d9021dc40cd45dfc52b
8
+ {
9
+ public static $files = array (
10
+ 'f15d016d70663d5e96ccd2b863511eb8' => __DIR__ . '/..' . '/cbschuld/browser.php/lib/Browser.php',
11
+ );
12
+
13
+ public static $prefixLengthsPsr4 = array (
14
+ 'J' =>
15
+ array (
16
+ 'Jaybizzle\\CrawlerDetect\\' => 24,
17
+ ),
18
+ );
19
+
20
+ public static $prefixDirsPsr4 = array (
21
+ 'Jaybizzle\\CrawlerDetect\\' =>
22
+ array (
23
+ 0 => __DIR__ . '/..' . '/jaybizzle/crawler-detect/src',
24
+ ),
25
+ );
26
+
27
+ public static $prefixesPsr0 = array (
28
+ 'D' =>
29
+ array (
30
+ 'Detection' =>
31
+ array (
32
+ 0 => __DIR__ . '/..' . '/mobiledetect/mobiledetectlib/namespaced',
33
+ ),
34
+ ),
35
+ );
36
+
37
+ public static $classMap = array (
38
+ 'Mobile_Detect' => __DIR__ . '/..' . '/mobiledetect/mobiledetectlib/Mobile_Detect.php',
39
+ );
40
+
41
+ public static function getInitializer(ClassLoader $loader)
42
+ {
43
+ return \Closure::bind(function () use ($loader) {
44
+ $loader->prefixLengthsPsr4 = ComposerStaticInit28a0833b49959d9021dc40cd45dfc52b::$prefixLengthsPsr4;
45
+ $loader->prefixDirsPsr4 = ComposerStaticInit28a0833b49959d9021dc40cd45dfc52b::$prefixDirsPsr4;
46
+ $loader->prefixesPsr0 = ComposerStaticInit28a0833b49959d9021dc40cd45dfc52b::$prefixesPsr0;
47
+ $loader->classMap = ComposerStaticInit28a0833b49959d9021dc40cd45dfc52b::$classMap;
48
+
49
+ }, null, ClassLoader::class);
50
+ }
51
+ }
vendor/composer/installed.json CHANGED
@@ -20,7 +20,7 @@
20
  "require-dev": {
21
  "phpunit/phpunit": "*"
22
  },
23
- "time": "2016-08-19 20:27:52",
24
  "type": "library",
25
  "installation-source": "dist",
26
  "autoload": {
@@ -72,7 +72,7 @@
72
  "johnkary/phpunit-speedtrap": "~1.0@dev",
73
  "phpunit/phpunit": "*"
74
  },
75
- "time": "2016-04-24 09:47:16",
76
  "type": "library",
77
  "installation-source": "dist",
78
  "autoload": {
@@ -104,5 +104,52 @@
104
  "mobile detector",
105
  "php mobile detect"
106
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  }
108
  ]
20
  "require-dev": {
21
  "phpunit/phpunit": "*"
22
  },
23
+ "time": "2016-08-19T20:27:52+00:00",
24
  "type": "library",
25
  "installation-source": "dist",
26
  "autoload": {
72
  "johnkary/phpunit-speedtrap": "~1.0@dev",
73
  "phpunit/phpunit": "*"
74
  },
75
+ "time": "2016-04-24T09:47:16+00:00",
76
  "type": "library",
77
  "installation-source": "dist",
78
  "autoload": {
104
  "mobile detector",
105
  "php mobile detect"
106
  ]
107
+ },
108
+ {
109
+ "name": "cbschuld/browser.php",
110
+ "version": "dev-master",
111
+ "version_normalized": "9999999-dev",
112
+ "source": {
113
+ "type": "git",
114
+ "url": "https://github.com/cbschuld/Browser.php.git",
115
+ "reference": "6bde9efb0b14a4917affe741500c29149419e491"
116
+ },
117
+ "dist": {
118
+ "type": "zip",
119
+ "url": "https://api.github.com/repos/cbschuld/Browser.php/zipball/6bde9efb0b14a4917affe741500c29149419e491",
120
+ "reference": "6bde9efb0b14a4917affe741500c29149419e491",
121
+ "shasum": ""
122
+ },
123
+ "time": "2017-07-31T23:43:17+00:00",
124
+ "type": "library",
125
+ "extra": {
126
+ "branch-alias": {
127
+ "dev-master": "1.95-dev"
128
+ }
129
+ },
130
+ "installation-source": "source",
131
+ "autoload": {
132
+ "files": [
133
+ "lib/Browser.php"
134
+ ]
135
+ },
136
+ "notification-url": "https://packagist.org/downloads/",
137
+ "license": [
138
+ "MIT"
139
+ ],
140
+ "authors": [
141
+ {
142
+ "name": "Chris Schuld",
143
+ "email": "chris@chrisschuld.com",
144
+ "homepage": "http://chrisschuld.com"
145
+ }
146
+ ],
147
+ "description": "A PHP Class to detect a user's Browser",
148
+ "homepage": "http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php.html",
149
+ "keywords": [
150
+ "browser",
151
+ "detection",
152
+ "user agent"
153
+ ]
154
  }
155
  ]