XF 1.3 Confused about style management

Neil E.

Active member
It's difficult to explain what I'm not understanding, but I'll do my best.
The master style is the original XF style.
The default style is a copy of the master style which may or may not be altered by the user.
A new style is a copy of the master style but with changes by the style designer or by the user.
The new style can be a child style if desired.

Do styles only ever reside in /styles/default/xenforo on the server?

I had thought that creating a new style would change the server file structure like the picture, thus the new style (ODSC) would be easily spotted in styles.

style structure.webp


I recently asked about custom default avatars and the default avatar location (SP>General>Path To Images: Styles/default).
style note 1.webp

This sounds good, but now there would be a whole style directory that would not be upgraded. Correcting this might be worse than just having to redo custom default avatars each upgrade.

This reminds me of a conversation with Guiltar about his TMS addon (not supposed to be discussed here, but might shed some light on my confusion).
style note 2.webp

Can someone clue me in on the different ways that styles are handled and where they are stored? I am able to work with styles, but thought the file structure would be more obvious.

tms note 1.webp

tms note 2.webp
 
You create custom style directories in the \styles directory.

So for example:
  • \styles\
    • default
    • mystyle
    • myotherstyle
    • darkstyle
    • lightstyle
Within each of those directories will be all of the folders and files found in the default style directory.

If any images are changed or added to the default style, you will need to replicate that in your custom style directories.
 
OK, but here is my current file structure and ODSC is not there. That is what I find so strange. Shouldn't the "Create Style" function have already done this when the style was originally created?
current files.webp

Obviously I don't understand the process. Is one supposed to create this folder before using the "create style" button?
 
Creating a new style in the ACP does nothing with regards to the server files.

You need to create the directory and copy the files to it.

You also need to set the path to it in the new style you create.

upload_2014-8-6_21-14-9.webp
 
I get the idea of creating the directory and copying the files. This would be like my very first picture in the topic. I also get why the path to images has to change relative to the new directory. What I'm trying to understand is how it works currently without a new directory and path change.
 
OK, maybe some others can chime in on how they add styles. I expect most users load them into the default style directory. Perhaps someone can illustrate how using a new directory would be advantageous.
 
Thank you for your help. Your explanation is clear, and I see that there are two possible methods for adding styles.
1) new style in the default style directory (default method)
2) new style placed in a new directory (created by the user)

Regarding changing the default custom avatars:
Method 1 requires that I redo a changed default avatar each upgrade
Method 2 requires that I add any possible other changed files on upgrade

All I'm looking for now is feedback on reasons to use Method 1 or Method 2. Either one works. With little previous forum admin experience it is difficult for me to determine why I should do things one way or another.
 
You can create a new style without having a corresponding folder on the server.
If you don't change the image path it will use the default style folder.

If you change the image path to use a different style folder then it must be created as per this thread: http://xenforo.com/community/threads/confused-about-style-management.80159/#post-805950

Default style images are rarely changed.

It is far better to have a custom style folder than use the default style folder and lost your custom icons every upgrade.
 
Back
Top Bottom