GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Hi, I did a new website using the mobile module and had to do some modifications which I think would worth sharing with you.
the problems we had was,
I did some modifications to the module which facilitates these, as I think this will be a good addition to the module, just sending a pull request.
thanks for the good work :)
MINOR: ipad detect facilitated
MINOR: ability to set different themes for ipad / iphone / and androi…
MINOR: added new fields to save themes for different devices
MINOR: added an extension to the SiteTree to modify access for users viewing the site using different devices.
MiNOR: registered the new MobileAccessModifier extension to SiteTree
I love the idea of different themes for different browsers (http://open.silverstripe.org/ticket/6008) however don't you think it would be better to abstract away from 3 specific devices (and hard coding) and make that dynamic. Perhaps a dataobject for the profile and have a checkbox for each of the devices in the mobile detection library?
yes, obviously it makes sense, and they can specify any device / theme they need. but logically most sites wont use more than 4 themes? (I can code that up if it you think it helps )
Also I think that access modifier for the devices will be important, cause that was something really helpful with my development.
MINOR: is_ipad method is more straightforward.
MINOR: is_mobile checks for is_ipad
one more thing, I'd like to add the feature to keep home page for different types of devices, basically mobile users and computer users
if we can integrate the functionality of this module https://github.com/fonsekaean/Device-Specific-Home-Pages-for-SilverStripe will be more useful.
Regarding your last commit you may want to make the fact that an iPad is treated like a mobile theme optional. We have clients who regard the iPad as a full website. The experience on the iPad can be more suited to larger desktop displays.
And like I said in my previous comment, for including this feature in the module I would prefer to have site profiles rather than hardcoded theme for A, theme for B.
Going forward that would be the most sound approach.
I will make it using data objects and commit.
Actually detecting iPad has some more advantages rather than just adding a theme.
Also this helped me a lot to make responsive web development possible with Silverstripe
And ipad detection will give the facilitate to have a separate theme for ipad
It seems like it might be better to break things down so that you can have an arbitrary number of device-specific templates, and then a specification of which devices they apply to.
So, you might configure your themes like this:
Which would mean iPads and iPhones get theme1, android tablets get theme2, and everything else (including both computers and android phones) get theme3.
However, a more usual grouping might be:
Which means that Android phones and iPhones would get your mobile_theme, iPads (but not android tablets) would get your tablet theme, and everyone else (including android tablets) would get your default theme.
So, what device options would you be able to specify?
That last option would enable you to set up an IE lte 6 theme. ;-)
Combined with the theme cascading planned for SilverStripe 3 (where you can have a theme that just defines the differences from the default theme) this could be quite powerful.
sminnee - that was what we were thinking with http://open.silverstripe.org/ticket/6008. If you have any other design ideas probably best to post there.
MINOR: made theme selection more abstract where users can add themes …
…as they wish, hardcoded selection is removed.
sminnee - I think thats a good option, and my last commit enables theme selection more abstract.
I added some new feature for this, which facilitate the users to show / hide pages from different devices. this will be good to have.
The template selection is taken to a more abstract level now
Your commits / pull request and posts contain a typo: andriod should be replaced with android (maintaining upper & lower cases appropriately) in every place this string occurs.
thanks for pointing it out :)
No problem. Just there is no need for complaints about the lack of android support ;)
Hey Nivanka, I know this might come as a blast from the past - but if you are interested in still merging this pull request, can you please rebase? Otherwise I'll close it
@chillu if you think it's ready to go in now, then we can merge by hand to deal with conflicts, however, I think there are valid points being made that haven't been addressed and so someone needs to pick this up if it's going to get in...
Given I haven't heard from Nivanka in over a month, there's merge conflicts, no tests or docs in the PR, on a module which is really an outdated approach to mobile, I'm going to close this.