Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

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

Category: Forum Home Enhancements - Version: 4.0.2 Rating:
Released: 03-13-2010 Last Update: Never Installs: 137
Uses Plugins Template Edits Auto-Templates
Additional Files Translations  
No support by the author.

Shoutcast Status 3.0 on your VB4 ForumHome.

/* ----------------- 03/13/2010 -----------------
This is a Nice hack to add Shoutcast Status on your VB4 ForumHome.
Hope it helps !!!

Zachariah @ http://www.szone.us

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 4+
SHOUTcast Server v1.9.5
================================================== =====

== Install: 2-5 min ==

Full Stats
- Needs Shoutcast server admin password

Server Name
Last 19 songs
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
- Dose not need shoutcast server admin password

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

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

VB3.8X - https://vborg.vbsupport.ru/showthread.php?t=126007
(Shoutcast Status 2.0, 4387 downloads)

Download Now

File Type: zip [vB 4] Shoutcast Status 3.0.zip (16.8 KB, 1428 views)

Screenshots

File Type: jpg admin.jpg (77.9 KB, 0 views)
File Type: jpg online_sm.jpg (19.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
TeknoSounds

Comments
  #122  
Old 07-17-2010, 07:51 AM
Gold Phan7om Gold Phan7om is offline
 
Join Date: Jun 2010
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Magz View Post
working fine on 4.05 here.

On mine it installs fine just doesnt pick up shoutcast server.
Reply With Quote
  #123  
Old 07-17-2010, 10:24 AM
Magz's Avatar
Magz Magz is offline
 
Join Date: Nov 2006
Location: UK
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I simply had to get my server host to open up tcp port that my shoutcast is using
Reply With Quote
  #124  
Old 07-17-2010, 11:49 AM
Gold Phan7om Gold Phan7om is offline
 
Join Date: Jun 2010
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Magz View Post
I simply had to get my server host to open up tcp port that my shoutcast is using
I found out the server has no firewall blocking it.
Reply With Quote
  #125  
Old 07-23-2010, 05:09 PM
Gold Phan7om Gold Phan7om is offline
 
Join Date: Jun 2010
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I really need the developer to update it to 4.0.5
Reply With Quote
  #126  
Old 07-24-2010, 02:04 AM
Blooded Blooded is offline
 
Join Date: Feb 2010
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works fine in localhost but when i add it to my forum its doesnt work and i got internal server error

What should i do? :s

BTW is 4.0.5 forum version
Reply With Quote
  #127  
Old 07-24-2010, 04:25 AM
RedDevil's Avatar
RedDevil RedDevil is offline
 
Join Date: Mar 2008
Location: Cumbria, UK
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Blooded View Post
Works fine in localhost but when i add it to my forum its doesnt work and i got internal server error

What should i do? :s

BTW is 4.0.5 forum version

Did you chmod the scast_home.xml on server? to 777, im on 4.0.5 works 100%
Reply With Quote
  #128  
Old 07-24-2010, 05:45 PM
Blooded Blooded is offline
 
Join Date: Feb 2010
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes i put the file chmod 777 but i think my host is blockin it
Reply With Quote
  #129  
Old 07-28-2010, 07:51 AM
Gold Phan7om Gold Phan7om is offline
 
Join Date: Jun 2010
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its annoying now. I have no firewall blocking the ports and the addon doesnt pick it up when streaming!
Reply With Quote
  #130  
Old 09-17-2010, 07:00 AM
TeknoSounds TeknoSounds is offline
 
Join Date: Nov 2006
Location: TX
Posts: 435
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cyberlooser View Post
there is no option for the VGA Block
can't find the option 2 select where i want 2 located this Modul.

so i modified your scast.php file a little bit.
in this way it is posible to install as a Modules.

here is the code:

this code should be cleaned up...i'll do this later. while some variables doesn't in use but i forgotten which one was it

PHP Code:

<?php
/* -----------------05/28/2010-----------------
This is a Nice hack to add Shoutcast  VBA block Modules on your VB4 Forum Home.
Hope it helps !!!

Original by Zachariah

modified by cyberlooser/h?r


HowTo Install

Install first the Shoutcast Status 3 (VB4) !

1. save this PHP file with this code  as radio.php in your ../forum / modules folder :

2.Create a new PHP module with the following values:
Module Title = "Radio" 
File To Include = radio.php
Identifier = radio


playlist link is implemented 
the playlist link for the players like QT / RP and MediaPlayer need to be reaktivated in this Module


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

vBulletin 4.0
SHOUTcast Server v1.9.5

=======================================================
*/




$scgroups explode(','$vbulletin->options['scgrp_full']);

//if (is_member_of($vbulletin->userinfo, $scgroups) OR $scgroups[0] == 0) {
//  #####   VBOPTION SETTINGS
  
$scdef $vbulletin->options['scname_full'];
  
$scip $vbulletin->options['scip_full'];
  
$scport $vbulletin->options['scport_full'];
  
$scpass $vbulletin->options['scpass_full'];
  
$file $vbulletin->options['scxml_full'];
  
$cache_tolerance $vbulletin->options['scupdate_full'];
  
$placecast $vbulletin->options['scplace_full'];
  
$scoff $vbulletin->options['scoff_full'];
//  #####   VBOPTION SETTINGS END

$pfad './images/misc/';

// Check if Cache File needs updated or not
  
if (!is_writable($file)) {
    @ 
chmod($folderstring0777);
  }
// Check if Cache needs an update
  
if (file_exists($file)) {
    
clearstatcache();
// filemtime info gets cached so we must ensure that the cache is empty
    
$time_difference time() - filemtime($file);
// echo "$file was last modified: " . date ("F d Y H:i:s.", filemtime($file)) . "( " . $time_difference . " seconds ago) <br>" . "The cache is set to update every " . $cache_tolerance . " seconds.<br>";
  
}
  else {
    
$time_difference $cache_tolerance;
// force update
  
}

// Parses shoutcasts xml to make an effective stats thing for any website
  
$scfp = @ fsockopen($scip$scport$errno$errstr2);


// If server is off line
  
if (!$scfp) {
    if (
$scoff == 1) {

    
echo
"
<html>

<head>
<title>
$scdef</title>
</head>

<body >
 
 <table width=100%>
        <tr>
        <td>
        <img border=0 src=
$pfad/shoutcast_off.gif alt=''> 
        <br><b>
$scdef ist derzeit leider</b></br>
        <img src= 
$pfad/offline.gif />
        </td>
<tr><td colspan=2>Sorry, but at moment the radio is offline. </td></tr>
  </tr>
</table>
</body>
</html>
 "
;
    }
  }
  else {
  
    
// ############ Shoutcast server is online #######################
    
    
if ($time_difference >= $cache_tolerance) {
// update the cache if need be
// Get XML feed from server
      
if ($scsuccs != 1) {
        if (
$scpass) {
          
fputs($scfp"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
        }
        else {
          
fputs($scfp"GET /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n");
        }
        while (!
feof($scfp)) {
          
$xmlfeed .= fgets($scfp8192);
        }
        
fclose($scfp);
      }
// Output to cache file
      
$tmpfile fopen($file"w+");
      
$fp fwrite($tmpfile$xmlfeed);
      
fclose($tmpfile);
      
flush();
// 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);
      }
    }
  }
  if (
$scpass) {
    
// ######### There is a Admin password ###############
    
//define  xml elements
    
$loop = array("AVERAGETIME""CURRENTLISTENERS""PEAKLISTENERS""MAXLISTENERS""SERVERGENRE""SERVERURL""SERVERTITLE""SONGTITLE""SONGURL""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++;
    }
//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 "";
    
$hours intval(intval($averagetime) / 3600);
    
$averagemin .= ($padHours) ? str_pad($hours2"0"STR_PAD_LEFT) : $hours 'h&nbsp;';
    
$minutes intval(($averagetime 60) % 60);
    
$averagemin .= str_pad($minutes2"0"STR_PAD_LEFT) . 'm&nbsp;';
    
$seconds intval($averagetime 60) . 's';
    
$averagemin .= str_pad($seconds2"0"STR_PAD_LEFT);
  }
  else {
    
// ######### There is no Admin password ###############
//define all the variables to get (delte any ones you don't want)
    
$page ereg_replace(".*<body>"""$page);
//extract data
    
$page ereg_replace("</body>.*"","$page);
//extract data
    
$numbers explode(","$page);
//extract data
    
$currentlisteners $numbers[0];
    
$streamstatus $numbers[1];
    
$peaklisteners $numbers[2];
    
$maxlisteners $numbers[3];
    
$currentlisteners $numbers[4];
    
$bitrate $numbers[5];
    
$song[0] = $numbers[6];
  }

  
// ######### Create links and media player pages ########
  // ######################################################
  
$listenamp 'http://' $scip ':' $scport '/listen.pls';
  
$listenlnk 'http://' $scip ':' $scport '/listen.pls';

// Player template requests

  
// Server is online display stats
  
if ($scfp) {
    if (
$streamstatus == "1") {
    
      echo 
"

<html>

<head>
<title>
$scdef</title>
</head>

<body>
  <table width=100%>
   <tr>    
    <td><img src=
$pfad/radio.gif align=middle></td>
   
   </tr>
   <tr>
     <td>
     <a href=
$listenamp><b>$scdef <br>
     Server is </b></a>
     <a href=
$listenamp></a>
     </td>
   </tr>
   
   <tr>
    <td colspan=2 ><marquee width=98% scrolldelay=100 scrollamount=5>
     <img src=
$pfad/radio.gif align=middle> <b>$song[0] @ $scdef</b> <img src=$pfad/im_genre.gif align=middle></marquee><br></td>
     </tr>
     <tr>
     <td><marquee width=98% scrolldelay=100 scrollamount=5><b>DJ: 
$servertitle </b> </marquee></td>
     </tr>
    <tr> 
    <td><marquee width=98% scrolldelay=100 scrollamount=5>
      <b>Current Listeners 
$currentlisteners / $maxlisteners </b>
    <b>Bitrate @ 
$bitrate kbps </b> </marquee> </td>
  </tr>
 
</table> 
<table width=100%>
  <tr>
    <td><center><a href=
$listenamp><img src=$pfad/im_qt.gif align=middle> </a></center></td>
    <td><center><a href=
$listenamp><img src=$pfad/im_real.gif align=middle> </a></center></td>
    <td><center><a href=
$listenamp><img src=$pfad/im_winamp.gif align=middle> </a> </center> </td>
    <td><center><a href=
$listenamp><img src=$pfad/im_winmp.gif align=middle> </a></center></td>
  </tr>
</table>
 
</body>
</html>"
;

  }
      
//if ($scoff == 1) 
      
else
      {        
         echo
"
<html>

<head>
<title>
$scdef</title>
</head>

<body >
 
 <table width=100%>
        <tr>
        <td>
        <img border=0 src=
$pfad/shoutcast_off.gif alt=''> 
        <br><b>
$scdef ist derzeit leider</b></br>
        <img src= 
$pfad/offline.gif />
        </td>
<tr><td colspan=2>Sorry, but at moment the radio is offline</td></tr>
  </tr>
</table>
</body>
</html>"
;
      }
    
  }
  
  
  
//}
?>


feel free in use and modify how u like...
Thanks!

So using a combination of yours and Zachariah's code I pieced together a vba module won't release the code tho since its both of ya'll's, as well as it needs to be cleaned up and properly setup. See site link in sig.

Waiting on an update for this mod tho and hoping an official vba module is released!
Reply With Quote
  #131  
Old 10-12-2010, 09:06 AM
cavebox cavebox is offline
 
Join Date: Oct 2008
Location: Netherlands
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi all,

Is there a possibility to place this in the navbar template?
I'd like to show up on every page under the navbar?

thanks in advance
Reply With Quote
Reply

Thread Tools

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 08:19 PM.


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.06355 seconds
  • Memory Usage 2,474KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete