PDA

View Full Version : Fix Missing vBulletin Images In Custom Styles


Carnage
11 Aug 2008, 00:51
This was a problem we were having on our forums, we have several different styles, each have their own image sets. When a new version of vBulletin came out that added a new icon or we installed an addon such as the blog we found that there were missing images all over the place.

The solution:
First, all alternative images were moved to a directory named skins, the images for each skin were put into appropriately named directories inside the skins directory.

Then the following code was placed into a .htaccess file in the skins directory.

Options +FollowSymLinks
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/(.*)$ /images/$2

Essentially what this does, is if a file is not found within the sub-directories it rewrites it to look instead in the default vBulletin images directory.

This will work with all versions of vBulletin provided your host supports mod_rewrite directives in .htaccess files.

Triky
16 Aug 2008, 21:49
Wow, great idea Carnage-. You have a new personal message.
Italian translation for this article at vB-Italy.org - Italian vBulletin Suppport Forum: http://www.vb-italy.org/showthread.php?p=379#post379. Thanks to Carnage- for given permissions.