Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks
Author Message
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1085

PostPosted: Wed Feb 09, 2022 3:25 pm Reply with quote

Guys! I am trying to make a radio shout block and it is working but when I click it goes to play in another page. Is that normal? Let me know if u see any mistake or validation.

Code:
<?php


if (!defined('BLOCK_FILE')) {Header('Location: ../index.php');  die();}
if (!defined('PHP_EOL')) define('PHP_EOL', strtoupper(substr(PHP_OS,0,3) == 'WIN') ? "\r\n" : "\n");

global $db, $prefix, $content;
$content = "<div align=\"center\"><table align=\"center\" bgcolor=\"#fff\" width=\"130\" height=\"100\" cellspacing=\"1\" cellpadding=\"1\" border=\"0\"><tr><td><center>" . PHP_EOL
."<a href=\"https://www.bestbuildpc.org/modules.php?name=Ritmo_95\"><img src=\"images/Shoutcast_Logo.jpg\" width=\"137\" height=\"56\" alt=\"Visit SHOUTcast Showcase\" title=\"Visit SHOUTcast Showcase\" cellpadding=\"1\" border=\"0\"></a></br></br>" . PHP_EOL
."<form name=\"radio\">" . PHP_EOL
."<select name=\"music\" size=\"1\" style=\"background-color:#1A87B9; font10px; color:#FFFFFF\" onChange=\"displaydesc(document.radio.music.selectedIndex)\">" . PHP_EOL
."<option selected>Pick a Station</option>" . PHP_EOL
."<option value=\"http://46.4.33.73:8014/stream\">La Poderosa</option>" . PHP_EOL
."<option value=\"http://62.141.38.36:8080/dance.mp3\">Dance Wave!</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."<option value=\"http://stream.antenne.de:80/chillout\">Electronic</option>" . PHP_EOL
."</select></br></br>" . PHP_EOL
."<input class=\"button button-13\" type=\"button\" value=\"Play it Now!\" onClick=\"location=document.radio.music.options[document.radio.music.selectedIndex].value\">" . PHP_EOL
."</form></br>" . PHP_EOL
."</center></td></tr></tbody></table></td></td>" . PHP_EOL
."</tr></div>" . PHP_EOL;
?>
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1717

PostPosted: Thu Feb 10, 2022 12:51 am Reply with quote

The related Javascript-Code is missing here.

_________________
Github: RavenNuke 
View user's profile Send private message
hicuxunicorniobestbuildpc







PostPosted: Thu Feb 10, 2022 3:23 am Reply with quote

Which code u mean? Rolling Eyes
 
neralex







PostPosted: Tue Feb 15, 2022 10:37 am Reply with quote

html Code:
onChange="displaydesc(document.radio.music.selectedIndex)"

html Code:
onClick="location=document.radio.music.options[document.radio.music.selectedIndex].value"


The attributes onchange and onclick are using Javascript code, which is not shown in your snippet. It's not clear for me, how it should works. Your code is following a normal behavior, it opens the URLs of the option-values in a new browser-tab or -window. Ther is no way to start a playback inside the block. Maybe you should try a clean restart instead to copy some crappy codelines.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©