PDA

View Full Version : VbRadio Module for CMPS


SVTOA
12-19-2004, 10:36 PM
Before I post the instructions for this module, I want to make it clear that the idea for this is taken directly from a hack by Zero Tolerance on Vbulletin.org.
Click here for the full hack (http://www.vbulletin.org/forum/showthread.php?t=72227)
I do not in any way, shape or form wish to make it appear as if I wrote this hack, all I did was convert it to a CMPS module. The fact is, you would be better off just installing the hack for your forum and using it that way. This module, while kind of cool, is really only useful for someone to listen to the pre-programmed radio stations right from your CMPS page. If they leave the page, the radio stops. However, if they come to your page and activate the radio, they can listen if they leave your page open. The difference between this and the full hack is that there is no provision for you to add or remove stations from your admin cpanel. This is a "stand alone" radio player with stations I have added manually as part of the hack. You can easily edit them via the radio template if you wish. (The original hack comes with only a few stations, I have added several for your use)

Install is not difficult. Be aware that you should only use this in the center of your page and it *may* screw up your table spacing. You can edit the radio template to suit your needs. You or your members must have WMP for this to work. Since it does not create a popup like the orignal hack, it will probably work for 99% of those who use it.

Ok, enough babling, let's get to work!


Step one:
Open template 'adv_portal' and directly above the </head> tag
add:


<!-- radio code -->
<script language="JavaScript">
<!--

function changeMute(){
Player.settings.mute = 'true';
mute.innerHTML='<a href="#" onClick="changeMute2();">Mute*</a>';
}

function changeMute2(){
Player.settings.mute = 'false';
mute.innerHTML='<a href="#" onClick="changeMute();">Mute</a>';
}

function initiateStation(){
toPlay = document.getElementById('thisStation')
toPlay = toPlay.options[toPlay.options.selectedIndex].value

newRadio = "";
newRadio += "<OBJECT ID='Player' height='250' width='300' CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'>"
newRadio += "<PARAM name='URL' value='" + toPlay + "' id='insert_1'>"
newRadio += "<PARAM name='uiMode' value='none'>"
newRadio += "<PARAM name='mute' value='false'>"
newRadio += "<PARAM name='ShowControls' value='0'>"
newRadio += "<PARAM name='ShowStatusBar' value='0'>"
newRadio += "<PARAM name='ShowDisplay' value='0'>"
newRadio += "<EMBED type='application/x-mplayer2' "
newRadio += "pluginspage = 'http://www.microsoft.com/Windows/MediaPlayer/' "
newRadio += "SRC='" + toPlay + "' "
newRadio += "name='Player' "
newRadio += "width='300' "
newRadio += "height='250' "
newRadio += "AutoStart='true' "
newRadio += "showcontrols='0' "
newRadio += "showstatusbar='0' "
newRadio += "showdisplay='0' "
newRadio += "id='insert_2'>"
newRadio += "</EMBED>"
newRadio += "</OBJECT>"

document.getElementById('radio').innerHTML = newRadio

}

-->
</script>
<!-- end radio code -->


Save.

Step two: Create a template called adv_portal_radio and use the following for the template content:


<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vboptions[blockbullet]Vb Radio</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tbody id="collapseobj_forumhome_radio" style="">
<tr>
<td class="thead" width="50%" align="center">Stations/Control</td>
<td class="thead" width="50%" align="center">Currently Playing</td>
</tr>

<tr>
<td class='alt2' valign='top'>

<fieldset class="fieldset">
<legend>Available Stations</legend>
<center>
<select class='button' id='thisStation'>
<optgroup label="Alternative Rock">
<option value='http://130.49.24.169:1015/listen.pls'>A.I.R. Radio</option>
<option value='http://www.myamericanradio.net/audio/heavymetalhigh/preload.asx'>ARN</option>
<option value='http://www.worldnettv.com/asx/live/cyberstormradio.asx'>Cyberstorm</option>
<option value='http://www.idobi.com/radio/iradio.rm'>Idobi</option>
<option value='http://release.theplatform.com/content.select?pid=_Vx9pkxpFxxCRGWMQ2FKCqW70iuLi6Mn&UserName=knaclive'>KNAC</option>
<option value='http://www.jr-digital.com/asx/nova969.asx'>NOVA969</option>
</optgroup>
<optgroup label="Blues/Jazz">
<option value='http://publicbroadcast.net/wdna/ppr/players/stations/wdna/wdna.asx'>88 Jazz Place</option>
<option value='http://www.electricblues.com/ram/ebradio16.asx'>Electric Blues</option>
<option value='mms://66.250.188.16/KKSF_FM'>KKSF-FM Jazz</option>
</optgroup>
<optgroup label="Classic Rock">
<option value='http://www.woxy.com/stream/wma20.asx'>97X Rock Radio</option>
<option value='mms://66.250.188.17/CFPL_FM'>CFPL-FM London, Ont</option>
<option value='mms://66.250.188.17/CILQ_FM'>CILQ-FM Toronto, CA</option>
<option value='http://radio.sonicnet.com/playlists/rpmprof.asp?C=LOW&B=68&X=X&playerID=24&Z=WMP.ASX'>CityHead Rock</option>
<option value='http://audio.musicradio.com/gold.asx'>Classic Gold</option>
<option value='mms://64.156.2.22:443/katt/24'>KATT-FM OK City, OK</option>
<option value='mms://66.250.188.13/khpt_fm'>KHPT-FM Conroe, Texas</option>
<option value='http://www.rock.com/rockcom2.asx'>ROCK.COM</option>
<option value='mms://66.250.188.16/WBAB_FM'>WBAB-FM</option>
<option value='mms://66.250.188.12/WBPT_FM'>WBPT-FM</option>
<option value='mms://66.250.188.18/WMXQ_FM'>WMXQ-FM</option>
<option value='mms://66.250.188.18/WPOI_FM'>WPOI-FM</option>
</optgroup>
<optgroup label="News/Talk Radio">
<option value='mms://66.250.188.20/KCBQ_AM'>KCBQ-AM</option>
<option value='mms://66.250.188.12/kstp_am'>KSTP-AM</option>
</optgroup>
<optgroup label="Oldies">
<option value='mms://moontaxi.net/cjoy'>CJOY-FM Oldies</option>
<option value='mms://66.250.188.23/KCMO_FM'>KCMO-FM Oldies</option>
</optgroup>
<optgroup label="Sports">
<option value='mms://66.250.188.16/kjr_am'>KJR-AM </option>
<option value='http://www.talksport.net/audio/talksport.asx'>TalkSport.net</option>
</optgroup>
<optgroup label="Variety">
<option value='http://www.bajaradio.com/bajaradio.asx'>Baja Radio Top 40</option>
<option value='http://www.virtuetv.com/clients/crysallis/heart1007.asx'>Heart FM</option>
<option value='http://www.emapdigitalradio.com/emapdigitalradio/metafiles/kiss.asx'>KISS 100 Rap/HIP-HOP</option>
<option value='http://www.hofstra.edu/Audio/WRHU_Hofstra.asx'>WRHU</option>
</optgroup>

</select><br /><br />
<input type='button' value='Play This Station' class='button' onclick='initiateStation()' />
</center>
</fieldset>

<br/>

<fieldset class="fieldset">
<legend>Player Controls</legend>
<center>
[<font id='mute'><a href='#' onClick='changeMute();'>Mute</a></font>]
[<a href='#' onClick='javascript:Player.controls.play();'>Play</a>]
[<a href='#' onClick='javascript:Player.controls.stop();'>Stop</a>]
<br/>[Controls: <a href='#' onClick='javascript:Player.uiMode = "mini";'>On</a> |
<a href='#' onClick='javascript:Player.uiMode = "none";'>Off</a>]
<br />
[Volume:
<a href='#' onClick='javascript:Player.settings.volume= 0;'>0</a>
<a href='#' onClick='javascript:Player.settings.volume= 10;'>1</a>
<a href='#' onClick='javascript:Player.settings.volume= 20;'>2</a>
<a href='#' onClick='javascript:Player.settings.volume= 30;'>3</a>
<a href='#' onClick='javascript:Player.settings.volume= 40;'>4</a>
<a href='#' onClick='javascript:Player.settings.volume= 50;'>5</a>
<a href='#' onClick='javascript:Player.settings.volume= 60;'>6</a>
<a href='#' onClick='javascript:Player.settings.volume= 70;'>7</a>
<a href='#' onClick='javascript:Player.settings.volume= 80;'>8</a>
<a href='#' onClick='javascript:Player.settings.volume= 90;'>9</a>
<a href='#' onClick='javascript:Player.settings.volume= 100;'>10</a>]
</center>
</fieldset>

</td>

<td class='alt2' align='center' id='radio'>
<OBJECT ID='Player' height='250' width='250' CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'>
<PARAM name='URL' value='' id='insert_1'>
<PARAM name='uiMode' value='none'>
<PARAM name='mute' value='false'>
<PARAM name='ShowControls' value='0'>
<PARAM name='ShowStatusBar' value='0'>
<PARAM name='ShowDisplay' value='0'>
<EMBED type='application/x-mplayer2'
pluginspage = 'http://www.microsoft.com/Windows/MediaPlayer/'
SRC=''
name='Player'
width='250'
height='250'
AutoStart='true'
showcontrols='0'
showstatusbar='0'
showdisplay='0'
id='insert_2'>
</EMBED>
</OBJECT>
</td>

</tr>
</table>
</span>
</td>
</tr>
</table>
<br/>


Step Three:
Create a new module called "Radio" (or whatever you wish to call it)
Module identifier: leave blank
File to include: select NONE
"OR Template to Include": radio (do not enter 'adv_portal_radio' )
Column: CENTER
"Templates Used:" leave blank.
Save and activate.

See screenshot for how the module appears.

If you wish to manually edit your stations, change the links in the radio template. See the original hack thread for links to many stations (I have provided several as have other members)

Zachery or Brian: if you feel this being here is improper, remove it. I haven't been able to get ahold of Zero Tolerance (he's in a way different time zone!)
but I have assisted with a couple of his other hacks (Like Vb Chat) and I honestly don't think he will object to this being here.

