+ Reply to Thread
Results 1 to 5 of 5

Thread: how check user come from mobile or laptop?

  1. #1
    Senior Member
    Join Date
    Mar 2015
    Posts
    130

    how check user come from mobile or laptop?

    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

  2. #2
    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

  3. #3
    Junior Member
    Join Date
    Jan 2023
    Posts
    2
    Здравствуйте, понадобился аналогичный функционал.

    создал в каталоге /libs/smarty/plugins файл function.MobDetect.php
    добавил в него:

    Code:
    Only registered members can view the code.
    файл MobileDetect.php (в этом же каталоге положил)

    создал в каталоге /libs/smarty/plugins файл function.isMobile.php с содержимым:
    Code:
    Only registered members can view the code.
    в файле /templates/uyoltin/tpl/header.tpl вызвал
    Code:
    Only registered members can view the code.
    выдает ошибку Class 'MobileDetect' не найден

    исходник скачивал отсюда

  4. #4
    Junior Member
    Join Date
    Jan 2023
    Posts
    2
    решил проблему, добавлением класса в smarty.class.php

  5. #5
    Quote Originally Posted by bahin View Post
    решил проблему, добавлением класса в smarty.class.php
    I have no idea what you're talking about. Would mind sharing your thought in English so everyone else can help?

+ Reply to Thread