ipublikuj-archive / mobile-detect Goto Github PK
View Code? Open in Web Editor NEWExtension for detecting mobile devices, managing mobile view types, redirect to mobile version for Nette Framework (2.4+)
License: Other
Extension for detecting mobile devices, managing mobile view types, redirect to mobile version for Nette Framework (2.4+)
License: Other
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.
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.
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
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? :)
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...
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.