News:

Create A Forum Installed

Author Topic: Werid Bug..  (Read 2322 times)

0 Members and 1 Guest are viewing this topic.

Offline Damien

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
  • Gender: Male
  • Location: Australia
    • View Profile
    • My Forums

Badges: (View All)
Level 3 Webmaster Fourth year Anniversary
Werid Bug..
« on: August 06, 2010, 05:37:02 am »
I did the Image Swap in the Footers and it doesn't show in topics and post... How I fix?

Share on Facebook Share on Twitter


Offline Fate

  • Newbie
  • *
  • Posts: 36
  • Karma: -1
  • Gender: Male
  • US Navy Seal - Commander Fate
    • View Profile
    • CIA

Badges: (View All)
Level 3 Topic Starter Combination
Re: Werid Bug..
« Reply #1 on: August 06, 2010, 02:05:33 pm »
Please post the code you used so we can help you.

Offline Damien

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
  • Gender: Male
  • Location: Australia
    • View Profile
    • My Forums

Badges: (View All)
Level 3 Webmaster Fourth year Anniversary
Re: Werid Bug..
« Reply #2 on: August 06, 2010, 03:28:36 pm »
I added this in Footers,
Code: [Select]
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//staradmin.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_Owner.gif" ]

var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//stargmod.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_F-Mod.gif" ]

var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1staraqua.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_Artist-1.gif" ]

var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1stargold.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_banned-1.gif" ]

var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1starlime.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_creator.gif" ]

var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1starorange.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_donator.png" ]

var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1starpink.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_gmod.gif" ]

var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1starpurple.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_RetiredStaff-1.gif" ]

var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1starred.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_S-Mod.gif" ]

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

Offline Fate

  • Newbie
  • *
  • Posts: 36
  • Karma: -1
  • Gender: Male
  • US Navy Seal - Commander Fate
    • View Profile
    • CIA

Badges: (View All)
Level 3 Topic Starter Combination
Re: Werid Bug..
« Reply #3 on: August 06, 2010, 03:39:38 pm »
That seems to be a code for SMF For Free Forums.

You don't need to add a new code for each image, simply do this:

Code: [Select]
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "ORIGINAL_URL_HERE" , "YOUR_REPLACEMENT_IMAGE_URL" ]

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

Replace ORIGINAL_URL_HERE with the url of the original image. (read what Seldom Fail said below)
Replace YOUR_REPLACEMENT_IMAGE_URL with the url of the image you want. (which you did correctly)

Instead of adding a new code each time, simply add more of this line under the first:
Code: [Select]
img_b[img_b.length++] = [ "ORIGINAL_URL_HERE" , "YOUR_REPLACEMENT_IMAGE_URL" ]
« Last Edit: August 06, 2010, 05:41:25 pm by Fate »

Offline Seldom Fail

  • Global Moderator
  • *****
  • Posts: 207
  • Karma: 30
  • Gender: Male
    • View Profile

Badges: (View All)
Karma Good Karma Bad Level 5
Re: Werid Bug..
« Reply #4 on: August 06, 2010, 05:36:20 pm »
You have 2 backslashes in the image links for the images you're trying to replace.

http://images.smfboards.com/ranks//staradmin.gif

That should be changed to

http://images.smfboards.com/ranks/staradmin.gif



Also, using a seperate code for each image will work. But doing what Fate suggested is easier to edit.

It's really just a preference thing. Either way will work fine and is not the cause of the trouble you're having.
« Last Edit: August 06, 2010, 05:39:48 pm by Seldom Fail »
<--- Donate to CreateAForum! :D

Jeremiah 33:3

Offline Damien

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
  • Gender: Male
  • Location: Australia
    • View Profile
    • My Forums

Badges: (View All)
Level 3 Webmaster Fourth year Anniversary
Re: Werid Bug..
« Reply #5 on: August 07, 2010, 05:19:41 am »
Thank you guys,
Code: [Select]
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//staradmin.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_Owner.gif" ]
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//stargmod.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_F-Mod.gif" ]
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1staraqua.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_Artist-1.gif" ]
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1stargold.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_banned-1.gif" ]
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1starlime.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_creator.gif" ]
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1starorange.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_donator.png" ]
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1starpink.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_gmod.gif" ]
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1starpurple.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_RetiredStaff-1.gif" ]
img_b[img_b.length++] = [ "http://images.smfboards.com/ranks//1starred.gif" , "http://i305.photobucket.com/albums/nn207/damo_elms/th_S-Mod.gif" ]
var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>

it's fixed! Locked this please.
« Last Edit: August 07, 2010, 06:12:01 am by Damien »

Offline Seldom Fail

  • Global Moderator
  • *****
  • Posts: 207
  • Karma: 30
  • Gender: Male
    • View Profile

Badges: (View All)
Karma Good Karma Bad Level 5
Re: Werid Bug..
« Reply #6 on: August 07, 2010, 01:06:02 pm »
You still have 2 backslashes.

Take one of the links and click on it... it doesn't show an image.

http://images.smfboards.com/ranks//staradmin.gif

If it doesn't show an image there, it won't work in the code.
<--- Donate to CreateAForum! :D

Jeremiah 33:3

Offline Fate

  • Newbie
  • *
  • Posts: 36
  • Karma: -1
  • Gender: Male
  • US Navy Seal - Commander Fate
    • View Profile
    • CIA

Badges: (View All)
Level 3 Topic Starter Combination
Re: Werid Bug..
« Reply #7 on: August 07, 2010, 02:17:38 pm »
You still have 2 backslashes.

Take one of the links and click on it... it doesn't show an image.

http://images.smfboards.com/ranks//staradmin.gif

If it doesn't show an image there, it won't work in the code.

Actually the image works perfectly fine in Firefox regardless - so it will "work" in the code.


If the images don't appear in other browsers however, then several of your members may not be able to see the images - so it might be a good idea to take Seldom's advice. ;)

Offline Damien

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
  • Gender: Male
  • Location: Australia
    • View Profile
    • My Forums

Badges: (View All)
Level 3 Webmaster Fourth year Anniversary
Re: Werid Bug..
« Reply #8 on: August 07, 2010, 04:37:28 pm »
Yes, i remove the "//"
There's only one "/" like you told me.
Thank you.

Offline Seldom Fail

  • Global Moderator
  • *****
  • Posts: 207
  • Karma: 30
  • Gender: Male
    • View Profile

Badges: (View All)
Karma Good Karma Bad Level 5
Re: Werid Bug..
« Reply #9 on: August 07, 2010, 07:28:03 pm »
no fate. im using firfox and when you click the link it doesnt take you to the image.
<--- Donate to CreateAForum! :D

Jeremiah 33:3

Offline Fate

  • Newbie
  • *
  • Posts: 36
  • Karma: -1
  • Gender: Male
  • US Navy Seal - Commander Fate
    • View Profile
    • CIA

Badges: (View All)
Level 3 Topic Starter Combination
Re: Werid Bug..
« Reply #10 on: August 08, 2010, 02:06:53 am »
Strange, took me directly to it. Both- with two backslashes and with one backslash.

Offline dstrickner

  • Newbie
  • *
  • Posts: 45
  • Karma: 1
  • Gender: Male
  • Yes, I am still around. :)
  • Location: Rochester NY
    • View Profile

Badges: (View All)
Karma Good Windows User Apple User
Re: Werid Bug..
« Reply #11 on: August 08, 2010, 04:02:11 am »
Strange, took me directly to it. Both- with two backslashes and with one backslash.

Same here it took me right to the image with both. :)

Offline Seldom Fail

  • Global Moderator
  • *****
  • Posts: 207
  • Karma: 30
  • Gender: Male
    • View Profile

Badges: (View All)
Karma Good Karma Bad Level 5
Re: Werid Bug..
« Reply #12 on: August 08, 2010, 12:53:12 pm »
This is what it takes me to

http://i34.tinypic.com/2ekkenq.png
<--- Donate to CreateAForum! :D

Jeremiah 33:3