Clan Adverts

Sponsors

CT on Facebook

Latest Product

User Box

Anonymous
38.107.179.216
Nickname:

Password:

Security Code
Security Code
Type Security Code


PND Downloads Feed

Phpnuke Downloads
How to Delete or Reset yo...
How to Delete or Reset your PHPNuke Admin Account
Lost your admin password ?  Cant login to your admin account ? This s...
Back Online & Stuff
Back Online & Stuff
Look at us with our nifty website back up and running… Seriously...
How to edit the admins in...
How to edit the admins in the forums
Here is a way to make someone admin in your forums on your Evo site. I...
Demo Splash Screen
Demo Splash Screen
Ped @ Clan Themes has released a simple splash screen entrance hack. ...
Free Phpnuke Business The...
Free Phpnuke Business Theme 6
This is the 6th Business theme for Phpnuke that Clan Themes has releas...
Tricked Out Slider
Tricked Out Slider
We have seen some great new things come out of Tricked Out News and th...

Custom Work

PHP Nuke Custom Work

www.clanthemes.com :: View topic - Shoutcast block issues
Shoutcast block issues

3 Replies / 2480 Views


Post new topic   Reply to topic  

   www.clanthemes.com Forum Index » Blocks

View previous topic :: View next topic


sueco
Reputation: 30.7 Add RepSubtract Rep
Local time: 11:47 PM
Location: Kristianstad
sweden.gif

Rocket Noob
Rocket Noob

0.01 posts per day
Medals: 0

Joined: Nov 24, 2007
Last Visit: 15 Apr 2010
Posts: 20
Points: 717 

Post Shoutcast block issues Posted: Thu Jan 31, 2008 4:31 pm

I installed the shoutcast block and after I activate it, it fucked up my site. All other menu, forums etc dissapeared exept the left sides block. Do any else have any problems with the shoutcast block? Any ideas what to do to solve it?
 

 
View user's profileSend private messageVisit poster's website Reply with quote

DoC
Reputation: 89.6 Add RepSubtract Rep
votes: 5
Local time: 10:47 PM
Location: UK
uk.gif



0.20 posts per day
Medals: 3 (View more...)
Dedication (Amount: 1)
Forums Moderator
Forums Moderator
Joined: Feb 07, 2007
Last Visit: 30 Jun 2011
Posts: 394
Points: 4451 

Post Shoutcast block issues Posted: Thu Jan 31, 2008 4:55 pm

Shop Purchases:
Clan Roster v1.7 Php Nuke Module · Clan Roster 2.0

I take it you put it into the center?

It is a bit of a pain to get right but when it is it's leet can you post your settings and ill tell you where you have gone wrong.

Basically try and get it looking like this (this is how I got it to work):

Code:
 $servers = array(
                  'servers' => array(
                                      's8.viastreaming.net',
                                      ''
                                     ),
                  'ports' => array(
                                    7240,
                                  ),
                  'passwords' => array(
                                        '**********',
                                        ''
                                      ),
                  'hbw' => 'http://s8.viastreaming.net/7240/listen.asx', <---- Windows Media Player; note the /
                  'lbw' => 'http://s8.viastreaming.net:7240/listen.pls', <----- WinAMP Media Player; note the :
                  'lasttracks' => 5
                  );
  $stationname = 'YOUR STATION NAME (Make sure its correct)'; // What is your station called?
  $refreshtime = 60 * 3; // How often to refresh (seconds)
  $content = "$stationname is not broadcasting"; // Default content.
 
  require_once('includes/scxml.php');
  require_once('config.php');
  global $prefix, $dbi;
 
 
 
  /* Function to fetch the info */
  function getInfo($servers)
  {
    $server = new SCXML;
    $listeners = 0;
    $nowplaying = 'Nothing';
    $peak = 0;
    $max = 0;
 
    while( $host = each($servers['servers']) )
    {
      $port = each($servers['ports']);
      $password = each($servers['passwords']);
      $server->set_host($host[1]);
       $server->set_port($port[1]);
       $server->set_password($password[1]);
       
       
      if ($server->retrieveXML())
      {
        $nowplaying = urldecode($server->fetchMatchingTag("SONGTITLE"));
        $listeners += $server->fetchMatchingTag("CURRENTLISTENERS");
        $peak += $server->fetchMatchingTag("PEAKLISTENERS");
        $max += $server->fetchMatchingTag("MAXLISTENERS");
        $lasttracks = $server->fetchMatchingArray("TITLE");
      }
    }
    $content .= "<b>Now Playing:</b><br><i>$nowplaying</i><br><b>Listeners:</b> ";
    $content .= "<i>$listeners/$max</i><br><b>Peak:</b> <i>$peak</i><br><br>";
    $content .= '<center>';
    if( ($servers['hbw']=='') && ($servers['lbw']=='') )
   {
      $content.="<a href=http://$host[1]:$port[1]/listen.pls>Tune In</a>";
    }
    if( $servers['hbw'] <> '' )
   {
      $content.="<a href=".$servers['hbw'].">Play With: Windows Media Player</a><br>";
    }
    if( $servers['lbw'] <> '' )
    {
      $content.="<a href=".$servers['lbw'].">Play With: WinAMP Media Player</a><br>";
    }
    $content.='</center>';
    if( $servers['lasttracks'] > 0 ) {
      $max = $servers['lasttracks'];
      if( count($lasttracks) < $max ) $max = count($lasttracks);
      $content .= "<br><b>Last $max tracks:</b><br>";
      for( $i=0; $i < $max; $i++ ) {
        $content .= ($i + 1).". $lasttracks[$i]<br>";
      }
    }
    return $content;
  }
 
  /* Function to cache the string $content */
  function cacheInfo($content,$title)
  {
    global $dbi, $prefix;
    $now = time();
    $sql = "UPDATE ".$prefix."_blocks SET content='".$content."', time=".$now
           ." WHERE title='".$title."'";
    sql_query($sql,$dbi);
  }

  /* Get Cached Content: */
  $sql = "SELECT content,time FROM ".$prefix."_blocks WHERE title='".$title."'";
  $result = sql_query($sql,$dbi);
  $roottime = time() - $refreshtime;
  if($result)
  {
    $row = sql_fetch_array($result, $dbi);
    /* Check time! */
    if( $row[1] < $roottime )
    {
      $content = getInfo($servers);
      cacheInfo($content,$title);
    }
    else
    {
      $content = $row[0];
    }
  }
  /* Otherwise, we have to fetch, and cache the details */
  else
  {
    $content = getInfo($servers);
    cacheInfo($content,$title);
  }
?>


Hope this helps

DoC
 

 
View user's profileSend private messageSend e-mail Reply with quote

sueco
Reputation: 30.7 Add RepSubtract Rep
Local time: 11:47 PM
Location: Kristianstad
sweden.gif

Rocket Noob
Rocket Noob

0.01 posts per day
Medals: 0

Joined: Nov 24, 2007
Last Visit: 15 Apr 2010
Posts: 20
Points: 717 

Post Shoutcast block issues Posted: Thu Jan 31, 2008 4:59 pm

No, I added it as a side block, but I tried to add it as a centerblock after sideblock not worked, same there.
 

 
View user's profileSend private messageVisit poster's website Reply with quote


DoC
Reputation: 89.6 Add RepSubtract Rep
votes: 5
Local time: 10:47 PM
Location: UK
uk.gif



0.20 posts per day
Medals: 3 (View more...)
Dedication (Amount: 1)
Forums Moderator
Forums Moderator
Joined: Feb 07, 2007
Last Visit: 30 Jun 2011
Posts: 394
Points: 4451 

Post Shoutcast block issues Posted: Thu Jan 31, 2008 5:14 pm

Shop Purchases:
Clan Roster v1.7 Php Nuke Module · Clan Roster 2.0

have you added any of your info to it like your server address etc? Again can you post your file like i have and that way I will be able to tell you what needs changing it sounds so far like you have a "/" instead of a ":" or visa versa

DoC
 

 
View user's profileSend private messageSend e-mail Reply with quote
Post new topic   Reply to topic  
   www.clanthemes.com Forum Index » Blocks


 
3 Replies / 2480 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum