Elgg Mobile v1.6

Release Notes

Changes in 1.6

- Bug fixes

- Users can switch between the mobile and desktop sites

- Resolved the message board issue

- Reply to wire now works.


Thanks to everyone for you bug reports/patches.


Extract into the mod folder. Enable in plugin tools and then run upgrade.php.

Does this work with your phone?

Please test this plugin on as many phones as possible and report if there where any bugs in it.

So far I have tested it on Android, iPhone, Blackberry and Nokia


Please make sure that you have create mobile views for your plugin - if not, they will not work with elgg mobile.


The next release of this plug-in will involve the restructuring of the code to make it even faster. I have spoken to some very experienced developers who will contribute to this but they do require payment. In order to speed up the next release, please donate using the link above. Thankyou to everyone who has generously donated already!


http://maestrozone.com/mod/mobile to take a look at this plugin on a live site

  • Hi Mark,

    Just installed this plugin and the first screen looks great but when I log in it returns this:

    Fatal error: Call to a member function getSubject() on a non-object in
    on line 15

    I'm running Elgg 1.7, any ideas?

    Thank you


  • Hi please, if someone can help me out with this.

    I dont want to display the exact homepage but in the mobile as it is  now. I would like to have just the logo, login and footer. I see that the index.php in the mod has this code at the bottom:

            //Load the front page
        global $CONFIG;
        set_input('view', 'mobile');
        $content = elgg_view_layout('two_column_left_sidebar', elgg_view("account/forms/login"));
        page_draw(null, $content);


    But I don't quite get where to change the index page (like...if in mobile, load index2.php instead of index.php - so that I can change the design for the mobile version)


    Thank you!

  • @Cynthia:

    The developer Mark is a 16 year old kid ;-) and " This is a free plugin. If you liked this plugin then please feel free to donate. Every penny helps !! "

    How about -->
    ? A promover la Elgg estilo de código abierto "ayudar a los desarrolladores jóvenes en contacto con él, envíe marcar algún poco de dinero y ver mi código de niño lo que quiere más rápido que la mayoría de los adultos pueden hacer;?-P 

    Es sólo un niño ! ;-)

  • meh... it is a nice mod, but still needs some work...if i was this good i would do it for free ._. thanks for the heads up!

  • Hi Everyone,

    I just wanted to let you all know that I will be updating this plugin to work with elgg 1.8 very shortly. Thanks for your patience! 

    For those of you who are experiencing the error where the mobile theme doesnt show properly, or not all, please go into your root view folder and add a folder called "mobile". Then run upgrade.php and everything should be working fine. (This was a bug in the last few versions of elgg).

    Once again thanks for using the plugin!


  • @Mark - If the bug is still present in core please open a ticket on trac. Thanks.

  • Sooriyapragash Rashiya plugins don't grow off trees you know, they require a developer to put time into making them. It will be coming shortly.

  • the captcha ond other fields that i have set at registration are not showing up. therefore users cannot register when this is enabled

  • i can't get this to work with this theme. the theme overides the mobile plugin on cell phones. here is the theme i'm using:


  • I figured out how to make the captcha and other mandatory login fields show up on the registration page. For the captcha, place the following code into the file mod/mobile/vies/mobile/account/forms/register.php either at the top or bottom of that page:


    // Generate a token which is then passed into the captcha algorithm for verification
        $token = captcha_generate_token();
    <div class="captcha">
        <input type="hidden" name="captcha_token" value="<?php echo $token; ?>" />
            <?php echo elgg_echo('captcha:entercaptcha'); ?><br /><br />
            <div class="captcha-right">
                <img class="captcha-input-image" src="<?php echo $vars['url']; ?>pg/captcha/$token"; ?>" /><br />
            </div><br />
            <div class="captcha-left">
                <?php echo elgg_view('input/text', array('internalname' => 'captcha_input', 'class' => 'captcha-input-text')); ?>




    If you use the profile manager plugin like i do, you can place the following code into that same file mod/mobile/vies/mobile/account/forms/register.php either at the top or bottom of that page:


        * Profile Manager
        * Extended registerpage view
        * @package profile_manager
        * @author ColdTrick IT Solutions
        * @copyright Coldtrick IT Solutions 2009
        * @link http://www.coldtrick.com/

        $categorized_fields = profile_manager_get_categorized_fields(null, true, true);
        $cats = $categorized_fields['categories'];
        $fields = $categorized_fields['fields'];
        if(count($fields) > 0 || get_plugin_setting("profile_icon_on_register", "profile_manager") == "yes"){
            $bounced_values = $_SESSION["custom_profile_fields"];
        <div id="custom_profile_fields">
            $options = array(
                    "type" => "object",
                    "subtype" => CUSTOM_PROFILE_FIELDS_PROFILE_TYPE_SUBTYPE,
                    "limit" => 0,
                    "owner_guid" => $CONFIG->site_guid
            $types = elgg_get_entities($options);
                $type_options = array();
                $type_options[""] = elgg_echo("profile_manager:profile:edit:custom_profile_type:default");
                foreach($types as $type){
                    $title = $type->getTitle();
                    $type_options[$type->guid] = $title;
                    // preparing descriptions of profile types
                    $description = $type->getDescription();
                        $types_description .= "<div id='custom_profile_type_description_" . $type->guid . "' class='custom_profile_type_description'>";
                        $types_description .= "<h3 class='settings'>" . elgg_echo("profile_manager:profile:edit:custom_profile_type:description") . "</h3>";
                        $types_description .= $description;
                        $types_description .= "</div>";
                <script type="text/javascript">
                    function changeProfileType(){
                        var selVal = $('select[name="custom_profile_fields_custom_profile_type"]').val();
                        if(selVal != ""){
                            $('#custom_profile_type_description_'+ selVal).show();
                echo "<p>\n";
                echo "<h3 class='settings'>\n";
                echo elgg_echo("profile_manager:profile:edit:custom_profile_type:label") . "</h3>\n";
                echo elgg_view("input/pulldown", array("internalname" => "custom_profile_fields_custom_profile_type",
                                                        "options_values" => $type_options,
                                                        "js" => "onchange='changeProfileType();'",
                                                        "value" => $bounced_values['custom_profile_type']));
                echo "</p>\n";
                echo $types_description;
            if(count($fields) > 0){
                if(count($cats) > 1){
                    $show_header = true;
                } else {
                    $show_header = false;
                foreach($cats as $cat_guid => $cat){
                        // make nice title
                        if($cat_guid == 0){
                            $title = elgg_echo("profile_manager:categories:list:default");
                        } else {
                            $title = $cat->getTitle();
                        echo "<h3 class='settings'>" . $title . "</h3>\n";
                    foreach($fields[$cat_guid] as $field){
                        $metadata_type = $field->metadata_type;
                        if($metadata_type == "longtext"){
                            // bug when showing tinymce on register page (when moving) newer versions of tinymce are working correctly
                            $metadata_type = "plaintext";
                        $value = $bounced_values[$field->metadata_name];
                            $value = implode(", ", $value);

                        $field_options = $field->getOptions();
                        if($field->mandatory == "yes"){
                            echo "<p class='mandatory'>";
                        } else {
                            echo "<p>";
                        if(!empty($field->metadata_hint)){ ?>
                            <span class='custom_fields_more_info' id='more_info_<?php echo $field->metadata_name; ?>'></span>        
                            <span class="custom_fields_more_info_text" id="text_more_info_<?php echo $field->metadata_name; ?>"><?php echo $field->metadata_hint;?></span>
                        <?php } ?>
                            <?php echo $field->getTitle(); ?><br />
                            <?php echo elgg_view("input/{$metadata_type}",array(
                                                                    'internalname' => "custom_profile_fields_" . $field->metadata_name,
                                                                    'value' => $value,
                                                                    'options' => $field_options
                                                                    )); ?>
            if(get_plugin_setting("profile_icon_on_register", "profile_manager") == "yes"){
                echo elgg_view("input/profile_icon");
            echo "<br />";
            echo elgg_echo("profile_manager:register:mandatory");
        <script type="text/javascript">        
            $("#register-box form p:first").addClass("mandatory");
            $("#register-box form .mandatory>label br").before("*");



    That will make the captcha, and the other mandatory fields you have set in your administration settings show up on the elgg mobile signup page. HOWEVER, the registration is not working. after the user enters all of that information, and hits the register button, all that happens is thhat they are sent back to the login page. I really would like for someone to figure out what the problem is with this. This is the only available plugin to make an elgg site mobile, so i is greatly needed. but basic things, like the registration process does not work

  • Hi I am running a elgg 1.7.16 and really like this plugin all seems to work fine until I switch off the messges feture, for security mesures I need to have message switched off. Can you tell me how I can use the mobile plugin with messages off.



  • Taner,

    This is deprecated version of the plugin and I would advise upgrading your site to 1.8 as soon as possible. If you header/top bar files then you will referrences to the message count (the error should outputting the line ref right?) and just comment that out. I will take a look at the actual plugin later and send you the line references.

    Unfortunatly I am on a full time dev project and also at uni so finding to time to keep these plugins upto date is difficult. I will be up landing on updating the elgg mobile plugin for 1.8+ very shortly!

Mark Harding

elgg developer, iOS developer


  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 44529
  • Recommendations: 78

Other Projects

View Mark Harding's plugins