Media Center

Started by dr.wills, March 04, 2009, 06:22:21 AM

Previous topic - Next topic

dr.wills

Link to Mod

Radio, Music, and Broadcast for your Forum
Author: Akai Phan

Compability: SMF 1.1.8

Introductions: This mod adds a program right into your forum to play music, video or stream. You can choose to disable/enable for all/guest, choose Windows Media player or the stylish Flash player. Because this program besides play mp3, wma, can also stream video or audio, which means that you can broadcast media from your computer to your forum in real time, either a MP3 or Sounds on your system, or from microphone. Further more, if you allow other people to broadcast then you can have a voice chat on your forum (much like Yahoo conference voice chat).

Note: Since you will need a radio hosting service and a program installed in your computer for broadcasting (only Winamp and one plugin). You can refer to the manual at e-technology.tk or broadcast.txt in the package on how to do it.

Important Instructions: When you are done installing the mod. Copy the code from note.php in the package to index.template.php wherever you like the program to appear.

Installation: For other themes, follow the instructions in install_radio.xml and the manual of your theme. If you need help, contact me.

Change log:
1.1 as of 2/20/09
   - Initial realease
   - Turn on/off radio for all/guest
   - Choose Windows media player/Flash player
   - Choose Autoplay or disable
   - Stream or play mp3/wma...
   - Broadcast right from your computer
   - Flash player displays volume, song title, radio channel, lagometer (which shows memory usuage, stream cached), audioscope...











You might ask
How to broadcast?
3 steps:
- Register for hosting service
- Install broadcast program
- Give link to visitors

Part 1
You can register for free radio hosting service at listen2myradio.com

Remember to take note of the following information, you will need for part 2
Note: In the 'radio password change', you can change the password required in part 2.



Part 2
To broadcast, you will need Winamp (download from winamp.com) and plugin SHOUTcast DSP (download from shoutcast.com).

Install Winamp, and then the plugin SHOUTcast DSP.

In DSP/Effect in Options, choose SHOUTcast DSP


fill the IP from part 1 into address, the port into the port and the password into the password box


You can choose any encoder you want, usually MP3


in the input device settings, you can choose to broadcast the songs being played in winamp or sounds from your computer, or microphone, or line input...


Go to Main and press Broadcast


Part 3: To listen to radio, there are a lot of ways

You can give links to user
You choose your own in 'radio station'


Or you can embed a Windows Media player to your website

Or you can use your own winamp program or other softwares to listen

Akai (e-technology.tk)
http://movies-on-mediafire.com

Never dying collection of high definition mediafire movies link

Chopper

Nice mod, how do i get the media player to appear just under the home button? Im not sure where to put the code.

Thanks

chrishicks

I'd like to have mine show in the footer as in the screengrabs but I also have no idea where to put the code.

Chopper

Anyone any ideas??

Thanks

dr.wills

#4
sorry for the late response   ;D

if you want it to appear on every page, right below the menu, and your smf version is 1.1.8, then you can dock it to the function template_menu() in index.template.php

find the function template_menu() in index.template.php about line 487
scroll down about line 598, find the following

// The end of tab section.
echo '
<td class="maintab_' , $last , '">&nbsp;</td>
</tr>
</table>';


and then paste the code in the note.php after that  ;)


@chrishicks:  to add to the end, you can paste it to the beginning of the function template_main_below() in the index.template.php :)
http://movies-on-mediafire.com

Never dying collection of high definition mediafire movies link

Chopper

Thanks man, that fixed it   :D :D :D

chrishicks

That worked. Now what would the reason be that Windows Media Player won't work? When I have that selected I get nothing in Firefox 3.0.6 or Opera 9.6 and just a red x box in IE7. The flash player works perfectly.

_Anthony_

Does the flash player decode Vorbis Ogg streams?

Afro

looks like something very interesting..installing it now

EZ1

Thanks for the great mod  ;D . however I do require some help when I paste the code from the note.php it eather shows up in the chat box with 4 players  or i get a error page..  since I'm sure its something I'm doing wrong is there anyone able to help me to complete this mod ??

thank you in advance

heinandar

Quote from: EZ1 on March 08, 2009, 07:26:08 AM
Thanks for the great mod  ;D . however I do require some help when I paste the code from the note.php it eather shows up in the chat box with 4 players  or i get a error page..  since I'm sure its something I'm doing wrong is there anyone able to help me to complete this mod ??

thank you in advance


Try this

find in BoardIndex.template.php

}
?>


