Author Topic: Help with a guide  (Read 403 times)

0 Members and 0 Guests are viewing this topic.

Offline lukealed

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Help with a guide
« on: January 06, 2013, 07:09:25 pm »
Just followed the rank guide http://support.createaforum.com/7/(guide)-using-your-own-rank-images/ and need help


Heres the script, any help you give will be appreciated :)



<script type='text/javascript'>
/*
Change Any Image On Page
Created by iFusion
*/
var img_b = new Array();
img_b[img_b.length++] = [ http://images.smfboards.com/ranks/AMDranks/0AMD.gif, http://services.runescape.com/m=rswikiimages/en/2011/11/Recruit-25211402.png]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/1AMD.gif , http://services.runescape.com/m=rswikiimages/en/2011/11/corporal-25213338.png]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/2AMD.gif , http://services.runescape.com/m=rswikiimages/en/2011/11/sergeant-25212137.png]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/3AMD.gif , http://services.runescape.com/m=rswikiimages/en/2011/11/Lieutenant-25212204.png]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/4AMD.gif , http://services.runescape.com/m=rswikiimages/en/2012/5/captain-01093601.png]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/5AMD.gif , http://services.runescape.com/m=rswikiimages/en/2011/11/general-25212227.png]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/6AMD.gif , http://services.runescape.com/m=rswikiimages/en/2011/11/admin-25212238.png]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/7AMD.gif , http://services.runescape.com/m=rswikiimages/en/2011/11/deputyowner-25212411.png]
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>


Luke

Share on Facebook Share on Twitter


Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile
Re: Help with a guide
« Reply #1 on: January 06, 2013, 08:24:16 pm »
Tell us what's wrong...
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Offline lukealed

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Help with a guide
« Reply #2 on: January 06, 2013, 08:29:15 pm »
The images arent changing

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile
Re: Help with a guide
« Reply #3 on: January 06, 2013, 09:51:14 pm »
You need to wrap quotation marks around each image link.
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Offline lukealed

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Help with a guide
« Reply #4 on: January 06, 2013, 10:16:38 pm »
Ok the code now looks like this and still doesnt worksupport

Code: [Select]
<script type='text/javascript'>
/*
Change Any Image On Page
Created by iFusion
*/
var img_b = new Array();
img_b[img_b.length++] = [ http://images.smfboards.com/ranks/AMDranks/0AMD.gif", "http://services.runescape.com/m=rswikiimages/en/2011/11/Recruit-25211402.png"]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/1AMD.gif" , "http://services.runescape.com/m=rswikiimages/en/2011/11/corporal-25213338.png"]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/2AMD.gif" , "http://services.runescape.com/m=rswikiimages/en/2011/11/sergeant-25212137.png"]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/3AMD.gif" , "http://services.runescape.com/m=rswikiimages/en/2011/11/Lieutenant-25212204.png"]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/4AMD.gif" , "http://services.runescape.com/m=rswikiimages/en/2012/5/captain-01093601.png"]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/5AMD.gif", "http://services.runescape.com/m=rswikiimages/en/2011/11/general-25212227.png"]
img_b[img_b.length++] = [http://images.smfboards.com/ranks/AMDranks/6AMD.gif" , "http://services.runescape.com/m=rswikiimages/en/2011/11/admin-25212238.png"]
img_b[img_b.length++] = ["http://images.smfboards.com/ranks/AMDranks/7AMD.gif" , "http://services.runescape.com/m=rswikiimages/en/2011/11/deputyowner-25212411.png"]
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>

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile
Re: Help with a guide
« Reply #5 on: January 06, 2013, 10:24:34 pm »
You didn't wrap quotation marks around the old links.
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Offline lukealed

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Help with a guide
« Reply #6 on: January 06, 2013, 10:26:54 pm »
Whoops, now it works :) Thank you so much for you help :) Have a good evening

 

Related Topics

  Subject / Started by Replies Last post
8 Replies
6590 Views
Last post June 28, 2014, 07:56:07 pm
by CreateAForum
5 Replies
1671 Views
Last post August 09, 2010, 09:59:50 pm
by Alex
0 Replies
439 Views
Last post June 06, 2013, 12:44:06 am
by Kuroyuki
26 Replies
3687 Views
Last post August 20, 2013, 12:43:37 am
by FlashlightForum
0 Replies
681 Views
Last post July 29, 2014, 05:40:18 am
by the.nova.inc