The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Complicated redirect using frameset - Possible?
Hey,
I have a vBulletin forum, I also have a radio player... I have put the radio player and the forum into a frameset so that the radio doesn't stop and start everytime the page changes. The code for the index.html looks like this: Code:
<frameset framespacing="0" border="0" frameborder="0" rows="0,*"> <frame id="radio" name="radio" scrolling="no" noresize target="main" src="radio/play.php" marginwidth="0" marginheight="0"> <frame id="main" name="main" src="index.php"> <noframes> <body> <p>This page uses frames, but your browser doesn't support them.</p> </body> </noframes> </frameset> The only problem with this is, when someone wants to link to a thread to the forum, it will load the forum without the frameset meaning the radio won't play. If there a way, that when a link to the forum is clicked it will redirect to the index.html page and then open the clicked link in the main frame, so that the radio will then play and show the linked thread in the main frame? I think that makes sence Thanks, Scott |
#2
|
|||
|
|||
Can anyone help at all?
|
#3
|
|||
|
|||
Well, you could make your index.php something like this:
PHP Code:
Code:
<script type="text/javascript"> function loadframes() { var page = document.location.href; page = page.substring(page.lastIndexOf('/') + 1, page.length) ; document.location.href = "index.php?page=" + encodeURI(page); } </script> ... <BODY onload="if (self==top) loadframes();"> ETA: Maybe you could have a "start radio" link or button instead of having it load automatically? That might be easier to add to every page. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|