[RFC] Include mobile style

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Include mobile style

Post by callumacrae »

naim wrote:
You don't need a library to detect something like this...

That library is incompatible with PHP as it is released under the MIT license, anyway.

It is also 91 lines long, most of which are defining useless variables that wouldn't be used. The following code would do:

Code: Select all

$match = '/(android.*mobile|android(?!.*mobile)|blackberry|rim tablet os|iphone|ipod|ipad|avantgo|blazer|elaine|hiptop|palm|plucker|xiino|windows ce; (iemobile|ppc|smartphone)|windows phone os|kindle|mobile|mmp|midp|o2|pda|pocket|psp|symbian|smartphone|treo|up.browser|up.link|vodafone|wap|opera mini)/i';
$is_mobile = (bool) preg_match($match, $user->browser);
Untested.
Made by developers, for developers!
My blog

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC] Include mobile style

Post by hanakin »

first we need to fix prosilver sadly adding a mobile theme can be left up to the user at this point once we fix prosilver and bring it into this decade/millenium we can work on making a responsive theme for phpbb which is the route that should be taken to handle this from a development standpoint
Donations welcome via Paypal Image

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Include mobile style

Post by callumacrae »

I propose the following for the mobile style:

It should use jQuery Mobile. It looks nice, and the colours can be customised using this tool. It should use the prosilver colours.

It should be fairly minimalist. The UCP and MCP (including moderation tools) don't necessarily have to be available. However, if the UCP wasn't available, private messaging should still be as that's an important feature. All the other mobile styles I've looked at, such as the ones available with vB and IPB use a similar mentality to this - it results in a smaller and cleaner style, which is very important.

It shouldn't have to support all mobile phones. If jQuery Mobile were used it would support a lot of mobiles, but if it weren't then I don't see the harm in dropping support for rubbish phone browsers (because there are a lot of them) in order to reduce development and maintenance time.

It should be enabled by default, but should use only hooks (this is actually possible in 3.0, so I'm assuming that it'll be possible in 3.1).

It should automatically detect for phones and display the mobile style to phones that support jQuery Mobile. There are plenty of code snippets in the public domain to do this already as it is fairly common, and I've written something to do it before.


I'm prepared to develop this. I already have a half-developed style which would need updating for jQuery Mobile 1.1, colouring to make it look like prosilver, and completing. You can see it here (there are a few obvious bugs and missing features): http://phpbb-mobile.com/forums/index.php?style=8
Made by developers, for developers!
My blog

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] Include mobile style

Post by Arty »

I like that idea.
callumacrae wrote:The UCP and MCP (including moderation tools) don't necessarily have to be available.
It must be available. Admins/mods must be able to moderate their forum using mobile style, otherwise mobile style loses half of its usefulness.
callumacrae wrote:It shouldn't have to support all mobile phones. If jQuery Mobile were used it would support a lot of mobiles, but if it weren't then I don't see the harm in dropping support for rubbish phone browsers (because there are a lot of them) in order to reduce development and maintenance time.
By that I assume you are talking about outdated mobile browsers? Style must work with all modern browsers, even those that don't support JavaScript.

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Include mobile style

Post by callumacrae »

Modern browsers by definition support JavaScript.
Made by developers, for developers!
My blog

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] Include mobile style

Post by Arty »

callumacrae wrote:Modern browsers by definition support JavaScript.
Not mobile browsers. They are designed to be as efficient as possible to increase battery life for mobile device. JS is disabled by default in some browsers, including Safari for some iOS devices.

User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: [RFC] Include mobile style

Post by Ger »

Smartphones have a renewing frequency of approx. 3 years. After that, they often aren't even supported by the manufacturers anymore. I'd say phpBB shouldn't be aiming at supporting devices that aren't supported by their own manufacturer.
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

User avatar
Mess
Registered User
Posts: 199
Joined: Wed Jun 13, 2012 10:14 am

Re: [RFC] Include mobile style

Post by Mess »

Arty wrote:I like that idea.
callumacrae wrote:The UCP and MCP (including moderation tools) don't necessarily have to be available.
It must be available. Admins/mods must be able to moderate their forum using mobile style, otherwise mobile style loses half of its usefulness.
-1
The focus should be on getting users a better mobile browser experience.
Admins/Moderators would still be able to access the ACP/MCP from a non optimized mobile style.

Once we get a good working mobile style for our users we should focus on getting better mobile moderation tools. I think admin tools can be ignored for mobile styles all together.

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Include mobile style

Post by callumacrae »

Arty wrote:
callumacrae wrote:Modern browsers by definition support JavaScript.
Not mobile browsers. They are designed to be as efficient as possible to increase battery life for mobile device. JS is disabled by default in some browsers, including Safari for some iOS devices.
http://jquerymobile.com/gbs/

jQuery Mobile doesn't work without JavaScript. I would say that that list is long enough to warrant using jQuery Mobile.

EDIT: Hangon, it works without JavaScript (mostly).

EDIT2: Just tested it without JavaScript. It's functional, but really really really ugly.
Made by developers, for developers!
My blog

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Include mobile style

Post by DavidIQ »

Mess wrote:-1
The focus should be on getting users a better mobile browser experience.
Admins/Moderators would still be able to access the ACP/MCP from a non optimized mobile style.

Once we get a good working mobile style for our users we should focus on getting better mobile moderation tools. I think admin tools can be ignored for mobile styles all together.
-1. As an administrator and/or Moderator it is sometimes imperative to take care of something immediately. What you are suggesting is that one would have to wait until one is at an actual computer which could sometimes be hours or even days before one can effectively take care of an immediately pressing issue. Either the mobile style should be complete or complete enough to provide basic moderator and administrator actions such as warnings, locking, moving, etc. Leaving these things out would make it half as useful, as Arty already mentioned.
Image

Post Reply