MyBB Community Forums

Full Version: Radio for mybb
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Mybb.radio 1.2

Updated 4/29/2010 and tested with the latest ie and firefox and working

Important : you need windows media player install in your pc to work

1-First make a page with page manager plugin

Thanx to querschlaeger for that nice plugin

Get the plugin here: http://mods.mybboard.net/view/page-manager

name: Radio

URI parameter: radio

Page content:
<html>

<head>

<title>Cross Browser Media Player with Select List and .wax Playlist</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script type="text/javascript">

	var mediaPath = "";   



	var mediaFileName = ""; 

	var playerEmbedStr = '\<embed type="application\/x-mplayer2" width="325" height="52" showstatusbar="1"  enablecontextmenu="false" src="mediaFileName"\>\<\/embed>';

	

	function swapMedia(nSong){



		if (nSong == ""){return; }

		document.getElementById('playerContainer').innerHTML = playerEmbedStr;

		var activePlayerStr = playerEmbedStr.replace("mediaFileName", mediaPath + nSong);		

		document.getElementById('playerContainer').innerHTML = activePlayerStr;

		self.focus();

	}

	

	function init(){



		document.forms[0]['songList'].onchange = function()

			{

			 swapMedia(this.value);

			}

	}



	navigator.appName == "Microsoft Internet Explorer" ? attachEvent('onload', init, false) : addEventListener('load', init, false);



</script>

<style type="text/css">



	 

	form {width: 350px; margin-left: auto; margin-right: auto; margin-top: 0px;}

	 select {width: 325px;} 

	#playerContainer {width: 350px; margin-left: auto; margin-right: auto;}

	

</style>

</head>

	<body>

		<div id="playerContainer">

			<embed type="application/x-mplayer2" width="325" height="45"></embed>			

		</div>

		

		<form action="">



			<select name="songList">

				<option value=""> Choose a Station </option>

				<option value="http://173.201.37.235:13072"> The Breeze 107.9 FM Ontario </option>

				<option value="http://66.90.121.16:10015"> Big R Radio - 90s Alternative </option>

				<option value="http://66.103.27.16:9610"> 1Club.FM - Adult Hits Channel </option>

                        <option value="http://91.121.203.207:8000"> RockRadio1.Com - Classic Rock </option>

                        <option value="http://209.9.238.84:80"> The Rock Radio.com </option>

                        <option value="http://scfire-mtc-aa03.stream.aol.com:80/stream/1040"> 977 The 80s Channel </option>

                        <option value="http://scfire-mtc-aa03.stream.aol.com:80/stream/1022"> 181.FM - The Buzz </option> 

                        <option value="http://205.188.215.230:8002"> 977 The Hitz Channel </option> 

                        <option value="http://scfire-mtc-aa05.stream.aol.com:80/stream/1013"> 80s, 80s, 80s! - S K Y . F M </option>

				<option value="http://216.155.137.149:10000"> 181.fm - The Eagle </option>

			</select>



		</form>

	</body>

</html>


2-Now you will have to make a link for that new page in templates/Default Templates/Header Templates/header/
Ps: note you will have to do this step in all styles you are using.

Find:
<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>

add above:
<li><a href="$settings[bburl]/misc.php?page=radio"><img src="$theme[imgdir]/toplinks/radio.png" border="0" alt="$lang->toplinks_radio.png" />Radio</a></li>

3-Upload radio.png to your ftp in that folder images/toplinks/

Here is the result

[Image: 30auoa8.gif]

Here is a radio.png if you want to use it feel free or upload a gif or png of your choice but dont forget to change the name in step 2.


Hope you enjoy Wink
More of a tut then a plugin, but still amazing, thank you very much Smile
Well if its more a tut feel free to move it admins
And you are welcome 41shots Wink
I love it Smile Thanks for this.
Glad you like it Wink
do not work on my forum
Won't work,nah,using opera and "plugin-needed" message appeared
Forgot to mention you need windows media player install in your pc to work
It is more of a tutorial, but it's still great.
Just curios, is there anyway to use it without WMP? I am a linux user, and have no access to WMP./
Pages: 1 2 3