Closed robocoder closed 12 years ago
Attachment: stub mobile UI plugin; render footer to switch between view types ActiveMobile.zip
Currently, we instantiate a view using the template path, e.g.,
$view = new Piwik_View('Login/templates/login.tpl');
We should create a view factory (and refactor a bit of the code in #700, e.g., cli templates). We should also standardize on a convention of either subdirectories (e.g., templates/mobile/login.tpl) or a prefix (e.g., 'mobile_login.tpl').
Add a FrontController.getViewType hook.
// default
$viewType = 'full';
if (phpCliMode()) {
$viewType = 'cli';
} else if (isset($session->viewType)) {
$viewType = $session->viewType;
} else {
// mobile browser detection
...
}
View factory method implemented in #921.
$view = Piwik_View::factory('login');
Or: !http://mdbf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=30256
Not as extensive as wurfl but smaller footprint (12mb vs 160k). Note Microsoft Public License so cannot be included in Piwik core.
Could this be implemented as a "mobile theme"? (see #5597)
See also #395
I mark as wont fix since we now have powerful Piwik Mobile app for web analytics reports on the phone, so probably enough. Plus we are trying to move away from flash completely so most phones should be compatible (JS/HTML required of course). For other phones, they can use HTML Reports :)
For mobile devices, we'll probably want to: