Advertise Here

Author Topic: [Code] Swap Images on Page  (Read 17546 times)

0 Members and 1 Guest are viewing this topic.

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Swap Images on Page
« Reply #45 on: November 03, 2006, 02:41:00 pm »
<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/off.gif" , "http://i71.photobucket.com/albums/i124/king_09/off.gif
" ];
img_b[img_b.length++] = [ "http://www.smfboards.com/Themes/default/images/on.gif" , "http://i71.photobucket.com/albums/i124/king_09/turtleicon.gif" ];

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.src == img_b[j][0]){
     all_images.src = img_b[j][1];
}}}
</script>


You do have permission from the owner/maker of these images to use them right? Are you king_09 on Photobucket.com?
« Last Edit: November 03, 2006, 03:02:11 pm by crasyandconfused »
Did my answer help you? Want to help out hosting costs?


Every donation counts.

Offline Adds

  • SMF For Free Full Member
  • *
  • Posts: 177
  • Press alt + F4
    • View Profile
    • Turtlelovers

  • Total Badges: 18
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Swap Images on Page
« Reply #46 on: November 03, 2006, 06:05:12 pm »
yes :)

GREAT DEALS ON CRUISES & ISLAND GETAWAYS At tru-healthtravel.com

Offline Adds

  • SMF For Free Full Member
  • *
  • Posts: 177
  • Press alt + F4
    • View Profile
    • Turtlelovers

  • Total Badges: 18
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Swap Images on Page
« Reply #47 on: November 03, 2006, 06:09:21 pm »
Still not working >:( just u do it im so done with messing wit it.

GREAT DEALS ON CRUISES & ISLAND GETAWAYS At tru-healthtravel.com

Offline x-Treme

  • SMF For Free Hero
  • *
  • Posts: 592
  • formally known as Gordie!!!
    • View Profile
    • xTreme Arcade

  • Total Badges: 19
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Swap Images on Page
« Reply #48 on: November 03, 2006, 06:24:14 pm »
Adds...I just checked your forum,and you already swapped images for the menu. All you have to do is add the 2 lines for the post images to the code you already have in your footer.That way, you won't have 2 swap image codes in your footer at once.

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Swap Images on Page
« Reply #49 on: November 03, 2006, 06:37:15 pm »
I still have a question
Do you have permission from the owner/maker of these images to use them right? Are you king_09 on Photobucket.com?

Then I'll explain how to do all of this. The whole image stealing thing is getting wayyy to prominent around here.
Did my answer help you? Want to help out hosting costs?


Every donation counts.

Offline Adds

  • SMF For Free Full Member
  • *
  • Posts: 177
  • Press alt + F4
    • View Profile
    • Turtlelovers

  • Total Badges: 18
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Swap Images on Page
« Reply #50 on: November 04, 2006, 12:09:57 am »
yes i do even ask teri (head mod) of turtlesale.com/forum i cant see the imgages swaped is still the same for me and ye im king_09

GREAT DEALS ON CRUISES & ISLAND GETAWAYS At tru-healthtravel.com

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Swap Images on Page
« Reply #51 on: November 04, 2006, 08:52:47 am »
Then take EVERYTHING out of your footers and stick my code in.
Did my answer help you? Want to help out hosting costs?


Every donation counts.

Offline Adds

  • SMF For Free Full Member
  • *
  • Posts: 177
  • Press alt + F4
    • View Profile
    • Turtlelovers

  • Total Badges: 18
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Swap Images on Page
« Reply #52 on: November 04, 2006, 12:02:11 pm »
done and still cant see it

GREAT DEALS ON CRUISES & ISLAND GETAWAYS At tru-healthtravel.com

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Swap Images on Page
« Reply #53 on: November 04, 2006, 12:05:32 pm »
You sure you're doing it right?
Explain to me the steps that you took to put the code in
Did my answer help you? Want to help out hosting costs?


Every donation counts.

Offline Adds

  • SMF For Free Full Member
  • *
  • Posts: 177
  • Press alt + F4
    • View Profile
    • Turtlelovers

  • Total Badges: 18
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Swap Images on Page
« Reply #54 on: November 04, 2006, 04:24:39 pm »
Copy and pasted...
<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/off.gif" , "http://i71.photobucket.com/albums/i124/king_09/off.gif
" ];
img_b[img_b.length++] = [ "http://www.smfboards.com/Themes/default/images/on.gif" , "http://i71.photobucket.com/albums/i124/king_09/turtleicon.gif" ];

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.src == img_b[j][0]){
     all_images.src = img_b[j][1];
}}}
</script>

Then hit save headers and fotters. There is not eles in fotters but 1 thing in headers

GREAT DEALS ON CRUISES & ISLAND GETAWAYS At tru-healthtravel.com

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Swap Images on Page
« Reply #55 on: November 04, 2006, 04:28:53 pm »
Try this

<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/off.gif" , "http://i71.photobucket.com/albums/i124/king_09/off.gif" ];
img_b[img_b.length++] = [ "http://www.smfboards.com/Themes/default/images/on.gif" , "http://i71.photobucket.com/albums/i124/king_09/turtleicon.gif" ];

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.src == img_b[j][0]){
 all_images.src = img_b[j][1];
}}}
</script>
Did my answer help you? Want to help out hosting costs?


Every donation counts.

Offline Adds

  • SMF For Free Full Member
  • *
  • Posts: 177
  • Press alt + F4
    • View Profile
    • Turtlelovers

  • Total Badges: 18
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Swap Images on Page
« Reply #56 on: November 04, 2006, 06:27:28 pm »
YA it worked!!!! ;D :D ;) :) thanks ;D :) :D ;) :-*

GREAT DEALS ON CRUISES & ISLAND GETAWAYS At tru-healthtravel.com

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Swap Images on Page
« Reply #57 on: November 04, 2006, 06:57:16 pm »
No problem. The reason it didn't work was my fault then. An extra space that I totally missed :-[
Did my answer help you? Want to help out hosting costs?


Every donation counts.

Offline Adds

  • SMF For Free Full Member
  • *
  • Posts: 177
  • Press alt + F4
    • View Profile
    • Turtlelovers

  • Total Badges: 18
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Swap Images on Page
« Reply #58 on: November 04, 2006, 08:37:54 pm »
Stipd space ;) thanks again u all

GREAT DEALS ON CRUISES & ISLAND GETAWAYS At tru-healthtravel.com

 

Related Topics

  Subject / Started by Replies Last post
26 Replies
19181 Views
Last post November 30, 2009, 06:19:51 pm
by simply sibyl
9 Replies
3231 Views
Last post January 19, 2009, 11:38:45 am
by simply sibyl
1 Replies
1502 Views
Last post March 14, 2009, 11:27:21 pm
by Agent Moose
1 Replies
810 Views
Last post March 10, 2010, 04:17:51 pm
by InsertName