how can check in 'header.tpl' user come from mobile or laptop?
have some code in flynax?
i was try in 'index.php' like this way
PHP Code:
Only registered members can view the code.
how can check in 'header.tpl' user come from mobile or laptop?
have some code in flynax?
i was try in 'index.php' like this way
PHP Code:
Only registered members can view the code.
Hello Sahap,
You can add your code in header.tpl also: add smarty tags {php}...{/php} and put your code.
Thank you, Curtis.
@Flynax Company
Здравствуйте, понадобился аналогичный функционал.
создал в каталоге /libs/smarty/plugins файл function.MobDetect.php
добавил в него:
файл MobileDetect.php (в этом же каталоге положил)Code:Only registered members can view the code.
создал в каталоге /libs/smarty/plugins файл function.isMobile.php с содержимым:
в файле /templates/uyoltin/tpl/header.tpl вызвалCode:Only registered members can view the code.
выдает ошибку Class 'MobileDetect' не найденCode:Only registered members can view the code.
исходник скачивал отсюда
решил проблему, добавлением класса в smarty.class.php