SVTOA
12-19-2004, 10:46 PM
To add: The station "Rock.com" is great- no DJ, just continous music! :D

Our Sponsors
 

SVTOA
12-21-2004, 08:40 AM
I see a lot of views, has anyone tried this out?

SVTOA
12-21-2004, 05:31 PM
I guess that means no...

Our Sponsors
 

boo
01-02-2005, 09:51 PM
i'll try it! but when you say

it *may* screw up your table spacing

can i just delete it and it'll fix the prob?

SVTOA
01-02-2005, 11:56 PM
Oh of course! Or just make adjustments in the size of the module. If you use the center module it should be fine...

funkie
01-04-2005, 06:54 PM
Nice I added it cheers:)

real simple too

SalTheWop
01-20-2005, 06:00 AM
I take it these radio modules are just links to radio stations?Does it affect your bandwith?

SVTOA
01-21-2005, 10:05 PM
I take it these radio modules are just links to radio stations?Does it affect your bandwith?

They are links to audio streams and do not draw your server resources down.

SilentK
01-26-2005, 03:00 PM
I added it. I have one question though what would I have to do to make it play .xml playlists?

wildondallas
02-04-2005, 02:07 PM
I had a new radio module on my site, but was having problems with it. Found the one this hack is based off of (vBRadio v1.0 (http://www.vbulletin.org/forum/showthread.php?p=607319#post607319)) and love it!
Got it installed fairly easy, still new to this stuff, but having fun learning :) Look for the "Wild Radio" link to view it on my site

I played around with it, to see if it could stream videos also, and it does, at least .asx files. I am streaming Electronic Dance Music channels from www.di.fm and there are more streams music and video on www.wantmymusic.com

DanKao
02-09-2005, 05:21 PM
This module works great. Thanks! :)

I'm trying to add this station, http://listen.bigbradio.com:8000/listen.pls, but it doesn't seem to to work. Can somebody help me? Thanks.

DanKao
02-10-2005, 12:19 PM
Figured it out. They sent me the wrong link. The .pls link is for winamp application. Here's the link for media player...
http://www.bigbradio.com/listen.asx

Don't know why any of you would listen to it, but there it is anyways. :D

cdembek
02-11-2006, 10:54 PM
Love this add on.. hate the fact that if someone goes to another page they lose the stream.. Is there a way I can add "Radio" to my navbar, when a member clicks the "Radio" button it open in it's own window? That way when someone goest to another page it doesn't stop the music.

Can this be done?

ichambers
03-19-2006, 11:47 AM
vBRadio Hack is on vB.org for what you want to do!