View Full Version : Module CMPS: Shoutcast Status Full
Zachariah
12-05-2004, 10:00 PM
/* -----------------12/06/2004 10:45AM-----------------
Shoutcast Status Full 1.2 - CMPS Module
This is a Module for CMPS to place Shoutcast Status in a block. :alien:
Hope it helps !!! Zack - http://www.gzhq.net
There are 4 types of this script here on vb.org:
1) CMPS: Shoutcast Status Lite (https://vborg.vbsupport.ru/showthread.php?t=76988)
2) CMPS: Shoutcast Status Full (https://vborg.vbsupport.ru/showthread.php?t=72570)
3) Shoutcast Status Lite (https://vborg.vbsupport.ru/showthread.php?t=76920) (forum home)
4) Shoutcast Status Full (https://vborg.vbsupport.ru/showthread.php?t=76873) (forum home)
This script pulls the XML data from a shoutcast server.
http://www.shoutcast.com/download/serve.phtml
CREDITS:
GeZuS P - for giving me a leg up on some code.
(this hack requires a password form the shoutcast admin to pull stream information.) --- Module CMPS: Shoutcast Status Lite (https://vborg.vbsupport.ru/showthread.php?t=76988) does not need one.
================================================== =====
NEEDED To Install:
vBadvanced CMPS
https://vborg.vbsupport.ru/showthread.php?t=65797
Coded by: Tigga
================================================== =====
Add: 2 templates
Upload: 4 images, 1 php file
Note: This Module with it's current template layout was designed as a center block.
--------------------------------------------------*/
== Install: 2-5 min ==
Server Name
Last 5 songs
DJ Name
DJ ICQ
DJ AIM
Bitrate
Current Song
Users Connected
User Max
IRC Server and Room
Online / Offline status
--------------------------------------------------*/
- Something that came to mind. You can take this add-on and rename the shoutcast.php file to say "shoutcast1.php, shoutcast2.php, etc." and make multi-blocks to get feeds from different servers. They all can use the same templates.
Changelog:
1.2 - 02.22.05
- Added: DJ ICQ, DJ AIM, IRC Server and Room, 2 images
Edited: cleaned up code in templates and php file.
1.1 Fixed - 12.07.04
- shoutcast.php file to show offline if sever IP can not be reached.
To update replace shoutcast.php file.
If you choose not to show any/all:
Variables used.
Here is a list of variables that can be used in your "adv_portal_shoutcast". If do not wish to show data, just remove the variables.
$scdef = Default station name
$scip = IP shoutcast server
$scport = Port of shoutcast server
$scpass = Admin password (not DJ) to shoutcast server
$ircsite = IRC Server - EX: irc.server.com
$song[t] = Song History:t can range from 0-19. EX: $song[$0], $song[1], $song[2] .... $song[19] ----- $song[0] (zerro) is the current song playing.
$servertitle = "Discription" - setting in DJ - DSP (I used for DJ Name).
$servergenre = - setting in DSP.
$bitrate = Quility of the Bitrate - setting in DJ - DSP .
$icq = ICQ# of DJ - setting in DJ - DSP.
$aim = AIM# of DJ - setting in DJ - DSP.
$irc = IRC room of DJ - setting in DJ - DSP.
$url = URL - setting in DJ - DSP
$currentlisteners = Current connected users.
$maxlisteners = Max users for the server.
$irclink = irc://$ircsite/$irc
$listenlink = 'http://$scip:$scport/listen.pls
yinyang
12-06-2004, 06:18 PM
awesome! my board really needs this. great work!
*clicks install*
Hades-1
12-06-2004, 07:13 PM
this is goddamn awsome but i need a version for regular Vbulletin :(
Zachariah
12-06-2004, 07:23 PM
this is goddamn awsome but i need a version for regular Vbulletin :(
I'll work on it it should not be hard, give me a day or so. I got to paint a bedroom. :tired:
Do you think on a diff. page or on the forumhome? ideas ?
yinyang
12-06-2004, 07:58 PM
harry - i'm not sure if this is unique to me, but if shoutcast is turned off (deactivated) from the server, the page with the shoutcast module goes haywire and shows basically warning messages.
Zachariah
12-06-2004, 08:01 PM
<a href="http://www.gzhq.net/index.php?id=shoutcast" target="_blank">http://www.gzhq.net/index.php?id=shoutcast</a> => Off state
got a link ?
Hades-1
12-06-2004, 10:34 PM
I'll work on it it should not be hard, give me a day or so. I got to paint a bedroom. :tired:
Do you think on a diff. page or on the forumhome? ideas ?
yeah maybe at the bottom of forum home would look nice.
in a little 150 wide box or something
lasto
12-06-2004, 11:47 PM
harry - i'm not sure if this is unique to me, but if shoutcast is turned off (deactivated) from the server, the page with the shoutcast module goes haywire and shows basically warning messages.
not just u m8 same happens to me
i get thousands of these appearing and page takes forever to load + it never gets to load the page because the errors keep on comming and coming so u deffo not on your own.
Warning: feof(): supplied argument is not a valid stream resource (pathname)
Zachariah
12-06-2004, 11:57 PM
Warning: feof(): supplied argument is not a valid stream resource (pathname)
There is a step in the install that was over looked.
Edit shoutcast.php
- Change values with in the "quotes" to your shoutcast server settings.
//Configuration
$scdef = "Server Name"; // Default station name
$scip = "0.0.0.0"; // ip or url of shoutcast server
$scport = "8000"; // port of shoutcast server
$scpass = "changeme"; // password to shoutcast server
$maxusers = "???"; // max users for your server
//End configuration
Save.
yinyang
12-07-2004, 01:27 AM
not just u m8 same happens to me
i get thousands of these appearing and page takes forever to load + it never gets to load the page because the errors keep on comming and coming so u deffo not on your own.
Warning: feof(): supplied argument is not a valid stream resource (pathname)
sorry harry, no link as i've disabled it for now. but it works beautiful when the thing was on, but i'm having the same problem as lasto.
Zachariah
12-07-2004, 02:07 AM
If there is no server for the script to interact with it will error. I'll have to look @ <if> no server <then> show template.
If your shoutcast server is on-line but no one is DJing it will show off line status. If the server is shut off it errors.
lasto
12-07-2004, 07:06 AM
yep its the errors when the server is off thats causeing the problems
Imagine this - your ip changes from the one in your config file and u not updated it) now people on your board will be getting that error until u return and fix it and with the amount of errors it throws up i cant see anyone sitting there watching screens of the same error code.
Not knocking your hack m8 just saying its needs a backup just in case it cant connect.
Zachariah
12-07-2004, 12:23 PM
ya, I am reading up on If no fsockopen connect then offline template. I almost got it done.
Zachariah
12-07-2004, 03:44 PM
yep its the errors when the server is off thats causeing the problems
Imagine this - your ip changes from the one in your config file and u not updated it) now people on your board will be getting that error until u return and fix it and with the amount of errors it throws up i cant see anyone sitting there watching screens of the same error code.
Not knocking your hack m8 just saying its needs a backup just in case it cant connect.
1.1 Fixed
- shoutcast.php file to show offline if sever IP can not be reached.
To update replace shoutcast.php file.
yinyang
12-07-2004, 06:13 PM
good going harrybutt. it works beautifully now.
lasto
12-07-2004, 06:29 PM
nice going m8 and really appreciae the time u took to solve this small problem
/me clicks installs and says `thank u m8`
RMS-Chef
12-07-2004, 06:43 PM
This works great, well done.
I would love to see this to be incorporated elsewhere as well, perhaps with the option of a significantly more compact template.
gmarik
12-07-2004, 08:37 PM
This seems to be the best hack for a long period of time.
Zachariah
12-08-2004, 12:28 AM
This seems to be the best hack for a long period of time.
Thank you sir, for the flowers. I have seen tons better, but I did miss doing shout casts and thought it would be cool to have a stat / on-line indicator.
Phalynx
12-09-2004, 09:36 PM
Great, thanks!
Zachariah
12-10-2004, 02:09 AM
ya'll get this turkey going ?
BlazeXXX
12-20-2004, 06:19 PM
*clicks install* Great hack, exactly wat i was waiting for. Gonna customise it to work with normal forumhome template and see ;) thanks fella.
BlazeXXX
12-20-2004, 09:17 PM
ok.. it looks good, but having a problem here:
I configured 'shoutcast.php' with my own server details and uploaded this and other images in to the appropriate folders. I went in to my Vbulletin template and den in ForumHome template:
I added:
<if condition="$scfp">
<if condition="$streamstatus=1">
pasted code for Shoutcast (online one)
<else />
Pasted code for Shoutcast (offline one)
</if>
</if>
It doesn't seem to recognise the DJ gone offline. I tried changing <if condition="$streamstatus=1"> to <if condition="$streamstatus['1']">, still doesn't work. Am I doing something stupid?
I am not a programmer, so was playing arnd with just vb knowledge. Any expert advice here on how to make it show offline condition in an event of dj goes off? or no spinning happening at that time?
Zachariah
12-21-2004, 07:30 AM
ok.. it looks good, but having a problem here:
I configured 'shoutcast.php' with my own server details and uploaded this and other images in to the appropriate folders. I went in to my Vbulletin template and den in ForumHome template:
I added:
<if condition="$scfp">
<if condition="$streamstatus=1">
pasted code for Shoutcast (online one)
<else />
Pasted code for Shoutcast (offline one)
</if>
</if>
It doesn't seem to recognise the DJ gone offline. I tried changing <if condition="$streamstatus=1"> to <if condition="$streamstatus['1']">, still doesn't work. Am I doing something stupid?
I am not a programmer, so was playing arnd with just vb knowledge. Any expert advice here on how to make it show offline condition in an event of dj goes off? or no spinning happening at that time?
Its not gana work that easy w/ forumhome. I'll work on it soon. I did this mod-hack for php-nuke by request.
http://www.gzhq.net/forums/showthread.php?t=11619
I'll work on forumhome and a full static page next. :D - Just off the top of my head for forumhome perhaps an edit to phpinclude template to call the page that requests the shoutcast info, but its 1:49AM :sleep: :dead:
a great hack.. can this be done for the forumhome instead as a right hand block?? please let me know if you could make this one. I appreciate and I am sure many others would like it too. Thank again. :-)
H@K@N
01-09-2005, 11:38 AM
Hello,
lol pfdc, i was just wrinting the same Message :
does somebody know, how i can place that Module into the Forumhome Template ?
Zachariah
01-09-2005, 03:21 PM
I have been busy off-line, still worken on it on forumhome.
pramodha
01-12-2005, 04:48 PM
I have been busy off-line, still worken on it on forumhome.
When can i except this for normal vb without installing CMPS ?
please please.. can someone else do this as Harry is obviously busy.. it shouldnt be that hard..
hXc Radio
01-15-2005, 08:11 AM
What about a way to cal to Amazon to get the cover artwork of current song? I know this can be done using python. I'd love it for vB
Zachariah
01-23-2005, 05:07 PM
please please.. can someone else do this as Harry is obviously busy.. it shouldnt be that hard..
Not that busy :D .. I am back on it
pramodha
01-24-2005, 05:55 AM
Not that busy :D .. I am back on it
cool will be waiting for the release
Zachariah
02-24-2005, 04:46 PM
New update
Changelog:
1.2 - 02.22.05
- Added: DJ ICQ, DJ AIM, IRC Server and Room, 2 images
Edited: cleaned up code in templates and php file.
cool will be waiting for the release
ForumHome:
Shoutcast Status Lite 1.0.1 (https://vborg.vbsupport.ru/showthread.php?t=76920)
Shoutcast Status Full 1.0.2 (https://vborg.vbsupport.ru/showthread.php?t=76873)
OTuRaNBoGHa
04-04-2005, 08:39 AM
my problem is that when the server is offline or the DJ is out, it shows the offline page with an image error[the image lacks the correct path; so there is an X]. But when the shoutcast program is online with a dj, it shows the correct info without any image errors. What can I do about it? I definetely followed ALL the instructions :(
Zachariah
04-04-2005, 01:52 PM
my problem is that when the server is offline or the DJ is out, it shows the offline page with an image error[the image lacks the correct path; so there is an X]. But when the shoutcast program is online with a dj, it shows the correct info without any image errors. What can I do about it? I definetely followed ALL the instructions :(
================================================== =====
Upload: Images |
===============
im_genre.gif, im_mirc.gif, shoutcast_off.gif, sound.gif
To:
$stylevar[imgdir_misc] - style_location/images/misc
If you have a style that the images do not show up on, then perhaps the images are not in the correct location. To check the path:
Admincp -> Styles & Templates -> Image Paths
Miscellaneous Images Folder
This folder contains the various images that do not fit into other category.
Place the images there. If you have many styles; upload the images to each "misc" folder for each style.
Zachariah
12-10-2005, 04:22 PM
Full 1.2 - CMPS Module not 1.6 :|
- Updates soon
cashpath
01-29-2006, 05:29 PM
Will this work or can it be made to work with .nsv streams?
Zachariah
01-29-2006, 06:11 PM
Will this work or can it be made to work with .nsv streams?
This pulls a shoutcast XML feed.
- What system are you talking about ? I am sure something could be made.
cashpath
01-30-2006, 03:14 AM
I will be using NSVtools to upload a video and audio capture to my shoutcast server..
I changed the shoutcast.php file and as long as they drag and drop the 'tune in' link to winamp it works..
Thanks for the great hack
ocmca
03-31-2006, 06:15 AM
How could I go about putting these stats on a page that is seperate than my forums without vbulletin installed? If that is unclear, what I mean is, my forums are on forums.clubtcb.com, and I would like to put just that box on a different page, a page without forums with radio info and shit that would be radio.clubtcb.com.
Zachariah
03-31-2006, 11:43 AM
How could I go about putting these stats on a page that is seperate than my forums without vbulletin installed? If that is unclear, what I mean is, my forums are on forums.clubtcb.com, and I would like to put just that box on a different page, a page without forums with radio info and shit that would be radio.clubtcb.com.
http://www.gzhq.net/demo/scastfull/
- It's not vBulletin so I can not post here.
- I do have it on my site.
Hope it helps. :cool:
looped
07-06-2006, 10:47 PM
OK, first one of these I've done..
I've added module, php file, titled it shoutcast, identified it as shoutcast in templates used, put
adv_portal_shoutcast
adv_portal_shoutcast_off
.
Now, when you say make template, do I do that from the styles and templates area? Or do I add a module, but call it a template??
Thanks..
Nevermind.. I figured it out.. Kinda.. now if I could just make it not so wide...
umusic2000
03-28-2008, 06:57 AM
How did you do it? I keep getting an error message.
XML Error: Mismatched tag at Line 13
This is the code: adv_portal_shoutcast_off
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><div class="smallfont"><b>$vba_options[portal_blockbullet] $scdef</b></div></td>
</tr>
<tr>
<td valign="top" align="left" class="alt1">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%" class="alt2">
<div align="center">Currently our shoutcast server is down. </div></td>
<td rowspan="2" width="50%">
<div align="center"><img border="0" src="$vboptions[imgdir_misc]/shoutcast_off.gif" alt="Server Down" vspace="5"></div><br />
<div class="smallfont"><b>$scdef is down.</b></div></td>
</tr>
<tr>
<td width="50%"> </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</td>
</tr>
</table>
<br />
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.