Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello there,

    First of all, vielen dank, for the lovely plugin.

    Now I don’t know how to test for mac, but here’s maybe part of the solution, since I needed to test for Chrome and Opera as well.This is what I did and it works.

    1) Go to http://browsers.garykeith.com/downloads.asp and download the lite version
    (lite_php_browscap.ini) for PHP though, mind you. (it’s the 4th one from the top)

    2) Go to your plugins directory and rename the file ‘php_browscap.ini’ that came with Marty’s plugin and rename it to ‘php_browscap.bak’. Then copy the downloaded file from step 1 to marty’s plugin directory and rename it ‘php_browscap.ini’. ‘php_browscap.bak’ and ‘php_browscap.ini’ should be in the same directory.

    It has the latest versions of chrome in them.

    3) Open header.php of your favorite theme and copy this above the </title> section. (or use the PHP example on Marty’s site: http://martythornley.com/downloads/php-browser-detection/

    Here is my code which should give the proper browser name in the different tested browsers.

    <?php
    
    if (is_firefox()) {
    echo 'This is Firefox';
    };
    
    if (is_chrome()) {
    echo 'This is Chrome';
    };
    if (is_IE7()) {
    echo 'This is $#@! IE 7';
    }
    
    if (is_opera()) {
    echo 'This is Opera';
    }
    
    ?>

    4) save the document and load your site with localhost/yoursite in the different browsers with the plugin and the ammended theme activated.

    Another note:
    Find the different names by opening the ‘php_browscap.ini’ file in notepad and CTRL-F for different versions of Safari.

    Hope this helps.

    Thread Starter dertien

    (@dertien)

    Hm, that puzzles me.

    So why do you need two seperate drop down boxes with identical content if I may ask ?

Viewing 2 replies - 1 through 2 (of 2 total)