2010-12-14, 04:27 AM
(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:46 AM)Scoutie44 Wrote: [ -> ]Someone else reported that, I'll have to look into it (Angel). And thanks, Bob!
(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 .
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");
}
"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"
)
// 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>";
$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>";
(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.
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.
Quote:Code snippets like this one scare me:
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...
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()).
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.
(2010-12-14, 08:53 PM)Scoutie44 Wrote: [ -> ]I personally don't need or require this feature
(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).
function gomobile_is_installed()
{
global $db;
if($db->table_exists("gomobile"))
{
// The gomobile database table exists, so it must be installed.
return true;
}
}
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.
Quote:Thanks for the feedback!
(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. It's all right, it's just me
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.
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?
Quote:Good luck with your project. I'll keep an eye on it in any case.
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
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