TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 528
  • Total: 528

JukeBox

Started by borgBOB, September 24, 2005, 07:24:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

crip

BTO - Good tunes you have borgBOB .. ;D

crip~

borgBOB

Quote from: crip on October 16, 2005, 08:55:01 PM
BTO - Good tunes you have borgBOB .. ;D

crip~

Thanks, I have to take some down, but i left the funny ones, and a few favorites.

Salamence

hmm. No I made to install it, but no other tings go wrong.

I cant se the "forum" button longer.

Here is a link to my index.templamate in txt format.
http://www.forten.net/index.templamate.txt

IchBin

I'm not quite sure, but I think this:
' : Jukebox), '

Needs to be this?
' : 'Jukebox'), '

WizardHawk

#14
Anyone else who wants to go with a menu block instead of button can use this format:
$playerurl = 'javascript:window.open(\'http://FORUMURL//FOLDER1/osplayer.html\', \'osplayer\', \'width=193,height=265\');history.go();';

$playerurl2 = 'javascript:window.open(\'http://FORUMURL//FOLDER2/osplayer.html\', \'osplayer\', \'width=193,height=265\');history.go();';


echo '<a href="', $playerurl, '">Test Player</a><br>';
echo '<a href="', $playerurl2, '">Test 2</a>';

Put that in a php block and change the paths to your path. Just add another $playerurl line and another echo line for it and change the text you want before the /a and you are set.

The nice thing about not using buttons is that you can easily select sub groups who are allowed to use the player (guests cannot see the player menu on my site) and you don't have to create 1,000 buttons if you have many themes like I do. This is clean and works great.

Now I get to sort through the 400+ songs I have up and put them in group folders.ÂÃ,  >:(

BTW, don't forget to put the 3 osplayer files in each folder you use or it won't work. Also add an empty index.php file to protect the folders from unwanted downloading.

Thanks for the code help guys!

Oldiesmann

history.go() doesn't cause the thing to open in a new window. That just sends the browser back to the last page after it opens a new window. window.open is what makes it open in a new window.

carver

Kind of off topic here but where is a good place to get MP3's ?


borgBOB

Quote from: Oldiesmann on October 19, 2005, 01:25:28 AM
history.go() doesn't cause the thing to open in a new window. That just sends the browser back to the last page after it opens a new window. window.open is what makes it open in a new window.

My bad, that's what we did to keep the forum active in the browser,

WizardHawk

Question:
Can anyone here who is good at working with php scripts modify this to randomize the order of the files for the player. This parse script loads all of the file information and passes it along to the swf player. The files order is the order of the last modified date of the files themselves. This means the only way to get files in a specific order is to change that date. Since that makes adding new files such a pain, I'd rather have the program randomize the order of files so that the player is more like a radio. The users can start on the first song and move down the list and get a different order next time they open it. Since this is just loading a simple array that is being passed, I would think it wouldn't be too hard to have a randomizer routine resort them before passing them. I could do this in basic but I'm afraid I haven't learned PHP yet.

$autoplay = false ;   // autoplay ON / OFF
$gDirectory = "./" ;   // the mp3 directory







///////////////////////////////////////////////////

// Parse variables to FLASH Fonction
/////////
   function Parse($variable,$valeur) {
       echo "&" . $variable . "=" . utf8_encode(urlencode($valeur));
   }

// Browse files Fonction
/////////
function tep_browse_mp3($pDirectory, $pExtension) {
    if($handle = opendir($pDirectory))   {
         while(false !== ($file = readdir($handle)))  {
            $getExt = explode(".", $file);
            $countExt = count($getExt);
            $fExt = $countExt - 1;
            $myExt = $getExt[$fExt];
           
            if (($myExt == $pExtension) && ($file != ".") && ($file != "..")) {
$files[] = $file;
}
        }
    }
return $files;   
closedir($handle);
}
/////////////////////////////////////////////////                             





// files extension we want to list
$gExtension = "mp3";

/// Create a tab with files
$ExpExt = explode(" ", $gExtension);
sort ($ExpExt);

foreach ($ExpExt as $findExt) {
       
$getFile = @tep_browse_mp3($gDirectory, $findExt);
        $countFile = count($getFile);     
       
        if ($countFile != 0) {
foreach ($getFile as $myFile) {
$list[] = $myFile;

}           
    }

//////////
/// create and parse the variables to the player

/// the number of tracks
$trcknbr = $countFile ;
Parse ("trcknbr" , $trcknbr ) ;

/// the tracks files names
for($i=0;$i<$countFile;$i++) {
$trck[$i] = "$list[$i]";
Parse ("trck$i" , $trck[$i] ) ;

}

/// the path where the files are located
$path = $gDirectory ;
Parse ("path" , $path ) ;

/// the path where the files are located
Parse ("autoplay" , $autoplay ) ;

This website is proudly hosted on Crocweb Cloud Website Hosting.