#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Nov 24, 2015 15:24:24 GMT -8
<script language="JavaScript">
function random_imglink(){ var myimages=new Array() //specify random images below. You can have as many as you wish myimages[1]="http://i.imgur.com/t4yBTRt.png" myimages[2]="http://i.imgur.com/VF9sCt2.png" myimages[3]="http://i.imgur.com/KfFvWEC.png" myimages[4]="" myimages[5]="" myimages[6]=""
//specify corresponding links below var imagelinks=new Array() imagelinks[1]="http://movie-tv-books.freeforums.net/page/mtvb-book-club" imagelinks[2]="http://movie-tv-books.freeforums.net/page/mtvb-book-club" imagelinks[3]="http://movie-tv-books.freeforums.net/page/mtvb-book-club" imagelinks[4]="" imagelinks[5]="" imagelinks[6]=""
var ry=Math.floor(Math.random()*myimages.length) if (ry==0) ry=1 document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>') } random_imglink() //--> </script>
With your code above, the green opening tag is an older way of doing things.. It should still work, but try replacing it with .. <script type="text/javascript"> Also, the red bit at the bottom should be removed. It was originally used to ensure that your code wasn't displayed as text in browsers that don't support JS, which is no longer needed, and as it doesn't have the accompanying opening segment to go with it, it will effectively break your code instead.
|
|
inherit
211492
0
Feb 24, 2021 8:52:31 GMT -8
Heildgar
124
July 2014
domanda
|
Post by Heildgar on Nov 24, 2015 16:03:11 GMT -8
I've tried that but nothing, it's driving me insane.
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Nov 25, 2015 0:07:30 GMT -8
I've tried that but nothing, it's driving me insane. Do you have anything else in your global headers? Even if you don't see it save, do you close your global headers and go view the main page to see if it is there? (By the way, remember, it is a random code and since you have no images in the last 3 you may see nothing until you refresh a few times and if you are using a mobile device not on desk top view, javascript will not work. Sorry if these are dumb points to make, just want to cover all bases.) At this point, we may need to see your forum. If you don't feel comfortable posting it here, then you could pm me or Todge (but please wait for Todge to say it is o.k.) because Todge is the coder and I'm not. But at least we could get an idea what all you have going on on your site and try to pin point the problem. This is baffling me too as I can throw the most insane gobble-dee-goop of code in my global headers with hundreds of mistakes and wrong tags, etc. and it will still save so this just doesn't make sense to me. Here it is on my test site working fine. putteraround.boards.net/
|
|
inherit
211492
0
Feb 24, 2021 8:52:31 GMT -8
Heildgar
124
July 2014
domanda
|
Post by Heildgar on Nov 25, 2015 2:25:14 GMT -8
I've tried that but nothing, it's driving me insane. Do you have anything else in your global headers? Even if you don't see it save, do you close your global headers and go view the main page to see if it is there? (By the way, remember, it is a random code and since you have no images in the last 3 you may see nothing until you refresh a few times and if you are using a mobile device not on desk top view, javascript will not work. Sorry if these are dumb points to make, just want to cover all bases.) At this point, we may need to see your forum. If you don't feel comfortable posting it here, then you could pm me or Todge (but please wait for Todge to say it is o.k.) because Todge is the coder and I'm not. But at least we could get an idea what all you have going on on your site and try to pin point the problem. This is baffling me too as I can throw the most insane gobble-dee-goop of code in my global headers with hundreds of mistakes and wrong tags, etc. and it will still save so this just doesn't make sense to me. Here it is on my test site working fine. putteraround.boards.net/Nope, I deleted everything else in my global headers, I usually open my forum in another tab, so I can have the global headers page close at hand incase I need to change anything. I've also waited a while and refreshed a bunch of times in case the blank images were showing. I'll be happy with posting my forum here if it helps with getting this problem solved, and I'll wait for Todge's response. Right now my forum is guest restricted, should I change the settings to allow guests in case Todge says it's ok?
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Nov 25, 2015 10:01:00 GMT -8
By all means, post your forum link here, it will need to be open for guests to view for either Tumble or myself to see it though. If you prefer to PM your link, then feel free also.
|
|
inherit
211492
0
Feb 24, 2021 8:52:31 GMT -8
Heildgar
124
July 2014
domanda
|
Post by Heildgar on Nov 25, 2015 10:08:22 GMT -8
|
|
inherit
211492
0
Feb 24, 2021 8:52:31 GMT -8
Heildgar
124
July 2014
domanda
|
Post by Heildgar on Nov 26, 2015 9:55:00 GMT -8
So I've tried posting it from another browser, and from another computer, but it still doesn't work.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Nov 26, 2015 17:52:22 GMT -8
Have you tried replacing the opening tag with a simple '<script>' tag?
|
|
inherit
211492
0
Feb 24, 2021 8:52:31 GMT -8
Heildgar
124
July 2014
domanda
|
Post by Heildgar on Nov 27, 2015 2:46:37 GMT -8
Still doesn't work,
I've tried a different code
<div style="text-align: center;"> <a href="http://movie-tv-books.freeforums.net/page/mtvb-book-club"> <img src="http://i.imgur.com/t4yBTRt.png" alt=" " /> </a> </div>
And it works, sadly it doesn't randomize the images like I wanted to and it can only hold one image at a time, I think it works because it's a "<div"
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Nov 27, 2015 9:09:52 GMT -8
It's a possibility that security software installed on the computer could be preventing the injection of <script> tags
|
|
inherit
211492
0
Feb 24, 2021 8:52:31 GMT -8
Heildgar
124
July 2014
domanda
|
Post by Heildgar on Nov 27, 2015 10:28:39 GMT -8
I've tried posting the same code from an entirely different computer, but I have double checked my security software and there is no such restriction.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Nov 27, 2015 15:07:01 GMT -8
Try this.. Random Banner.pbp (559 B) It's your exact code, just inside a plugin. You can get into the code to add/remove images by clicking Manage Plugins and selecting it from your list.
|
|
inherit
211492
0
Feb 24, 2021 8:52:31 GMT -8
Heildgar
124
July 2014
domanda
|
Post by Heildgar on Nov 28, 2015 0:10:38 GMT -8
I uploaded it, but when I try to change the settings, it comes out like this.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Nov 28, 2015 11:04:34 GMT -8
Sorry, I meant 'Build', not manage.. My bad.
|
|
inherit
211492
0
Feb 24, 2021 8:52:31 GMT -8
Heildgar
124
July 2014
domanda
|
Post by Heildgar on Nov 28, 2015 12:48:35 GMT -8
ALright, no prob, trying it now.
|
|