SMF For Free Support Forum
Signup For Free Forum
September 08, 2008, 05:04:06 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: [Code] Swap Images on Page  (Read 3890 times)
0 Members and 1 Guest are viewing this topic.
webworldx
Code Master's
***
Offline Offline

Posts: 24



View Profile WWW
« on: December 11, 2006, 04:44:22 pm »

Use this Swap Images Generator to swap your images:

http://www.ifcode.com/javascript/ImageSwapSMF.html

Hope that helps you - just add in the URL's into the boxes at the top, then generate the code.  Should be a bit easier.

The generator generates a code that swaps any image on your forum with a new image.
Just enter the URL of any image currently on your forum and the URL of a new image to replace that image and press "Generate"

The current image on your forum goes under the "Old Image" column.
The image you want to replace that image goes across from it in the "New Image" column.

Stick the code that is generated into your FOOTERS. (AdminCP->Manage Styles->Edit Headers/Footers)


« Last Edit: August 19, 2008, 08:35:32 pm by simply sibyl » Logged

mr_css
SMF For Free Sr. Member
*
Offline Offline

Posts: 259



View Profile
« Reply #1 on: October 20, 2007, 11:32:03 am »

Code:
<script type='text/javascript'>
/*
Change Any Image On Page
Created by iFusion
*/
var img_b = new Array();

img_b[img_b.length++] = [ "http://www.smfboards.com/Themes/default/images/on.gif" , "http://i216.photobucket.com/albums/cc283/mr_css/angry_homer_simpson.jpg" ]
img_b[img_b.length++] = [ "http://www.smfboards.com/Themes/default/images/off.gif" , "http://i216.photobucket.com/albums/cc283/mr_css/Simpsons-Yahoo-Avatars_100.jpg" ]

var all_images = document.getElementsByTagName('IMG');
for(i=0;i<all_images.length;i++){
for(j=0;j<img_b.length;j++){
   if(all_images[i].src == img_b[j][0]){
     all_images[i].src = img_b[j][1];
}}}
</script>

</body>

Mine will not work, Any help?
Logged


            WOLFSCAPE FORUMS
Omikron 9861
SMF For Free Full Member
*
Offline Offline

Posts: 232


High School Science.........


View Profile
« Reply #2 on: November 24, 2007, 05:42:47 am »

The problem seems to be the </body> at the bottom of the code. Also, to change those images, got to your Admin CP>>Manage Styles>>Customize Images. You don't need a code for that.
Logged


You have no idea what you are missing out on. The best place to discuss Eragon, Eldest and Book 3
 is just a single click away. So click!

Want a spoiler tag on your forum? Click here!
simply sibyl
not a dude
Global Moderator
*
Offline Offline

Posts: 8034


Don't PM me for Support


View Profile WWW
« Reply #3 on: January 18, 2008, 06:59:55 pm »

Did webworldx stop hosting this code? Because it is no longer available.

I sent him an email.   Will wait to see
Logged

simply sibyl
not a dude
Global Moderator
*
Offline Offline

Posts: 8034


Don't PM me for Support


View Profile WWW
« Reply #4 on: January 18, 2008, 07:13:27 pm »

Gordie...  the code will still work.    The webpage was just an easy way to "make" the code.  You can do it yourself this way:

(The code goes in the Footer)

Code:
<script type='text/javascript'>
/*
Change Any Image On Page
Created by iFusion
*/
var img_b = new Array();

img_b[img_b.length++] = ["OLD IMAGE URL" , "NEW IMAGE URL"]

var all_images = document.getElementsByTagName('IMG');
for(i=0;i<all_images.length;i++){
for(j=0;j<img_b.length;j++){
   if(all_images[i].src == img_b[j][0]){
     all_images[i].src = img_b[j][1];
}}}
</script>


Replace OLD IMAGE URL with the url of the image you want to replace
Replace NEW IMAGE URL with the url of the new image you want to use

Add more of these lines if you have several images to swap:

img_b[img_b.length++] = ["OLD IMAGE URL" , "NEW IMAGE URL"]
« Last Edit: January 21, 2008, 10:37:30 am by simply sibyl » Logged

Gordie
SMF For Free Hero
*
Offline Offline

Posts: 593


I'm around somewhere!!!


View Profile WWW
« Reply #5 on: January 18, 2008, 07:45:29 pm »

Thanks, Sibyl...I knew there was a way, just couldn't remember!
Logged



simply sibyl
not a dude
Global Moderator
*
Offline Offline

Posts: 8034


Don't PM me for Support


View Profile WWW
« Reply #6 on: January 29, 2008, 03:12:21 pm »

that site doesnt load it sez it doesnt exist can someone tell me another way to do this?

If you read the first post in this thread it says that the site is down and gives directions for how to do it manually.   

I have emailed and tried to reach the auther of the site to no avail.
You will need to do it manually, which is why that post is edited to reflect that.
Logged

webworldx
Code Master's
***
Offline Offline

Posts: 24



View Profile WWW
« Reply #7 on: January 31, 2008, 02:13:16 pm »

New Host: http://www.ifcode.com/javascript/ImageSwapSMF.html

Smiley
Logged

simply sibyl
not a dude
Global Moderator
*
Offline Offline

Posts: 8034


Don't PM me for Support


View Profile WWW
« Reply #8 on: January 31, 2008, 02:15:46 pm »


Added it back to the first post.

Thanks!!!   Been looking around for you.   
I managed to find it thru Google cache but will leave your link here unless you'ld like it put on another site.
« Last Edit: January 31, 2008, 05:07:03 pm by simply sibyl » Logged

.:: £ SNIPER12903 £ ::.
SMF For Free Member
*
Offline Offline

Posts: 71



View Profile
« Reply #9 on: January 31, 2008, 05:01:10 pm »


thank you very very much!!!
Logged

i think im quiting these forums? ull prbly see me on but like i wont post or say anything


Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.261 seconds with 17 queries.