Jump to content

cqinzx

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cqinzx's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks a lot Jack!
  2. Hey PHP Freaks, I think you guys are fantastic for helping out noobs like me.. Well I'm here because I need some help with some Joomla/php coding. I'm using this Joomla extension called MetaMod. Theres nothing wrong with the module, but the module requires PHP knowledge, which is what I don't have. I'm trying to display a certain module in all browsers except Internet Explorer. I saw some MetaMod PHP recipies on the Documentation page, but I didn't know what to do with. I know I'm suppose to copy and paste the code, but I don't know how to edit the code so that the module won't show up in IE. Can you help me out? Heres the code if you guys need it: // browser detection example (display a different module based on which browser is being used) $UA = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; $SF = strstr($UA, 'Safari') ? true : false; $OP = strstr($UA, 'Opera') ? true : false; $OPV = $OP ? preg_split('/opera\//i', $UA) : false; $OPV = $OPV ? floatval($OPV[1]) : false; $FF = !$OP && strstr($UA, 'Firefox') ? true : false; $FFV = $FF ? preg_split('/firefox\//i', $UA) : false; $FFV = $FFV ? floatval($FFV[1]) : false; $IE = strstr($UA, 'MSIE') ? true : false; $IEV = $IE ? preg_split('/msie/i', $UA) : false; $IEV = $IEV ? floatval($IEV[1]) : false; if ($IEV >= 7) return 55; // any version of IE greater or equal to 7 if ($IEV >= 6) return 55; // any version of IE greater or equal to 6 if ($IE) return 55; // any version (at all) of IE if ($OP) return 66; // any version of Opera if ($FF) return 77; // any version of Firefox if ($SF) return 88; // any version of Safari And here is the Documentation page The reason I want to block IE is because IE can't handle the Javascript that is in the module(JW Player) I'm using. Thanks for helping out in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.