This forum is also now the support forum for ForumUp.se, ForumUp.com.br, ForumUp.dk and ForumUp.vn, due to lack of Swedish, Portuguese, Danish and Vietnamese speaking staff.
Joined: 25 Feb 2007 Posts: 802 Location: Hyperborea
Posted: Thu Oct 18, 2007 10:08 pm Post subject: How to Replace the Forum Icons Using a Script
Image replacement script - Forum Icons.
Explanation
This script will replace the following Icons, with images of your own:
whosonline.gif : 'Who is Online'
folder_new.gif : 'New Posts'
folder.gif : 'No New Posts'
folder_lock.gif : 'Forum is Locked'
The script must be modified to suit the style template in use, as the icon image names, and directory structure, do not always remain the same. The image path is different on different templates.
imageorig01 . . 04: These four variables are where you must list the full URL of the original Icon images.
imagerplc01 . . 04: These four variables list the full URL of your replacement images.
Ensure that you have 'matched' each group of four. eg, 01 to 01, 02 to 02, etc. Otherwise your Icons will not represent what you intend them to, such as your 'Who's Online' image, marking a locked folder !
Note: Your replacement images must be the same size as the original Icons. Otherwise they will be resized, and possibly distorted.
You can find the full URL of an image, by right mouse clicking the image, then selecting 'Properties'. You will be able to Copy & Paste the URL, direct from the pop-up Properties window.
Script
This example using 'subSilver'. Edit it in a text editor, such as Notepad, then copy & paste it into the Footer:
Admin Panel >> General Admin >> ForumUp >> HTML codes on top and bottom of all forum pages >> Code at the bottom of the forum, after all topics.
Be very careful to copy and paste the complete script. Double check that the closing tag </body> is there, before you click Edit allow HTML. A missing > can make a mess of your forum.
You must put YOUR forum URL in the code and the template you are using, in place of the sample forum in the script below.
Code:
<script>
function iconswap()
{
var index = 0;
var imageorig01 = "http://abc.forumup.com/templates/subSilver/images/whosonline.gif";
var imageorig02 = "http://abc.forumup.com/templates/subSilver/images/folder_new_big.gif";
var imageorig03 = "http://abc.forumup.com/templates/subSilver/images/folder_big.gif";
var imageorig04 = "http://abc.forumup.org/templates/subSilver/images/folder_locked_big.gif";
var imagerplc01 = "http://urlofyourimage";
var imagerplc02 = "http://urlofyourimage";
var imagerplc03 = "http://urlofyourimage";
var imagerplc04 = "http://urlofyourimage";
If you wish to swap more images, it is a simple matter to duplicate the lines of script, that represent the original, and the replacement images. Then insert the additional URL's.
You must also ensure that you increment the image count, above 04 and onwards. eg,
var imageorig05 = ..
var imageorig06 = ..
Most importantly, you must duplicate the following line. The process is as you performed above. Remember to increment the image counters - there are two here.
Place the amended script into the Code at the bottom of the forum, after all topics. field. (see above)
Advanced II
If you need to save space in the Footer, you can upload the script to a file host, and link to it.
Remove the code from between the <script> tags. Do not include them. Paste this code into a text file, and save it with a .js extension. eg, iconswap.js .
Upload this .js file to a File Host that allows for text files such as:
Only registered users can see links on this forum! Register or Login on forum!
or
Only registered users can see links on this forum! Register or Login on forum!
Using the remainder of the script, with your hosted file URL, we have the following,
This code is placed in the Footer, the Code at the bottom of the forum, after all topics. field, in the Admin Panel. (see above)
Be very careful to copy and paste the complete code. Double check that the closing tag </body> is there, before you click Edit allow HTML. A missing > can make a mess of your forum.
Please note: There will be some Style templates, and/or some Icons on which this script will not operate correctly.
Written by Kana3. Updated by FoxLeonard. Special thanks to Raulken for the original version of this code.
_________________
Only registered users can see links on this forum! Register or Login on forum!
Svensk Support
Only registered users can see links on this forum! Register or Login on forum!
Dansk Support
Only registered users can see links on this forum! Register or Login on forum!
Lithuanian Support
Only registered users can see links on this forum! Register or Login on forum!
Vietnamese Support
Only registered users can see links on this forum! Register or Login on forum!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum