Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Shoutcast Status 2.0 (3.5) Details »»
Shoutcast Status 2.0 (3.5)
Version: 2.0, by Zachariah Zachariah is offline
Developer Last Online: Jan 2020 Show Printable Version Email this Page

Version: 3.5.6 Rating:
Released: 08-14-2005 Last Update: 11-17-2006 Installs: 122
Uses Plugins Template Edits
Additional Files  
No support by the author.

Shoutcast Status 2.0 on your VB3.5 ForumHome.

/* ----------------- 11/15/2006 -----------------
This is a Nice hack to add Shoutcast Status on your VB3.5 ForumHome.
Hope it helps !!!

Zachariah @ http://www.gzhq.net

SHOUTcast is a free-of-charge audio homesteading solution. It permits anyone
on the internet to broadcast audio from their PC to listeners across the
Internet or any other IP-based network (Office LANs, college campuses, etc.).

http://www.shoutcast.com

Zerro Queries Added

================================================== =====
Tested On:

vBulletin 3.5+
SHOUTcast Server v1.9.5

DEMO
================================================== =====

== Install: 2-5 min ==


Full Stats
- Needs Shoutcast server admin password

Server Name
Song History
4 media layers (winamp, quicktime, media player, real player)
DJ Name
Bitrate
Current Song
Media Type
Most Ever Connected
Hit Count
Users Connected
Avj. Connect Time
User Max
Online / Offline status
XML Data Cache


Lite Stats
- Does not need shoutcast server admin password

Server Name
4 media layers (winamp, quicktime, media player, real player)
Bitrate
Current Song
Users Connected
User Max
Online / Offline status
XML Data Cache

================================================== =====
Adds: 2 plugins
Adds: 8 images, 2 files
Adds: 10 templates
Adds: 45 phrases


shoutcast full 3.5.zip (13.7 KB, 683 downloads)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #212  
Old 03-08-2006, 01:11 PM
l0streflecti0n's Avatar
l0streflecti0n l0streflecti0n is offline
 
Join Date: Dec 2004
Location: chicago
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #213  
Old 03-09-2006, 02:51 PM
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Posts: 2,125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #214  
Old 03-10-2006, 01:03 AM
l0streflecti0n's Avatar
l0streflecti0n l0streflecti0n is offline
 
Join Date: Dec 2004
Location: chicago
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey thanx for that quick reply... will be looking forward to it
Reply With Quote
  #215  
Old 03-15-2006, 09:14 PM
Orcun Orcun is offline
 
Join Date: Dec 2005
Location: Ankara
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #216  
Old 03-15-2006, 09:55 PM
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Posts: 2,125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #217  
Old 03-15-2006, 10:35 PM
Orcun Orcun is offline
 
Join Date: Dec 2005
Location: Ankara
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #218  
Old 03-15-2006, 11:14 PM
Orcun Orcun is offline
 
Join Date: Dec 2005
Location: Ankara
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #219  
Old 03-16-2006, 02:14 AM
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Posts: 2,125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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");
Reply With Quote
  #220  
Old 03-16-2006, 08:19 AM
Orcun Orcun is offline
 
Join Date: Dec 2005
Location: Ankara
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #221  
Old 03-16-2006, 09:14 AM
Orcun Orcun is offline
 
Join Date: Dec 2005
Location: Ankara
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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']);
                }
        } 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04566 seconds
  • Memory Usage 2,385KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete