Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Wordpress iPhone theme - make it work on n800?

    Reply
    Budgetperson | # 1 | 2008-10-13, 18:09 | Report

    Hi all,

    I am making a wordpress blog, and while looking for themes, I found this -
    http://www.bravenewcode.com/wptouch/ .

    It looks really cool for iPods, but I was wondering if I could make it work for the n800 and n810.

    I saw part of the php code was this -

    Originally Posted by
    function detectAppleMobile($query = '') {
    $container = $_SERVER['HTTP_USER_AGENT'];
    //print_r($container); //this prints out the user agent array. uncomment to see it shown on page.
    $useragents = array("iPhone", "iPod", "Aspen");
    //print_r($container); //this prints out the user agent array
    // Add whatever user agents you want here if you want to make this show on a Blackberry or something. No guarantees it'll look pretty, though!
    $useragents = array("iPhone", "iPod", "Aspen", "n800", "n810",);
    $this->applemobile = false;
    foreach ($useragents as $useragent) {
    if (eregi($useragent, $container)) {
    $this->applemobile = true;
    }
    }
    }
    Did I do the useragents part correctly? Or would I have to enter something else...
    I could install it right now and ask someone if it displays properly... right now my n800 is at the Nokia Repair Center .

    Thanks!
    Budgetperson

    Edit | Forward | Quote | Quick Reply | Thanks

     
    penguinbait | # 2 | 2008-10-13, 18:44 | Report

    Originally Posted by Budgetperson View Post
    Hi all,

    I am making a wordpress blog, and while looking for themes, I found this -
    http://www.bravenewcode.com/wptouch/ .

    It looks really cool for iPods, but I was wondering if I could make it work for the n800 and n810.

    I saw part of the php code was this -



    Did I do the useragents part correctly? Or would I have to enter something else...
    I could install it right now and ask someone if it displays properly... right now my n800 is at the Nokia Repair Center .

    Thanks!
    Budgetperson

    I just did this on my blog.

    http://tablethacker.com

    If you go there with a tablet or iphone you will get wptouch theme




    ---------------------------------------------------

    function detectAppleMobile($query = '') {
    $container = $_SERVER['HTTP_USER_AGENT'];
    // print_r($container); //this prints out the user agent array. uncomment to see it shown on page.
    $useragents = array("iPhone", "iPod", "Aspen", "X11; U; Linux armv6l");
    // print_r($container); //this prints out the user agent array
    // Add whatever user agents you want here if you want to make this show on a Blackberry or something. No guarantees it'll look pretty, though!
    $useragents = array("iPhone", "iPod", "Aspen", "X11; U; Linux armv6l");
    $this->applemobile = false;
    foreach ($useragents as $useragent) {
    if (eregi($useragent, $container)) {
    $this->applemobile = true;
    }
    }
    }

    -----------------------------

    Not everything worked cleanly though, the dropdowns are kind of messed up, let me know if you get that figured out, I just removed the drop arrows and linked the search to google

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by penguinbait; 2008-10-13 at 18:49.
    The Following 3 Users Say Thank You to penguinbait For This Useful Post:
    Budgetperson, Reda, timsamoff

     
    Budgetperson | # 3 | 2008-10-13, 18:48 | Report

    Ah okay, that makes sense.
    Thanks!
    (Oh and by the way, your blog theme (on normal computers) is cool, I like it ) :P.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Reda | # 4 | 2008-10-14, 11:59 | Report

    Originally Posted by penguinbait View Post
    I just did this on my blog.

    $useragents = array("iPhone", "iPod", "Aspen", "X11; U; Linux armv6l");
    Thanks!
    Do you know if there is a list of UA somewhere (i'm interested in mobile UAs as well)...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    kbarter | # 5 | 2008-10-14, 12:15 | Report

    For user agent strings, try http://www.user-agents.org/

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Reda | # 6 | 2008-10-14, 13:23 | Report

    Thanks, I also had that link from wikipedia but I was wondering if there is a more user friendly list (which identifies the hardware running the browser as well)

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout