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

As designed Better way to handle images path

Ahmed

Well-known member
#1
While working on a my first xF skin, I was impressed how easy it is to work with, but I noticed it's too complicated when it comes to setting the right images path specially if you put the a new custome style in another directory (e.g. one level or two up the default one) and it could be improved and made much easier. In its current state, you need to go through tens of template to set the right path in there because the imagePath variable doesn't include the whole path.
For example:
In many template, the code is like this:
Code:
@imagePath/xenforo/gradients/xxx.png
While it should be like this:
Code:
@imagePath/gradients/xxx.png
So when you set the path to images that's all what you need to put in there, and the @imagePath should include all directories directly to the style directory. That will be easier and more convenient.

Not to mention how it's a pain to set (of even find) where to set the correct avatars path in a custom style. See here.
 

Kier

XenForo Developer
Staff member
#2
The intention is that other products that include images would create their own directory as a sibling of styles/{style-name}/xenforo - so you could have styles/{style-name}/xencarta etc. As such, this is working as designed.
 

Ahmed

Well-known member
#3
You mean there should be a directory called 'xenforo' inside the custom style directory for the main xF product images so it won't get messed up by third-party products images? OK, that's a fair point and it makes sense.