vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Shoutcast Status 2.0 (3.5) (https://vborg.vbsupport.ru/showthread.php?t=94336)

apollooooooo 03-04-2006 04:54 PM

this might sound like a Noob Question so sorry..

I listen to a Station all time via winamp can i put there station on my website if so HOW!!!

Zachariah 03-04-2006 08:32 PM

Quote:

Originally Posted by apollooooooo
this might sound like a Noob Question so sorry..

I listen to a Station all time via winamp can i put there station on my website if so HOW!!!


- The station your tuned into is a Shoutcast server ?

apollooooooo 03-06-2006 09:16 AM

so let me get this right the station i am listin to is http://www.shoutcast.com/sbin/shoutc...e=filename.pls

so were do i get the ip address ect

sorry i am i am a pian thanks in advance

itorrents 03-06-2006 11:49 AM

Quote:

Originally Posted by apollooooooo
so let me get this right the station i am listin to is http://www.shoutcast.com/sbin/shoutc...e=filename.pls

so were do i get the ip address ect

sorry i am i am a pian thanks in advance

I'm pretty sure it has to be a shoutcast station that you admin, not someone else's on another server.

The Realist 03-06-2006 05:20 PM

Why does my shoutcase only show one song at a time and not like the sample picture above in the 1st post?

https://vborg.vbsupport.ru/external/...chmentid=33910


Anyone?

The Realist 03-06-2006 05:24 PM

Ignore me :)

All of the extend info is in a hidden cell.


Quote:

Originally Posted by The Realist
Why does my shoutcase only show one song at a time and not like the sample picture above in the 1st post?

https://vborg.vbsupport.ru/attachmen...chmentid=33910


Anyone?


Xplorer4x4 03-06-2006 05:24 PM

click the http://www.tech-tronix.com/images/st...apse_thead.gif button right above the now playing info. ;)

The Realist 03-06-2006 05:26 PM

Yeh found that out :) and all the time I've been using this hack as well LOL.

Anyway, is there anything I can change to keep all the info showing to all and not hidden as standard.

Laters

Ruler68jg 03-07-2006 11:53 AM

can I use it with vBulletin Version 3.5.4 scuessfully ?

Zachariah 03-07-2006 12:03 PM

Quote:

Originally Posted by Ruler68jg
can I use it with vBulletin Version 3.5.4 scuessfully ?

No problems VB3.5 - current.

l0streflecti0n 03-08-2006 01:11 PM

i was wondering if there was any way to add an auto refresh so that when a song changes it also refreshes the song title ect in the forum page that way the user dosent have to manually refresh the page... .. kinda like the php-nuke shoutcast block ... thanks

Zachariah 03-09-2006 02:51 PM

Quote:

Originally Posted by l0streflecti0n
i was wondering if there was any way to add an auto refresh so that when a song changes it also refreshes the song title ect in the forum page that way the user dosent have to manually refresh the page... .. kinda like the php-nuke shoutcast block ... thanks

On my to do list :)
I will look in on it.

l0streflecti0n 03-10-2006 01:03 AM

hey thanx for that quick reply... will be looking forward to it

Orcun 03-15-2006 09:14 PM

Hi everyone,

I Just installed and did what it says in install.txt but in the main page it does not display the song info.

It says that the server is off but It's not. I am not the admin, I have a password to use on Winamp to broadcast, I bought this hosting service.

It that password enough ?

If yes, what can be the problem ? I have entered IP correctly, Port correctly and Password correctly. What else should be wrong ?

Zachariah 03-15-2006 09:55 PM

Quote:

Originally Posted by Orcun
Hi everyone,

I Just installed and did what it says in install.txt but in the main page it does not display the song info.

It says that the server is off but It's not. I am not the admin, I have a password to use on Winamp to broadcast, I bought this hosting service.

It that password enough ?

If yes, what can be the problem ? I have entered IP correctly, Port correctly and Password correctly. What else should be wrong ?

The "full" ver. of this hack needs Admin password to access the data. (there is admin, DJ password)

Lite ver. you can just use IP and port, but less info can be gathered.
https://vborg.vbsupport.ru/showthread.php?t=97500

Orcun 03-15-2006 10:35 PM

Thx for quick reply. I read the whole topic.

I was unable to find out the output of

$scfp = @fsockopen($scip, $scport, &$errno, &$errstr, 1); // Connect to the server

I asked my host, and he said that they closed fopen which Php uses to write XML.

I switched to Crontab. And entered the command. Here's the result I have.

/bin/sh: line 1: /usr/bin/lynx: Permission denied

I have -auth=admin:xxx password because I have access to Admin panel of my Shoutcast server.

Well, I think I did my best :)

Next step is I want to make Lynx enable. I cant persuade my host to enable fopen etc.

For triggerin Issues, I want this script only to read cast.xml from my hoe directory and Dont execute the fsocket, fopen commands. I should reduce the load a bit.

How can I do that ?

Make cron the grabbing info from Shoutcast.
Make This Script to only read xml file on my host.

Thanks in advance.

P.S: I have a Problem with the cron command I think.

Code:

*/5 * * * * lynx -auth=admin:dNASpasshere -source http://dNAS-IP-Or-Domain:port/admin.cgi?mode=viewxml 1> /webserver/path/public_html/filename.xml
Should be

Code:

5 * * * * lynx -auth=admin:dNASpasshere -source http://dNAS-IP-Or-Domain:port/admin.cgi?mode=viewxml > /webserver/path/public_html/filename.xml
I removed */ part from the beginning and 1> from the lynx source .

Is the first one true of false ?
If it is true can you please explain why */5 instead of only 5 and 1> instead of only >

I searched some documentation but I was unable to find anything.

Orcun 03-15-2006 11:14 PM

I checked if fopen is closed, NO !

Well, I manually pulled the XML file from Shoutcast server. Uploaded it to specified dir and refreshed.

Still says the Radio is Offline. But there is a XML filled radio.xml file which has a static info in it.

I specified the path for file as /home/forumtur/public_html/radio.xml

Are there anything wrong you see ?

Zachariah 03-16-2006 02:14 AM

Quote:

Originally Posted by Orcun
I checked if fopen is closed, NO !

Well, I manually pulled the XML file from Shoutcast server. Uploaded it to specified dir and refreshed.

Still says the Radio is Offline. But there is a XML filled radio.xml file which has a static info in it.

I specified the path for file as /home/forumtur/public_html/radio.xml

Are there anything wrong you see ?

What about this ?

Code:

// Add:
$domain = "www.domainhere.com";  // The domain to retrieve the xml
$xmlfile = "filename.xml";  //xml filename from your saved stdout 1>

// Change
$scfp = fsockopen($domain, 80, &$errno, &$errstr, 1);

// Change
fputs($scfp,"GET /$xmlfile HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");


Orcun 03-16-2006 08:19 AM

Where will I add this info ?

The plugin at the forumhome hook also grab those values from $vbulletin_options -> etc.

Sorry but I didn't understand what u mean.

$scdef = $vbulletin->options['scname_full'];
$scip = $vbulletin->options['scip_full'];
$scport = $vbulletin->options['scport_full'];
$scpass = $vbulletin->options['scpass_full'];
$ircsite = $vbulletin->options['scirc_full'];
$file = $vbulletin->options['scxml_full'];
$cache_tolerance = $vbulletin->options['scupdate_full'];

Options are grabbed by plugin. What else ?

Orcun 03-16-2006 09:14 AM

Well, I changed the plug-in code just to use the XML file written by Lynx.
Also, when I remove @fsockopen, It says It cannot connect to the IP specified on port 5555.

fsockopen should be blocked by a Firewall.

Here's the new code for the plugin.

PHP Code:

$scdef $vbulletin->options['scname_full'];
$scip $vbulletin->options['scip_full'];
$scport $vbulletin->options['scport_full'];
$scpass $vbulletin->options['scpass_full'];
$ircsite $vbulletin->options['scirc_full'];
$file $vbulletin->options['scxml_full'];
$cache_tolerance $vbulletin->options['scupdate_full'];

// Check if Cache needs an update
        
if (file_exists($file)) {
            
clearstatcache();  
            
$time_difference time() - filemtime($file); 
        } else {
            
$time_difference $cache_tolerance;  // force update
        
}

        
// Outputs the cached file after new data
    
$xmlcache fopen($file,"r");
    
$page '';
    if(
$xmlcache){
         while (!
feof($xmlcache)) {
           
$page .= fread($xmlcache8192);
         }
        
                
fclose($xmlcache);
    }        
    else{
        
// outputs the cached file
    
$xmlcache fopen($file,"r");
    
$page '';
        if(
$xmlcache){
              while (!
feof($xmlcache)) {
                 
$page .= fread($xmlcache8192);
              }

                
fclose($xmlcache);
                }
        }

//define  xml elements
            
$loop = array("AVERAGETIME""CURRENTLISTENERS""PEAKLISTENERS""MAXLISTENERS""SERVERGENRE""SERVERURL""SERVERTITLE""SONGTITLE""SONGURL""IRC""ICQ" ,"AIM""WEBHITS""STREAMHITS""LISTEN""STREAMSTATUS""BITRATE""CONTENT");
            