add before
// Begin Radio code
global $modSettings;
if ($modSettings['radioMedia'] == 'on')
{
if (!(($modSettings['radioGuest'] == 'on') and ($context['user']['is_guest'])))
{
echo '<object id="mediaplayer" classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" type="application/x-oleobject" width="250" height="150">
<param name="url" value="',(isset($modSettings['radioLink']) ? $modSettings['radioLink'] : '') ,'">
<param name="autostart" value="',(($modSettings['radioAutoplay'] == 'on') ? '1' : '0'),'">
<param name="showcontrols" value="1">
<param name="stretchtofit" value="0">
<param name="enablecontextmenu" value="0">
<param name="ShowStatusBar" value="1">

<embed src="',(isset($modSettings['radioLink']) ? $modSettings['radioLink'] : ''),'" autostart="',(($modSettings['radioAutoplay'] == 'on') ? '1' : '0'),'" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" transparentatstart="0" animationatstart="0" showcontrols="1" autosize="0" displaysize="0" showtracker="0" showstatusbar="1" width="300" height="50">
</object>';
}
}

if ($modSettings['radioFlash'] == 'on')
{
if (!(($modSettings['radioGuest'] == 'on') and ($context['user']['is_guest'])))
{
echo '<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">
<p><strong>Sorry this site is based on flash shoutcast radio and needs adobe flash 8+ support. </strong><br />
<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Download Flash here.</a></p></div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("nativeradio2.swf", "nativeradio", "400", "200", "10", "#cccccc");
so.addParam("scale", "noscale");
so.addVariable("swfcolor", "2c85c7");
so.addVariable("swfstreamurl", "',(isset($modSettings['radioLink']) ? $modSettings['radioLink'] : ''),'");
so.addVariable("swfpause", "',(($modSettings['radioAutoplay'] == 'on') ? '0' : '1'),'");
so.write("flashcontent");
// ]]>
</script>';
}
}
// End Radio code


just remove <?php and ?>

EZ1

thank you worked great!  :D

Kreator

#12
I can get the radio if I use a link, but I get nothing on the flash player provided, it just constantly buffers...... can you provide more details on how to get this running from the forum please, especially the live feeds with a microphone !


Joe N

Nice!

I saw this on my friends forum!
Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


dr.wills

Quote from: chrishicks on March 07, 2009, 01:22:12 AM
That worked. Now what would the reason be that Windows Media Player won't work? When I have that selected I get nothing in Firefox 3.0.6 or Opera 9.6 and just a red x box in IE7. The flash player works perfectly.

Can you take a screenshot? :D

Quote from: MrMoney on March 07, 2009, 02:43:12 AM
Does the flash player decode Vorbis Ogg streams?

It doesn't decode the ogg, but there is a player that can do it, you can grab it from listen2myradio.com, and integrate it into the code ;)

Thanks Heinandar for the answer. ;)

Quote from: Kreator on March 10, 2009, 12:56:52 PM
I can get the radio if I use a link, but I get nothing on the flash player provided, it just constantly buffers...... can you provide more details on how to get this running from the forum please, especially the live feeds with a microphone !

What link? Here is how to set up a live microphone ;)

choose the Soundcard input, choose Microphone


Press the Open Mixer and make sure you don't mute anything,
then Push to talk, or you can Lock


If you want to find some live radio stations to test or listen, you can go to shoutcast.com there are a lot of stations there, copy the link and paste into the radio setting ;)
;)

Thanks
http://movies-on-mediafire.com

Never dying collection of high definition mediafire movies link

chrishicks

screens as requested:

Normal with Flash player enabled(same in all browsers - works just fine):



IE7 with Windows Media Player enabled:



I didn't do a screen for Firefox/Opera. Just imagine the above screen minus the box with the red x. Same amount of space and everything just no box.


zagrom

#16
Great mod, I just so happened to be looking for something like this,
will looking to using it ^^





Ok I am liking this mod,
(I havent tested all the features yet) but is there a way
where I can make a link that opens up the flash in a new
window (or with the WMP)
Or perhaps have it on a new page, sorta like "The Rules" mod?

Kreator

#17
QuoteQuote from: Kreator on Yesterday at 12:56:52 PM
I can get the radio if I use a link, but I get nothing on the flash player provided, it just constantly buffers...... can you provide more details on how to get this running from the forum please, especially the live feeds with a microphone !

QuoteWhat link?

By a Link I mean I have to place a link to listen2myradio.com , as opposed to having the flash player there , the player just sits there buffering, and I do know the radio is working with the link as I can hear it playing on another computer I have running.

However, it would be better if the flashplayer was operational, hav`nt tested the WMP yet.



I have flash10 running so that is not the problem

zagrom

^^^^^^^^^I have the same issues, with both Flash and WMP as well,
I have not tried to connect with winamp on another computer tho.

Kreator

Update: I placed an MP3 file on my server and that does not work either with WMP ....... is there any support for this mod ??



Advertisement: