Jump to content

[MOD] Audio Tracks lets users select from pre defined....


Recommended Posts

Downloaded this about an hour ago pretty nice engine :)

So heres me first mod for it and probably plenty more...

This will let you upload more audio tracks to a folder so your user can select a better atmospheric track... i did quite a bit of editing for this to work as i wasnt happy with the STOP/ START and not knowing whats playing next...

create a new file call it tracks.php


include "config.php";
include_once 'include_lang.php';

<object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab" width="240" height="43">
<param name="FileName" value="music/<?=$song;?>">
<param name="AutoStart" value="false">
<param name="ShowTracker" value="true">
<param name="ShowControls" value="true">
<param name="ShowGotoBar" value="false">
<param name="ShowDisplay" value="false">
<param name="ShowStatusBar" value="false">
<param name="AutoSize" value="false">
<param name="PlayCount" value="0">
<embed src="songs/<?=$song;?>" AutoStart="false" ShowTracker="true" ShowControls="true" PlayCount="0" ShowGotoBar="false" ShowDisplay="false" ShowStatusBar="false" AutoSize="false" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/" width="200" height="43"></embed>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<select name="song">
<option value="#">Choose Atmosphere Track</option>

$files = Array();
$path = "music";
$dh = opendir($path);
while ($file = readdir($dh)) {
 if (!is_dir($path."/".$file)) {
  if (is_file($path."/".$file)) {
   if (($file!=".") && ($file!="..")) {
    $files[] = $file;

foreach($files as $index=>$file) {
 echo "<option value=\"".$file."\">".$file."</option>\n";

<input name="go" type="submit" value="PLAY!">
<link href="styles/phaos.css" rel="stylesheet" type="text/css">
<iframe src="right_side.php" name="iframe985426" width="250px" height="800px" scrolling="auto" frameborder="0" align="right"></iframe>



Now open up menu.php

and remove this section near bottom


if([email protected]$play_music) {$play_music = 'NO';}
if($play_music == "YES"){

if($song_select == "") {$song_select = rand(1,4);}

if($song_select == 1) {
<embed SRC="music/homeland_farmland.mid" hidden="true" LOOP="true">
} elseif($song_select == 2) {
<embed SRC="music/under_the_bards_tree.mid" hidden="true" LOOP="true">
} elseif($song_select == 3) {
<embed SRC="music/stranger_on_a_hill.mid" hidden="true" LOOP="true">
} elseif($song_select == 4) {
<embed SRC="music/the_town_of_witchwoode.mid" hidden="true" LOOP="true">



Now open up



and remove this section


[b]<? echo $lang_mus; ?>:[/b]

[url="menu.php?play_music=YES"]<? echo $lang_plays; ?>[/url] &nbsp [url="menu.php?play_music=NO"]<? echo $lang_stop; ?>[/url]

[url="clear_side_post.php"]<? echo $lang_ref; ?>[/url]


Now open up index.php

and change


<frame name="right_side" src="right_side.php" scrolling=no>




<frame name="tracks" src="tracks.php" scrolling=no>


Dont worry your right_side.php will still be called as its now in the tracks.php file as an iframe..

Thats it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...