$y=0;
        while(
$loop[$y]!=''){
          
$pageed ereg_replace(".*<$loop[$y]>"""$page);
          
$scphp strtolower($loop[$y]);
          $
$scphp ereg_replace("</$loop[$y]>.*"""$pageed);
      if(
$loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE)
           $
$scphp urldecode($$scphp);
            ;
          
$y++;
        }
//end intro xml elements

//get song info and history
            
$pageed ereg_replace(".*<SONGHISTORY>"""$page);
            
$pageed ereg_replace("<SONGHISTORY>.*"""$pageed);
            
$songatime explode("<SONG>"$pageed);
            
$r=1;
        while(
$songatime[$r]!=""){
          
$t=$r-1;
          
$playedat[$t] = ereg_replace(".*<PLAYEDAT>"""$songatime[$r]);
          
$playedat[$t] = ereg_replace("</PLAYEDAT>.*"""$playedat[$t]);
          
$song[$t] = ereg_replace(".*<TITLE>"""$songatime[$r]);
          
$song[$t] = ereg_replace("</TITLE>.*"""$song[$t]);
          
$song[$t] = urldecode($song[$t]);
          
$dj[$t] = ereg_replace(".*<SERVERTITLE>"""$page);
          
$dj[$t] = ereg_replace("</SERVERTITLE>.*"""$pageed);
            
$r++;
        }

        
$averagemin round($averagetime/60,2);
        
$irclink 'irc://'.$ircsite.'/'.$irc.'';
        
$listenamp 'http://'.$scip.':'.$scport.'/listen.pls';
        
$listenlnk 'http://'.$scip.':'.$scport.'';

// Player template requests
        
if ($_REQUEST['do'] == 'mp'){ // MP popup link
        
eval('print_output("' fetch_template('forumhome_shoutcast_mp') . '");'); 
        }
        if (
$_REQUEST['do'] == 'rp'){ // RP popup link 
        
eval('print_output("' fetch_template('forumhome_shoutcast_rp') . '");'); 
        }
        if (
$_REQUEST['do'] == 'qt'){ // QT popup link
        
eval('print_output("' fetch_template('forumhome_shoutcast_qt') . '");'); 
        }

//display stats
        
if($time_difference <= $cache_tolerance){
                if(
$streamstatus == "1"){
                    
$search_text '<!-- end logged-in users -->';
                    
$vbulletin->templatecache['FORUMHOME'] = str_replace($search_text,
                    
$search_text.fetch_template('forumhome_shoutcast'),$vbulletin->templatecache['FORUMHOME']);
                } else {
                    
$search_text '<!-- end logged-in users -->';
                    
$vbulletin->templatecache['FORUMHOME'] = str_replace($search_text,
                    
$search_text.fetch_template('forumhome_shoutcast_off'),$vbulletin->templatecache['FORUMHOME']);
                }
        } 


Zachariah 03-16-2006 11:13 AM

Quote:

Originally Posted by Orcun
Where will I add this info ?

The plugin at the forumhome hook also grab those values from $vbulletin_options -> etc.

Sorry but I didn't understand what u mean.

$scdef = $vbulletin->options['scname_full'];
$scip = $vbulletin->options['scip_full'];
$scport = $vbulletin->options['scport_full'];
$scpass = $vbulletin->options['scpass_full'];
$ircsite = $vbulletin->options['scirc_full'];
$file = $vbulletin->options['scxml_full'];
$cache_tolerance = $vbulletin->options['scupdate_full'];

Options are grabbed by plugin. What else ?

Admincp => vBulletin Options => Shoutcast Full - Forumhome

https://vborg.vbsupport.ru/attachmen...6&d=1140276425

nestoras 03-17-2006 03:01 PM

i have just installthis hack!
i put everything right!
my server is up
but in forum says that is down!what can be wrong?

HHU 03-23-2006 02:22 AM

I'm unable to get this to display on my forum home template?

Uploaded the images, installed the product-shoutcast_home_full.xml and uploaded the other xml to my server, which I'm not sure if I'm supposed to install or not, but when I do try it states "
XML Error: not well-formed (invalid token) at Line 1"

But nothing is displaying on my Forumhome, no drop down box or anything at all regarding this hack?

Everything is installed correctly though.... thanks

mpadc 03-24-2006 03:52 PM

this is in forumhome_shoutcast templates

but i dont see the variables being displayed i.;e most listenrs and all it dont show up

what im doing wrong?

<script type="text/javascript">
function scastmp(){
scastmpWindow = window.open("index.php?do=mp","mp","width=360,heig ht=75");
}
function scastrp(){
scastrpWindow = window.open("index.php?do=rp","rp","width=420,heig ht=160");
}
function scastqt(){
scastqtWindow = window.open("index.php?do=qt","qt","width=330,heig ht=50");
}
</script>
<tbody>
<tr >
<td class="thead" width="100%" colspan="6"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_shoutcast')">
<img id="collapseimg_forumhome_shoutcast" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_shoutcast].gif" alt="" border="0" /></a>
<div ><b>$scdef: $servertitle ($currentlisteners/$maxlisteners @ $bitrate kbs)</b></div>
</td>
</tr>
</tbody>
<td rowspan="3" class="alt2" align="center"><img src="$stylevar[imgdir_misc]/radio.gif" alt="$scdef: $servertitle ($currentlisteners/$maxlisteners @ $bitrate kbs)" /></td>
<td valign="top" align="left" class="alt1">
<table border="0" cellpadding="1" cellspacing="0" width="100%">
<tr >
<td class="alt2" ><b>Tune-In:</b></td>
<td width="5" > </td>
<td width="50%" class="alt2" ><b>Now Playing:</b></td>
</tr>
<tr >
<td width="50%" style="padding-left: 5px><a href=" colspan="2" class="smallfont">
<img src="$stylevar[imgdir_misc]/im_winamp.gif" alt="Listen w/ Winamp" border="0" hspace="2" /><a href="$listenamp">Winamp</a>
<img src="$stylevar[imgdir_misc]/im_real.gif" alt="Listen w/ Realplayer" border="0" hspace="2" /><a href="javascript:scastrp()">Real</a>
<img src="$stylevar[imgdir_misc]/im_winmp.gif" alt="Listen w/ Media Player" border="0" hspace="2" /><a href="javascript:scastmp()">Media</a>
<a href="javascript:scastqt()"><img src="$stylevar[imgdir_misc]/im_qt.gif" alt="Listen w/ Quicktime" border="0" hspace="2" /></a>
<a href="javascript:scastqt()">Quicktime</a>
</td>
<td width="50%" style="padding-left: 5px" class="smallfont"><tt><marquee width="98%" scrolldelay="100" scrollamount="5">+ $song[0]</marquee></tt></td>
</tr>

<tbody id="collapseobj_forumhome_shoutcast" style="display: none;">
<tr>
<td width="100%" colspan="3"> </td>
</tr>
<tr >
<td class="alt2" ><b>Stream Info:</b></td>
<td width="5"></td>
<td width="50%" class="alt2" align="left"><b>Last 19 Songs:</b>
</td>
</tr>
<tr >
<td valign="top" rowspan="4" style="padding-left: 5px" colspan="2" class="smallfont">
<div >Most Ever: <b>$peaklisteners</b><br />Current Listening: <b>$currentlisteners/$maxlisteners</b><br />Speed: <b>$bitrate</b> kbs<br />Media Type: <b>$content</b><br />Hit Count: <b>$streamhits</b><br />Avj. Time: <b>$averagemin</b></div>
<br /><hr width="90%" size="1">
<img src="$stylevar[imgdir_misc]/im_genre.gif" alt="Genre" /> $servergenre<br /><img src="$stylevar[imgdir_misc]/im_icq.gif" alt="ICQ the DJ" /> $icq<br /><img src="$stylevar[imgdir_misc]/im_aim.gif" alt="AIM the DJ" /> $aim<br /><img src="$stylevar[imgdir_misc]/im_mirc.gif" alt="IRC Chat with the DJ" /> <a href="$irclink">$ircsite</a> : #$irc<br />
</td>
</tr>
<tr >
<td valign="top" rowspan="5" style="padding-left: 5px" class="smallfont"><div ><tt>+ $song[1]<br />+ $song[2]<br />+ $song[3]<br />+ $song[4]<br />+ $song[5]<br />+ $song[6]<br />+ $song[7]<br />+ $song[8]<br />+ $song[9]<br />+ $song[10]<br />+ $song[11]<br />+ $song[12]<br />+ $song[13]<br />+ $song[14]<br />+ $song[15]<br />+ $song[16]<br />+ $song[17]<br />+ $song[18]<br />+ $song[19]</tt></div>
</td>
</tr>
</table>
</td>
</tr>
</tbody>

Zachariah 03-24-2006 06:43 PM

Did you hit the "collapse / expand" image on the table ?
- $streamhits is what your looking for

HHU 03-24-2006 08:03 PM

Zach.... did you manage to figure out what the issue was or should I just go delete that admin account, beacuse it's installed correctly but definately not showing up

unitedpunjab 03-30-2006 09:44 AM

