$stylevar[imgdir_button] | Button Images Folder |
$stylevar[imgdir_status] | Item Status Icon Folder |
$stylevar[imgdir_attach] | Attachment Icons Folder |
$stylevar[imgdir_misc] | Miscellaneous Images Folder |
$stylevar[imgdir_editor] | Text Editor Controls Folder |
$stylevar[imgdir_poll] | Poll Images Folder |
$stylevar[imgdir_rating] | Ratings Images Folder |
$stylevar[imgdir_reputation] | Reputation Images Folder |
The purpose of having several different StyleVars pointing to different image directories is to allow the administrator to choose which images are shared between styles, and which images are unique to each style.
For example, if a board has three different styles called 'Red', 'Green' and 'Blue', where the only difference between the three styles is the color scheme, the administrator may decide that each style will share all of its images, except for the button images, where he has created specially colored versions of the buttons to match the color schemes of the three styles.
In this case, all the image directory StyleVars could point to the same group of directories, with the exception of the $stylevar[imgdir_button] StyleVar, which would have a unique value for each style to point to the appropriate directory containing the colored buttons for each style.
In use, you will find the image directory StyleVars throughout the templates whenever an image is referenced. For example:
<img src="$stylevar[imgdir_button]/newthread.gif" alt="Post New Thread" />
If our 'Red', 'Green' and 'Blue' styles have unique values for the button images folder, we might see that StyleVar being evaluated in the templates in this sort of manner:
'Red' Style
<img src="images/red_buttons/newthread.gif" alt="Post New Thread" />
<img src="images/greenButtons/newthread.gif" alt="Post New Thread" />
<img src="images/buttons_for_blue/newthread.gif" alt="Post New Thread" />
- A complete URL, such as https://www.example.com/forums/images/buttons
- An absolute path URL such as /forums/images/buttons
- A file path relative to your forum's URL such as images/buttons
Warning:
Do not include a trailing slash at the end of your image directory paths.
This is correct:
images/buttons
This is incorrect:
images/buttons/
This is correct:
images/buttons
This is incorrect:
images/buttons/