Joined: 25 Feb 2007 Posts: 1259 Location: Hyperborea
Posted: Thu Oct 18, 2007 11:11 pm Post subject: Change the Logo with a Javascript
Change the Logo with a Javascript
This Javascript enables you to change the logo on more than one template simultaneously, if you have a choice of templates for the members.
The script also enables you to change the logo on some of the templates where the ForumUp Theme "tool" in the Admin Panel does not work.
Note that this is an updated version, making the logo(s) show up on all forum pages.
Code:
<script>
var index = 0;
var imageorg = "http://YOURFORUM.forumup.XX/templates/TEMPLATENAME/images/LOGONAME.gif";
var imagereplace = "http://YOURIMAGEHOST/YOURIMAGE.XX";
for(index=0; index<document.images.length; index++){
if(document.images[index].src != imageorg) continue;
else {
document.images[index].src = imagereplace;
break;
}
}
</script>
Copy the script and paste it on notepad (.txt) without "automatic line changes".
Right click the original logo, click properties, and copy the full URL of the logo.
Paste the URL where it says:
Only registered users can see links on this forum! Register or Login on forum!
Note that everything in CAPS should refer to your forum and the template you use.
Upload your new logo to an image host, such as Imageshack or Photobucket.
Find the direct to image URL, copy it and paste it where it says
Only registered users can see links on this forum! Register or Login on forum!
Copy the edited script and 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 </script> is there, before you click Edit allow HTML. A missing > can make a mess of your forum.
If you have more than one template, just make another script, with the URL of that template's logo, and everything else the same, and paste that script into the Footer after the first one.
If you need to save space in the Footer, you can upload the script(s) to a file host, and link to it/them.
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, logoswap.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!
Paste the direct URL to the .js file into this code:
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 </script> is there, before you click Edit allow HTML. A missing > can make a mess of your forum.
The size of the new logo must often be the same as, or similar to, the size of the original logo, while some templates allow (much) bigger or smaller logos.
This script does not work on all templates.
Written by FoxLeonard. Script by Raulken.
_________________
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