it doesn't work for me.... :( i tried diffrent shoutcast address but every time it just shows the shoutcast server is offline....

The Realist 03-30-2006 10:03 AM

Is your server running a firewall?
Do you have the port open Shoutcast uses?
Can you connect to shoutcast ok?
Do you have the correct details within the shoutcast settings in admincp?

Laters

Quote:

Originally Posted by unitedpunjab
it doesn't work for me.... :( i tried diffrent shoutcast address but every time it just shows the shoutcast server is offline....


unitedpunjab 03-30-2006 10:25 AM

Quote:

Originally Posted by The Realist
Is your server running a firewall?
Do you have the port open Shoutcast uses?
Can you connect to shoutcast ok?
Do you have the correct details within the shoutcast settings in admincp?

Laters

I was tryin a a free online streaming radio. it work fine in my winamp, media player. even it work fine when i use the link in the forum using Any media BB code. i mean it is playing fine everywhere else....don't knw watz wrng wid it. please help me out.

Zachariah 04-08-2006 02:57 AM

I have not updated the main package yet. :tired: :cross-eyed:

Bug fix
Hook Location : forumhome_complete
Shoutcast Status Full - Main

Find:
Code:

$averagemin = round($averagetime/60,2);
Replace:
Code:

$averagemin = "";
$hours = intval(intval($averagetime) / 3600);
$averagemin .= ($padHours) ? str_pad($hours, 2, "0", STR_PAD_LEFT) : $hours. 'h&nbsp;';
$minutes = intval(($averagetime / 60) % 60);
$averagemin .= str_pad($minutes, 2, "0", STR_PAD_LEFT). 'm&nbsp;';
$seconds = intval($averagetime % 60). 's';
$averagemin .= str_pad($seconds, 2, "0", STR_PAD_LEFT);

Output:

- Changes
Avj. Time: 533.03

- To
Avj. Time: 8h 53m 2s

TheProphet 04-14-2006 02:36 PM

Any progress on the multi streams yet...

Pete C 04-18-2006 01:05 PM

I've been using the previous version on my 3.0.9 board for several months and no problems. I'm now setting up another domain (2nd licence purchased) using vB 3.5.4. I've installed this version (Shoutcast Status Full - vB3.5), entered IP, Port and ADMIN password and it says Shoutcast Down - even though the stream is up and running. I can hear it, my other forum displays it. Trying to figure if I've missed something, or whether it could be firewall settings on my hosts server. Any clues would be appreciated guys - this has been a great hack so far - just can't make it work on 3.5.4 :(

*NB The ACP shows the Shoutcast controls, there were no errors during the install - I'm pretty sure it's installed correctly - it simply can't "see" the stream.

Zachariah 04-18-2006 02:03 PM

@Belder

Did you give it a little time ?
- XML Data Cache by default has a 3 min delay before data will update.

Pete C 04-18-2006 02:48 PM

Thanks for the reply Zachariah. I did give it quite a while - the stream was up for over 2 hrs. I double checked the settings, and refreshed the board frequently - it's just not detecting the stream.

Zachariah 04-18-2006 04:28 PM

Quote:

Originally Posted by TheProphet
Any progress on the multi streams yet...

I have not progressed yet as far as a date, but I do have a multi server ver working.
Current Ver. supports 4 stations.

To do:
- I want to work out a cron job to get data updates still.
- I also want to workout multi bitrates.
- Shoutcast video support

Pete C 04-18-2006 10:08 PM

Ok mine is sorted. The server is firewalled . . so my host opened the relevant ports and everything is working as it should. Well, I knew it couldn't be my fault :D

Great hack by the way - I'll go click the Install button now :banana:

TheProphet 04-21-2006 07:29 PM

Quote:

Originally Posted by Zachariah
I have not progressed yet as far as a date, but I do have a multi server ver working.
Current Ver. supports 4 stations.

To do:
- I want to work out a cron job to get data updates still.
- I also want to workout multi bitrates.
- Shoutcast video support

Sounds awesome, if u need a tester :banana:

PsiNyde 04-21-2006 08:21 PM

sick hack! thanks.

*installs*

zane99 04-23-2006 06:12 PM

Noob here!

luv the hack

But i want to have it at the top instead of the bottom, how do i do this?

Zachariah 04-23-2006 07:26 PM

Quote:

Originally Posted by zane99
Noob here!

luv the hack

But i want to have it at the top instead of the bottom, how do i do this?

:)
https://vborg.vbsupport.ru/showpost....&postcount=194


All times are GMT. The time now is 04:57 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01916 seconds
  • Memory Usage 1,916KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete