Skip to content

pafnuty-fansoro-plugins/fansoro-plugin-detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Detect Plugin for Fansoro CMS

version DLE MIT License

The plugin to define the different types of devices from which the user browses the site. Based on Mobile_Detect class.

Special thanks https://github.com/Awilum for an example implementation code.

Install

See this instruction

Usage

In any site template:

{Detect::getUserAgent()}

{Detect::mobileGrade()}

{if Detect::isMobile()}
    {* Do something fot Mobile *}
{/if}

{if Detect::isTablet()}
    {* Do something fot Tablet *}
{/if}

{if Detect::isiPhone()}
    {* Do something fot iPhone *}
{/if}

{if Detect::isiPad()}
    {* Do something fot iPad *}
{/if}

{if Detect::isIOS()}
    {* Do something fot IOS *}
{/if}

{if Detect::isAndroid()}
    {* Do something fot Android *}
{/if}

{if Detect::isChrome()}
    {* Do something fot Chrome *}
{/if}

{if Detect::isOpera()}
    {* Do something fot Opera *}
{/if}

{if Detect::isFirefox()}
    {* Do something fot Firefox *}
{/if}

{if Detect::isIE()}
    {* Do something fot IE *}
{/if}

License

MIT