The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How would you code this? (meta redirect)
I know you can do an autoredirect this way:
<META http-equiv="refresh" content="10;URL=http://www.******.com/forum/quiz_comics_v1"> but instead of just directing to 1 url, is there a way to have it auto-redirect to a random url out of a list of 10 url's? Like the person clicks the quiz page and it randomly picks a url from: http://www.******.com/forum/quiz_comics_v1 http://www.******.com/forum/quiz_comics_v2 http://www.******.com/forum/quiz_comics_v3 http://www.******.com/forum/quiz_comics_v4 http://www.******.com/forum/quiz_comics_v5 http://www.******.com/forum/quiz_comics_v6 http://www.******.com/forum/quiz_comics_v7 http://www.******.com/forum/quiz_comics_v8 http://www.******.com/forum/quiz_comics_v9 http://www.******.com/forum/quiz_comics_v10 |
#2
|
|||
|
|||
Quote:
Not sure how to do it with the meta refresh, but with javascript its pretty easy Code:
<script type="text/javascript"> var urls = new Array("http://www.******.com/forum/quiz_comics_v1/", "http://www.******.com/forum/quiz_comics_v2/"); function redirect() { window.location = urls[Math.floor(urls.length*Math.random())]; } var temp = setInterval("redirect()", 3000); </script> Code:
var urls = new Array Go to here Code:
var temp = setInterval("redirect()", 3000); |
#3
|
|||
|
|||
thanks!! So I put this in the header area?
|
#4
|
|||
|
|||
Please, Try at the end of your header
let us know if it worked |
#5
|
|||
|
|||
Top of "headinclude" template would be best for this sort of coding as its meta related.
|
#6
|
|||
|
|||
Thanks for the heads up
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|