Mobile Version

Hello all,

I am looking for some direction in making my site mobile friendly. I am more of a developer than a designer but I need to know how to make it work. Basically the site I have created is for blackberry users. However, it is not very functional on the blackberry at this moment.

I would like to create a template template that is friendly to mobile users. I have a script that can detect mobile users. I just need some direction as far as where to start doing this. Is there an easy way to switch the template based on a mobile detection? I read something about possibly doing views but its not very clear, is that the way to go and would I have to do that for every plugin?

Any help is greatly appreciated.

  • nobody seriously..this community is aweful..

  • OKI ;-)
    U R RIGHT
    U R CORRECT
    WE ARE AWFUL.
    AND.. SO R U ;-)

  •  

    :-) there is a hook that you can set to see what view type the user needs

    There are some groups that are utilising this already  eg iPhone etc

    There is also documentation on how to proceed to get this working. I haven't looked into it much

  • <?php
    $varsmobilecheck =isset( $vars['mobile']);
    /* checking for whether the mobile variable is set or not, if not we double check and set the variable. this is done once.*/

    if (!isloggedin()&& $varsmobilecheck==false){
    $screensize = $_REQUEST['mobile'];
    $_SESSION ['mobile']=$_REQUEST['mobile'];
    /* the $_SESSION Variable is set, ELGG adds all session variables to the $var variable */

    if (empty ($screensize)){ ?>
    <!-- when the $screensize variable is empty javascript is used to refresh the page with a url to pass a variable based on screensize -->
    <script type="text/javascript">
    width = screen.width;
    height = screen.height;
    <!-- using both checks in case in the future its needed to be used -->

    if (width > 0 && height >0) {
            height="off" <!-- set this to o
        if (height>500){n to work on theme from PC -->
        }
        else
        height="off" <!-- turn this on when ready for mobile theme -->
       
        window.location.href = "<?php $vars['url'] ?>"+"?&mobile=" + height;
        <!-- new url with a variable PHP can use, this code will run a second time now to pass the variable -->
    } else
        exit();

    </script>
    <?php}}?> <!-- end mobile check -->

    put this on top of the  page_elements\header.php

    when installing your theme you might have to us the upgrade.php file to get things to resync correctly, but ELGG will now have $var ['mobile']  with either "on" or "off" to use in making decisions throughout your layout and CSS.

  • The next version of the Themer plugin will allow users to set their mobile preference so that regardless of how browser supplies the information, the user can set their preferred mobile settings.  For example, if you prefer to use the iPhone in landscape mode, the display will be formatted as such.

    I was away on a conference and just got back.  More work to be done  -  hopefully in about 2 weeks. 

    BTW, this community is terrific, making negative comments like you do really offends a lot of people - me included.