• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Advanced Styling Rules v1.0.4

No permission to download
This add-on offers an advanced styling system that allows you to assign specific styles to any page

alexD

Well-known member
#1
DaTheme.png — Advanced Styling Rules SetStyleForX
This add-on offers an advanced styling system that allows you to assign specific styles to any page you like.
search_specific_rule_with_expanded_menu_and_info_box.png

- You may find it useful if:
  • you have any site locations (like often visited/popular threads) that could get some extra love
  • you need to apply different styles for different devices and/or systems
  • you own more than one domain that points to one XenForo installation and could use different styles for each one (please make sure you don't violate the terms in the XenForo License Agreement) [1]
  • you are a style designer who likes the idea of displaying sneak peaks from your alpha/beta-stage designs (something that could possibly result in valuable feedback)
  • you would like to display custom pages/messages/advertisments for specific search terms
! Please consider donating if you use this add-on.
....................
 

alexD

Well-known member
#2
This post will be getting updates from time to time with additional information and maybe some FAQs.
------------------------------------------------------------------------------------------------------------------------------------------------------

FAQ
What is the Validation step I see every time I try to create a new rule?
-It's a feature that aims to automate the URL splitting process. It requires the adminCP URL to have the same scheme, host and base (XenForo installation) path with the inserted one.
---------------------------------------------------------------------------------------------------------------
I can move the rules up and down, why?
-The rules nearest the top have higher priority than the following ones.
---------------------------------------------------------------------------------------------------------------
I can not find the control panel, what's wrong?
-Only Super Admins and administrators that have the "Manage styles, style properties, and templates " permission are allowed to use this add-on.
-
- adminCP_location.png
---------------------------------------------------------------------------------------------------------------
How exactly the rules and sub-rules are structured?
  • Main Rule
    • URI
      • Scheme
      • Host
      • Base Path: the path of your XenForo location, if any
      • Rest Path: the remaining path (full path - base path)
      • Query
    • Device
      • Browser
      • is.Mobile
      • User Agent regular expression
    • User
      • User Id(s)
      • IP(s)
      • User Group(s)
    • Style(s)
Screenshots
example_part0.png example_part1.png example_part2_validation.png example_part3.png example_part4_rule.png example_part5.png
In the above screenshots you can see how to assign a specific style (in our case Black n' White) to a specific thread.
 

Morgain

Well-known member
#5
Sorry - don't get this at all. Does this affect the URL? the tabs? the breadcrumbs? or the content of the page?

How about example screenshots?
 

alexD

Well-known member
#6
Sorry - don't get this at all. Does this affect the URL? the tabs? the breadcrumbs? or the content of the page?

How about example screenshots?
Hi there,

This add-on affects the whole displayed style by taking into account any rules set by the administrator, let them be URLs, User Groups or any combination from this list.

For example you could create a rule that would display a random style from a set of selected ones to visitors/members browsing from an iPhone. That rule would require the following settings:

set Browser to 'WebKit'
set isMobile to 'Yes'
check multiple styles

...you could also provide a regular expression for the user agent in the browser category instead.

It's a really unique add-on, a cool feature that only exists for XenForo.
 
#12
I'll try to find a workaround, thanks for reporting!
You'll need to wait till I get a friend's smartphone though.
If you just install the Tapatalk plugin, and point your browser to /mobiquo/mobiquo.php on your forums there is a base64 encoded version of the error message there. (My site for example)

In fact, if you edit line 41 of /mobiquo/mobiquo.php from
Code:
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n".(xmlresperror("Server error occurred: '{$error['message']} (".basename($error['file']).":{$error['line']})'")->serialize('UTF-8'));
to
Code:
echo "Server error occurred: '{$error['message']} (".basename($error['file']).":{$error['line']})'";
It should just echo out the un-encoded error, without the need to access it on a smartphone :)
 

Morgain

Well-known member
#17
So if I want a dedicated Category page, or a specific forum list page, or a usergroup set of Profile pages - I could assign a certain design to a unique page? or to a group of pages?
 

alexD

Well-known member
#18
So if I want a dedicated Category page, or a specific forum list page, or a usergroup set of Profile pages - I could assign a certain design to a unique page? or to a group of pages?
Think of it like this. In your post, you' re talking about 3 pages. Every page has a URL. If we wanted to assign a certain style to a page, we' d use the URI sub-rules and create a main rule for that page.

example_1.png
Here, I am creating a URI-only based rule with a specific style assigned to my profile page, any visitor browsing that page will see that specific style.

Let's say I don't want everyone to see my cool user profile style, but only a few trusted members of a specific User Group, let's say Moderators.
I'll need to select/check that User Group inside the User Group sub-rule field.
example_2.png

If I wanted my Moderators to see that style only by browsing from a mobile device I would set the isMobile sub-rule to 'Yes'.

Notice the asterisk on the right side of the User Group label. As we haven't yet checked a group, that asterisk notifies us that the User Group criteria will not be checked to assign the style.
 

Digital Doctor

Well-known member
#19
This seems to create the opportunity for Style creators to make xenforo even better.
If I bought a Style from DesignerX ... how would they also include page / node / URL specific styles ?
Would they send me an .xml file and I would upload it ?
Is it not possible ?
 

alexD

Well-known member
#20
This seems to create the opportunity for Style creators to make xenforo even better.
If I bought a Style from DesignerX ... how would they also include page / node / URL specific styles ?
Would they send me an .xml file and I would upload it ?
Is it not possible ?
A designer needs to create a separate style and send you the .xml file. The only one who can assign that style to a specific page / node / URL is you.