Browser Detection

Browser Detection 2.4.0

Sem autorização para baixar
Compatibilidade com XF
  1. 2.3.x
  2. 2.2.x
Short Description
A light-weight shim around Mobile_detect for XenForo 2
A light-weight shim around Mobile_detect for XenForo 2 Usage (in templates) The add-on injects the global variable $mobileDetect, check that the variable is set before calling any methods to prevent errors during upgrades or if the add-on is disabled.
PHP:
            <xf:if is="$mobileDetect && $mobileDetect.isMobile()"> Is Mobile <xf:else /> Not Mobile </xf:if>
PHP:
           <xf:if is="$mobileDetect && $mobileDetect.is('Firefox')">
Is Firefox
<xf:else />
Not Firefox
</xf:if>
PHP:
            <xf:if is="$mobileDetect && $mobileDetect.is('Chrome')">
Is Chrome
<xf:else />
Not Chrome
</xf:if>
Usage (in php)
PHP:
            $mobileDetect = \SV\BrowserDetection\Listener::getMobileDetection();
$isMobile = $mobileDetect && $mobileDetect->isMobile() ? "_m1" : "_m0";
XF2.1 Page caching The integration mobile detection with XF2.1+ full-page caching, add to the config.php this;
PHP:
            $config['pageCache']['onSetup'] = function (\XF\PageCache $pageCache) {
$pageCache->setCacheIdGenerator(function(\XF\Http\Request $request) {
return \SV\BrowserDetection\CacheHelper::getPageCacheId($request);
});
};
Contributing features or bug fixes
Please create a Github Pull request via the "More information." link. Contributions If you appreciate this add-on, please consider a contribution via PayPal. Details will be provide via private conversation. Please contact me if you wish for different licencing arrangements. Licence See MobileDetectLicense.md for Mobile-Detect's licence (MIT licensed)
  • Curtir
Reações: ADYADY
Autor
newimage
Visualizações
962
Tipo de extensão
zip
Tamanho do arquivo
43,2 KB
Primeiro lançamento
Última atualização
Avaliações 0,00 estrelas 0 avaliações
Link was Broken? Please Send Message to NP Team with direct message, You will get it very quickly!
Support Developer If you are satisfied with your test or project have earn money successfully, Maybe you can click more information button to support with buying.

Últimas atualizações

  1. 2.4.0 - change log
    Restore XF2.1 support Update Mobile Detect from v3.74.3 => v4.8.06. Note; this...
  2. 2.3.1 - changelog
    XF2.3 support php 8.4 compatibility Update MobileDetect library to 3.74.3
  3. 2.3.0 - changelog
    This add-on is now available on atelieraphelion.com Require XenForo 2.2+ Require php 7.2+...

Mais recursos de newimage

SalePro - Sistema de Gerenciamento de Inventário com POS, RH e Contabilidade N
um sistema baseado em Laravel (PHP) para gerenciamento de estoque/inventário que permite que você gerencie seu estoque etc
Visualizações
1.438
Atualizado
XenForo Pesquisa Aprofundada N
um addon que substitui o sistema de busca built-in do XenForo

Recursos similares

[FF] Page Criteria for Xon Browser Detection A
dd a new set of criterion to the Page criteria
Visualizações
461
Atualizado
[AndyB] Attachment browser A
Allows viewing members attachments.
Visualizações
475
Atualizado
[AndyB] Image browser A
Allows viewing latest image attachments.
Visualizações
103
Atualizado
Top