Changeset 595248
- Timestamp:
- 09/06/2012 03:56:33 AM (13 years ago)
- Location:
- wp-useragent/trunk
- Files:
-
- 16 added
- 3 edited
-
img/16/net/barca.png (added)
-
img/16/net/ryouko.png (added)
-
img/16/net/slimboat.png (added)
-
img/16/net/substream.png (added)
-
img/16/net/zbrowser.png (added)
-
img/24/net/barca.png (added)
-
img/24/net/ryouko.png (added)
-
img/24/net/slimboat.png (added)
-
img/24/net/substream.png (added)
-
img/24/net/zbrowser.png (added)
-
readme.txt (modified) (3 diffs)
-
wp-useragent-detect-device.php (added)
-
wp-useragent-detect-os.php (added)
-
wp-useragent-detect-platform.php (added)
-
wp-useragent-detect-trackback.php (added)
-
wp-useragent-detect-webbrowser-version.php (added)
-
wp-useragent-detect-webbrowser.php (added)
-
wp-useragent-options.php (modified) (4 diffs)
-
wp-useragent.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-useragent/trunk/readme.txt
r564351 r595248 4 4 Tags: useragent, user-agent, user agent, web, browser, web browser, operating system, platform, os, mac, apple, windows, win, linux, phone 5 5 Requires at least: 2.0 6 Tested up to: 3.4 7 Stable tag: 0.10.156 Tested up to: 3.4.1 7 Stable tag: 1.0.0 8 8 9 9 == Description == … … 67 67 == Changelog == 68 68 69 = v0.10.15 = //in-progress 69 = v1.0.0 = 70 * Added detection for Barca, SubStream, SlimBoat, zBrowser, Ryouko browsers. 71 * Fixed Chrome detection on Android (props: JayXon) 72 * Refactored code for easier maintenance. 73 * Release v1.0.0!!!! (w00t!) 74 75 76 = v0.10.15 = 70 77 * Added detection for Atomic Web Browser. 71 78 * Fixed issue where the Links browser was incorrectly detected for the UA "online link validator (http://www.dead-links.com/)" and cause a warning to appear. … … 556 563 == Upgrade Notice == 557 564 558 = v 0.10.15=559 * Added detection for Atomic Web Browser.560 * Fixed issue where the Links browser was incorrectly detected for the UA "online link validator (http://www.dead-links.com/)" and cause a warning to appear.561 * Added detection for Windows 8.562 * Added detection for the Wordpress App for BlackBerry, Windows Phone, Nokia, WebOS.565 = v1.0.0 = 566 * Added detection for Barca, SubStream, SlimBoat, zBrowser, Ryouko browsers. 567 * Fixed Chrome detection on Android (props: JayXon) 568 * Refactored code for easier maintenance. 569 * Release v1.0.0!!!! (w00t!) -
wp-useragent/trunk/wp-useragent-options.php
r365240 r595248 6 6 <?php 7 7 wp_nonce_field('update-options'); 8 $ua_doctype =get_option('ua_doctype');9 $ua_comment_size =get_option('ua_comment_size');10 $ua_track_size =get_option('ua_track_size');11 $ua_show_text =get_option('ua_show_text');12 $ua_image_style =get_option('ua_image_style');13 $ua_image_css =get_option('ua_image_css');14 $ua_text_surfing =get_option('ua_text_surfing');15 $ua_text_on =get_option('ua_text_on');16 $ua_text_via =get_option('ua_text_via');17 $ua_text_links =get_option('ua_text_links');18 $ua_show_au_bool =get_option('ua_show_ua_bool');19 $ua_hide_unknown_bool =get_option('ua_hide_unknown_bool');20 $ua_output_location =get_option('ua_output_location');8 $ua_doctype = get_option('ua_doctype'); 9 $ua_comment_size = get_option('ua_comment_size'); 10 $ua_track_size = get_option('ua_track_size'); 11 $ua_show_text = get_option('ua_show_text'); 12 $ua_image_style = get_option('ua_image_style'); 13 $ua_image_css = get_option('ua_image_css'); 14 $ua_text_surfing = get_option('ua_text_surfing'); 15 $ua_text_on = get_option('ua_text_on'); 16 $ua_text_via = get_option('ua_text_via'); 17 $ua_text_links = get_option('ua_text_links'); 18 $ua_show_au_bool = get_option('ua_show_ua_bool'); 19 $ua_hide_unknown_bool = get_option('ua_hide_unknown_bool'); 20 $ua_output_location = get_option('ua_output_location'); 21 21 ?> 22 22 … … 300 300 var os_24="iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9gHHQIYGcceg0cAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAC5klEQVRIx63VT2hcVRQG8N+dzJ8ak1WtxCrWilK1A1YDrlSwQTuoRaTWohsVxNaFiwoTgiiCqGAGurJG6cr6h7RFxBplorbYLsQ/BcFOwdSiVFPUWkRMsE0myXMxN/IYJ8kUPfDgve+e9933zj3n+/gfosbNNcZqTNcYrtE5vxbOh2hig3wIrsYKzODHH6rGAydxWSr12SLPQbYd4smSXjyN23FhaukEenFp0yvXzN9kFiOuV6ysV3ThHO5uIodVq0sK+LQJf2/JDeoVRXyFp7qqjuGVFmk57Ogo2IxB7MMD2LPoGdQrLsERrMQU1k4d8DuOYy6WJofr4l8dwhBO4yasTRIPd4+ay7Ygh9ciORSwo6vqnsmS65PEz92jEpjcYJlgC17EcJonBF9gZ2ixwS043AS/kSQeyvc3iFs0QQ8+RjEF/4YrWp3BY03P3+DRhcihq+oX3IuzKXgFNoWJOwgZt+JaHCz0WYX3sSwm3pcre6fNdh7CthT0diZkPBMP6VUcnTpgBpWYMIPqeczintgcX8crEyZL/kR3KundQp+X8Dl+zZX1/BcZycYhSm9wDvl43z09qCPfb7ZNTVqDrSnoVBZl7Ip9fTq23OMxoTMEvfiyzQ/ehO2p5w8zXVWv40qsx1WFPsWmg9p+9vmlmY82FHRrE3w4G9tsHONQ79PZJCFbsgUf4M1FyEPgZVyegmcw/O85SLyF79NDiYHpwdayUqMnNDTokaal3UVOLqRF6/EROiJU+rbsk8AIfsJ3sRFuwJ24oIniFNYVOdPSD3JlB+sVT2An9s/NGg2N+pYWqNIhjRKdwo34rMiZJR2tXnE/joyV/YExXNQibd/qAdvyyw1EoxlJErvmpWVRR8uV7Y113izls6mYw5P55XbjrohtDEEmKkP7nlxrDONtWIeLMYsTayqGosilP3YkV7axbU/W0OEJ7I/XPzGVkAmOR/OZj2NteXI7UegHD0Zx+wt78cL8+t+YhsdFSTORbAAAAABJRU5ErkJggg=="; 301 301 302 function preview(){ 302 function preview() 303 { 303 304 var wp_ua_content="", wp_ua_string="", ua_text_surfing="", ua_text_on="", ua_browser="", ua_system=""; 304 305 … … 309 310 //wp_ua_image_style 310 311 if(document.getElementById('ua_image_style').value=="1") 312 { 311 313 document.getElementById('ua_image_css').style.display="none"; 314 } 312 315 else 316 { 313 317 document.getElementById('ua_image_css').style.display="inline"; 318 } 314 319 315 320 //wp_ua_content 316 if(document.getElementById('ua_show_text').value=="1" || document.getElementById('ua_show_text').value=="3"){ 321 if(document.getElementById('ua_show_text').value=="1" || document.getElementById('ua_show_text').value=="3") 322 { 317 323 ua_text_surfing=document.getElementById('ua_text_surfing').value+" "; 318 324 ua_text_on=" "+document.getElementById('ua_text_on').value+" "; 319 if (document.getElementById('ua_text_links').value!="0") { 325 326 if (document.getElementById('ua_text_links').value!="0") 327 { 320 328 ua_browser=" <a href='http://www.opera.com/' style='text-decoration:none'>Opera 10.00</a> "; 321 329 ua_system=" <a href='http://www.ubuntu.com/' style='text-decoration:none'>Ubuntu 9.10</a>"; 322 } else { 330 } 331 else 332 { 323 333 ua_browser=" Opera 10.00 "; 324 334 ua_system=" Ubuntu 9.10"; … … 326 336 } 327 337 328 if(document.getElementById('ua_show_text').value=="1" || document.getElementById('ua_show_text').value=="2"){ 329 if(document.getElementById('ua_comment_size').value=="16"){ 338 if(document.getElementById('ua_show_text').value=="1" || document.getElementById('ua_show_text').value=="2") 339 { 340 if(document.getElementById('ua_comment_size').value=="16") 341 { 330 342 wp_ua_content=ua_text_surfing+"<img src='data:image/png;base64,"+net_16+"' alt='Browser:' style='border:0px;vertical-align:middle;' />"+ua_browser+ua_text_on+" <img src='data:image/png;base64,"+os_16+"' alt='System:' style='border:0px;vertical-align:middle;' />"+ua_system; 331 }else if(document.getElementById('ua_comment_size').value=="24"){ 343 } 344 else if(document.getElementById('ua_comment_size').value=="24") 345 { 332 346 wp_ua_content=ua_text_surfing+"<img src='data:image/png;base64,"+net_24+"' alt='Browser:' style='border:0px;vertical-align:middle;' />"+ua_browser+ua_text_on+" <img src='data:image/png;base64,"+os_24+"' alt='System:' style='border:0px;vertical-align:middle;' />"+ua_system; 333 347 } 334 } else if (document.getElementById('ua_show_text').value=="3") { 348 } 349 else if (document.getElementById('ua_show_text').value=="3") 350 { 335 351 wp_ua_content=ua_text_surfing+ua_browser+ua_text_on+ua_system; 336 352 } 337 353 338 354 //wp_ua_string 339 if(document.getElementById('ua_show_ua_bool').value=="true"){ 355 if(document.getElementById('ua_show_ua_bool').value=="true") 356 { 340 357 wp_ua_string="Opera/9.80 (X11; Ubuntu/9.10 x86_64; U; en) Presto/2.2.15 Version/10.00"; 341 358 } 342 359 343 360 //toggle preview and custom output location directions 344 if(document.getElementById('ua_output_location').value=="custom"){ 361 if(document.getElementById('ua_output_location').value=="custom") 362 { 345 363 document.getElementById('ua_output_custom_location').style.display="table-row"; 346 364 document.getElementById('ua_preview').style.display="none"; 347 }else{ 365 } 366 else 367 { 348 368 document.getElementById('ua_preview').style.display="table-row"; 349 369 document.getElementById('ua_output_custom_location').style.display="none"; 350 if(document.getElementById('ua_output_location').value=="before"){ 370 371 if(document.getElementById('ua_output_location').value=="before") 372 { 351 373 document.getElementById('wp_ua_content_bottom').innerHTML=""; 352 374 document.getElementById('wp_ua_string_bottom').innerHTML=""; 353 375 document.getElementById('wp_ua_content_top').innerHTML=wp_ua_content; 354 376 document.getElementById('wp_ua_string_top').innerHTML=wp_ua_string; 355 }else if(document.getElementById('ua_output_location').value=="after"){ 377 } 378 else if(document.getElementById('ua_output_location').value=="after") 379 { 356 380 document.getElementById('wp_ua_content_top').innerHTML=""; 357 381 document.getElementById('wp_ua_string_top').innerHTML=""; -
wp-useragent/trunk/wp-useragent.php
r564351 r595248 4 4 Plugin URI: http://kyleabaker.com/goodies/coding/wp-useragent/ 5 5 Description: A simple User-Agent detection plugin that lets you easily insert icons and/or textual web browser and operating system details with each comment. 6 Version: 0.10.156 Version: 1.0.0 7 7 Author: Kyle Baker 8 8 Author URI: http://kyleabaker.com/ … … 39 39 define('WP_PLUGIN_DIR', WP_CONTENT_DIR.'/plugins'); 40 40 41 // Plugin Options41 // Plugin Options 42 42 $url_img=WP_PLUGIN_URL."/wp-useragent/img/"; 43 43 44 $ua_doctype=get_option('ua_doctype'); 45 $ua_comment_size=get_option('ua_comment_size'); 46 $ua_track_size=get_option('ua_track_size'); 47 $ua_show_text=get_option('ua_show_text'); 48 $ua_image_style=get_option('ua_image_style'); 49 $ua_image_css=get_option('ua_image_css'); 50 $ua_text_surfing=get_option('ua_text_surfing'); 51 $ua_text_on=get_option('ua_text_on'); 52 $ua_text_via=get_option('ua_text_via'); 53 $ua_text_links=get_option('ua_text_links'); 54 $ua_show_ua_bool=get_option('ua_show_ua_bool'); 55 $ua_hide_unknown_bool=get_option('ua_hide_unknown_bool'); 56 $ua_output_location=get_option('ua_output_location'); 57 58 //Detect webbrowser versions 59 function detect_browser_version($title){ 60 global $useragent; 61 62 //fix for Opera's (and others) UA string changes in v10.00 63 $start=$title; 64 if((strtolower($title)==strtolower("Opera") || strtolower($title)==strtolower("Opera Next") 65 || strtolower($title)==strtolower("Opera Labs")) && preg_match('/Version/i', $useragent)) 66 $start="Version"; 67 elseif(strtolower($title)==strtolower("Opera Mobi") && preg_match('/Version/i', $useragent)) 68 $start="Version"; 69 elseif(strtolower($title)==strtolower("Safari") && preg_match('/Version/i', $useragent)) 70 $start="Version"; 71 elseif(strtolower($title)==strtolower("Pre") && preg_match('/Version/i', $useragent)) 72 $start="Version"; 73 elseif(strtolower($title)==strtolower("Android Webkit")) 74 $start="Version"; 75 elseif(strtolower($title)==strtolower("Links")) 76 $start="Links ("; 77 elseif(strtolower($title)==strtolower("UC Browser")) 78 $start="UC Browse"; 79 elseif(strtolower($title)==strtolower("TenFourFox")) 80 $start=" rv"; 81 elseif(strtolower($title)==strtolower("Classilla")) 82 $start=" rv"; 83 elseif(strtolower($title)==strtolower("SmartTV")) 84 $start="WebBrowser"; 85 86 //Grab the browser version if its present 87 preg_match('/'.$start.'[\ |\/]?([.0-9a-zA-Z]+)/i', $useragent, $regmatch); 88 $version=$regmatch[1]; 89 90 //Return browser Title and Version, but first..some titles need to be changed 91 if(strtolower($title)=="msie" && strtolower($version)=="7.0" && preg_match('/Trident\/4.0/i', $useragent)) 92 return " 8.0 (Compatibility Mode)"; //fix for IE8 quirky UA string with Compatibility Mode enabled 93 elseif(strtolower($title)=="msie") 94 return " ".$version; 95 elseif(strtolower($title)=="multi-browser") 96 return "Multi-Browser XP ".$version; 97 elseif(strtolower($title)=="nf-browser") 98 return "NetFront ".$version; 99 elseif(strtolower($title)=="semc-browser") 100 return "SEMC Browser ".$version; 101 elseif(strtolower($title)=="ucweb") 102 return "UC Browser ".$version; 103 elseif(strtolower($title)=="up.browser" || strtolower($title)=="up.link") 104 return "Openwave Mobile Browser ".$version; 105 elseif(strtolower($title)=="chromeframe") 106 return "Google Chrome Frame ".$version; 107 elseif(strtolower($title)=="mozilladeveloperpreview") 108 return "Mozilla Developer Preview ".$version; 109 elseif(strtolower($title)=="multi-browser") 110 return "Multi-Browser XP ".$version; 111 elseif(strtolower($title)=="opera mobi") 112 return "Opera Mobile ".$version; 113 elseif(strtolower($title)=="osb-browser") 114 return "Gtk+ WebCore ".$version; 115 elseif(strtolower($title)=="tablet browser") 116 return "MicroB ".$version; 117 elseif(strtolower($title)=="tencenttraveler") 118 return "TT Explorer ".$version; 119 elseif(strtolower($title)=="crmo") 120 return "Chrome Mobile ".$version; 121 elseif(strtolower($title)=="smarttv") 122 return "Maple Browser ".$version; 123 elseif(strtolower($title)=="wp-android" || strtolower($title)=="wp-iphone") 124 return "Wordpress App ".$version; 125 elseif(strtolower($title)=="atomicbrowser") 126 return "Atomic Web Browser ".$version; 127 elseif(strtolower($title)=="opera labs") 128 { 129 preg_match('/Edition\ Labs([\ ._0-9a-zA-Z]+);/i', $useragent, $regmatch); 130 return $title.$regmatch[1]." ".$version; 44 $ua_doctype = get_option('ua_doctype'); 45 $ua_comment_size = get_option('ua_comment_size'); 46 $ua_track_size = get_option('ua_track_size'); 47 $ua_show_text = get_option('ua_show_text'); 48 $ua_image_style = get_option('ua_image_style'); 49 $ua_image_css = get_option('ua_image_css'); 50 $ua_text_surfing = get_option('ua_text_surfing'); 51 $ua_text_on = get_option('ua_text_on'); 52 $ua_text_via = get_option('ua_text_via'); 53 $ua_text_links = get_option('ua_text_links'); 54 $ua_show_ua_bool = get_option('ua_show_ua_bool'); 55 $ua_hide_unknown_bool = get_option('ua_hide_unknown_bool'); 56 $ua_output_location = get_option('ua_output_location'); 57 58 // Include our main UA detection functions 59 include(WP_PLUGIN_DIR.'/wp-useragent/wp-useragent-detect-device.php'); 60 include(WP_PLUGIN_DIR.'/wp-useragent/wp-useragent-detect-os.php'); 61 include(WP_PLUGIN_DIR.'/wp-useragent/wp-useragent-detect-platform.php'); 62 include(WP_PLUGIN_DIR.'/wp-useragent/wp-useragent-detect-trackback.php'); 63 include(WP_PLUGIN_DIR.'/wp-useragent/wp-useragent-detect-webbrowser.php'); 64 include(WP_PLUGIN_DIR.'/wp-useragent/wp-useragent-detect-webbrowser-version.php'); 65 66 // Image generation function 67 function img($code, $type, $title) 68 { 69 global $ua_comment_size, $ua_track_size, $ua_image_style, $ua_image_css, $ua_trackback, $url_img, $ua_doctype; 70 71 // We need to default icons to size 16 or 24, we'll just use 16. 72 if($ua_comment_size=="") 73 { 74 $ua_comment_size=16; 75 } 76 if($ua_track_size=="") 77 { 78 $ua_track_size=16; 79 } 80 81 // Set the style/class for icon appearance... 82 if($ua_image_style=="1") 83 { 84 $img_style="style='border:0px;vertical-align:middle;'"; 85 } 86 elseif($ua_image_style=="2") 87 { 88 $img_style="style='".$ua_image_css."'"; 89 } 90 elseif($ua_image_style=="3") 91 { 92 $img_style="class='".$ua_image_css."'"; 93 } 94 95 // Set the img to display browser/os/device 96 // src=http://blogurl/plugins/plugin-name/size/net-os-device/code.png 97 if($ua_trackback==1) 98 { 99 $img="<img src='".$url_img.$ua_track_size.$type.$code.".png' title='".$title."' ".$img_style." alt='".$title."'"; 131 100 } 132 101 else 133 return $title." ".$version; 134 } 135 136 //Detect webbrowsers 137 function detect_webbrowser(){ 138 global $useragent, $ua_show_text, $ua_text_links, $ua_hide_unknown_bool; 139 $mobile=0; 140 if(preg_match('/360se/i', $useragent)){ 141 $link="http://se.360.cn/"; 142 $title="360Safe Explorer"; 143 $code="360se"; 144 }elseif(preg_match('/Abolimba/i', $useragent)){ 145 $link="http://www.aborange.de/products/freeware/abolimba-multibrowser.php"; 146 $title="Abolimba"; 147 $code="abolimba"; 148 }elseif(preg_match('/Acoo\ Browser/i', $useragent)){ 149 $link="http://www.acoobrowser.com/"; 150 $title="Acoo ".detect_browser_version("Browser"); 151 $code="acoobrowser"; 152 }elseif(preg_match('/Alienforce/i', $useragent)){ 153 $link="http://sourceforge.net/projects/alienforce/"; 154 $title=detect_browser_version("Alienforce"); 155 $code="alienforce"; 156 }elseif(preg_match('/Amaya/i', $useragent)){ 157 $link="http://www.w3.org/Amaya/"; 158 $title=detect_browser_version("Amaya"); 159 $code="amaya"; 160 }elseif(preg_match('/Amiga-AWeb/i', $useragent)){ 161 $link="http://aweb.sunsite.dk/"; 162 $title="Amiga ".detect_browser_version("AWeb"); 163 $code="amiga-aweb"; 164 }elseif(preg_match('/America\ Online\ Browser/i', $useragent)){ 165 $link="http://downloads.channel.aol.com/browser"; 166 $title="America Online ".detect_browser_version("Browser"); 167 $code="aol"; 168 }elseif(preg_match('/AmigaVoyager/i', $useragent)){ 169 $link="http://v3.vapor.com/voyager/"; 170 $title="Amiga ".detect_browser_version("Voyager"); 171 $code="amigavoyager"; 172 }elseif(preg_match('/AOL/i', $useragent)){ 173 $link="http://downloads.channel.aol.com/browser"; 174 $title=detect_browser_version("AOL"); 175 $code="aol"; 176 }elseif(preg_match('/Arora/i', $useragent)){ 177 $link="http://code.google.com/p/arora/"; 178 $title=detect_browser_version("Arora"); 179 $code="arora"; 180 }elseif(preg_match('/AtomicBrowser/i', $useragent)){ 181 $link="http://www.atomicwebbrowser.com/"; 182 $title=detect_browser_version("AtomicBrowser"); 183 $code="atomicwebbrowser"; 184 }elseif(preg_match('/Avant\ Browser/i', $useragent)){ 185 $link="http://www.avantbrowser.com/"; 186 $title="Avant ".detect_browser_version("Browser"); 187 $code="avantbrowser"; 188 }elseif(preg_match('/baidubrowser/i', $useragent)){ 189 $link="http://liulanqi.baidu.com/"; 190 $title=detect_browser_version("Browser"); 191 $code="baidubrowser"; 192 }elseif(preg_match('/Beonex/i', $useragent)){ 193 $link="http://www.beonex.com/"; 194 $title=detect_browser_version("Beonex"); 195 $code="beonex"; 196 }elseif(preg_match('/BlackBerry/i', $useragent)){ 197 $link="http://www.blackberry.com/"; 198 $title=detect_browser_version("BlackBerry"); 199 $code="blackberry"; 200 }elseif(preg_match('/Blackbird/i', $useragent)){ 201 $link="http://www.blackbirdbrowser.com/"; 202 $title=detect_browser_version("Blackbird"); 203 $code="blackbird"; 204 }elseif(preg_match('/BlackHawk/i', $useragent)){ 205 $link="http://www.netgate.sk/blackhawk/help/welcome-to-blackhawk-web-browser.html"; 206 $title=detect_browser_version("BlackHawk"); 207 $code="blackhawk"; 208 }elseif(preg_match('/Blazer/i', $useragent)){ 209 $link="http://en.wikipedia.org/wiki/Blazer_(web_browser)"; 210 $title=detect_browser_version("Blazer"); 211 $code="blazer"; 212 }elseif(preg_match('/Bolt/i', $useragent)){ 213 $link="http://www.boltbrowser.com/"; 214 $title=detect_browser_version("Bolt"); 215 $code="bolt"; 216 }elseif(preg_match('/BonEcho/i', $useragent)){ 217 $link="http://www.mozilla.org/projects/minefield/"; 218 $title=detect_browser_version("BonEcho"); 219 $code="firefoxdevpre"; 220 }elseif(preg_match('/BrowseX/i', $useragent)){ 221 $link="http://pdqi.com/browsex/"; 222 $title="BrowseX"; 223 $code="browsex"; 224 }elseif(preg_match('/Browzar/i', $useragent)){ 225 $link="http://www.browzar.com/"; 226 $title=detect_browser_version("Browzar"); 227 $code="browzar"; 228 }elseif(preg_match('/Bunjalloo/i', $useragent)){ 229 $link="http://code.google.com/p/quirkysoft/"; 230 $title=detect_browser_version("Bunjalloo"); 231 $code="bunjalloo"; 232 }elseif(preg_match('/Camino/i', $useragent)){ 233 $link="http://www.caminobrowser.org/"; 234 $title=detect_browser_version("Camino"); 235 $code="camino"; 236 }elseif(preg_match('/Cayman\ Browser/i', $useragent)){ 237 $link="http://www.caymanbrowser.com/"; 238 $title="Cayman ".detect_browser_version("Browser"); 239 $code="caymanbrowser"; 240 }elseif(preg_match('/Charon/i', $useragent)){ 241 $link="http://en.wikipedia.org/wiki/Charon_(web_browser)"; 242 $title=detect_browser_version("Charon"); 243 $code="null"; 244 }elseif(preg_match('/Cheshire/i', $useragent)){ 245 $link="http://downloads.channel.aol.com/browser"; 246 $title=detect_browser_version("Cheshire"); 247 $code="aol"; 248 }elseif(preg_match('/Chimera/i', $useragent)){ 249 $link="http://www.chimera.org/"; 250 $title=detect_browser_version("Chimera"); 251 $code="null"; 252 }elseif(preg_match('/chromeframe/i', $useragent)){ 253 $link="http://code.google.com/chrome/chromeframe/"; 254 $title=detect_browser_version("chromeframe"); 255 $code="google"; 256 }elseif(preg_match('/ChromePlus/i', $useragent)){ 257 $link="http://www.chromeplus.org/"; 258 $title=detect_browser_version("ChromePlus"); 259 $code="chromeplus"; 260 }elseif(preg_match('/Iron/i', $useragent)){ 261 $link="http://www.srware.net/"; 262 $title="SRWare ".detect_browser_version("Iron"); 263 $code="srwareiron"; 264 }elseif(preg_match('/Chromium/i', $useragent)){ 265 $link="http://www.chromium.org/"; 266 $title=detect_browser_version("Chromium"); 267 $code="chromium"; 268 }elseif(preg_match('/Classilla/i', $useragent)){ 269 $link="http://en.wikipedia.org/wiki/Classilla"; 270 $title=detect_browser_version("Classilla"); 271 $code="classilla"; 272 }elseif(preg_match('/Columbus/i', $useragent)){ 273 $link="http://www.columbus-browser.com/"; 274 $title=detect_browser_version("Columbus"); 275 $code="columbus"; 276 }elseif(preg_match('/CometBird/i', $useragent)){ 277 $link="http://www.cometbird.com/"; 278 $title=detect_browser_version("CometBird"); 279 $code="cometbird"; 280 }elseif(preg_match('/Comodo_Dragon/i', $useragent)){ 281 $link="http://www.comodo.com/home/internet-security/browser.php"; 282 $title="Comodo ".detect_browser_version("Dragon"); 283 $code="comodo-dragon"; 284 }elseif(preg_match('/Conkeror/i', $useragent)){ 285 $link="http://www.conkeror.org/"; 286 $title=detect_browser_version("Conkeror"); 287 $code="conkeror"; 288 }elseif(preg_match('/CoolNovo/i', $useragent)){ 289 $link="http://www.coolnovo.com/"; 290 $title=detect_browser_version("CoolNovo"); 291 $code="coolnovo"; 292 }elseif(preg_match('/Crazy\ Browser/i', $useragent)){ 293 $link="http://www.crazybrowser.com/"; 294 $title="Crazy ".detect_browser_version("Browser"); 295 $code="crazybrowser"; 296 }elseif(preg_match('/CrMo/i', $useragent)){ 297 $link="http://www.google.com/chrome"; 298 $title=detect_browser_version("CrMo"); 299 $code="chrome"; 300 }elseif(preg_match('/Cruz/i', $useragent)){ 301 $link="http://www.cruzapp.com/"; 302 $title=detect_browser_version("Cruz"); 303 $code="cruz"; 304 }elseif(preg_match('/Cyberdog/i', $useragent)){ 305 $link="http://www.cyberdog.org/about/cyberdog/cyberbrowse.html"; 306 $title=detect_browser_version("Cyberdog"); 307 $code="cyberdog"; 308 }elseif(preg_match('/Deepnet\ Explorer/i', $useragent)){ 309 $link="http://www.deepnetexplorer.com/"; 310 $title=detect_browser_version("Deepnet Explorer"); 311 $code="deepnetexplorer"; 312 }elseif(preg_match('/Demeter/i', $useragent)){ 313 $link="http://www.hurrikenux.com/Demeter/"; 314 $title=detect_browser_version("Demeter"); 315 $code="demeter"; 316 }elseif(preg_match('/DeskBrowse/i', $useragent)){ 317 $link="http://www.deskbrowse.org/"; 318 $title=detect_browser_version("DeskBrowse"); 319 $code="deskbrowse"; 320 }elseif(preg_match('/Dillo/i', $useragent)){ 321 $link="http://www.dillo.org/"; 322 $title=detect_browser_version("Dillo"); 323 $code="dillo"; 324 }elseif(preg_match('/DoCoMo/i', $useragent)){ 325 $link="http://www.nttdocomo.com/"; 326 $title=detect_browser_version("DoCoMo"); 327 $code="null"; 328 }elseif(preg_match('/DocZilla/i', $useragent)){ 329 $link="http://www.doczilla.com/"; 330 $title=detect_browser_version("DocZilla"); 331 $code="doczilla"; 332 }elseif(preg_match('/Dolfin/i', $useragent)){ 333 $link="http://www.samsungmobile.com/"; 334 $title=detect_browser_version("Dolfin"); 335 $code="samsung"; 336 }elseif(preg_match('/Dooble/i', $useragent)){ 337 $link="http://dooble.sourceforge.net/"; 338 $title=detect_browser_version("Dooble"); 339 $code="dooble"; 340 }elseif(preg_match('/Doris/i', $useragent)){ 341 $link="http://www.anygraaf.fi/browser/indexe.htm"; 342 $title=detect_browser_version("Doris"); 343 $code="doris"; 344 }elseif(preg_match('/Dorothy/i', $useragent)){ 345 $link="http://www.dorothybrowser.com/"; 346 $title=detect_browser_version("Dorothy"); 347 $code="dorothybrowser"; 348 }elseif(preg_match('/Edbrowse/i', $useragent)){ 349 $link="http://edbrowse.sourceforge.net/"; 350 $title=detect_browser_version("Edbrowse"); 351 $code="edbrowse"; 352 }elseif(preg_match('/Elinks/i', $useragent)){ 353 $link="http://elinks.or.cz/"; 354 $title=detect_browser_version("Elinks"); 355 $code="elinks"; 356 }elseif(preg_match('/Element\ Browser/i', $useragent)){ 357 $link="http://www.elementsoftware.co.uk/software/elementbrowser/"; 358 $title="Element ".detect_browser_version("Browser"); 359 $code="elementbrowser"; 360 }elseif(preg_match('/Enigma\ Browser/i', $useragent)){ 361 $link="http://en.wikipedia.org/wiki/Enigma_Browser"; 362 $title="Enigma ".detect_browser_version("Browser"); 363 $code="enigmabrowser"; 364 }elseif(preg_match('/EnigmaFox/i', $useragent)){ 365 $link="#"; 366 $title=detect_browser_version("EnigmaFox"); 367 $code="null"; 368 }elseif(preg_match('/Epic/i', $useragent)){ 369 $link="http://www.epicbrowser.com/"; 370 $title=detect_browser_version("Epic"); 371 $code="epicbrowser"; 372 }elseif(preg_match('/Epiphany/i', $useragent)){ 373 $link="http://gnome.org/projects/epiphany/"; 374 $title=detect_browser_version("Epiphany"); 375 $code="epiphany"; 376 }elseif(preg_match('/Escape/i', $useragent)){ 377 $link="http://www.espial.com/products/evo_browser/"; 378 $title="Espial TV Browser - ".detect_browser_version("Escape"); 379 $code="espialtvbrowser"; 380 }elseif(preg_match('/Fennec/i', $useragent)){ 381 $link="https://wiki.mozilla.org/Fennec"; 382 $title=detect_browser_version("Fennec"); 383 $code="fennec"; 384 }elseif(preg_match('/Firebird/i', $useragent)){ 385 $link="http://seb.mozdev.org/firebird/"; 386 $title=detect_browser_version("Firebird"); 387 $code="firebird"; 388 }elseif(preg_match('/Fireweb\ Navigator/i', $useragent)){ 389 $link="http://www.arsslensoft.tk/?q=node/7"; 390 $title=detect_browser_version("Fireweb Navigator"); 391 $code="firewebnavigator"; 392 }elseif(preg_match('/Flock/i', $useragent)){ 393 $link="http://www.flock.com/"; 394 $title=detect_browser_version("Flock"); 395 $code="flock"; 396 }elseif(preg_match('/Fluid/i', $useragent)){ 397 $link="http://www.fluidapp.com/"; 398 $title=detect_browser_version("Fluid"); 399 $code="fluid"; 400 }elseif(preg_match('/Galaxy/i', $useragent)){ 401 $link="http://www.traos.org/"; 402 $title=detect_browser_version("Galaxy"); 403 $code="galaxy"; 404 }elseif(preg_match('/Galeon/i', $useragent)){ 405 $link="http://galeon.sourceforge.net/"; 406 $title=detect_browser_version("Galeon"); 407 $code="galeon"; 408 }elseif(preg_match('/GlobalMojo/i', $useragent)){ 409 $link="http://www.globalmojo.com/"; 410 $title=detect_browser_version("GlobalMojo"); 411 $code="globalmojo"; 412 }elseif(preg_match('/GoBrowser/i', $useragent)){ 413 $link="http://www.gobrowser.cn/"; 414 $title="GO ".detect_browser_version("Browser"); 415 $code="gobrowser"; 416 }elseif(preg_match('/Google\ Wireless\ Transcoder/i', $useragent)){ 417 $link="http://google.com/gwt/n"; 418 $title="Google Wireless Transcoder"; 419 $code="google"; 420 }elseif(preg_match('/GoSurf/i', $useragent)){ 421 $link="http://gosurfbrowser.com/?ln=en"; 422 $title=detect_browser_version("GoSurf"); 423 $code="gosurf"; 424 }elseif(preg_match('/GranParadiso/i', $useragent)){ 425 $link="http://www.mozilla.org/"; 426 $title=detect_browser_version("GranParadiso"); 427 $code="firefoxdevpre"; 428 }elseif(preg_match('/GreenBrowser/i', $useragent)){ 429 $link="http://www.morequick.com/"; 430 $title=detect_browser_version("GreenBrowser"); 431 $code="greenbrowser"; 432 }elseif(preg_match('/Hana/i', $useragent)){ 433 $link="http://www.alloutsoftware.com/"; 434 $title=detect_browser_version("Hana"); 435 $code="hana"; 436 }elseif(preg_match('/HotJava/i', $useragent)){ 437 $link="http://java.sun.com/products/archive/hotjava/"; 438 $title=detect_browser_version("HotJava"); 439 $code="hotjava"; 440 }elseif(preg_match('/Hv3/i', $useragent)){ 441 $link="http://tkhtml.tcl.tk/hv3.html"; 442 $title=detect_browser_version("Hv3"); 443 $code="hv3"; 444 }elseif(preg_match('/Hydra\ Browser/i', $useragent)){ 445 $link="http://www.hydrabrowser.com/"; 446 $title="Hydra Browser"; 447 $code="hydrabrowser"; 448 }elseif(preg_match('/Iris/i', $useragent)){ 449 $link="http://www.torchmobile.com/"; 450 $title=detect_browser_version("Iris"); 451 $code="iris"; 452 }elseif(preg_match('/IBM\ WebExplorer/i', $useragent)){ 453 $link="http://www.networking.ibm.com/WebExplorer/"; 454 $title="IBM ".detect_browser_version("WebExplorer"); 455 $code="ibmwebexplorer"; 456 }elseif(preg_match('/IBrowse/i', $useragent)){ 457 $link="http://www.ibrowse-dev.net/"; 458 $title=detect_browser_version("IBrowse"); 459 $code="ibrowse"; 460 }elseif(preg_match('/iCab/i', $useragent)){ 461 $link="http://www.icab.de/"; 462 $title=detect_browser_version("iCab"); 463 $code="icab"; 464 }elseif(preg_match('/Ice Browser/i', $useragent)){ 465 $link="http://www.icesoft.com/products/icebrowser.html"; 466 $title=detect_browser_version("Ice Browser"); 467 $code="icebrowser"; 468 }elseif(preg_match('/Iceape/i', $useragent)){ 469 $link="http://packages.debian.org/iceape"; 470 $title=detect_browser_version("Iceape"); 471 $code="iceape"; 472 }elseif(preg_match('/IceCat/i', $useragent)){ 473 $link="http://gnuzilla.gnu.org/"; 474 $title="GNU ".detect_browser_version("IceCat"); 475 $code="icecat"; 476 }elseif(preg_match('/IceWeasel/i', $useragent)){ 477 $link="http://www.geticeweasel.org/"; 478 $title=detect_browser_version("IceWeasel"); 479 $code="iceweasel"; 480 }elseif(preg_match('/IEMobile/i', $useragent)){ 481 $link="http://www.microsoft.com/windowsmobile/en-us/downloads/microsoft/internet-explorer-mobile.mspx"; 482 $title=detect_browser_version("IEMobile"); 483 $code="msie-mobile"; 484 }elseif(preg_match('/iNet\ Browser/i', $useragent)){ 485 $link="http://alexanderjbeston.wordpress.com/"; 486 $title="iNet ".detect_browser_version("Browser"); 487 $code="null"; 488 }elseif(preg_match('/iRider/i', $useragent)){ 489 $link="http://en.wikipedia.org/wiki/IRider"; 490 $title=detect_browser_version("iRider"); 491 $code="irider"; 492 }elseif(preg_match('/Iron/i', $useragent)){ 493 $link="http://www.srware.net/en/software_srware_iron.php"; 494 $title=detect_browser_version("Iron"); 495 $code="iron"; 496 }elseif(preg_match('/InternetSurfboard/i', $useragent)){ 497 $link="http://inetsurfboard.sourceforge.net/"; 498 $title=detect_browser_version("InternetSurfboard"); 499 $code="internetsurfboard"; 500 }elseif(preg_match('/Jasmine/i', $useragent)){ 501 $link="http://www.samsungmobile.com/"; 502 $title=detect_browser_version("Jasmine"); 503 $code="samsung"; 504 }elseif(preg_match('/K-Meleon/i', $useragent)){ 505 $link="http://kmeleon.sourceforge.net/"; 506 $title=detect_browser_version("K-Meleon"); 507 $code="kmeleon"; 508 }elseif(preg_match('/K-Ninja/i', $useragent)){ 509 $link="http://k-ninja-samurai.en.softonic.com/"; 510 $title=detect_browser_version("K-Ninja"); 511 $code="kninja"; 512 }elseif(preg_match('/Kapiko/i', $useragent)){ 513 $link="http://ufoxlab.googlepages.com/cooperation"; 514 $title=detect_browser_version("Kapiko"); 515 $code="kapiko"; 516 }elseif(preg_match('/Kazehakase/i', $useragent)){ 517 $link="http://kazehakase.sourceforge.jp/"; 518 $title=detect_browser_version("Kazehakase"); 519 $code="kazehakase"; 520 }elseif(preg_match('/Strata/i', $useragent)){ 521 $link="http://www.kirix.com/"; 522 $title="Kirix ".detect_browser_version("Strata"); 523 $code="kirix-strata"; 524 }elseif(preg_match('/KKman/i', $useragent)){ 525 $link="http://www.kkman.com.tw/"; 526 $title=detect_browser_version("KKman"); 527 $code="kkman"; 528 }elseif(preg_match('/KMail/i', $useragent)){ 529 $link="http://kontact.kde.org/kmail/"; 530 $title=detect_browser_version("KMail"); 531 $code="kmail"; 532 }elseif(preg_match('/KMLite/i', $useragent)){ 533 $link="http://en.wikipedia.org/wiki/K-Meleon"; 534 $title=detect_browser_version("KMLite"); 535 $code="kmeleon"; 536 }elseif(preg_match('/Konqueror/i', $useragent)){ 537 $link="http://konqueror.kde.org/"; 538 $title=detect_browser_version("Konqueror"); 539 $code="konqueror"; 540 }elseif(preg_match('/Kylo/i', $useragent)){ 541 $link="http://kylo.tv/"; 542 $title=detect_browser_version("Kylo"); 543 $code="kylo"; 544 }elseif(preg_match('/LBrowser/i', $useragent)){ 545 $link="http://wiki.freespire.org/index.php/Web_Browser"; 546 $title=detect_browser_version("LBrowser"); 547 $code="lbrowser"; 548 }elseif(preg_match('/LeechCraft/i', $useragent)){ 549 $link="http://leechcraft.org/"; 550 $title="LeechCraft"; 551 $code="null"; 552 }elseif(preg_match('/Links/i', $useragent) && !preg_match('/online\ link\ validator/i', $useragent)){ 553 $link="http://links.sourceforge.net/"; 554 $title=detect_browser_version("Links"); 555 $code="links"; 556 }elseif(preg_match('/Lobo/i', $useragent)){ 557 $link="http://www.lobobrowser.org/"; 558 $title=detect_browser_version("Lobo"); 559 $code="lobo"; 560 }elseif(preg_match('/lolifox/i', $useragent)){ 561 $link="http://www.lolifox.com/"; 562 $title=detect_browser_version("lolifox"); 563 $code="lolifox"; 564 }elseif(preg_match('/Lorentz/i', $useragent)){ 565 $link="http://news.softpedia.com/news/Firefox-Codenamed-Lorentz-Drops-in-March-2010-130855.shtml"; 566 $title=detect_browser_version("Lorentz"); 567 $code="firefoxdevpre"; 568 }elseif(preg_match('/Lunascape/i', $useragent)){ 569 $link="http://www.lunascape.tv"; 570 $title=detect_browser_version("Lunascape"); 571 $code="lunascape"; 572 }elseif(preg_match('/Lynx/i', $useragent)){ 573 $link="http://lynx.browser.org/"; 574 $title=detect_browser_version("Lynx"); 575 $code="lynx"; 576 }elseif(preg_match('/Madfox/i', $useragent)){ 577 $link="http://en.wikipedia.org/wiki/Madfox"; 578 $title=detect_browser_version("Madfox"); 579 $code="madfox"; 580 }elseif(preg_match('/Maemo\ Browser/i', $useragent)){ 581 $link="http://maemo.nokia.com/features/maemo-browser/"; 582 $title=detect_browser_version("Maemo Browser"); 583 $code="maemo"; 584 }elseif(preg_match('/Maxthon/i', $useragent)){ 585 $link="http://www.maxthon.com/"; 586 $title=detect_browser_version("Maxthon"); 587 $code="maxthon"; 588 }elseif(preg_match('/\ MIB\//i', $useragent)){ 589 $link="http://www.motorola.com/content.jsp?globalObjectId=1827-4343"; 590 $title=detect_browser_version("MIB"); 591 $code="mib"; 592 }elseif(preg_match('/Tablet\ browser/i', $useragent)){ 593 $link="http://browser.garage.maemo.org/"; 594 $title=detect_browser_version("Tablet browser"); 595 $code="microb"; 596 }elseif(preg_match('/Midori/i', $useragent)){ 597 $link="http://www.twotoasts.de/index.php?/pages/midori_summary.html"; 598 $title=detect_browser_version("Midori"); 599 $code="midori"; 600 }elseif(preg_match('/Minefield/i', $useragent)){ 601 $link="http://www.mozilla.org/projects/minefield/"; 602 $title=detect_browser_version("Minefield"); 603 $code="minefield"; 604 }elseif(preg_match('/MiniBrowser/i', $useragent)){ 605 $link="http://dmkho.tripod.com/"; 606 $title=detect_browser_version("MiniBrowser"); 607 $code="minibrowser"; 608 }elseif(preg_match('/Minimo/i', $useragent)){ 609 $link="http://www-archive.mozilla.org/projects/minimo/"; 610 $title=detect_browser_version("Minimo"); 611 $code="minimo"; 612 }elseif(preg_match('/Mosaic/i', $useragent)){ 613 $link="http://en.wikipedia.org/wiki/Mosaic_(web_browser)"; 614 $title=detect_browser_version("Mosaic"); 615 $code="mosaic"; 616 }elseif(preg_match('/MozillaDeveloperPreview/i', $useragent)){ 617 $link="http://www.mozilla.org/projects/devpreview/releasenotes/"; 618 $title=detect_browser_version("MozillaDeveloperPreview"); 619 $code="firefoxdevpre"; 620 }elseif(preg_match('/Multi-Browser/i', $useragent)){ 621 $link="http://www.multibrowser.de/"; 622 $title=detect_browser_version("Multi-Browser"); 623 $code="multi-browserxp"; 624 }elseif(preg_match('/MultiZilla/i', $useragent)){ 625 $link="http://multizilla.mozdev.org/"; 626 $title=detect_browser_version("MultiZilla"); 627 $code="mozilla"; 628 }elseif(preg_match('/myibrow/i', $useragent) && preg_match('/My\ Internet\ Browser/i', $useragent)){ 629 $link="http://myinternetbrowser.webove-stranky.org/"; 630 $title=detect_browser_version("myibrow"); 631 $code="my-internet-browser"; 632 }elseif(preg_match('/MyIE2/i', $useragent)){ 633 $link="http://www.myie2.com/"; 634 $title=detect_browser_version("MyIE2"); 635 $code="myie2"; 636 }elseif(preg_match('/Namoroka/i', $useragent)){ 637 $link="https://wiki.mozilla.org/Firefox/Namoroka"; 638 $title=detect_browser_version("Namoroka"); 639 $code="firefoxdevpre"; 640 }elseif(preg_match('/Navigator/i', $useragent)){ 641 $link="http://netscape.aol.com/"; 642 $title="Netscape ".detect_browser_version("Navigator"); 643 $code="netscape"; 644 }elseif(preg_match('/NetBox/i', $useragent)){ 645 $link="http://www.netgem.com/"; 646 $title=detect_browser_version("NetBox"); 647 $code="netbox"; 648 }elseif(preg_match('/NetCaptor/i', $useragent)){ 649 $link="http://www.netcaptor.com/"; 650 $title=detect_browser_version("NetCaptor"); 651 $code="netcaptor"; 652 }elseif(preg_match('/NetFront/i', $useragent)){ 653 $link="http://www.access-company.com/"; 654 $title=detect_browser_version("NetFront"); 655 $code="netfront"; 656 }elseif(preg_match('/NetNewsWire/i', $useragent)){ 657 $link="http://www.newsgator.com/individuals/netnewswire/"; 658 $title=detect_browser_version("NetNewsWire"); 659 $code="netnewswire"; 660 }elseif(preg_match('/NetPositive/i', $useragent)){ 661 $link="http://en.wikipedia.org/wiki/NetPositive"; 662 $title=detect_browser_version("NetPositive"); 663 $code="netpositive"; 664 }elseif(preg_match('/Netscape/i', $useragent)){ 665 $link="http://netscape.aol.com/"; 666 $title=detect_browser_version("Netscape"); 667 $code="netscape"; 668 }elseif(preg_match('/NetSurf/i', $useragent)){ 669 $link="http://www.netsurf-browser.org/"; 670 $title=detect_browser_version("NetSurf"); 671 $code="netsurf"; 672 }elseif(preg_match('/NF-Browser/i', $useragent)){ 673 $link="http://www.access-company.com/"; 674 $title=detect_browser_version("NF-Browser"); 675 $code="netfront"; 676 }elseif(preg_match('/NokiaBrowser/i', $useragent)){ 677 $link="http://browser.nokia.com/"; 678 $title="Nokia ".detect_browser_version("Browser"); 679 $code="nokia"; 680 }elseif(preg_match('/Novarra-Vision/i', $useragent)){ 681 $link="http://www.novarra.com/"; 682 $title="Novarra ".detect_browser_version("Vision"); 683 $code="novarra"; 684 }elseif(preg_match('/Obigo/i', $useragent)){ 685 $link="http://en.wikipedia.org/wiki/Obigo_Browser"; 686 $title=detect_browser_version("Obigo"); 687 $code="obigo"; 688 }elseif(preg_match('/OffByOne/i', $useragent)){ 689 $link="http://www.offbyone.com/"; 690 $title="Off By One"; 691 $code="offbyone"; 692 }elseif(preg_match('/OmniWeb/i', $useragent)){ 693 $link="http://www.omnigroup.com/applications/omniweb/"; 694 $title=detect_browser_version("OmniWeb"); 695 $code="omniweb"; 696 }elseif(preg_match('/Opera Mini/i', $useragent)){ 697 $link="http://www.opera.com/mini/"; 698 $title=detect_browser_version("Opera Mini"); 699 $code="opera-2"; 700 }elseif(preg_match('/Opera Mobi/i', $useragent)){ 701 $link="http://www.opera.com/mobile/"; 702 $title=detect_browser_version("Opera Mobi"); 703 $code="opera-2"; 704 }elseif(preg_match('/Opera Labs/i', $useragent) || (preg_match('/Opera/i', $useragent) && preg_match('/Edition Labs/i', $useragent))){ 705 $link="http://labs.opera.com/"; 706 $title=detect_browser_version("Opera Labs"); 707 $code="opera-next"; 708 }elseif(preg_match('/Opera Next/i', $useragent) || (preg_match('/Opera/i', $useragent) && preg_match('/Edition Next/i', $useragent))){ 709 $link="http://www.opera.com/support/kb/view/991/"; 710 $title=detect_browser_version("Opera Next"); 711 $code="opera-next"; 712 }elseif(preg_match('/Opera/i', $useragent)){ 713 $link="http://www.opera.com/"; 714 $title=detect_browser_version("Opera"); 715 $code="opera-1"; 716 if(preg_match('/Version/i', $useragent)) 717 $code="opera-2"; 718 }elseif(preg_match('/Orca/i', $useragent)){ 719 $link="http://www.orcabrowser.com/"; 720 $title=detect_browser_version("Orca"); 721 $code="orca"; 722 }elseif(preg_match('/Oregano/i', $useragent)){ 723 $link="http://en.wikipedia.org/wiki/Oregano_(web_browser)"; 724 $title=detect_browser_version("Oregano"); 725 $code="oregano"; 726 }elseif(preg_match('/Origyn\ Web\ Browser/i', $useragent)){ 727 $link="http://www.sand-labs.org/owb"; 728 $title="Oregano Web Browser"; 729 $code="owb"; 730 }elseif(preg_match('/osb-browser/i', $useragent)){ 731 $link="http://gtk-webcore.sourceforge.net/"; 732 $title=detect_browser_version("osb-browser"); 733 $code="null"; 734 }elseif(preg_match('/\ Pre\//i', $useragent)){ 735 $link="http://www.palm.com/us/products/phones/pre/index.html"; 736 $title="Palm ".detect_browser_version("Pre"); 737 $code="palmpre"; 738 }elseif(preg_match('/Palemoon/i', $useragent)){ 739 $link="http://www.palemoon.org/"; 740 $title="Pale ".detect_browser_version("Moon"); 741 $code="palemoon"; 742 }elseif(preg_match('/Patriott\:\:Browser/i', $useragent)){ 743 $link="http://madgroup.x10.mx/patriott1.php"; 744 $title="Patriott ".detect_browser_version("Browser"); 745 $code="patriott"; 746 }elseif(preg_match('/Phaseout/i', $useragent)){ 747 $link="http://www.phaseout.net/"; 748 $title="Phaseout"; 749 $code="phaseout"; 750 }elseif(preg_match('/Phoenix/i', $useragent)){ 751 $link="http://www.mozilla.org/projects/phoenix/phoenix-release-notes.html"; 752 $title=detect_browser_version("Phoenix"); 753 $code="phoenix"; 754 }elseif(preg_match('/Podkicker/i', $useragent)){ 755 $link="http://www.podkicker.com/"; 756 $title=detect_browser_version("Podkicker"); 757 $code="podkicker"; 758 }elseif(preg_match('/Podkicker\ Pro/i', $useragent)){ 759 $link="http://www.podkicker.com/"; 760 $title=detect_browser_version("Podkicker Pro"); 761 $code="podkicker"; 762 }elseif(preg_match('/Pogo/i', $useragent)){ 763 $link="http://en.wikipedia.org/wiki/AT%26T_Pogo"; 764 $title=detect_browser_version("Pogo"); 765 $code="pogo"; 766 }elseif(preg_match('/Polaris/i', $useragent)){ 767 $link="http://www.infraware.co.kr/eng/01_product/product02.asp"; 768 $title=detect_browser_version("Polaris"); 769 $code="polaris"; 770 }elseif(preg_match('/Prism/i', $useragent)){ 771 $link="http://prism.mozillalabs.com/"; 772 $title=detect_browser_version("Prism"); 773 $code="prism"; 774 }elseif(preg_match('/QtWeb\ Internet\ Browser/i', $useragent)){ 775 $link="http://www.qtweb.net/"; 776 $title="QtWeb Internet ".detect_browser_version("Browser"); 777 $code="qtwebinternetbrowser"; 778 }elseif(preg_match('/QupZilla/i', $useragent)){ 779 $link="http://www.qupzilla.com/"; 780 $title=detect_browser_version("QupZilla"); 781 $code="qupzilla"; 782 }elseif(preg_match('/rekonq/i', $useragent)){ 783 $link="http://rekonq.sourceforge.net/"; 784 $title="rekonq"; 785 $code="rekonq"; 786 }elseif(preg_match('/retawq/i', $useragent)){ 787 $link="http://retawq.sourceforge.net/"; 788 $title=detect_browser_version("retawq"); 789 $code="terminal"; 790 }elseif(preg_match('/RockMelt/i', $useragent)){ 791 $link="http://www.rockmelt.com/"; 792 $title=detect_browser_version("RockMelt"); 793 $code="rockmelt"; 794 }elseif(preg_match('/SaaYaa/i', $useragent)){ 795 $link="http://www.saayaa.com/"; 796 $title="SaaYaa Explorer"; 797 $code="saayaa"; 798 }elseif(preg_match('/SeaMonkey/i', $useragent)){ 799 $link="http://www.seamonkey-project.org/"; 800 $title=detect_browser_version("SeaMonkey"); 801 $code="seamonkey"; 802 }elseif(preg_match('/SEMC-Browser/i', $useragent)){ 803 $link="http://www.sonyericsson.com/"; 804 $title=detect_browser_version("SEMC-Browser"); 805 $code="semcbrowser"; 806 }elseif(preg_match('/SEMC-java/i', $useragent)){ 807 $link="http://www.sonyericsson.com/"; 808 $title=detect_browser_version("SEMC-java"); 809 $code="semcbrowser"; 810 }elseif(preg_match('/Series60/i', $useragent) && !preg_match('/Symbian/i', $useragent)){ 811 $link="http://en.wikipedia.org/wiki/Web_Browser_for_S60"; 812 $title="Nokia ".detect_browser_version("Series60"); 813 $code="s60"; 814 }elseif(preg_match('/S60/i', $useragent) && !preg_match('/Symbian/i', $useragent)){ 815 $link="http://en.wikipedia.org/wiki/Web_Browser_for_S60"; 816 $title="Nokia ".detect_browser_version("S60"); 817 $code="s60"; 818 }elseif(preg_match('/SE\ /i', $useragent) && preg_match('/MetaSr/i', $useragent)){ 819 $link="http://ie.sogou.com/"; 820 $title="Sogou Explorer"; 821 $code="sogou"; 822 }elseif(preg_match('/Shiira/i', $useragent)){ 823 $link="http://www.shiira.jp/en.php"; 824 $title=detect_browser_version("Shiira"); 825 $code="shiira"; 826 }elseif(preg_match('/Shiretoko/i', $useragent)){ 827 $link="http://www.mozilla.org/"; 828 $title=detect_browser_version("Shiretoko"); 829 $code="firefoxdevpre"; 830 }elseif(preg_match('/SiteKiosk/i', $useragent)){ 831 $link="http://www.sitekiosk.com/SiteKiosk/Default.aspx"; 832 $title=detect_browser_version("SiteKiosk"); 833 $code="sitekiosk"; 834 }elseif(preg_match('/SkipStone/i', $useragent)){ 835 $link="http://www.muhri.net/skipstone/"; 836 $title=detect_browser_version("SkipStone"); 837 $code="skipstone"; 838 }elseif(preg_match('/Skyfire/i', $useragent)){ 839 $link="http://www.skyfire.com/"; 840 $title=detect_browser_version("Skyfire"); 841 $code="skyfire"; 842 }elseif(preg_match('/Sleipnir/i', $useragent)){ 843 $link="http://www.fenrir-inc.com/other/sleipnir/"; 844 $title=detect_browser_version("Sleipnir"); 845 $code="sleipnir"; 846 }elseif(preg_match('/SlimBrowser/i', $useragent)){ 847 $link="http://www.flashpeak.com/sbrowser/"; 848 $title=detect_browser_version("SlimBrowser"); 849 $code="slimbrowser"; 850 }elseif(preg_match('/SmartTV/i', $useragent)){ 851 $link="http://www.freethetvchallenge.com/details/faq"; 852 $title=detect_browser_version("SmartTV"); 853 $code="maplebrowser"; 854 }elseif(preg_match('/Songbird/i', $useragent)){ 855 $link="http://www.getsongbird.com/"; 856 $title=detect_browser_version("Songbird"); 857 $code="songbird"; 858 }elseif(preg_match('/Stainless/i', $useragent)){ 859 $link="http://www.stainlessapp.com/"; 860 $title=detect_browser_version("Stainless"); 861 $code="stainless"; 862 }elseif(preg_match('/Sulfur/i', $useragent)){ 863 $link="http://www.flock.com/"; 864 $title="Flock ".detect_browser_version("Sulfur"); 865 $code="flock"; 866 }elseif(preg_match('/Sundance/i', $useragent)){ 867 $link="http://digola.com/sundance.html"; 868 $title=detect_browser_version("Sundance"); 869 $code="sundance"; 870 }elseif(preg_match('/Sunrise/i', $useragent)){ 871 $link="http://www.sundialbrowser.com/"; 872 $title=detect_browser_version("Sundial"); 873 $code="sundial"; 874 }elseif(preg_match('/Sunrise/i', $useragent)){ 875 $link="http://www.sunrisebrowser.com/"; 876 $title=detect_browser_version("Sunrise"); 877 $code="sunrise"; 878 }elseif(preg_match('/Surf/i', $useragent)){ 879 $link="http://surf.suckless.org/"; 880 $title=detect_browser_version("Surf"); 881 $code="surf"; 882 }elseif(preg_match('/Swiftfox/i', $useragent)){ 883 $link="http://www.getswiftfox.com/"; 884 $title=detect_browser_version("Swiftfox"); 885 $code="swiftfox"; 886 }elseif(preg_match('/Swiftweasel/i', $useragent)){ 887 $link="http://swiftweasel.tuxfamily.org/"; 888 $title=detect_browser_version("Swiftweasel"); 889 $code="swiftweasel"; 890 }elseif(preg_match('/Sylera/i', $useragent)){ 891 $link="http://dombla.net/sylera/"; 892 $title=detect_browser_version("Sylera"); 893 $code="null"; 894 }elseif(preg_match('/tear/i', $useragent)){ 895 $link="http://wiki.maemo.org/Tear"; 896 $title="Tear"; 897 $code="tear"; 898 }elseif(preg_match('/TeaShark/i', $useragent)){ 899 $link="http://www.teashark.com/"; 900 $title=detect_browser_version("TeaShark"); 901 $code="teashark"; 902 }elseif(preg_match('/Teleca/i', $useragent)){ 903 $link="http://en.wikipedia.org/wiki/Obigo_Browser/"; 904 $title=detect_browser_version(" Teleca"); 905 $code="obigo"; 906 }elseif(preg_match('/TencentTraveler/i', $useragent)){ 907 $link="http://www.tencent.com/en-us/index.shtml"; 908 $title="Tencent ".detect_browser_version("Traveler"); 909 $code="tencenttraveler"; 910 }elseif(preg_match('/TenFourFox/i', $useragent)){ 911 $link="http://en.wikipedia.org/wiki/TenFourFox"; 912 $title=detect_browser_version("TenFourFox"); 913 $code="tenfourfox"; 914 }elseif(preg_match('/TheWorld/i', $useragent)){ 915 $link="http://www.ioage.com/"; 916 $title="TheWorld Browser"; 917 $code="theworld"; 918 }elseif(preg_match('/Thunderbird/i', $useragent)){ 919 $link="http://www.mozilla.com/thunderbird/"; 920 $title=detect_browser_version("Thunderbird"); 921 $code="thunderbird"; 922 }elseif(preg_match('/Tizen/i', $useragent)){ 923 $link="https://www.tizen.org/"; 924 $title=detect_browser_version("Tizen"); 925 $code="tizen"; 926 }elseif(preg_match('/Tjusig/i', $useragent)){ 927 $link="http://www.tjusig.cz/"; 928 $title=detect_browser_version("Tjusig"); 929 $code="tjusig"; 930 }elseif(preg_match('/TencentTraveler/i', $useragent)){ 931 $link="http://tt.qq.com/"; 932 $title=detect_browser_version("TencentTraveler"); 933 $code="tt-explorer"; 934 }elseif(preg_match('/uBrowser/i', $useragent)){ 935 $link="http://www.ubrowser.com/"; 936 $title=detect_browser_version("uBrowser"); 937 $code="ubrowser"; 938 }elseif(preg_match('/UC\ Browser/i', $useragent)){ 939 $link="http://www.uc.cn/English/index.shtml"; 940 $title=detect_browser_version("UC Browser"); 941 $code="ucbrowser"; 942 }elseif(preg_match('/UCWEB/i', $useragent)){ 943 $link="http://www.ucweb.com/English/product.shtml"; 944 $title=detect_browser_version("UCWEB"); 945 $code="ucweb"; 946 }elseif(preg_match('/UltraBrowser/i', $useragent)){ 947 $link="http://www.ultrabrowser.com/"; 948 $title=detect_browser_version("UltraBrowser"); 949 $code="ultrabrowser"; 950 }elseif(preg_match('/UP.Browser/i', $useragent)){ 951 $link="http://www.openwave.com/"; 952 $title=detect_browser_version("UP.Browser"); 953 $code="openwave"; 954 }elseif(preg_match('/UP.Link/i', $useragent)){ 955 $link="http://www.openwave.com/"; 956 $title=detect_browser_version("UP.Link"); 957 $code="openwave"; 958 }elseif(preg_match('/Usejump/i', $useragent)){ 959 $link="http://www.usejump.com/"; 960 $title=detect_browser_version("Usejump"); 961 $code="usejump"; 962 }elseif(preg_match('/uZardWeb/i', $useragent)){ 963 $link="http://en.wikipedia.org/wiki/UZard_Web"; 964 $title=detect_browser_version("uZardWeb"); 965 $code="uzardweb"; 966 }elseif(preg_match('/uZard/i', $useragent)){ 967 $link="http://en.wikipedia.org/wiki/UZard_Web"; 968 $title=detect_browser_version("uZard"); 969 $code="uzardweb"; 970 }elseif(preg_match('/uzbl/i', $useragent)){ 971 $link="http://www.uzbl.org/"; 972 $title="uzbl"; 973 $code="uzbl"; 974 }elseif(preg_match('/Vimprobable/i', $useragent)){ 975 $link="http://www.vimprobable.org/"; 976 $title=detect_browser_version("Vimprobable"); 977 $code="null"; 978 }elseif(preg_match('/Vonkeror/i', $useragent)){ 979 $link="http://zzo38computer.cjb.net/vonkeror/"; 980 $title=detect_browser_version("Vonkeror"); 981 $code="null"; 982 }elseif(preg_match('/w3m/i', $useragent)){ 983 $link="http://w3m.sourceforge.net/"; 984 $title=detect_browser_version("W3M"); 985 $code="w3m"; 986 }elseif(preg_match('/AppleWebkit/i', $useragent) && preg_match('/Android/i', $useragent)){ 987 $link="http://developer.android.com/reference/android/webkit/package-summary.html"; 988 $title=detect_browser_version("Android Webkit"); 989 $code="android-webkit"; 990 }elseif(preg_match('/WebianShell/i', $useragent)){ 991 $link="http://webian.org/shell/"; 992 $title="Webian ".detect_browser_version("Shell"); 993 $code="webianshell"; 994 }elseif(preg_match('/Webrender/i', $useragent)){ 995 $link="http://webrender.99k.org/"; 996 $title="Webrender"; 997 $code="webrender"; 998 }elseif(preg_match('/WeltweitimnetzBrowser/i', $useragent)){ 999 $link="http://weltweitimnetz.de/software/Browser.en.page"; 1000 $title="Weltweitimnetz ".detect_browser_version("Browser"); 1001 $code="weltweitimnetzbrowser"; 1002 }elseif(preg_match('/wKiosk/i', $useragent)){ 1003 $link="http://www.app4mac.com/store/index.php?target=products&product_id=9"; 1004 $title="wKiosk"; 1005 $code="wkiosk"; 1006 }elseif(preg_match('/WorldWideWeb/i', $useragent)){ 1007 $link="http://www.w3.org/People/Berners-Lee/WorldWideWeb.html"; 1008 $title=detect_browser_version("WorldWideWeb"); 1009 $code="worldwideweb"; 1010 }elseif(preg_match('/wp-android/i', $useragent)){ 1011 $link="http://android.wordpress.org/"; 1012 $title=detect_browser_version("wp-android"); 1013 $code="wordpress"; 1014 }elseif(preg_match('/wp-blackberry/i', $useragent)){ 1015 $link="http://blackberry.wordpress.org/"; 1016 $title=detect_browser_version("wp-blackberry"); 1017 $code="wordpress"; 1018 }elseif(preg_match('/wp-iphone/i', $useragent)){ 1019 $link="http://ios.wordpress.org/"; 1020 $title=detect_browser_version("wp-iphone"); 1021 $code="wordpress"; 1022 }elseif(preg_match('/wp-nokia/i', $useragent)){ 1023 $link="http://nokia.wordpress.org/"; 1024 $title=detect_browser_version("wp-nokia"); 1025 $code="wordpress"; 1026 }elseif(preg_match('/wp-webos/i', $useragent)){ 1027 $link="http://webos.wordpress.org/"; 1028 $title=detect_browser_version("wp-webos"); 1029 $code="wordpress"; 1030 }elseif(preg_match('/wp-windowsphone/i', $useragent)){ 1031 $link="http://windowsphone.wordpress.org/"; 1032 $title=detect_browser_version("wp-windowsphone"); 1033 $code="wordpress"; 1034 }elseif(preg_match('/Wyzo/i', $useragent)){ 1035 $link="http://www.wyzo.com/"; 1036 $title=detect_browser_version("Wyzo"); 1037 $code="Wyzo"; 1038 }elseif(preg_match('/X-Smiles/i', $useragent)){ 1039 $link="http://www.xsmiles.org/"; 1040 $title=detect_browser_version("X-Smiles"); 1041 $code="x-smiles"; 1042 }elseif(preg_match('/Xiino/i', $useragent)){ 1043 $link="#"; 1044 $title=detect_browser_version("Xiino"); 1045 $code="null"; 1046 }elseif(preg_match('/ZipZap/i', $useragent)){ 1047 $link="http://www.zipzaphome.com/"; 1048 $title=detect_browser_version("ZipZap"); 1049 $code="zipzap"; 1050 1051 //Pulled out of order to help ensure better detection for above browsers 1052 }elseif(preg_match('/ABrowse/i', $useragent)){ 1053 $link="http://abrowse.sourceforge.net/"; 1054 $title=detect_browser_version("ABrowse"); 1055 $code="abrowse"; 1056 }elseif(preg_match('/Chrome/i', $useragent)){ 1057 $link="http://google.com/chrome/"; 1058 $title="Google ".detect_browser_version("Chrome"); 1059 $code="chrome"; 1060 }elseif(preg_match('/Safari/i', $useragent) && !preg_match('/Nokia/i', $useragent)){ 1061 $link="http://www.apple.com/safari/"; 1062 $title="Safari"; 1063 if(preg_match('/Version/i', $useragent)) 1064 $title=detect_browser_version("Safari"); 1065 if(preg_match('/Mobile Safari/i', $useragent)) 1066 $title="Mobile ".$title; 1067 $code="safari"; 1068 }elseif(preg_match('/Nokia/i', $useragent)){ 1069 $link="http://www.nokia.com/browser"; 1070 $title="Nokia Web Browser"; 1071 $code="maemo"; 1072 }elseif(preg_match('/Firefox/i', $useragent)){ 1073 $link="http://www.mozilla.org/"; 1074 $title=detect_browser_version("Firefox"); 1075 $code="firefox"; 1076 }elseif(preg_match('/MSIE/i', $useragent)){ 1077 $link="http://www.microsoft.com/windows/products/winfamily/ie/default.mspx"; 1078 $title="Internet Explorer".detect_browser_version("MSIE"); 1079 preg_match('/MSIE[\ |\/]?([.0-9a-zA-Z]+)/i', $useragent, $regmatch); 1080 if($regmatch[1]>=9){ 1081 $code="msie9"; 1082 }elseif($regmatch[1]>=7){ 1083 //also ie8 1084 $code="msie7"; 1085 }elseif($regmatch[1]>=6){ 1086 $code="msie6"; 1087 }elseif($regmatch[1]>=4){ 1088 //also ie5 1089 $code="msie4"; 1090 }elseif($regmatch[1]>=3){ 1091 $code="msie3"; 1092 }elseif($regmatch[1]>=2){ 1093 $code="msie2"; 1094 }elseif($regmatch[1]>=1){ 1095 $code="msie1"; 1096 }else{ 1097 $code="msie"; 1098 } 1099 }elseif(preg_match('/Mozilla/i', $useragent)){ 1100 $link="http://www.mozilla.org/"; 1101 $title="Mozilla Compatible"; 1102 if(preg_match('/rv:([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1103 $title="Mozilla ".$regmatch[1]; 1104 $code="mozilla"; 1105 }else{ 1106 $link="#"; 1107 $title="Unknown"; 1108 $code="null"; 1109 if($ua_hide_unknown_bool=='true' && $ua_show_text==2) 1110 return $title; 1111 } 1112 if($ua_show_text=="1" && $ua_text_links!="0") //image and linked text 1113 $web_browser=img($code, "/net/", $title)." <a href='".$link."' title='".$title."' rel='nofollow'>".$title."</a>"; 1114 else if($ua_show_text=="1") //image and text 1115 $web_browser=img($code, "/net/", $title)." ".$title; 1116 else if($ua_show_text=="2") //image only 1117 $web_browser=img($code, "/net/", $title); 1118 else if($ua_show_text=="3" && $ua_text_links!="0") //linked text only 1119 $web_browser="<a href='".$link."' title='".$title."' rel='nofollow'>".$title."</a>"; 1120 else if($ua_show_text=="3") //text only 1121 $web_browser=$title; 1122 return $web_browser; 1123 } 1124 1125 //Detect Console or Mobile Device 1126 function detect_device(){ 1127 global $useragent, $ua_show_text, $ua_text_links; 1128 1129 //Apple 1130 if(preg_match('/iPad/i', $useragent)){ 1131 $link="http://www.apple.com/itunes"; 1132 $title="iPad"; 1133 if(preg_match('/CPU\ OS\ ([._0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1134 $title.=" iOS ".str_replace("_", ".", $regmatch[1]); 1135 $code="ipad"; 1136 }elseif(preg_match('/iPod/i', $useragent)){ 1137 $link="http://www.apple.com/itunes"; 1138 $title="iPod"; 1139 if(preg_match('/iPhone\ OS\ ([._0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1140 $title.=" iOS ".str_replace("_", ".", $regmatch[1]); 1141 $code="iphone"; 1142 }elseif(preg_match('/iPhone/i', $useragent)){ 1143 $link="http://www.apple.com/iphone"; 1144 $title="iPhone"; 1145 if(preg_match('/iPhone\ OS\ ([._0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1146 $title.=" iOS ".str_replace("_", ".", $regmatch[1]); 1147 $code="iphone"; 1148 1149 //BenQ-Siemens (Openwave) 1150 }elseif(preg_match('/[^M]SIE/i', $useragent)){ 1151 $link="http://en.wikipedia.org/wiki/BenQ-Siemens"; 1152 $title="BenQ-Siemens"; 1153 if(preg_match('/[^M]SIE-([.0-9a-zA-Z]+)\//i', $useragent, $regmatch)) 1154 $title.=" ".$regmatch[1]; 1155 $code="benq-siemens"; 1156 1157 //BlackBerry 1158 }elseif(preg_match('/BlackBerry/i', $useragent)){ 1159 $link="http://www.blackberry.com/"; 1160 $title="BlackBerry"; 1161 if(preg_match('/blackberry([.0-9a-zA-Z]+)\//i', $useragent, $regmatch)) 1162 $title.=" ".$regmatch[1]; 1163 $code="blackberry"; 1164 1165 //Dell 1166 }elseif(preg_match('/Dell Mini 5/i', $useragent)){ 1167 $link="http://en.wikipedia.org/wiki/Dell_Streak"; 1168 $title="Dell Mini 5"; 1169 $code="dell"; 1170 }elseif(preg_match('/Dell Streak/i', $useragent)){ 1171 $link="http://en.wikipedia.org/wiki/Dell_Streak"; 1172 $title="Dell Streak"; 1173 $code="dell"; 1174 }elseif(preg_match('/Dell/i', $useragent)){ 1175 $link="http://en.wikipedia.org/wiki/Dell"; 1176 $title="Dell"; 1177 $code="dell"; 1178 1179 //Google 1180 }elseif(preg_match('/Nexus One/i', $useragent)){ 1181 $link="http://en.wikipedia.org/wiki/Nexus_One"; 1182 $title="Nexus One"; 1183 $code="google-nexusone"; 1184 1185 //HTC 1186 }elseif(preg_match('/Desire/i', $useragent)){ 1187 $link="http://en.wikipedia.org/wiki/HTC_Desire"; 1188 $title="HTC Desire"; 1189 $code="htc"; 1190 }elseif(preg_match('/Rhodium/i', $useragent) || preg_match('/HTC[_|\ ]Touch[_|\ ]Pro2/i', $useragent) || preg_match('/WMD-50433/i', $useragent)){ 1191 $link="http://en.wikipedia.org/wiki/HTC_Touch_Pro2"; 1192 $title="HTC Touch Pro2"; 1193 $code="htc"; 1194 }elseif(preg_match('/HTC[_|\ ]Touch[_|\ ]Pro/i', $useragent)){ 1195 $link="http://en.wikipedia.org/wiki/HTC_Touch_Pro"; 1196 $title="HTC Touch Pro"; 1197 $code="htc"; 1198 }elseif(preg_match('/HTC/i', $useragent)){ 1199 $link="http://en.wikipedia.org/wiki/High_Tech_Computer_Corporation"; 1200 $title="HTC"; 1201 if(preg_match('/HTC[\ |_|-]8500/i', $useragent)){ 1202 $link="http://en.wikipedia.org/wiki/HTC_Startrek"; 1203 $title.=" Startrek"; 1204 }elseif(preg_match('/HTC[\ |_|-]Hero/i', $useragent)){ 1205 $link="http://en.wikipedia.org/wiki/HTC_Hero"; 1206 $title.=" Hero"; 1207 }elseif(preg_match('/HTC[\ |_|-]Legend/i', $useragent)){ 1208 $link="http://en.wikipedia.org/wiki/HTC_Legend"; 1209 $title.=" Legend"; 1210 }elseif(preg_match('/HTC[\ |_|-]Magic/i', $useragent)){ 1211 $link="http://en.wikipedia.org/wiki/HTC_Magic"; 1212 $title.=" Magic"; 1213 }elseif(preg_match('/HTC[\ |_|-]P3450/i', $useragent)){ 1214 $link="http://en.wikipedia.org/wiki/HTC_Touch"; 1215 $title.=" Touch"; 1216 }elseif(preg_match('/HTC[\ |_|-]P3650/i', $useragent)){ 1217 $link="http://en.wikipedia.org/wiki/HTC_Polaris"; 1218 $title.=" Polaris"; 1219 }elseif(preg_match('/HTC[\ |_|-]S710/i', $useragent)){ 1220 $link="http://en.wikipedia.org/wiki/HTC_S710"; 1221 $title.=" S710"; 1222 }elseif(preg_match('/HTC[\ |_|-]Tattoo/i', $useragent)){ 1223 $link="http://en.wikipedia.org/wiki/HTC_Tattoo"; 1224 $title.=" Tattoo"; 1225 }elseif(preg_match('/HTC[\ |_|-]?([.0-9a-zA-Z]+)/i', $useragent, $regmatch)){ 1226 $title.=" ".$regmatch[1]; 1227 }elseif(preg_match('/HTC([._0-9a-zA-Z]+)/i', $useragent, $regmatch)){ 1228 $title.=str_replace("_", " ", $regmatch[1]); 1229 } 1230 $code="htc"; 1231 1232 //Kindle 1233 }elseif(preg_match('/Kindle/i', $useragent)){ 1234 $link="http://en.wikipedia.org/wiki/Amazon_Kindle"; 1235 $title="Kindle"; 1236 if(preg_match('/Kindle\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1237 $title.=" ".$regmatch[1]; 1238 $code="kindle"; 1239 1240 //LG 1241 }elseif(preg_match('/LG/i', $useragent)){ 1242 $link="http://www.lgmobile.com"; 1243 $title="LG"; 1244 if(preg_match('/LG[E]?[\ |-|\/]([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1245 $title.=" ".$regmatch[1]; 1246 $code="lg"; 1247 1248 //Microsoft 1249 }elseif(preg_match('/Windows Phone OS 7.0/i', $useragent) || preg_match('/ZuneWP7/i', $useragent) || preg_match('/WP7/i', $useragent)){ 1250 $link="http://www.microsoft.com/windowsphone/"; 1251 $title.="Windows Phone 7"; 1252 $code="wp7"; 1253 1254 //Motorola 1255 }elseif(preg_match('/\ Droid/i', $useragent)){ 1256 $link="http://en.wikipedia.org/wiki/Motorola_Droid"; 1257 $title.="Motorola Droid"; 1258 $code="motorola"; 1259 }elseif(preg_match('/XT720/i', $useragent)){ 1260 $link="http://en.wikipedia.org/wiki/Motorola"; 1261 $title.="Motorola Motoroi (XT720)"; 1262 $code="motorola"; 1263 }elseif(preg_match('/MOT-/i', $useragent) || preg_match('/MIB/i', $useragent)){ 1264 $link="http://en.wikipedia.org/wiki/Motorola"; 1265 $title="Motorola"; 1266 if(preg_match('/MOTO([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1267 $title.=" ".$regmatch[1]; 1268 if(preg_match('/MOT-([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1269 $title.=" ".$regmatch[1]; 1270 $code="motorola"; 1271 }elseif(preg_match('/XOOM/i', $useragent)){ 1272 $link="http://en.wikipedia.org/wiki/Motorola_Xoom"; 1273 $title.="Motorola Xoom"; 1274 $code="motorola"; 1275 1276 //Nintendo 1277 }elseif(preg_match('/Nintendo/i', $useragent)){ 1278 $title="Nintendo"; 1279 if(preg_match('/Nintendo DSi/i', $useragent)){ 1280 $link="http://www.nintendodsi.com/"; 1281 $title.=" DSi"; 1282 $code="nintendodsi"; 1283 }elseif(preg_match('/Nintendo DS/i', $useragent)){ 1284 $link="http://www.nintendo.com/ds"; 1285 $title.=" DS"; 1286 $code="nintendods"; 1287 }elseif(preg_match('/Nintendo Wii/i', $useragent)){ 1288 $link="http://www.nintendo.com/wii"; 1289 $title.=" Wii"; 1290 $code="nintendowii"; 1291 }else{ 1292 $link="http://www.nintendo.com/"; 1293 $code="nintendo"; 1294 } 1295 1296 //Nokia 1297 }elseif(preg_match('/Nokia/i', $useragent) && !preg_match('/S(eries)?60/i', $useragent)){ 1298 $link="http://www.nokia.com/"; 1299 $title="Nokia"; 1300 if(preg_match('/Nokia(E|N)?([0-9]+)/i', $useragent, $regmatch)) 1301 $title.=" ".$regmatch[1].$regmatch[2]; 1302 $code="nokia"; 1303 }elseif(preg_match('/S(eries)?60/i', $useragent)){ 1304 $link="http://www.s60.com/"; 1305 $title="Nokia Series60"; 1306 $code="nokia"; 1307 1308 //OLPC (One Laptop Per Child) 1309 }elseif(preg_match('/OLPC/i', $useragent)){ 1310 $link="http://www.laptop.org/"; 1311 $title="OLPC (XO)"; 1312 $code="olpc"; 1313 1314 //Palm 1315 }elseif(preg_match('/\ Pixi\//i', $useragent)){ 1316 $link="http://en.wikipedia.org/wiki/Palm_Pixi"; 1317 $title="Palm Pixi"; 1318 $code="palm"; 1319 }elseif(preg_match('/\ Pre\//i', $useragent)){ 1320 $link="http://en.wikipedia.org/wiki/Palm_Pre"; 1321 $title="Palm Pre"; 1322 $code="palm"; 1323 }elseif(preg_match('/Palm/i', $useragent)){ 1324 $link="http://www.palm.com/"; 1325 $title="Palm"; 1326 $code="palm"; 1327 }elseif(preg_match('/wp-webos/i', $useragent)){ 1328 $link="http://www.palm.com/"; 1329 $title="Palm"; 1330 $code="palm"; 1331 1332 //Playstation 1333 }elseif(preg_match('/Playstation/i', $useragent)){ 1334 $title="Playstation"; 1335 if(preg_match('/[PS|Playstation\ ]3/i', $useragent)){ 1336 $link="http://www.us.playstation.com/PS3"; 1337 $title.=" 3"; 1338 }elseif(preg_match('/[Playstation Portable|PSP]/i', $useragent)){ 1339 $link="http://www.us.playstation.com/PSP"; 1340 $title.=" Portable"; 1341 }else{ 1342 $link="http://www.us.playstation.com/"; 1343 } 1344 $code="playstation"; 1345 1346 //Samsung 1347 }elseif(preg_match('/Galaxy Nexus/i', $useragent)){ 1348 $link="http://en.wikipedia.org/wiki/Galaxy_Nexus"; 1349 $title="Galaxy Nexus"; 1350 $code="samsung"; 1351 }elseif(preg_match('/SmartTV/i', $useragent)){ 1352 $link="http://www.freethetvchallenge.com/details/faq"; 1353 $title="Samsung Smart TV"; 1354 $code="samsung"; 1355 }elseif(preg_match('/Samsung/i', $useragent)){ 1356 $link="http://www.samsungmobile.com/"; 1357 $title="Samsung"; 1358 if(preg_match('/Samsung-([.\-0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1359 $title.=" ".$regmatch[1]; 1360 $code="samsung"; 1361 1362 //Sony Ericsson 1363 }elseif(preg_match('/SonyEricsson/i', $useragent)){ 1364 $link="http://en.wikipedia.org/wiki/SonyEricsson"; 1365 $title="SonyEricsson"; 1366 if(preg_match('/SonyEricsson([.0-9a-zA-Z]+)/i', $useragent, $regmatch)){ 1367 if(strtolower($regmatch[1])==strtolower("U20i")) 1368 $title.=" Xperia X10 Mini Pro"; 1369 else 1370 $title.=" ".$regmatch[1]; 1371 } 1372 $code="sonyericsson"; 1373 1374 //Windows Phone 1375 }elseif(preg_match('/wp-windowsphone/i', $useragent)){ 1376 $link="http://www.windowsphone.com/"; 1377 $title="Windows Phone"; 1378 $code="windowsphone"; 1379 1380 //No Device match 1381 }else{ 1382 return ""; 1383 } 1384 if($ua_show_text=="1" && $ua_text_links!="0") //image and linked text 1385 $detected_device=img($code, "/device/", $title)." <a href='".$link."' title='".$title."' rel='nofollow'>".$title."</a>"; 1386 else if($ua_show_text=="1") //image and text 1387 $detected_device=img($code, "/device/", $title)." ".$title; 1388 else if($ua_show_text=="2") //image only 1389 $detected_device=img($code, "/device/", $title); 1390 else if($ua_show_text=="3" && $ua_text_links!="0") //linked text only 1391 $detected_device="<a href='".$link."' title='".$title."' rel='nofollow'>".$title."</a>"; 1392 else if($ua_show_text=="3") //text only 1393 $detected_device=$title; 1394 return $detected_device; 1395 } 1396 1397 //Detect Operating System 1398 function detect_os(){ 1399 global $useragent, $ua_show_text, $ua_text_links; 1400 if(preg_match('/AmigaOS/i', $useragent)){ 1401 $link="http://en.wikipedia.org/wiki/AmigaOS"; 1402 $title="AmigaOS"; 1403 if(preg_match('/AmigaOS\ ([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1404 $title.=" ".$regmatch[1]; 1405 $code="amigaos"; 1406 if(preg_match('/x86_64/i', $useragent)) 1407 $title.=" x64"; 1408 }elseif(preg_match('/Android/i', $useragent)){ 1409 $link="http://www.android.com/"; 1410 $title="Android"; 1411 $code="android"; 1412 if(preg_match('/Android[\ |\/]?([.0-9a-zA-Z]+)/i', $useragent, $regmatch)){ 1413 $version=$regmatch[1]; 1414 $title.=" ".$version; 1415 } 1416 if(preg_match('/x86_64/i', $useragent)) 1417 $title.=" x64"; 1418 }elseif(preg_match('/[^A-Za-z]Arch/i', $useragent)) { //&& !preg_match('/Search/i', $useragent)){ 1419 $link="http://www.archlinux.org/"; 1420 $title="Arch Linux"; 1421 $code="archlinux"; 1422 if(preg_match('/x86_64/i', $useragent)) 1423 $title.=" x64"; 1424 }elseif(preg_match('/BeOS/i', $useragent)){ 1425 $link="http://en.wikipedia.org/wiki/BeOS"; 1426 $title="BeOS"; 1427 $code="beos"; 1428 if(preg_match('/x86_64/i', $useragent)) 1429 $title.=" x64"; 1430 }elseif(preg_match('/CentOS/i', $useragent)){ 1431 $link="http://www.centos.org/"; 1432 $title="CentOS"; 1433 if(preg_match('/.el([.0-9a-zA-Z]+).centos/i', $useragent, $regmatch)) 1434 $title.=" ".$regmatch[1]; 1435 $code="centos"; 1436 if(preg_match('/x86_64/i', $useragent)) 1437 $title.=" x64"; 1438 }elseif(preg_match('/Chakra/i', $useragent)){ 1439 $link="http://www.chakra-linux.org/"; 1440 $title="Chakra Linux"; 1441 $code="chakra"; 1442 if(preg_match('/x86_64/i', $useragent)) 1443 $title.=" x64"; 1444 }elseif(preg_match('/CrOS/i', $useragent)){ 1445 $link="http://en.wikipedia.org/wiki/Google_Chrome_OS"; 1446 $title="Google Chrome OS"; 1447 $code="chromeos"; 1448 if(preg_match('/x86_64/i', $useragent)) 1449 $title.=" x64"; 1450 }elseif(preg_match('/Crunchbang/i', $useragent)){ 1451 $link="http://www.crunchbanglinux.org/"; 1452 $title="Crunchbang"; 1453 $code="crunchbang"; 1454 if(preg_match('/x86_64/i', $useragent)) 1455 $title.=" x64"; 1456 }elseif(preg_match('/Debian/i', $useragent)){ 1457 $link="http://www.debian.org/"; 1458 $title="Debian GNU/Linux"; 1459 $code="debian"; 1460 if(preg_match('/x86_64/i', $useragent)) 1461 $title.=" x64"; 1462 }elseif(preg_match('/DragonFly/i', $useragent)){ 1463 $link="http://www.dragonflybsd.org/"; 1464 $title="DragonFly BSD"; 1465 $code="dragonflybsd"; 1466 if(preg_match('/x86_64/i', $useragent)) 1467 $title.=" x64"; 1468 }elseif(preg_match('/Edubuntu/i', $useragent)){ 1469 $link="http://www.edubuntu.org/"; 1470 $title="Edubuntu"; 1471 if(preg_match('/Edubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1472 $version.=" ".$regmatch[1]; 1473 if($regmatch[1] < 10) 1474 $code="edubuntu-1"; 1475 else 1476 $code="edubuntu-2"; 1477 if(strlen($version) > 1) 1478 $title.=$version; 1479 if(preg_match('/x86_64/i', $useragent)) 1480 $title.=" x64"; 1481 }elseif(preg_match('/Fedora/i', $useragent)){ 1482 $link="http://www.fedoraproject.org/"; 1483 $title="Fedora"; 1484 if(preg_match('/.fc([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1485 $title.=" ".$regmatch[1]; 1486 $code="fedora"; 1487 if(preg_match('/x86_64/i', $useragent)) 1488 $title.=" x64"; 1489 }elseif(preg_match('/Foresight\ Linux/i', $useragent)){ 1490 $link="http://www.foresightlinux.org/"; 1491 $title="Foresight Linux"; 1492 if(preg_match('/Foresight\ Linux\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1493 $title.=" ".$regmatch[1]; 1494 $code="foresight"; 1495 if(preg_match('/x86_64/i', $useragent)) 1496 $title.=" x64"; 1497 }elseif(preg_match('/FreeBSD/i', $useragent)){ 1498 $link="http://www.freebsd.org/"; 1499 $title="FreeBSD"; 1500 $code="freebsd"; 1501 if(preg_match('/x86_64/i', $useragent)) 1502 $title.=" x64"; 1503 }elseif(preg_match('/Gentoo/i', $useragent)){ 1504 $link="http://www.gentoo.org/"; 1505 $title="Gentoo"; 1506 $code="gentoo"; 1507 if(preg_match('/x86_64/i', $useragent)) 1508 $title.=" x64"; 1509 }elseif(preg_match('/Inferno/i', $useragent)){ 1510 $link="http://www.vitanuova.com/inferno/"; 1511 $title="Inferno"; 1512 $code="inferno"; 1513 if(preg_match('/x86_64/i', $useragent)) 1514 $title.=" x64"; 1515 }elseif(preg_match('/IRIX/i', $useragent)){ 1516 $link="http://www.sgi.com/partners/?/technology/irix/"; 1517 $title="IRIX Linux"; 1518 if(preg_match('/IRIX(64)?\ ([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) { 1519 if($regmatch[1]) 1520 $title.=" x".$regmatch[1]; 1521 if($regmatch[2]) 1522 $title.=" ".$regmatch[2]; 1523 } 1524 $code="irix"; 1525 if(preg_match('/x86_64/i', $useragent)) 1526 $title.=" x64"; 1527 }elseif(preg_match('/Kanotix/i', $useragent)){ 1528 $link="http://www.kanotix.com/"; 1529 $title="Kanotix"; 1530 $code="kanotix"; 1531 if(preg_match('/x86_64/i', $useragent)) 1532 $title.=" x64"; 1533 }elseif(preg_match('/Knoppix/i', $useragent)){ 1534 $link="http://www.knoppix.net/"; 1535 $title="Knoppix"; 1536 $code="knoppix"; 1537 if(preg_match('/x86_64/i', $useragent)) 1538 $title.=" x64"; 1539 }elseif(preg_match('/Kubuntu/i', $useragent)){ 1540 $link="http://www.kubuntu.org/"; 1541 $title="Kubuntu"; 1542 if(preg_match('/Kubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1543 $version.=" ".$regmatch[1]; 1544 if($regmatch[1] < 10) 1545 $code="kubuntu-1"; 1546 else 1547 $code="kubuntu-2"; 1548 if(strlen($version) > 1) 1549 $title.=$version; 1550 if(preg_match('/x86_64/i', $useragent)) 1551 $title.=" x64"; 1552 }elseif(preg_match('/LindowsOS/i', $useragent)){ 1553 $link="http://en.wikipedia.org/wiki/Lsongs"; 1554 $title="LindowsOS"; 1555 $code="lindowsos"; 1556 if(preg_match('/x86_64/i', $useragent)) 1557 $title.=" x64"; 1558 }elseif(preg_match('/Linspire/i', $useragent)){ 1559 $link="http://www.linspire.com/"; 1560 $title="Linspire"; 1561 $code="lindowsos"; 1562 if(preg_match('/x86_64/i', $useragent)) 1563 $title.=" x64"; 1564 }elseif(preg_match('/Linux\ Mint/i', $useragent)){ 1565 $link="http://www.linuxmint.com/"; 1566 $title="Linux Mint"; 1567 if(preg_match('/Linux\ Mint\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1568 $title.=" ".$regmatch[1]; 1569 $code="linuxmint"; 1570 if(preg_match('/x86_64/i', $useragent)) 1571 $title.=" x64"; 1572 }elseif(preg_match('/Lubuntu/i', $useragent)){ 1573 $link="http://www.lubuntu.net/"; 1574 $title="Lubuntu"; 1575 if(preg_match('/Lubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1576 $version.=" ".$regmatch[1]; 1577 if($regmatch[1] < 10) 1578 $code="lubuntu-1"; 1579 else 1580 $code="lubuntu-2"; 1581 if(strlen($version) > 1) 1582 $title.=$version; 1583 if(preg_match('/x86_64/i', $useragent)) 1584 $title.=" x64"; 1585 }elseif(preg_match('/Mac/i', $useragent) || preg_match('/Darwin/i', $useragent)){ 1586 $link="http://www.apple.com/macosx/"; 1587 if(preg_match('/Mac OS X/i', $useragent)){ 1588 $title=substr($useragent, strpos(strtolower($useragent), strtolower("Mac OS X"))); 1589 $title=substr($title, 0, strpos($title, ")")); 1590 if (strpos($title, ";")) 1591 $title=substr($title, 0, strpos($title, ";")); 1592 $title=str_replace("_", ".", $title); 1593 $code="mac-3"; 1594 }elseif(preg_match('/Mac OSX/i', $useragent)){ 1595 $title=substr($useragent, strpos(strtolower($useragent), strtolower("Mac OS X"))); 1596 $title=substr($title, 0, strpos($title, ")")); 1597 if (strpos($title, ";")) 1598 $title=substr($title, 0, strpos($title, ";")); 1599 $title=str_replace("_", ".", $title); 1600 $code="mac-2"; 1601 }elseif(preg_match('/Darwin/i', $useragent)){ 1602 $title="Mac OS Darwin"; 1603 $code="mac-1"; 1604 }else { 1605 $title="Macintosh"; 1606 $code="mac-1"; 1607 } 1608 }elseif(preg_match('/Mageia/i', $useragent)){ 1609 $link="http://www.mageia.org/"; 1610 $title="Mageia"; 1611 $code="mageia"; 1612 }elseif(preg_match('/Mandriva/i', $useragent)){ 1613 $link="http://www.mandriva.com/"; 1614 $title="Mandriva"; 1615 if(preg_match('/mdv([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1616 $title.=" ".$regmatch[1]; 1617 $code="mandriva"; 1618 if(preg_match('/x86_64/i', $useragent)) 1619 $title.=" x64"; 1620 }elseif(preg_match('/moonOS/i', $useragent)){ 1621 $link="http://www.moonos.org/"; 1622 $title="moonOS"; 1623 if(preg_match('/moonOS\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1624 $title.=" ".$regmatch[1]; 1625 $code="moonos"; 1626 if(preg_match('/x86_64/i', $useragent)) 1627 $title.=" x64"; 1628 }elseif(preg_match('/MorphOS/i', $useragent)){ 1629 $link="http://www.morphos-team.net/"; 1630 $title="MorphOS"; 1631 $code="morphos"; 1632 if(preg_match('/x86_64/i', $useragent)) 1633 $title.=" x64"; 1634 }elseif(preg_match('/NetBSD/i', $useragent)){ 1635 $link="http://www.netbsd.org/"; 1636 $title="NetBSD"; 1637 $code="netbsd"; 1638 if(preg_match('/x86_64/i', $useragent)) 1639 $title.=" x64"; 1640 }elseif(preg_match('/Nova/i', $useragent)){ 1641 $link="http://www.nova.cu"; 1642 $title="Nova"; 1643 if(preg_match('/Nova[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1644 $version.=" ".$regmatch[1]; 1645 if(strlen($version) > 1) 1646 $title.=$version; 1647 $code="nova"; 1648 if(preg_match('/x86_64/i', $useragent)) 1649 $title.=" x64"; 1650 }elseif(preg_match('/OpenBSD/i', $useragent)){ 1651 $link="http://www.openbsd.org/"; 1652 $title="OpenBSD"; 1653 $code="openbsd"; 1654 if(preg_match('/x86_64/i', $useragent)) 1655 $title.=" x64"; 1656 }elseif(preg_match('/Oracle/i', $useragent)){ 1657 $link="http://www.oracle.com/us/technologies/linux/"; 1658 $title="Oracle"; 1659 if(preg_match('/.el([._0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1660 $title.=" Enterprise Linux ".str_replace("_", ".", $regmatch[1]); 1661 else 1662 $title.=" Linux"; 1663 $code="oracle"; 1664 if(preg_match('/x86_64/i', $useragent)) 1665 $title.=" x64"; 1666 }elseif(preg_match('/Pardus/i', $useragent)){ 1667 $link="http://www.pardus.org.tr/en/"; 1668 $title="Pardus"; 1669 $code="pardus"; 1670 if(preg_match('/x86_64/i', $useragent)) 1671 $title.=" x64"; 1672 }elseif(preg_match('/PCLinuxOS/i', $useragent)){ 1673 $link="http://www.pclinuxos.com/"; 1674 $title="PCLinuxOS"; 1675 if(preg_match('/PCLinuxOS\/[.\-0-9a-zA-Z]+pclos([.\-0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1676 $title.=" ".str_replace("_", ".", $regmatch[1]); 1677 $code="pclinuxos"; 1678 if(preg_match('/x86_64/i', $useragent)) 1679 $title.=" x64"; 1680 }elseif(preg_match('/Red\ Hat/i', $useragent) || preg_match('/RedHat/i', $useragent)){ 1681 $link="http://www.redhat.com/"; 1682 $title="Red Hat"; 1683 if(preg_match('/.el([._0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1684 $title.=" Enterprise Linux ".str_replace("_", ".", $regmatch[1]); 1685 $code="red-hat"; 1686 if(preg_match('/x86_64/i', $useragent)) 1687 $title.=" x64"; 1688 }elseif(preg_match('/Rosa/i', $useragent)){ 1689 $link="http://www.rosalab.com/"; 1690 $title="Rosa Linux"; 1691 $code="rosa"; 1692 if(preg_match('/x86_64/i', $useragent)) 1693 $title.=" x64"; 1694 }elseif(preg_match('/Sabayon/i', $useragent)){ 1695 $link="http://www.sabayonlinux.org/"; 1696 $title="Sabayon Linux"; 1697 $code="sabayon"; 1698 if(preg_match('/x86_64/i', $useragent)) 1699 $title.=" x64"; 1700 }elseif(preg_match('/Slackware/i', $useragent)){ 1701 $link="http://www.slackware.com/"; 1702 $title="Slackware"; 1703 $code="slackware"; 1704 if(preg_match('/x86_64/i', $useragent)) 1705 $title.=" x64"; 1706 }elseif(preg_match('/Solaris/i', $useragent)){ 1707 $link="http://www.sun.com/software/solaris/"; 1708 $title="Solaris"; 1709 $code="solaris"; 1710 }elseif(preg_match('/SunOS/i', $useragent)){ 1711 $link="http://www.sun.com/software/solaris/"; 1712 $title="Solaris"; 1713 $code="solaris"; 1714 }elseif(preg_match('/Suse/i', $useragent)){ 1715 $link="http://www.opensuse.org/"; 1716 $title="openSUSE"; 1717 $code="suse"; 1718 if(preg_match('/x86_64/i', $useragent)) 1719 $title.=" x64"; 1720 }elseif(preg_match('/Symb[ian]?[OS]?/i', $useragent)){ 1721 $link="http://www.symbianos.org/"; 1722 $title="SymbianOS"; 1723 if(preg_match('/Symb[ian]?[OS]?\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1724 $title.=" ".$regmatch[1]; 1725 $code="symbianos"; 1726 if(preg_match('/x86_64/i', $useragent)) 1727 $title.=" x64"; 1728 }elseif(preg_match('/Unix/i', $useragent)){ 1729 $link="http://www.unix.org/"; 1730 $title="Unix"; 1731 $code="unix"; 1732 if(preg_match('/x86_64/i', $useragent)) 1733 $title.=" x64"; 1734 }elseif(preg_match('/VectorLinux/i', $useragent)){ 1735 $link="http://www.vectorlinux.com/"; 1736 $title="VectorLinux"; 1737 $code="vectorlinux"; 1738 if(preg_match('/x86_64/i', $useragent)) 1739 $title.=" x64"; 1740 }elseif(preg_match('/Venenux/i', $useragent)){ 1741 $link="http://www.venenux.org/"; 1742 $title="Venenux GNU Linux"; 1743 $code="venenux"; 1744 if(preg_match('/x86_64/i', $useragent)) 1745 $title.=" x64"; 1746 }elseif(preg_match('/webOS/i', $useragent)){ 1747 $link="http://en.wikipedia.org/wiki/WebOS"; 1748 $title="Palm webOS"; 1749 $code="palm"; 1750 }elseif(preg_match('/Windows/i', $useragent) || preg_match('/WinNT/i', $useragent) || preg_match('/Win32/i', $useragent)){ 1751 $link="http://www.microsoft.com/windows/"; 1752 if(preg_match('/Windows NT 6.2; Win64; x64;/i', $useragent) || preg_match('/Windows NT 6.2; WOW64/i', $useragent)){ 1753 $title="Windows 8 x64 Edition"; 1754 $code="win-5"; 1755 }elseif(preg_match('/Windows NT 6.2/i', $useragent)){ 1756 $title="Windows 8"; 1757 $code="win-5"; 1758 }elseif(preg_match('/Windows NT 6.1; Win64; x64;/i', $useragent) || preg_match('/Windows NT 6.1; WOW64/i', $useragent)){ 1759 $title="Windows 7 x64 Edition"; 1760 $code="win-4"; 1761 }elseif(preg_match('/Windows NT 6.1/i', $useragent)){ 1762 $title="Windows 7"; 1763 $code="win-4"; 1764 }elseif(preg_match('/Windows NT 6.0/i', $useragent)){ 1765 $title="Windows Vista"; 1766 $code="win-3"; 1767 }elseif(preg_match('/Windows NT 5.2 x64/i', $useragent)){ 1768 $title="Windows XP x64 Edition"; 1769 $code="win-2"; 1770 }elseif(preg_match('/Windows NT 5.2/i', $useragent)){ 1771 $title="Windows Server 2003"; 1772 $code="win-2"; 1773 }elseif(preg_match('/Windows NT 5.1/i', $useragent) || preg_match('/Windows XP/i', $useragent)){ 1774 $title="Windows XP"; 1775 $code="win-2"; 1776 }elseif(preg_match('/Windows NT 5.01/i', $useragent)){ 1777 $title="Windows 2000, Service Pack 1 (SP1)"; 1778 $code="win-1"; 1779 }elseif(preg_match('/Windows NT 5.0/i', $useragent) || preg_match('/Windows 2000/i', $useragent)){ 1780 $title="Windows 2000"; 1781 $code="win-1"; 1782 }elseif(preg_match('/Windows NT 4.0/i', $useragent) || preg_match('/WinNT4.0/i', $useragent)){ 1783 $title="Microsoft Windows NT 4.0"; 1784 $code="win-1"; 1785 }elseif(preg_match('/Windows NT 3.51/i', $useragent) || preg_match('/WinNT3.51/i', $useragent)){ 1786 $title="Microsoft Windows NT 3.11"; 1787 $code="win-1"; 1788 }elseif(preg_match('/Windows 3.11/i', $useragent) || preg_match('/Win3.11/i', $useragent) || preg_match('/Win16/i', $useragent)){ 1789 $title="Microsoft Windows 3.11"; 1790 $code="win-1"; 1791 }elseif(preg_match('/Windows 3.1/i', $useragent)){ 1792 $title="Microsoft Windows 3.1"; 1793 $code="win-1"; 1794 }elseif(preg_match('/Windows 98; Win 9x 4.90/i', $useragent) || preg_match('/Win 9x 4.90/i', $useragent) || preg_match('/Windows ME/i', $useragent)){ 1795 $title="Windows Millennium Edition (Windows Me)"; 1796 $code="win-1"; 1797 }elseif(preg_match('/Win98/i', $useragent)){ 1798 $title="Windows 98 SE"; 1799 $code="win-1"; 1800 }elseif(preg_match('/Windows 98/i', $useragent) || preg_match('/Windows\ 4.10/i', $useragent)){ 1801 $title="Windows 98"; 1802 $code="win-1"; 1803 }elseif(preg_match('/Windows 95/i', $useragent) || preg_match('/Win95/i', $useragent)){ 1804 $title="Windows 95"; 1805 $code="win-1"; 1806 }elseif(preg_match('/Windows CE/i', $useragent)){ 1807 $title="Windows CE"; 1808 $code="win-2"; 1809 }elseif(preg_match('/WM5/i', $useragent)){ 1810 $title="Windows Mobile 5"; 1811 $code="win-phone"; 1812 }elseif(preg_match('/WindowsMobile/i', $useragent)){ 1813 $title="Windows Mobile"; 1814 $code="win-phone"; 1815 }else{ 1816 $title="Windows"; 1817 $code="win-2"; 1818 } 1819 }elseif(preg_match('/Xandros/i', $useragent)){ 1820 $link="http://www.xandros.com/"; 1821 $title="Xandros"; 1822 $code="xandros"; 1823 if(preg_match('/x86_64/i', $useragent)) 1824 $title.=" x64"; 1825 }elseif(preg_match('/Xubuntu/i', $useragent)){ 1826 $link="http://www.xubuntu.org/"; 1827 $title="Xubuntu"; 1828 if(preg_match('/Xubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1829 $version.=" ".$regmatch[1]; 1830 if($regmatch[1] < 10) 1831 $code="xubuntu-1"; 1832 else 1833 $code="xubuntu-2"; 1834 if(strlen($version) > 1) 1835 $title.=$version; 1836 if(preg_match('/x86_64/i', $useragent)) 1837 $title.=" x64"; 1838 }elseif(preg_match('/Zenwalk/i', $useragent)){ 1839 $link="http://www.zenwalk.org/"; 1840 $title="Zenwalk GNU Linux"; 1841 $code="zenwalk"; 1842 if(preg_match('/x86_64/i', $useragent)) 1843 $title.=" x64"; 1844 1845 //Pulled out of order to help ensure better detection for above platforms 1846 }elseif(preg_match('/Ubuntu/i', $useragent)){ 1847 $link="http://www.ubuntu.com/"; 1848 $title="Ubuntu"; 1849 if(preg_match('/Ubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch)) 1850 $version.=" ".$regmatch[1]; 1851 if($regmatch[1] < 10) 1852 $code="ubuntu-1"; 1853 else 1854 $code="ubuntu-2"; 1855 if(strlen($version) > 1) 1856 $title.=$version; 1857 if(preg_match('/x86_64/i', $useragent)) 1858 $title.=" x64"; 1859 }elseif(preg_match('/Linux/i', $useragent)){ 1860 $link="http://www.linux.org/"; 1861 $title="GNU/Linux"; 1862 $code="linux"; 1863 if(preg_match('/x86_64/i', $useragent)) 1864 $title.=" x64"; 1865 }elseif(preg_match('/J2ME\/MIDP/i', $useragent)){ 1866 $link="http://java.sun.com/javame/"; 1867 $title="J2ME/MIDP Device"; 1868 $code="java"; 1869 }else{ 1870 return ""; 1871 } 1872 if($ua_show_text=="1" && $ua_text_links!="0") //image and linked text 1873 $detected_os=img($code, "/os/", $title)." <a href='".$link."' title='".$title."' rel='nofollow'>".$title."</a>"; 1874 else if($ua_show_text=="1") //image and text 1875 $detected_os=img($code, "/os/", $title)." ".$title; 1876 else if($ua_show_text=="2") //image only 1877 $detected_os=img($code, "/os/", $title); 1878 else if($ua_show_text=="3" && $ua_text_links!="0") //linked text only 1879 $detected_os="<a href='".$link."' title='".$title."' rel='nofollow'>".$title."</a>"; 1880 else if($ua_show_text=="3") //text only 1881 $detected_os=$title; 1882 return $detected_os; 1883 } 1884 1885 //Detect Platform (check for Device, then OS if no device is found, else return null) 1886 function detect_platform(){ 1887 global $useragent, $ua_show_text, $ua_text_links, $ua_hide_unknown_bool; 1888 if(strlen($detected_platform=detect_device()) > 0){ 1889 return $detected_platform; 1890 }elseif(strlen($detected_platform=detect_os()) > 0){ 1891 return $detected_platform; 1892 }else{ 1893 $title="Unknown"; 1894 $link="#"; 1895 $code="null"; 1896 if($ua_hide_unknown_bool=='true' && $ua_show_text==2) 1897 return $title; 1898 } 1899 if($ua_show_text=="1" && $ua_text_links!="0") //image and linked text 1900 $detected_os=img($code, "/os/", $title)." <a href='".$link."' title='".$title."' rel='nofollow'>".$title."</a>"; 1901 else if($ua_show_text=="1") //image and text 1902 $detected_os=img($code, "/os/", $title)." ".$title; 1903 else if($ua_show_text=="2") //image only 1904 $detected_os=img($code, "/os/", $title); 1905 else if($ua_show_text=="3" && $ua_text_links!="0") //linked text only 1906 $detected_os="<a href='".$link."' title='".$title."' rel='nofollow'>".$title."</a>"; 1907 else if($ua_show_text=="3") //text only 1908 $detected_os=$title; 1909 return $detected_os; 1910 } 1911 1912 //Detect Trackbacks -- Check if it works... 1913 function detect_trackback(){ 1914 global $useragent, $ua_trackback, $ua_show_text, $ua_text_links, $ua_hide_unknown_bool; 102 { 103 $img="<img src='".$url_img.$ua_comment_size.$type.$code.".png' title='".$title."' ".$img_style." alt='".$title."'"; 104 } 105 106 // End the img tag following their specified html preference. 107 if($ua_doctype=="html") 108 { 109 $img.=">"; 110 } 111 elseif($ua_doctype=="xhtml") 112 { 113 $img.=" />"; 114 } 115 116 return $img; 117 } 118 119 // Main function 120 function wp_useragent() 121 { 122 global $comment, $useragent, $ua_output_location, $ua_trackback; 123 124 // Default tracks to zero. 1915 125 $ua_trackback=0; 1916 if(preg_match('/Drupal/i', $useragent)){ 1917 $link="http://www.drupal.org/"; 1918 $title="Drupal"; 1919 $code="drupal"; 1920 }elseif(preg_match('/Feedburner/i', $useragent)){ 1921 $link="http://www.feedburner.com/"; 1922 $title="FeedBurner"; 1923 $code="feedburner"; 1924 }elseif(preg_match('/laconica|statusnet/i', $useragent)){ 1925 $link="http://status.net/"; 1926 $title="StatusNet"; 1927 $code="laconica"; 1928 }elseif(preg_match('/libwww-perl\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch)){ 1929 $link="http://search.cpan.org/dist/libwww-perl/"; 1930 $title="libwww-perl"; 1931 $code="null"; 1932 $version=$regmatch[1]; 1933 }elseif(preg_match('/meneame/i', $useragent)){ 1934 $link="http://www.meneame.net/"; 1935 $title="Meneame"; 1936 $code="meneame"; 1937 }elseif(preg_match('/MovableType\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch)){ 1938 $link="http://www.movabletype.org/"; 1939 $title="MovableType"; 1940 $code="movabletype"; 1941 $version=$regmatch[1]; 1942 }elseif(preg_match('/Peach\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch)){ 1943 $link="http://www.psych.neu.edu/faculty/y.petrov/Software/PEACH/"; 1944 $title="Peach"; 1945 $code="null"; 1946 $version=$regmatch[1]; 1947 }elseif(preg_match('/pligg/i', $useragent)){ 1948 $link="http://www.pligg.com/"; 1949 $title="Pligg"; 1950 $code="pligg"; 1951 }elseif(preg_match('/Python-urllib\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch)){ 1952 $link="http://docs.python.org/library/urllib.html"; 1953 $title="Python-urllib"; 1954 $code="null"; 1955 $version=$regmatch[1]; 1956 }elseif(preg_match('/Snoopy\ v([.0-9a-zA-Z]+)/i', $useragent, $regmatch)){ 1957 $link="http://sourceforge.net/projects/snoopy/"; 1958 $title="Snoopy"; 1959 $code="null"; 1960 $version=$regmatch[1]; 1961 }elseif(preg_match('/SOAP::/i', $useragent)){ 1962 $link="http://en.wikipedia.org/wiki/SOAP"; 1963 $title="SOAP (Simple Object Access Protocol)"; 1964 $code.="null"; 1965 }elseif(preg_match('/Typepad/i', $useragent)){ 1966 $link="http://www.typepad.com/"; 1967 $title="Typepad"; 1968 $code.="typepad"; 1969 }elseif(preg_match('/vBSEO/i', $useragent)){ 1970 $link="http://www.vbseo.com/"; 1971 $title="vBSEO (VBulletin)"; 1972 $code.="vbseo"; 1973 }elseif(preg_match('/WordPress\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch)){ 1974 $link="http://www.wordpress.org/"; 1975 $title="WordPress"; 1976 $code="wordpress"; 1977 $version=$regmatch[1]; 1978 }elseif(preg_match('/XML-RPC/i', $useragent)){ 1979 $link="http://www.xmlrpc.com/"; 1980 $title="XML-RPC"; 1981 $code.="null"; 1982 }else{ 1983 $link="#"; 1984 $title="Unknown"; 1985 $code="null"; 1986 if($ua_hide_unknown_bool=='true' && $ua_show_text==2) 1987 return $title; 1988 } 1989 $title.=" ".$version; 1990 if($ua_show_text=="1" && $ua_text_links!="0") //image and linked text 1991 $detected_tb=img($code, "/trackback/", $title)." <a href='".$link."' title='".$title."' rel='nofollow'>".$title."</a>"; 1992 elseif($ua_show_text=="1") //image and text 1993 $detected_tb=img($code, "/trackback/", $title)." ".$title; 1994 else if($ua_show_text=="2") //image only 1995 $detected_tb=img($code, "/trackback/", $title); 1996 else if($ua_show_text=="3" && $ua_text_links!="0") //linked text only 1997 $detected_tb="<a href='".$link."' title='".$title."' rel='nofollow'>".$title."</a>"; 1998 else if($ua_show_text=="3") //text only 1999 $detected_tb=$title; 2000 return $detected_tb; 2001 } 2002 2003 //Image generation function 2004 function img($code, $type, $title){ 2005 global $ua_comment_size, $ua_track_size, $ua_image_style, $ua_image_css, $ua_trackback, $url_img, $ua_doctype; 2006 if($ua_comment_size=="") 2007 $ua_comment_size=16; 2008 if($ua_track_size=="") 2009 $ua_track_size=16; 2010 2011 if($ua_image_style=="1") 2012 $img_style="style='border:0px;vertical-align:middle;'"; 2013 elseif($ua_image_style=="2") 2014 $img_style="style='".$ua_image_css."'"; 2015 elseif($ua_image_style=="3") 2016 $img_style="class='".$ua_image_css."'"; 2017 2018 //Set the img to display browser/os/device 2019 //src=http://blogurl/plugins/plugin-name/size/net-os-device/code.png 2020 if($ua_trackback==1) 2021 $img="<img src='".$url_img.$ua_track_size.$type.$code.".png' title='".$title."' ".$img_style." alt='".$title."'"; 2022 else 2023 $img="<img src='".$url_img.$ua_comment_size.$type.$code.".png' title='".$title."' ".$img_style." alt='".$title."'"; 2024 2025 if($ua_doctype=="html") 2026 $img.=">"; 2027 elseif($ua_doctype=="xhtml") 2028 $img.=" />"; 2029 2030 return $img; 2031 } 2032 2033 //Main function 2034 function wp_useragent(){ 2035 global $comment, $useragent, $ua_output_location, $ua_trackback; 2036 $ua_trackback=0; 126 127 // This grabs the ua and comment details per user. 2037 128 get_currentuserinfo(); 129 130 // Where should we display the useragent output? 2038 131 $useragent=$comment->comment_agent; 2039 if($ua_output_location=="before"){ 132 if($ua_output_location=="before") 133 { 2040 134 display_useragent(); 2041 135 ua_comment(); 2042 136 add_filter('comment_text', 'wp_useragent'); 2043 }elseif($ua_output_location=="after"){ 137 } 138 elseif($ua_output_location=="after") 139 { 2044 140 ua_comment(); 2045 141 display_useragent(); 2046 142 add_filter('comment_text', 'wp_useragent'); 2047 }elseif($ua_output_location=="custom"){ 143 } 144 elseif($ua_output_location=="custom") 145 { 2048 146 display_useragent(); 2049 147 } 2050 148 } 2051 149 2052 //Function to form the final String 2053 function display_useragent(){ 150 // Function to form the final String 151 function display_useragent() 152 { 2054 153 global $comment, $ua_show_text, $ua_text_surfing, $ua_text_on, $ua_text_via, $ua_show_ua_bool, $ua_hide_unknown_bool, $ua_doctype; 2055 //Check if the comment is a trackback. 2056 if($comment->comment_type=='trackback' || $comment->comment_type=='pingback'){ 154 155 // Check if the comment is a trackback or a comment 156 if($comment->comment_type=='trackback' || $comment->comment_type=='pingback') 157 { 158 // We've got a trackback... 2057 159 $trackback=detect_trackback(); 2058 if($ua_show_text=="1" || $ua_show_text=="3"){ 160 161 if($ua_show_text=="1" || $ua_show_text=="3") 162 { 2059 163 if($ua_hide_unknown_bool=='true' && strpos($trackback,"Unknown")) 164 { 2060 165 $ua=""; 166 } 2061 167 else 168 { 2062 169 $ua="$ua_text_via $trackback"; 2063 }elseif($ua_show_text=="2"){ 170 } 171 } 172 elseif($ua_show_text=="2") 173 { 2064 174 if($ua_hide_unknown_bool=='true' && strpos($trackback,"Unknown")) 175 { 2065 176 $ua=""; 177 } 2066 178 else 179 { 2067 180 $ua=$trackback; 2068 } 2069 }else{ 181 } 182 } 183 } 184 else 185 { 186 // We've got a comment... 2070 187 $webbrowser=detect_webbrowser(); 2071 188 $platform=detect_platform(); 2072 if($ua_show_text=="1" || $ua_show_text=="3"){ 189 190 // Does the user want to display text, icons, or both? 191 if($ua_show_text=="1" || $ua_show_text=="3") 192 { 2073 193 if($ua_hide_unknown_bool=='true' && strpos($webbrowser,"Unknown") && strpos($platform,"Unknown")) 194 { 2074 195 $ua=""; 196 } 2075 197 elseif($ua_hide_unknown_bool=='true' && strpos($webbrowser,"Unknown")) 198 { 2076 199 $ua="$ua_text_on $platform"; 200 } 2077 201 elseif($ua_hide_unknown_bool=='true' && strpos($platform,"Unknown")) 202 { 2078 203 $ua="$ua_text_surfing $webbrowser"; 204 } 2079 205 else 206 { 2080 207 $ua="$ua_text_surfing $webbrowser $ua_text_on $platform"; 2081 }elseif($ua_show_text=="2"){ 208 } 209 } 210 elseif($ua_show_text=="2") 211 { 2082 212 if($ua_hide_unknown_bool=='true' && strpos($webbrowser,"Unknown") && strpos($platform,"Unknown")) 213 { 2083 214 $ua=""; 215 } 2084 216 elseif($ua_hide_unknown_bool=='true' && strpos($webbrowser,"Unknown")) 217 { 2085 218 $ua=$platform; 219 } 2086 220 elseif($ua_hide_unknown_bool=='true' && strpos($platform,"Unknown")) 221 { 2087 222 $ua=$webbrowser; 223 } 2088 224 else 225 { 2089 226 $ua=$webbrowser.$platform; 2090 } 2091 } 2092 2093 if($ua_show_ua_bool=='true'){ 2094 if(strlen($ua) > 0) { 227 } 228 } 229 } 230 231 // Does the user want to display the full ua string? 232 if($ua_show_ua_bool=='true') 233 { 234 if(strlen($ua) > 0) 235 { 2095 236 if($ua_doctype=="html") 237 { 2096 238 $ua.="<br>"; 239 } 2097 240 elseif($ua_doctype=="xhtml") 241 { 2098 242 $ua.="<br />"; 2099 } 243 } 244 } 245 246 // Attach the full ua string to the output. 2100 247 $ua.="<small>".htmlspecialchars($comment->comment_agent)."</small>"; 2101 248 } … … 2104 251 // the echo statement will interrupt redirects from the comment page. 2105 252 if(empty($_POST['comment_post_ID'])) 253 { 2106 254 echo $ua; 2107 } 2108 2109 //Custom function 255 } 256 } 257 258 // Custom function for displaying the output in non-standard locations. 2110 259 function useragent_output_custom(){ 2111 260 global $ua_output_location, $useragent, $comment; 2112 if($ua_output_location=="custom"){ 261 262 if($ua_output_location=="custom") 263 { 2113 264 get_currentuserinfo(); 2114 265 $useragent=$comment->comment_agent; … … 2117 268 } 2118 269 2119 //Util functions for filters and stuff. 2120 function ua_comment(){ 270 // Util functions for filters and stuff. 271 function ua_comment() 272 { 2121 273 global $comment; 274 2122 275 remove_filter('comment_text', 'wp_useragent'); 2123 276 apply_filters('get_comment_text', $comment->comment_content); 277 278 // The following conditional will hopefully prevent a problem where 279 // the echo statement will interrupt redirects from the comment page. 2124 280 if(empty($_POST['comment_post_ID'])) 281 { 2125 282 echo apply_filters('comment_text', $comment->comment_content); 2126 } 2127 2128 function add_option_page(){ 283 } 284 } 285 286 // Add a link to our Options page for Admin users. 287 function add_option_page() 288 { 2129 289 add_options_page('WP-UserAgent', 'WP-UserAgent', 'manage_options','wp-useragent/wp-useragent-options.php'); 2130 290 } 2131 2132 291 add_action('admin_menu', 'add_option_page'); 2133 if($ua_output_location!='custom'){ 292 293 // If the user selected to display output in a standard location 294 // and not a custom location then lets add a filter here. 295 if($ua_output_location!='custom') 296 { 2134 297 add_filter('comment_text', 'wp_useragent'); 2135 298 } 2136 299 2137 // Add quick links to plugins page300 // Add quick links to plugins page 2138 301 $plugin=plugin_basename(__FILE__); 2139 302 add_filter("plugin_action_links_$plugin", 'my_plugin_actlinks' ); 2140 function my_plugin_actlinks( $links ) { 303 function my_plugin_actlinks( $links ) 304 { 2141 305 // Add a link to this plugin's settings page 2142 306 $settings_link='<a href="options-general.php?page=wp-useragent/wp-useragent-options.php">Settings</a>'; … … 2144 308 return $links; 2145 309 } 310 2146 311 ?>
Note: See TracChangeset
for help on using the changeset viewer.