GithubHelp home page GithubHelp logo

ipublikuj-archive / mobile-detect Goto Github PK

View Code? Open in Web Editor NEW
19.0 5.0 7.0 105 KB

Extension for detecting mobile devices, managing mobile view types, redirect to mobile version for Nette Framework (2.4+)

License: Other

PHP 99.44% HTML 0.56%
mobile mobile-detect device-detection os-detection php php7 php71 php72 nette nette-framework

mobile-detect's People

Contributors

akadlec avatar elcheco avatar gizellos avatar jirinapravnik avatar peldax avatar rhrebecek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mobile-detect's Issues

DetectTabletAsMobile a deviceView

Ve starší verzi (než byla přidaná view - PHONE) jsem používal při extension. Toto nastavení:

redirect:
    mobile:
        isEnabled: true             # default false
    detectTabletAsMobile: true      # default false

Pak mi stačilo zavolat $deviceView->isMobileView() v presenteru a tam si nastavil, co chtěl pro mobilní verzi, kterou jsem zobrazoval i na tabletu. Je to možné nějak teď? Když si nastavím usera genta na iphone, dostanu v deviceview ze jsem PHONE - budiz, ale pokud si prepnu na ipad, tak mam device_view TABLET.

Nemel by se nejak brat tady ohled na to detectTabletAsMobile? Jak docilit jinak toho abych mel jeden vzhled pro to i to?

Resp. kdy vlastně dostanu na isMobile() TRUE. Když kouknu sem: https://github.com/iPublikuj/mobile-detect/blob/master/src/IPub/MobileDetect/Events/OnRequestHandler.php - tak mi přijde, že se tam nikdy nedostane ne? Buď mi to hodí tablet, nebo phone.

$template->getMobileDetectService($vars) is deprecated

I use Nette 2.4.x and PHP 5.6.25, but unfortunately I get the following error message when I use it in Latte {ifMobile}.

Invoking filters via $template->getMobileDetectService($vars) is deprecated, use ($vars|getMobileDetectService)

I've tried different versions of MobileDetect, but there's no one
Thanks in advance for your advice.

null returned by CookieSettings::getDomain()

Ahoj,

po aktualizaci z 1.0.3 na 2.0.0 mi chodí z nette emaily o chybě (viz níže). Problém se mi nasimulovat nepodařilo, nevím tedy kdy uvedený problém nastává. Na webu používám detekci "isMobile". Zkoušel jsem i smazat všechny sessions na serveru což nepomohlo. Popravdě ani netuším kdy a proč se cookies používají (v prohlížeči žádnou nevidím).

Chyba je jasná, funkce vrátí null i když by neměla. Opět zde ale nemám tušení, kde by měla vzít správný string, nikde v kódu jsem jeho přiřazení nenašel...

TypeError: Return value of IPub\MobileDetect\Helpers\CookieSettings::getDomain() must be of the type string, null returned in xxx/vendor/ipub/mobile-detect/src/IPub/MobileDetect/Helpers/CookieSettings.php:116

nette 2.4 compatibility?

Hi,

I just updated to nette 2.4 and I get this error:

PHP User Deprecated: Invoking filters via $template->getMobileDetectService($vars) is deprecated, use ($vars|getMobileDetectService) in .../vendor/latte/latte/src/Latte/Runtime/Template.php:351

Can you help me? :)

Při přepnutí deviceView HttpResponse possible problem

Používám, přepnutí pomocí getParametru (tedy http://site.com?device_view={full/mobile/tablet}) a když kdykoli kliknu, tak se mi do error logu uloží tahle notice:

PHP User Notice: Possible problem: you are sending a HTTP header while already having some data in output buffer. Try OutputDebugger or start session earlier. in .../application/vendor/nette/http/src/Http/Response.php:316

Nikde žádný obsah nevypisuju, session automaticky startuji v configu. Ladenka nic neukládá je to jen v error logu, takže nevím kde pořádně hledat problém...

Tracy panel extension

I was just wondering about extending the tracy bar with mobile-detect panel.

I imagine panel would display some information about detection (current UA, whether header or session was used to determine UA).

I am aware its not neccassary and I may do it myself when I get some free time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.