• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Mobile Browser Style Switch

I think I have the logic of excluding certain controllers done it is just a case of implementing it and adding an option that people can understand!
Out of curiosity, did you get anywhere with the XenForo_Visitor::isBrowsingWith() function?
 
Out of curiosity, did you get anywhere with the XenForo_Visitor::isBrowsingWith() function?

Yeah though still not 100% if I will use it for this and it doesn't effect excluding certain controllers as that is simply the check if the user is mobile need additional checks which controller is being loaded!
 
There should be a default list that would cover blackberry by default... I will check the addon xml file incase it didn't save as default but this is it... covers most smart phones, most older phones, also covers a lot of after market mobile browsers like firefox mobile... and even covers windows embeded devices and kindles... Though if you do find the need to expand it any further feel free... for testing I was adding chrome, in the list..

Code:
android,avantgo,blackberry,blazer,compal,elaine,fennec,hiptop,iemobile,iris,kindle,maemo,midp,phone,plucker,pocket,psp,symbian,treo,vodafone,iphone,windows ce,windows phone

Am i missing something due to no sleep, are you saying that the chrome user agent is in here?
 
Yeah though still not 100% if I will use it for this and it doesn't effect excluding certain controllers as that is simply the check if the user is mobile need additional checks which controller is being loaded!
Any new updates on this Cezz?
Thanks
 
Using on 1.1.2 Seems to be all fine.

Also just a heads up...

Found a list here: http://www.dannyherran.com/2011/02/...t-with-php-ipad-iphone-blackberry-and-others/

Code:
w3c,acs,alav,alca,amoi,audi,avan,benq,bird,blac,blaz,brew,cell,cldc,cmd-,dang,doco,eric,hipt,inno,ipaq,java,jigs,kddi,keji,leno,lg-c,lg-d,lg-g,lge-,
maui,maxo,midp,mits,mmef,mobi,mot-,moto,mwbp,nec-,newt,noki,oper,palm,pana,pant,phil,play,port,prox,qwap,sage,sams,sany,sch-,sec-,send,seri,sgh-,shar,sie-,siem,smal,smar,sony,sph-,symb,t-mo,teli,tim-,tosh,tsm-,upg1,upsi,vk-v,voda,wap-,wapa,wapi,wapp,wapr,webc,winw,winw,xda,xda-

Hope it works well :)

The original lot here has an ident for opera 'oper' which should be taken out if you don't want the desktop client being detected as a mobile as well.

This is my current list seems to cover everything. I'm not a 100% if any other desktop clients are getting filtered too but seems ok so far.

Code:
android,avantgo,blackberry,blazer,compal,elaine,fennec,hiptop,iemobile,iris,kindle,maemo,midp,phone,plucker,pocket,psp,symbian,treo,vodafone,iphone,windows ce,windows phone,w3c,acs,alav,alca,amoi,audi,avan,benq,bird,blac,blaz,brew,cell,cldc,cmd-,dang,doco,eric,hipt,inno,ipaq,java,jigs,kddi,keji,leno,lg-c,lg-d,lg-g,lge-,
maui,maxo,midp,mits,mmef,mobi,mot-,moto,mwbp,nec-,newt,noki,palm,pana,pant,phil,play,port,prox,qwap,sage,sams,sany,sch-,sec-,send,seri,sgh-,shar,sie-,siem,smal,smar,sony,sph-,symb,t-mo,teli,tim-,tosh,tsm-,upg1,upsi,vk-v,voda,wap-,wapa,wapi,wapp,wapr,webc,winw,winw,xda,xda-,alcatel,amoi,cell,cricket,docomo,elaine,htc,iemobile,ipad,ipaq,ipod,j2me, java, midp,mini,mmp,mobi,motorola,nec-,nokia,palm,panasonic,philips,phone,sagem,sharp,sie-,smartphone,sony,symbian,t-mobile
 
Thanks for the mod - installed and working at GeeksChat. (y)

One problem I have found though is that I can't switch to another style on my iPhone - it's effectively "locked in" to the mobile style; I can't go back and forth between Flexile and XFS Mobile Style.

Any way of getting around this so that it autodetects and switches to the ID you specify, but once you change away from that style ID it disables the autoswitch until you manually move back to the mobile style ID or logout?

Change style away = turn OFF autoswitching
Logout = turn ON autoswitching
Change back to mobile style = turn ON autoswitching again

Cheers,
Shaun :D
 
Top Bottom