TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 09:07:28 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 192
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 109
  • Total: 109

pop up streaming radio

Started by rbh, January 04, 2006, 05:40:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rbh

i really liked the radio code but you couldn't change pages without it losing connection and rebuffering so i played around a bit and came up with this which is working great so far. when someone clicks on the link it loads the stream in a little popup box and continues playing while surfing through your site or where ever.

before doing anything you need to create html pages for each station, example, classicrock.html country.html hardrock.html etc. just open a text editor and paste this code into it.
<HTML>
<HEAD>
<TITLE></TITLE>
<EMBED SRC="http://www.streamaudio.com/stations/asx/KCFX_FM.asx"  HEIGHT="42" WIDTH="100%" AUTOSTART="TRUE">
</HEAD>
<BODY>


replace the url with a url of your musical choice. if you want the music to autoplay when popup loads then leave be, or replace TRUE with FALSE to make it so the play button will have to be pushed. now just save as whatever you want.html and continue this step for each station. when finished, upload these html files to your forum root directory.

now in tinyportal create a script box and title it Streaming Radio or whatever you chose then paste this code into the box.
<HTML>
<HEAD>
<TITLE></TITLE>

<SCRIPT language="JavaScript"><!--

function popup(url){
  cuteLittleWindow = window.open(url, "littleWindow", "location=no,width=320,height=200");
}

//--></SCRIPT>

</HEAD>
<BODY>

<A HREF="javascript:popup('name of your html file.html')">name for the link</A>
<BR><A HREF="javascript:popup('name of your html file.html')">name for the link</A>
</BODY>
</HTML>


just keep repeating the <BR><A HREF="javascript:popup('name of your html file.html')">name for the link</A> for each html file you have created. once completed you should have a block with links for all your radio stations.

if there is a better way, feel free to let me know. i know very little about any of this stuff like html, java and such and have spent the better part of this evening getting it to work right. if someone could show me how to be able to add code to look into a certain directory i would much rather have all the radio station html files in it rather then the root but i may figure it out soon. also, i dont know if this qualifies as a block code snippet so if not just move it wherever.


there is an update to try if you want the options in a drop down menu. look at page 2 of this thread.

YahMan

Very good, it works like a charm!

~YM

YahMan

#2
Btw, if anyone likes to see this in action, go to my site.
click here Remember, it's an adult site! The radio block is on the right.

~YM

crip

Now thats a worth while Block snippet, thanks it works really good.

crip~

PowerPyx

Sry,

but it seems to me not working correctly under firefox 1.5 ... cause i know that asx doesn't work with ff i set up a pls stream (winamp) but this doesn't work too.

with IE the asx streams are working fine but also stuck in trouble with the pls streams...

any ideas ?

Best Regards,
PowerPyx

YahMan

All asx stations work fine in FF1.5. I also tried MP3 and pls, no problems there either.

~YM

IchBin

YahMan, I cannot see your radio Block. Am I Blind? Maybe my eyes are wandering for some reason....:P

Seriously though, I can't find it.

YahMan

#7
I've set up my radioblock visible to guests, check for yourself. It's on the right under the clock.

~YM

YahMan

You weren't blind, IchBin......;)

~YM

YahMan

I'm working on MP3's to work in the same way as WMP files. I'll post the code as soon as I'm finished.

~YM