Browser Detection (Mobile/MSIE)

Browser Detection (Mobile/MSIE) 1.3.3

No permission to download

Mouth

Well-known member
Yes:
HTML:
    <xen:if is="{$visitor.getBrowser.isMobile}">
        You're using a mobile device. {xen:if "{$visitor.getBrowser.isTablet}", "This Mobile device is a tablet"}
    <xen:else />
        You're not using any mobile devices.
    </xen:if>
Would be TERRIFIC to have something like this as a User Criteria for Notices !!!
 

cclaerhout

Well-known member
How might I use this to display a notice to IE users?
See this example (available in the presentation of this addon):

HTML:
    <xen:if is="{$visitor.getBrowser.isIE}">
        {xen:if "{$visitor.getBrowser.IEis} == 9", "You're using Internet Explorer 9", "You're using Internet Explorer {$visitor.getBrowser.IEis}"}
    <xen:elseif is="{$visitor.getBrowser.isMobile}" />
        You're using a mobile device.{xen:if "{$visitor.getBrowser.isTablet}", "This Mobile device is a tablet"}
    <xen:else />
        Hello world !
    </xen:if>
 

maxicep

Active member
Is possible to add some custom mobile device definitions ? (Because i m using Mobile Agent Tracer and need add custom user agents or devices difinitions )

Or are there any update the all mobile and tablet agents and browsers?
 

cclaerhout

Well-known member
Is possible to add some custom mobile device definitions ? (Because i m using Mobile Agent Tracer and need add custom user agents or devices difinitions )

Or are there any update the all mobile and tablet agents and browsers?
This addon is related to this class: http://mobiledetect.net/

It would require to update to the last version. I will do it, but no time for this at the moment.
 

HWS

Well-known member
This add-on is a real live saver. We use it to decide which ads we load into our responsive design. Otherwise we would have to hide ads, which falsify all statistics and is also not very liked by advertisers. ;-)
 

cclaerhout

Well-known member
cclaerhout updated Browser Detection (Mobile/MSIE) with a new update entry:

Version 1.3 released

Version 1.3 released
  • Mobiledetect class updated to 2.7.9 version
    • New mobile devices detected: LG, Micromax, iMobile, SimValley
    • New tablets devices detected: SurfaceTablet, HPTablet, FujitsuTablet, PrestigioTablet, LenovoTablet, IntensoTablet, IRUTablet, MegafonTablet, EbodaTablet, AllViewTablet, SonyTablet, MIDTablet, PantechTablet, BronchoTablet, VersusTablet, ZyncTablet, PositivoTablet, KoboTablet, DanewTablet, TexetTablet, TrekstorTablet,...
Read the rest of this update entry...
 

D.O.A.

Well-known member
This add-on is a real live saver. We use it to decide which ads we load into our responsive design. Otherwise we would have to hide ads, which falsify all statistics and is also not very liked by advertisers. ;-)
Just to ask you about that, is that like hiding it with CSS? (not being liked by advertisers) because I was planning (until now) on using something like;

<div class='bigBanner'>{content}</div>
<div class="littleBanner">{content}</div>

css:

Code:
.littleBanner
     {
          display: none;
     }

    <xen:if is="@enableResponsive">
    @media (max-width:@maxResponsiveNarrowWidth)
    {
          .littleBanner
          {
               display: block;
          }

          .bigBanner
          {
               display: none;
          }
    }
    </xen:if>
 

cclaerhout

Well-known member
@D.O.A
The visitor object is not available in the css templates, so you need to use the conditionnal (read the faq for this) in the "normal" template and include a special css template with custom styles.

Example taken from the TinyMCE Quattro addon:
HTML:
<xen:if is="{$visitor.getBrowser.IEis} != 7">
   <xen:require css="tiny_quattro_editor.css" />
<xen:else />
   <xen:require css="tiny_quattro_editor_ie7.css" />
</xen:if>
 

Mouth

Well-known member
XF v1.3.0
Browser Detection: v1.3
Mobile Agent Tracer: v1.5.2

Server Error Log (repeated 9 times in last few hours, with same error (isTablet)) ...

Code:
ErrorException: Undefined index: isTablet - library/Sedo/AgentTracer/Helper/Detector.php:18
Generated By: Kimberley, Today at 13:02
Stack Trace
#0 /var/www/netrider/library/Sedo/AgentTracer/Helper/Detector.php(18): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/netrid...', 18, Array)
#1 /var/www/netrider/library/Sedo/AgentTracer/Datawriter/DiscussionMessage.php(26): Sedo_AgentTracer_Helper_Detector::get()
#2 /var/www/netrider/library/XenForo/DataWriter/DiscussionMessage.php(391): Sedo_AgentTracer_Datawriter_DiscussionMessage->_messagePreSave()
#3 /var/www/netrider/library/XenForo/DataWriter.php(1446): XenForo_DataWriter_DiscussionMessage->_preSave()
#4 /var/www/netrider/library/XenForo/ControllerPublic/Thread.php(542): XenForo_DataWriter->preSave()
#5 /var/www/netrider/library/ThreadBan/ControllerPublic/Thread.php(139): XenForo_ControllerPublic_Thread->actionAddReply()
#6 /var/www/netrider/library/Tac/StopHumanSpam/ControllerPublic/Thread.php(170): ThreadBan_ControllerPublic_Thread->actionAddReply()
#7 /var/www/netrider/library/Tac/StopHumanSpam/ControllerPublic/Thread.php(85): Tac_StopHumanSpam_ControllerPublic_Thread->addReplyResponse(false)
#8 /var/www/netrider/library/XenForo/FrontController.php(347): Tac_StopHumanSpam_ControllerPublic_Thread->actionAddReply()
#9 /var/www/netrider/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /var/www/netrider/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(74) "http://netrider.net.au/threads/embarassing-newbie-mistakes.94796/add-reply"
["_GET"] => array(1) {
["/threads/embarassing-newbie-mistakes_94796/add-reply"] => string(0) ""
}
["_POST"] => array(9) {
["message_html"] => string(234) "<p>[QUOTE="Petesul, post: 2705022, member: 41931"]Won't have nuts if it is a girl bike! Kimberley, is a girl or boy bike?[/QUOTE]</p><p><br></p><p>Ooh I don't know, I haven't even named it! It'd be fun if it was a boy though, heh.</p>"
["_xfRelativeResolver"] => string(72) "http://netrider.net.au/threads/embarassing-newbie-mistakes.94796/page-52"
["attachment_hash"] => string(32) "04483a8c81973de884d72da1aa4827b4"
["last_date"] => string(10) "1394617707"
["last_known_date"] => string(10) "1394617707"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(50) "/threads/embarassing-newbie-mistakes.94796/page-52"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 

Arkshine

Active member
Cédric, Install & Upgrade add-on is not happy with your latest version, when I try to upgrade.

Code:
String could not be parsed as XML

SimpleXMLElement->__construct() in AddOnInstaller/Model/AddOn.php at line 0
AddOnInstaller_Model_AddOn->getXmlType() in AddOnInstaller/ControllerAdmin/AddOn.php at line 167
AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /srv/d_cs-amx/www/cs-amx.fr/htdocs/admin.php at line 13
 

TBDragon

Active member
i got this error after i upload files

Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /usr/local/lsws/DEFAULT/html/library/Sedo/DetectBrowser/Listener/Visitor.php on line 164
 

TBDragon

Active member
i got this error after i upload files

Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /usr/local/lsws/DEFAULT/html/library/Sedo/DetectBrowser/Listener/Visitor.php on line 164
i solve it by edit the line

PHP:
$wip['isMobile'] => true;
to
PHP:
$wip['isMobile'] = true;
 
Top