PDA

View Full Version : Add-On Releases - Wabuf Sonic Shoutcast Player


Wabuf
07-19-2009, 10:00 PM
Wabuf Sonic v1.0

Description:
Adds a flash player that tunes into your WHMSonic radio station on a popup page for your users to listen to while they browse your forums.

Credits / Thanks:
Thanks to Gary King for the page tutorial: https://vborg.vbsupport.ru/showthread.php?t=62164
WHMSonic for the Flashplayer /javascript / embedding tutorial (found in cPanel) http://www.whmsonic.com

Things I'm looking to do in next release:
- add an adminCP menu
- fix the date (product refused to export with template so it was coded manually I put in all 9s lol if someone knows how to get it to export properly, do drop me a PM as I read vbulletin's manual and I must of missed something)
- Add two phrases IP and radio name
- make a better popup window

Install Guide:

Files to Upload:
scast.php
player.swf
swfobject.js

File to import:
product-wbfsonic.xml

Upload the three files in /upload to your forum root folder.

Go to plugins / products - Manage Products
Click on Add/Import product and browse for product-wbfsonic.xml click Import.

Now the template editing work:

Open up Header template and find:
</style>

Under that add:
<script type="text/javascript" >
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=780,height=250');");
}
// End -->
</script>

Save the template.

Open up Navbar template and find:
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>

Under it add this:
<td class="vbmenu_control"><a href="javascript:popUp('scast.php')">Radio</a></td>

Save the template.

Open up scast template and find:
<td class="tcat">Radio Name Here</td>

Replace it with your radio name

Find:
s1.addParam("flashvars","file=http://IP:port/;stream.nsv&type=mp3&volume=50&autostart=true");

Replace http://IP:port with your radio IP and port number. (You can also set whether autostart is true or false here too)

Save the template.

That should do it! If you like this mod click install.

Live Demo:
http://www.wabuf.com/forums/index.php
Click Radio it'll popup in a new window and autoplay whatever I'm streaming ;)

Shaheen
07-20-2009, 02:14 AM
Thanks , nice hack . Will try it

thedudleys
07-20-2009, 07:52 AM
oh i have got to get this and install it for my radio!

ubcforums
07-20-2009, 09:43 AM
Cool !

gwerzal
07-20-2009, 10:14 PM
Thnaks for sharing

Wabuf
07-20-2009, 10:30 PM
Thanks , nice hack . Will try it

Your welcome, hope you like it!

oh i have got to get this and install it for my radio!

when you do be sure to click install ;)

Cool !

Glad you like it :)

Thnaks for sharing

Your welcome thanks for installing :)

Hornstar
07-21-2009, 06:17 AM
When I clicked Radio on your site no music played in the popup.

Wabuf
07-23-2009, 02:01 AM
When I clicked Radio on your site no music played in the popup.

That is because I don't stream 24/7.

Joseph C
11-04-2009, 09:33 PM
None of my styles have a </style> in their headers???

Wabuf
11-05-2009, 12:02 AM
None of my styles have a </style> in their headers???

What you can do is add the code then before the </head> or similar closing tag.

FazerPaint
02-10-2011, 04:50 PM
I know this is an old thread but is there any chance of this being updated to vB4 ??

Or can someone edit the template and upload it??

doctorsexy
05-23-2011, 05:32 PM
yer need something that works with 4.1.3

RedDevil
07-11-2011, 10:12 AM
works fine on 4.1.4, just add to end header and search calendar instead of the other code

Black Tiger
03-29-2012, 03:52 PM
Is it possible to put multiple radio stations in this plugin, so the user can choose which radio station to listen to?

Mr_Devlin
04-25-2012, 03:36 PM
Is it possible to put multiple radio stations in this plugin, so the user can choose which radio station to listen to?

No. This is a player for one shoutcast stream only. If you want to have more stations played you have to add for each station another scast template with the proper link specified.

Please note, that this addon will not work properly when using safari browsers (eg. Chrome/Iron or Apple Safari). It will open but without any output.

hugly
04-25-2012, 05:40 PM
where s the demo page ?

the demo page is broken as i see.