PDA

Zobacz pełną wersję : rds radiowy w joomli



nu.wroclaw
08-12-2007, 00:03
Witajcie, posiadacie może rozszerzenie, skrypt do Joomli z RDS-em ?. W wyznaczonym miejscu na stronie ma znajdować się napis : Teraz gramy: "płynący" tekst z nazwą wykonawcy, pobierany z autopilota(serwera).

Pozdrawiam ic zekam na odpowiedź.

p.s
Chyba, że ktoś potrafi zedytować ten moduł, tak, żeby był tylko sam tytuł i wykonawca, bez zbędnych "pierdół"
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,595/Itemid,35/

Kod: <div>
<center><br>
<?php
/**
* Shoutcast Molok - A Joomla 1.0.8 shoutcast module
* @version 1.0
* @package mod_shoutcastextended.zip
* @copyright (C) 2005 by Molok - All rights reserved!
*/

# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

$radioname = $params->get( 'radioname', 'FungKur.FM' );
$host = $params->get( 'host', 'fungkurfm.mine.nu' );
$port = $params->get( 'port', '8000' );
$chooseplayer = $params->get( 'chooseplayer', 'Choose Player' );
$listener = $params->get( 'listener', 'Listener' );
$from = $params->get( 'from', 'from' );
$peakmenu = $params->get( 'peakmenu', 'Peak' );
$serverstatus = $params->get( 'serverstatus', 'Server Status' );
$currentsong = $params->get( 'currentsong', 'Current Song' );

$fp=@fsockopen($host,$port,&$errno,&$errstr,10);
if (!$fp) {
echo "Connection Putus";
} else {

fputs($fp,"GET /7 HTTP/1.1\nUser-Agent:Mozilla\n\n");

for($i=0; $i<1; $i++) {
if(feof($fp)) break;
$fp_data=fread($fp,31337);
usleep(500000);
}

$fp_data=ereg_replace("^.*<body>","",$fp_data);
$fp_data=ereg_replace("</body>.*","",$fp_data);

list($current,$status,$peak,$max,$reported,$bit,$s ong) = explode(",", $fp_data, 7);

if ($status == "1") {

echo "$chooseplayer<br>";
echo "<a href=http://$host:$port/listen.pls><img src=modules/mod_shoutcastextended/winamp.gif border=0 alt=listen with Winamp></a>&nbsp;<a href=modules/mod_shoutcastextended/listen.asx><img src=modules/mod_shoutcastextended/wmplayer.gif border=0 alt=listen with Window Media Player></a>&nbsp;";
echo "<a href=modules/mod_shoutcastextended/listen.ram><img src=modules/mod_shoutcastextended/realplayer.gif border=0 alt=listen with RealPlayer></a>&nbsp<a href=modules/mod_shoutcastextended/listen.m3u><img src=modules/mod_shoutcastextended/itunes.gif border=0 alt=listen with iTunes></a><br>";
echo "<font face='verdana' size='2' color='#800000'><b> $radioname </b></font><br><br> ";
echo "<font face=verdana size=1> <b>$listener</b>: $current $from $max ($reported Unique)<br> <b>$peakmenu</b>: $peak<br> <b>$serverstatus</b>: <font face='verdana' size='2' color='#009900'><b> Online</b></font><br> <b>Bitrate</b>: $bit Kbps<br> <b>$currentsong</b>: $song </font><br>";

} else {
echo "<font face='verdana' size='2' color='#000000'><b> $radioname </b></font><br><font face='verdana' size='2' color='#FF0000'><b> Offline </b></font>";
} }
?> </center> <br>
</div>[/code]





Kod: <?xml version="1.0" encoding="iso-8859-1"?>

<mosinstall type="module" version="1.0.8">

<name>Shoutcast Molok Extended</name>

<author>fungkur</author>

<creationDate>April 2006</creationDate>

<copyright>(C) 2005 Molok</copyright>

<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>

<authorEmail>fungkur@yahoo.com</authorEmail>

