ForumUp English Language Support Forum Index ForumUp English Language Support
Before asking for support:

*Check the FAQ, Guides and Tutorials
*Use a title in posts that describes your question
*Include your forum's URL
*No PM or Email support!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Welcome!

**ALWAYS include the URL to your forum in every post.**
You cannot register with a web.de or mail.ru email address at this time, due to a massive spam registering attack.
* Read the rules for signatures and avatars
* If you did not get your activation email, look here

* Click here for fast help for your questions.

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.

Change the Logo with a Javascript

 
Post new topic   Reply to topic    ForumUp English Language Support Forum Index -> Frequently Asked Questions, Guides and Tutorials
View previous topic :: View next topic  
Author Message
FoxLeonard
Member


Joined: 25 Feb 2007
Posts: 802
Location: Hyperborea

PostPosted: Thu Oct 18, 2007 11:11 pm    Post subject: Change the Logo with a Javascript Reply with quote

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>

Arrow Copy the script and paste it on notepad (.txt) without "automatic line changes".

Arrow 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.

Arrow 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!



Arrow 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.

Exclamation 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.

Idea 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.

Idea 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:

Code:
<script src="http://YOuRFILEHOST/logoswap.js"></script>

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)

Exclamation 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.

Exclamation 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!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ForumUp English Language Support Forum Index -> Frequently Asked Questions, Guides and Tutorials All times are GMT
Page 1 of 1

 
Jump to:  
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


View posts since last visit / View your posts


Powered by phpBB © 2001, 2005 phpBB Group

Powered by forumup.com free forum, create your free forum!
Created by Raulken of Hyarbor S.r.l.
TOS & Privacy.

Page generation time: 0.066