vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Graphics Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=221)
-   -   Fix Missing vBulletin Images In Custom Styles (https://vborg.vbsupport.ru/showthread.php?t=187785)

Carnage 08-10-2008 10:00 PM

Fix Missing vBulletin Images In Custom Styles
 
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.

Code:

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 08-16-2008 07:49 PM

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.


All times are GMT. The time now is 11:11 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02149 seconds
  • Memory Usage 1,707KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete