Resource icon

Advanced Styling Rules for XF1 v1.0.4

No permission to download
Alex,
Just to let you know that i just install the Firefox Beta on Android and it will show my site in Desktop style instead of the mobile style which I set for all mobile device.
Chrome will work very well.
Hi Andy,
The add-on uses the default XenForo functionality to detect if the browser is a mobile device or not.
Until there's an update to the core XenForo_Visitor::isBrowsingWith('mobile') method, it's best to create a separate rule with a regEx sub-rule (which can detect this specific system/browser).
 
just wondering if its possible to not include ipad to detect as mobile?

if i set "is mobile" to yes:
is it possible to detect if the user is using ipad, he will use the original style.
while others will use the mobile theme style.

is that possible?
 
thanks russ.

edited:
alexd your addon is great!
I suggest to have a description/notes box in every rule just to describe which is which :)
 
I have an issue with the Manage Rules page showing. I click on it and get a blank page with Manage Rules at the top. Permissions are set but nothing.
 
I have an issue with the Manage Rules page showing. I click on it and get a blank page with Manage Rules at the top. Permissions are set but nothing.
Hi there,

Make sure you correctly replace every file on your server when upgrading the add-on to the latest version.

Cheers,
Alex
 
This is a fresh install. Have never used it before.

  • Try using a different browser.
If the problem persists, it means the required js files are not loading.​
If you can inspect the 'Net' with your browser tools, make sure there aren't any failed requests.​

  • Have you renamed the admin.php page?

  • Can you access '/js/datheme/manage_styles_index.js' ? Is the text obfuscated or does it start with:
Rich (BB code):
var manageStyles = new Class({

  • Try changing the system clock of your client PC to a date before June 13th of 2012.
 
Hi Andy,
The add-on uses the default XenForo functionality to detect if the browser is a mobile device or not.
Until there's an update to the core XenForo_Visitor::isBrowsingWith('mobile') method, it's best to create a separate rule with a regEx sub-rule (which can detect this specific system/browser).
Please let us know how can this regEx rule be. I can't make it detect my mobile.
 
Please let us know how can this regEx rule be. I can't make it detect my mobile.
Hi,

When creating new posts, does your mobile device display a rich BB code interface?
Could you specify the brand, model and the browser you use?
 
Hi,

When creating new posts, does your mobile device display a rich BB code interface?
Could you specify the brand, model and the browser you use?

Alex, thank's for your fast answer. Mi phone is a GalaxyS2, and no, it doesn't display a rich bb code interface.
Here is the $_SERVER array of mi mobile:
Code:
Array
(
[HTTP_HOST] => xxxxxxxxxxxx.com
[HTTP_CONNECTION] => keep-alive
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_X_WAP_PROFILE] => http://wap.samsungmobile.com/uaprof/GT-I9100.xml
[HTTP_USER_AGENT] => Mozilla/5.0 (Linux; U; Android 4.0.3; es-us; GT-I9100 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
[HTTP_ACCEPT_ENCODING] => gzip,deflate
[HTTP_ACCEPT_LANGUAGE] => es-US, en-US
[HTTP_ACCEPT_CHARSET] => utf-8, iso-8859-1, utf-16, *;q=0.7
[HTTP_COOKIE] => xf_session_admin=1c76d80d2061dac3fef4e5f8f95f4ec6; xf_user=1%2Cc3b33e5422d89a8477fcf5b471d4c983d3d8c384; xf_session=fafe69d819933a0da37605283a90fce7
[PATH] => /sbin:/bin:/usr/sbin:/usr/bin
[SERVER_SIGNATURE] =>
[SERVER_SOFTWARE] => Apache
[SERVER_NAME] => xxxxxxxxxxxxxxx.com
[SERVER_ADDR] => xxxxxxxxxxxxx
[SERVER_PORT] => 80
[REMOTE_ADDR] => xxxxxxxxxxxxxxx
[DOCUMENT_ROOT] => /usr/local/apache/htdocs
[SERVER_ADMIN] => admin@xxxxxxxxxxxxxx.com
[SCRIPT_FILENAME] => /www/xxxxxxxxxxxxxxx/ua.php
[REMOTE_PORT] => 39167
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] =>
[REQUEST_URI] => /ua.php
[SCRIPT_NAME] => /ua.php
[PHP_SELF] => /ua.php
[REQUEST_TIME] => 1343060784
)
 
Alex, thank's for your fast answer. Mi phone is a GalaxyS2, and no, it doesn't display a rich bb code interface.
Here is the $_SERVER array of mi mobile:
...
Not displaying a rich editor means that the isMobile sub rule should work without a problem. Creating a new rule with the isMobile set to Yes has to work as it uses the exact same detection logic.
.webp
Make sure there are no other sub-rules interfering and that you have selected the correct style.


In the Regular Expression field add any regEx you find useful. To use the ones from that gist, you'll first need to remove the delimiters.
So for example if you'd like to use the following regEx:
Rich (BB code):
/Mobile|Android|BlackBerry/
you will first have to remove the red slashes.
 
I suggest to have a description/notes box in every rule just to describe which is which :)

if you have different rules for different devices, its hard to remember which one is for which device
 
So I added this rule:

Code:
http://www.minecraftsurvivalgames.com/―*―Yes―XFStop Mobile

However its not redirecting to the template using my phone (iphone) unless I force change it to the mobile theme. Is there any troubleshooting steps?
 
Top Bottom