<authorUrl>www.fungkurs-network.net</authorUrl>

<version>1.0.8</version>

<description><![CDATA[

<div align="left"><img src="http://img419.imageshack.us/img419/6667/shoutcastmolokextended3pu.gif" /></div>

<h2>Shoutcast Molok Extended&nbsp;</h2>

Shoutcast Molok Extended is a module that shows some basic info from shoutcast radio stations .

<br/>This module retrieve the following basic info from a shoutcast radio station::
<ul>

<li>Total listener</li>

<li>Peak</li>

<li>Server Status : <font color="#008000"><b>Online</b></font> or <font color="#FF0000"><b>Offline</b></font></li>
<li>Bitrate</li>
<li>Current Song</li>
</ul><br/>
With this Module you can:

<ul>

<li>Enter the name of the radio station</li>

<li>Configure the radio station I.P and Port number,</li>

<li>Change the module interface to your language,</li>
<li>Links autoplay with WinAmp, Window Media Player, Real Player or iTunes</li>
<p><font color="#000080">1. in order to make autoplay streaming links for RealPlayer, Window Media
Player and iTunes you need to edit 3 files<br/>
<br>
listen.asx<br/>
listen.ram<br/>
listen.m3u<br/>
<br/>
the files are in streaminglinks.zip. by default the links are linking to my
radio.<br/>
<br/>
2. open with notepad<br/>
3. make change depend on your shoutcast IP Address and Port<br/>
4. save<br/>
5. upload to your server <br/>
http://yoursite.com/modules/mod_shoutcastextended/<br/>
or<br>
http://yoursite.com/joomla/modules/mod_shoutcastextended/<br/>
<br/>
</font><b><font color="#FF0000">NOTE!! if those links are not working, check your mime-setting in cPanel </font></b></p>

</ul><br/>

<strong>Credit to Molok!</strong><br/>

<strong>This is a extended Version of Shoutcast Molok Module by Arnold Wender</strong><br/>

<strong>Original Version - Visit <a href="http://www.mundobizarro.org" target="_blank">Mundo Bizarro </a></strong><br/>
<strong>Extended Version - Visit <a href="http://www.fungkurs-network.net/joomla/" target="_blank">fungkur's Network </a></strong><br/>

]]></description>

<files>

<filename module="mod_shoutcastextended">mod_shoutcastextended.php</filename>

<filename>mod_shoutcastextended/winamp.gif</filename>
<filename>mod_shoutcastextended/wmplayer.gif</filename>
<filename>mod_shoutcastextended/realplayer.gif</filename>
<filename>mod_shoutcastextended/itunes.gif</filename>
<filename>mod_shoutcastextended/listen.ram</filename>
<filename>mod_shoutcastextended/listen.asx</filename>
<filename>mod_shoutcastextended/listen.m3u</filename>
</files>

<params>

<param name="radioname" type="text" default="FungKur.FM" label="radioname" description="Your Radio Station Name" />

<param name="host" type="text" default="fungkurfm.mine.nu" label="host" description="Your Host IP or Domain" />

<param name="port" type="text" default="8000" label="port" description="Your Port, which your ShoutCast is using" />

<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="chooseplayer" type="text" default="Choose Player" label="chooseplayer" description="Translate 'Choose Player' to your language" />

<param name="listener" type="text" default="Listener" label="listener" description="Translate 'Listener' to your language" />

<param name="from" type="text" default="from" label="from" description="Translate 'from' to your language" />

<param name="peakmenu" type="text" default="Peak" label="peakmenu" description="Translate 'Peak' to your language" />
<param name="serverstatus" type="text" default="Server Status" label="serverstatus" description="Translate 'Server Status' to your language" />
<param name="currentsong" type="text" default="Current Song" label="currentsong" description="Translate 'Current Song' to your language" />
</params>
</mosinstall>


rds po przerobieniu ma wyglądać tak ---------- Teraz gramy: Wykonawca - tytuł