Mobile Detective. Example 1.

Groups and rules used

For this page were used next groups/Rules (how to define them you can read here):

  1. SamsungMobile: isMobile, isSamsung
  2. iMobileDevices: isMobile, isiOS

Source code

Here I’ve used next codes:
[МobDetective SamsungMobile] This is mobile device OR from Samsung[/МobDetective]
[МobDetective iMobileDevices] This is a mobile device OR a device with iOS[/МobDetective ]
[МobDetective isMobile] This is a mobile device[/МobDetective ]
[МobDetective !isMobile] This is a desktop PC[/
МobDetective
Note that I’ve used a standard rule isMobile without defining it as a group.

Test for mobile devices from Samsung.

Failed SamsungMobile

Test for mobile devices from Apple.

Failed iMobileDevices

Test for mobile devices.

Failed $detect->isMobile()

Test for desktop PC.

This is a desktop PC