Dynamic Favicon
This modification is in the archives.
>> Note: This requires Apache & mod rewrite. If you do not have these, I cannot help you. << What does it do? This little code snippet and directory setup, combined with mod rewrite will allow you to dynamically generate a favicon for your site based on the user's style preference. What is required for this to run properly? Apache & mod rewrite. If you do not have these, the mod will not function properly. Absolutely no change or addition in vBulletin code is necessary. For those of you who want to skip code addition and upload the files, I've attached the PHP code to the post, however you will need to read on for .htaccess instructions. If you have an existing .htaccess file, please do not delete the existing contents, instead follow the instructions I've provided here. Also, please read the PHP code section and make sure you update the file paths if necessary. First, create a new file in the root directory of your forum called favicon.php If you do not know where this is, navigate to vBulletin Options -> Site Name / URL / Contact Details and look at the URL provided for Forum URL. This is the root directory of your forum. In this new file, you will need to add the following code. >> NOTE: YOU WILL NEED TO CHANGE THE FILE PATHS FOR THIS TO FUNCTION PROPERLY. << To do this, locate /skins/default/misc/favicon.ico You will need to change this to the misc images directory path of your DEFAULT FORUM SKIN. For example, if the directory path is /images/default/misc/ then you will need to change it to /images/default/misc/favicon.ico PHP Code:
<?php
If you already have a .htaccess file, you will need to make a few additions to it to make sure the PHP code we just added is properly used. At the top of your .htaccess file, add the following lines. Code:
RewriteEngine on RewriteRule favicon.ico favicon.php Now that we've set up the code and instructed Apache to look at favicon.php for our favicon, we need to set up the directory structure. Note that if you do not have a favicon in all directories, the code will automatically use the favicon from your default skin. >> Note: You will need to leave favicon.ico in your root directory along with favicon.php. It does not matter what this icon looks like, it merely matters that it exists in the directory for purposes of mod rewrite. << Simply locate your /skins/style/misc/ directories, and add your own custom favicon for each one until you are satisfied with them. Note that the change may not be immediate, depending on your browser. You may have to clear history and/or cache for it to update, and in some cases, it may not update at all, or for awhile even. This mod is final. No updates will be made except for newer variable names. Download
This modification is archived, downloads are still allowed. |
Similar Mods
Miscellaneous Hacks Dynamic Favicon | Modification Graveyard |