Skip to main content
Topic: Options for mobile phones (Read 7172 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Options for mobile phones

Just a question, maybe it's easy to implement (havent checked the related code details yet):
I'd like to force the usage of "click menu" instead of the hover menus for mobile phones.  Is it just the javascript var use_click_menu that needs to be true? How would I check, if the device (browser) is from a mobile phone?
Thorsten "TE" Eurich
------------------------

Re: Options for mobile phones

Reply #1

Yep, should be the only value.
I don't think we have any mobile detection in javascript, but we can drop in a variable from the php detection I think.
Alternatively you can do some "responsive-like" javascript measuring the width of the screen (and/or attaching an event to resize or whatever is called, but maybe that's not necessary) and set the variable accordingly.
Bugs creator.
Features destroyer.
Template killer.

Re: Options for mobile phones

Reply #2

Yup, all you should have to do is set that var and the click menus will activate.

We don't have specific mobile capability detection, ("robust" detection), but the UA quick sniff  does its best to check for the following mobile type devices 'is_iphone' , is_android, 'is_blackberry' , 'is_nokia',  'is_ipad', is_tablet_pc, is_ie_mobi, 'is_opera_mobi' etc.

One easy way to check what it finds is that it will set $context['browser_body_id']  to 'mobile' or 'tablet' if it feels that is what is being used, otherwise it will have the more standard firefox, chrome, etc.  I don't think we have a generic isBrowser('is_mobile') check but one could be added, so till then just use if  $context['browser_body_id'] === 'mobile' as a start

Re: Options for mobile phones

Reply #3

If I'm not wrong that was implemented... if not feel free to move it back. O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: Options for mobile phones

Reply #4

Yep
Thorsten "TE" Eurich
------------------------