MyBB Community Forums

Full Version: GoMobile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
(2010-12-14, 03:46 AM)Scoutie44 Wrote: [ -> ]Someone else reported that, I'll have to look into it (Angel). And thanks, Bob!

Alright thx, cause even if i try to exit the browser in my android it still don't work :/
(2010-12-14, 03:21 AM)Angel Caquias. Wrote: [ -> ]I found one little bug when i use opera on my phone then go on my desktop with opera the mobile theme is on :/ And it don't let me change it back to default o.o.

Also ill remind you don't worry Big Grin.

I use Firefox, Works great. Though at 27mb its pretty big for droids with lower memory.

http://www.mozilla.com/en-US/mobile/beta/
My current opinion of GoMobile is: I want this, but I'm not sure if I can use this.

Judging just by looks, it's great (tested your forum with an Android Smartphone). However I'm not sure if I like what I'm seeing behind the curtain in the code. I'm wary of plugins which change MyBB database tables (GoMobile changes posts, threads, users). I guess I just don't really understand the necessity of tracking mobile posts.

What I hoped for was something lighter; primarily a theme that works for mobiles, it does not have to cover all aspects of the forum, just reading and posting. I don't need to be able to change my avatar or go in the admin cp or such. Maybe a delete post button for moderators at most. If you need to do more you can always switch to the full version and do it there; for things that are rarely ever needed, that's okay.

Not a code review, just a few comments.

Code snippets like this one scare me: Smile

function gomobile_is_installed()
{
    global $db;

    // Do some fancy stuff that Scoutie44 doesn't understand o.O
    return $db->table_exists("gomobile");

    $db->query("ALTER TABLE ".TABLE_PREFIX."posts DROP COLUMN mobile");
}

I'm sure the $db->query is in there by accident but it's still scary... if you didn't return before, so it never gets executed, it would shoot the database every time I go to the plugins page in the Admin CP...

        "gomobile_urltype" => array(
            "title"         => "URL Type",
            "description"   => "Please select the appropriate URL type of your board (such as Google SEO URLs).",
            "optionscode"   => "select\ndefault=Default URLs\nstock=Stock MyBB SEO URLs\ngseo=Google SEO URLs",
            "value"         => "default",
            "disporder"     => "7"
        )

This setting should be unnecessary.

    // Get our templates ready
    $pj_default = "<div class=\"float_left\" style=\"padding-top: 12px;\">
        <a href=\"showthread.php?tid={$thread['tid']}&page=1\" class=\"pagination_a\">{$lang->gomobile_firstpage}</a>
        <a href=\"showthread.php?tid={$thread['tid']}&page=last\" class=\"pagination_a\">{$lang->gomobile_lastpage}</a>
    </div>";
    $pj_stock = "<div class=\"float_left\" style=\"padding-top: 12px;\">
        <a href=\"thread-{$thread['tid']}.html\" class=\"pagination_a\">{$lang->gomobile_firstpage}</a>
        <a href=\"thread-{$thread['tid']}-lastpost.html\" class=\"pagination_a\">{$lang->gomobile_lastpost2}</a>
    </div>";
    $pj_gseo = "<div class=\"float_left\" style=\"padding-top: 12px;\">
        <a href=\"showthread.php?tid={$thread['tid']}\" class=\"pagination_a\">{$lang->gomobile_firstpage}</a>
        <a href=\"showthread.php?tid={$thread['tid']}&action=lastpost\" class=\"pagination_a\">{$lang->gomobile_lastpost2}</a>
    </div>";

Instead use get_thread_link() and consorts (check inc/functions.php for get_*_link() and multipage()).

    $pj = "<div class=\"float_left\" style=\"padding-top: 12px;\">
        <a href=\"".get_thread_link($thread['tid'], 1)."\" class=\"pagination_a\">{$lang->gomobile_firstpage}</a>
        <a href=\"".get_thread_link($thread['tid'], 0, 'lastpost').\" class=\"pagination_a\">{$lang->gomobile_lastpage}</a>
    </div>";

page=last removed since it is curious: while showthread.php understands it, nothing seems to link to it, and get_thread_link() does not accept it as page value. MyBB SEF URLs do not accept thread-123-page-last.html either... so it's probably better to not use it.
(2010-12-14, 06:43 PM)frostschutz Wrote: [ -> ]My current opinion of GoMobile is: I want this, but I'm not sure if I can use this.

Judging just by looks, it's great (tested your forum with an Android Smartphone). However I'm not sure if I like what I'm seeing behind the curtain in the code. I'm wary of plugins which change MyBB database tables (GoMobile changes posts, threads, users). I guess I just don't really understand the necessity of tracking mobile posts.

It was requested by several users - an easy way to track what posts are sent from a mobile device. I personally don't need or require this feature, but it just makes sense. I'm always open to alternative tracking methods, though. As far as it goes, though, I'm not sure there's any other way to do it properly. or as efficiently.

Quote:What I hoped for was something lighter; primarily a theme that works for mobiles, it does not have to cover all aspects of the forum, just reading and posting. I don't need to be able to change my avatar or go in the admin cp or such. Maybe a delete post button for moderators at most. If you need to do more you can always switch to the full version and do it there; for things that are rarely ever needed, that's okay.

Understandably! I think as a whole, a mobile format should cover features that you might commonly use on a mobile device. I've tried to strip out the majority of the features which are essentially useless on mobile devices for the most part. Personally I didn't like the model of having only a select few features available on the mobile platform. The other thing is, I've found, is that since MyBB is already very light by comparison, it wouldn't hurt to have the features there. I suppose my aim is to make this as light as possible but allow you to use the entire forum without switching to the full version, really.

Quote:Code snippets like this one scare me: Smile

function gomobile_is_installed()
{
    global $db;

    // Do some fancy stuff that Scoutie44 doesn't understand o.O
    return $db->table_exists("gomobile");

    $db->query("ALTER TABLE ".TABLE_PREFIX."posts DROP COLUMN mobile");
}

I'm sure the $db->query is in there by accident but it's still scary... if you didn't return before, so it never gets executed, it would shoot the database every time I go to the plugins page in the Admin CP...

I, myself, don't even know why it's there or what it does (as you may see from the comment). Since this is based off of UA Theme, there are a few areas that I haven't quite figured out yet. Though, I do understand your concern and will look into either getting rid of it or figuring out why it's there..

Quote:
        "gomobile_urltype" => array(
            "title"         => "URL Type",
            "description"   => "Please select the appropriate URL type of your board (such as Google SEO URLs).",
            "optionscode"   => "select\ndefault=Default URLs\nstock=Stock MyBB SEO URLs\ngseo=Google SEO URLs",
            "value"         => "default",
            "disporder"     => "7"
        )

This setting should be unnecessary.

    // Get our templates ready
    $pj_default = "<div class=\"float_left\" style=\"padding-top: 12px;\">
        <a href=\"showthread.php?tid={$thread['tid']}&page=1\" class=\"pagination_a\">{$lang->gomobile_firstpage}</a>
        <a href=\"showthread.php?tid={$thread['tid']}&page=last\" class=\"pagination_a\">{$lang->gomobile_lastpage}</a>
    </div>";
    $pj_stock = "<div class=\"float_left\" style=\"padding-top: 12px;\">
        <a href=\"thread-{$thread['tid']}.html\" class=\"pagination_a\">{$lang->gomobile_firstpage}</a>
        <a href=\"thread-{$thread['tid']}-lastpost.html\" class=\"pagination_a\">{$lang->gomobile_lastpost2}</a>
    </div>";
    $pj_gseo = "<div class=\"float_left\" style=\"padding-top: 12px;\">
        <a href=\"showthread.php?tid={$thread['tid']}\" class=\"pagination_a\">{$lang->gomobile_firstpage}</a>
        <a href=\"showthread.php?tid={$thread['tid']}&action=lastpost\" class=\"pagination_a\">{$lang->gomobile_lastpost2}</a>
    </div>";

Instead use get_thread_link() and consorts (check inc/functions.php for get_*_link() and multipage()).

I'll look into that. I'm not familiar at all with MyBB's functions so I've mostly resorted to conventional PHP.

Quote:
    $pj = "<div class=\"float_left\" style=\"padding-top: 12px;\">
        <a href=\"".get_thread_link($thread['tid'], 1)."\" class=\"pagination_a\">{$lang->gomobile_firstpage}</a>
        <a href=\"".get_thread_link($thread['tid'], 0, 'lastpost').\" class=\"pagination_a\">{$lang->gomobile_lastpage}</a>
    </div>";

page=last removed since it is curious: while showthread.php understands it, nothing seems to link to it, and get_thread_link() does not accept it as page value. MyBB SEF URLs do not accept thread-123-page-last.html either... so it's probably better to not use it.

Interesting. I was under the impression it was a valid URL since it worked on my site, so I'll certainly find a better solution for that.

Thanks for the feedback!
(2010-12-14, 08:53 PM)Scoutie44 Wrote: [ -> ]I personally don't need or require this feature

Too bad it's not easy to make database changes based on setting changes, otherwise I'd suggest to make this feature optional. Big Grin It's all right, it's just me Dodgy

(2010-12-14, 08:53 PM)Scoutie44 Wrote: [ -> ]I, myself, don't even know why it's there or what it does (as you may see from the comment).

Maybe it's easier to understand if you write it like this:

function gomobile_is_installed()
{
    global $db;

    if($db->table_exists("gomobile"))
    {
        // The gomobile database table exists, so it must be installed.
        return true;
    }
}

The plugin_is_installed() function is called on the plugins page. It mainly influences the choice of buttons. If the plugin_is_installed() function returns true, the plugins page displays buttons [Activate/Deactivate] [Uninstall]. Otherwise it displays [Install & Activate] and also calls the plugin_install() function when you activate it.

Quote:I was under the impression it was a valid URL since it worked on my site, so I'll certainly find a better solution for that.

The URL is valid - it works, it's just not being used. Not sure why it's supported - maybe MyBB did make links like this in the past?

Quote:Thanks for the feedback!

Good luck with your project. I'll keep an eye on it in any case.
(2010-12-14, 09:15 PM)frostschutz Wrote: [ -> ]Too bad it's not easy to make database changes based on setting changes, otherwise I'd suggest to make this feature optional. Big Grin It's all right, it's just me Dodgy

That would be awesome Toungue

Quote:Maybe it's easier to understand if you write it like this:

function gomobile_is_installed()
{
    global $db;

    if($db->table_exists("gomobile"))
    {
        // The gomobile database table exists, so it must be installed.
        return true;
    }
}

The plugin_is_installed() function is called on the plugins page. It mainly influences the choice of buttons. If the plugin_is_installed() function returns true, the plugins page displays buttons [Activate/Deactivate] [Uninstall]. Otherwise it displays [Install & Activate] and also calls the plugin_install() function when you activate it.

Oh I see, yeah that makes a lot more sense.

Quote:The URL is valid - it works, it's just not being used. Not sure why it's supported - maybe MyBB did make links like this in the past?

Strange. Some reported it working yet others not (default SEF URLs didn't seem to affect it).

Quote:Good luck with your project. I'll keep an eye on it in any case.

Many thanks Wink
Great download, just downloaded now, I will report any bugs i come across. Thanks, been looking for a mobile mod for a while.
When i install this and try to deactivate plugins i get this
MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1104 - The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
Query:
SELECT t.tid, t.title, t.sid, t.template FROM mybb_templates t LEFT JOIN mybb_templatesets s ON (t.sid=s.sid) LEFT JOIN mybb_templates t2 ON (t.title=t2.title AND t2.sid='1') WHERE t.title = 'index' AND NOT (t.sid = -2 AND NOT ISNULL(t2.tid)) ORDER BY t.title ASC

as soon as i unistall the theme the error goes away.
I also get the error when first trying to activate the plugin.
Haven't encountered this before.. can you be a bit more specific as to exactly when/where this occurs?
after i ftp the files across and go to acp click install/activate and i get
MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1104 - The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
Query:
SELECT t.tid, t.title, t.sid, t.template FROM mybb_templates t LEFT JOIN mybb_templatesets s ON (t.sid=s.sid) LEFT JOIN mybb_templates t2 ON (t.title=t2.title AND t2.sid='1') WHERE t.title = 'postbit_posturl' AND NOT (t.sid = -2 AND NOT ISNULL(t2.tid)) ORDER BY t.title ASC

click back and install and activate and it works but then if i try to activate/deactivate existing plugins then i get the error i posted before.
I tried a different theme and never got the error.

not sure what other info i can give.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15