matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.13k stars 2.57k forks source link

Mobile device UI #920

Closed robocoder closed 12 years ago

robocoder commented 14 years ago

For mobile devices, we'll probably want to:

robocoder commented 14 years ago

Attachment: stub mobile UI plugin; render footer to switch between view types ActiveMobile.zip

robocoder commented 14 years ago

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').

robocoder commented 14 years ago

Add a FrontController.getViewType hook.

    // default
    $viewType = 'full';

    if (phpCliMode()) {
        $viewType = 'cli';
    } else if (isset($session->viewType)) {
        $viewType = $session->viewType;
    } else {
        // mobile browser detection
        ...
    }
robocoder commented 14 years ago

View factory method implemented in #921.

    $view = Piwik_View::factory('login');
robocoder commented 14 years ago

See !http://wurfl.sourceforge.net/newapi/index.php

robocoder commented 14 years ago

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.

robocoder commented 14 years ago

Could this be implemented as a "mobile theme"? (see #5597)

robocoder commented 14 years ago

See also #395

mattab commented 12 years ago

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 :)