MyBB Community Forums

Full Version: Disable Mybb GoMobile auto UA detection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Ok here is the deal,
I love Mybb Gomobile plugin but due to some reasons (personal idea) I prefer to disable the Auto UA detection function so that my users are presented the Full version by default irrespective of the UA they are using and if they wish, allow them to access the mobile version by cliking a provided switch link. Is it possible??
(2012-11-13, 11:21 AM)Mr. Nx Wrote: [ -> ]Ok here is the deal,
I love Mybb Gomobile plugin but due to some reasons (personal idea) I prefer to disable the Auto UA detection function so that my users are presented the Full version by default irrespective of the UA they are using and if they wish, allow them to access the mobile version by cliking a provided switch link. Is it possible??

I haven't tried this, but it seems to me you could install GoMobile and then export the GoMobile theme, and backup that themes image directory then uninstall GoMobile and reinstall just the theme.

I could be mistaken.
(2012-11-13, 03:25 PM)Wildcard Wrote: [ -> ]I haven't tried this, but it seems to me you could install GoMobile and then export the GoMobile theme, and backup that themes image directory then uninstall GoMobile and reinstall just the theme.
I could be mistaken.

Well thanks for trying to help. Its a good idea but how can i allow users to choose the theme?
In the package there should be a file like GoMoblie.xml go to import theme and select that file. It will only give you the theme and not the auto view to mobile devices.
install gomobile and then edit the plugin file inc/plugins/gomobile.php and comment out this line

$plugins->add_hook("global_start", "gomobile_forcetheme");

by change it to

//$plugins->add_hook("global_start", "gomobile_forcetheme");

edit: fyi,this is will leave the "Switch to Mobile View" link at the bottom of the page.
That what I missed out.
(2012-11-13, 04:13 PM)pavemen Wrote: [ -> ]install gomobile and then edit the plugin file inc/plugins/gomobile.php and comment out this line

$plugins->add_hook("global_start", "gomobile_forcetheme");

by change it to

//$plugins->add_hook("global_start", "gomobile_forcetheme");

edit: fyi,this is will leave the "Switch to Mobile View" link at the bottom of the page.

Thank you! Exactly what i was asking for. But that seems to remove the footer link. Gotta find a way to provide the switch link manually. Tried manipulating the UA string but not working
(2012-11-13, 03:45 PM)Mr. Nx Wrote: [ -> ]
(2012-11-13, 03:25 PM)Wildcard Wrote: [ -> ]I haven't tried this, but it seems to me you could install GoMobile and then export the GoMobile theme, and backup that themes image directory then uninstall GoMobile and reinstall just the theme.
I could be mistaken.

Well thanks for trying to help. Its a good idea but how can i allow users to choose the theme?

If you installed just the theme, it would appear in your forums list of themes. You could then use a plugin like MyTheme to display a quick list of themes to choose from.

But again, I haven't tried this and don't even know if it will work.
(2012-11-13, 04:54 PM)Mr. Nx Wrote: [ -> ]
(2012-11-13, 04:13 PM)pavemen Wrote: [ -> ]install gomobile and then edit the plugin file inc/plugins/gomobile.php and comment out this line

$plugins->add_hook("global_start", "gomobile_forcetheme");

by change it to

//$plugins->add_hook("global_start", "gomobile_forcetheme");

edit: fyi,this is will leave the "Switch to Mobile View" link at the bottom of the page.

Thank you! Exactly what i was asking for. But that seems to remove the footer link. Gotta find a way to provide the switch link manually. Tried manipulating the UA string but not working

the other option is to undo that edit and then make this one:

find

// Fetch the list of User Agent strings
	$query = $db->simple_select("gomobile", "regex");

and add ABOVE
return false;

that will let the footer edits happen, but stop the automatic loading of the theme
Quote:the other option is to undo that edit and then make this one:

find

// Fetch the list of User Agent strings
	$query = $db->simple_select("gomobile", "regex");

and add ABOVE
return false;

that will let the footer edits happen, but stop the automatic loading of the theme

Really appreciate your help but i couldn't find the codes you specified. Maybe you should take a look at the file i have attached pls
Pages: 1 2 3