Added $base_url to fix PATH_INFO issues (still need to edit links to use it)
authorHarvie <tomas@mudrunka.cz>
Fri, 29 Oct 2010 17:47:32 +0000 (19:47 +0200)
committerHarvie <tomas@mudrunka.cz>
Fri, 29 Oct 2010 17:47:32 +0000 (19:47 +0200)
example_config.php
index.php
tests/audio.html [changed mode: 0644->0755]

index 9b5f90df99e05b14c94c3561a7ea83d4870f4aa9..2de765b6705dd77a878237d6155e4cb7b74d0b14 100755 (executable)
@@ -11,7 +11,8 @@
  */
 //Config-basic
 $title =                'Harvie\'s&nbsp;JuKe!Box'; //Title of jukebox
-$music_dir =            './music'; //Local path to directory with music
+$music_dir =            'music'; //Local path to directory with music
+$base_url =             dirname($_SERVER['SCRIPT_NAME']); //URL of this directory ("./")
 $music_dir_url =        'http://your-server.net/jukebox/music'; //URL path to the same directory CHANGE IT!
 $cache_passwd =         'renew123'; //You need this passwd to refresh search cache CHANGE IT!
 //Login
@@ -28,5 +29,5 @@ $search_engines = array_merge($search_engines, array(
 */
 //Bonuses
 if(isset($bonus_dir) && is_dir($bonus_dir)) {
-       $css_file =     $bonus_dir.'/themes/default/jukebox.css'; //CSS (Design/Theme)
+       $css_file =     $base_url.'/'.$bonus_dir.'/themes/default/jukebox.css'; //CSS (Design/Theme)
 }
index 27a54b8119318c93ccf9bc1d3f7c6b64fcaffbed..92a0507e1a624794501b3d2b81ae7ffa4053b491 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -18,7 +18,8 @@ Version info:
 
 //Config-basic
 $title =               'Harvie\'s&nbsp;JuKe!Box'; //Title of jukebox
-$music_dir =           './music'; //Local path to directory with music
+$music_dir =           'music'; //Local path to directory with music
+$base_url =            dirname($_SERVER['SCRIPT_NAME']); //URL of this directory ("./")
 $music_dir_url =       'http://your-server.net/jukebox/music'; //URL path to the same directory
 $cache_passwd =        'renew123'; //You need this passwd to refresh search cache
 $sort =                        3; //Sort? 0 = none, 1 = playlists, 2 = 1+listings; 3 = 2+search-EXPERIMENTAL! (sorting could eat lot of memory)
@@ -35,11 +36,11 @@ $default_random_count =     30; //How many random songs by defaul?
 
 //External files
 $indexlist =           array('index.html', 'index.txt'); //Search for this file in each directory
-$bonus_dir =           './jbx'; //Misc. files directory
+$bonus_dir =           'jbx'; //Misc. files directory
 ////
 $search_cache =        $bonus_dir.'/cache.db'; //Database for searching music (php +rw) - .htaccess: Deny from all!!!
-$css_file =            $bonus_dir.'/themes/default/jukebox.css'; //CSS (Design)
-$favicon_file =                './favicon.png'; //favicon
+$css_file =            $base_url.'/'.$bonus_dir.'/themes/default/jukebox.css'; //CSS (Design)
+$favicon_file =                $base_url.'/favicon.png'; //favicon
 $header_file =         $bonus_dir.'/header.html'; //header file
 $footer_file =         $bonus_dir.'/footer.html'; //footer file
 
@@ -280,7 +281,7 @@ function flash_mp3_player() {
 <style> * { margin: 0; padding: 0; border: 0; } </style></head><body>
 <object width="100%" height="344">
         <embed src="<?php
-               echo($GLOBALS['flash_player_swf'].$GLOBALS['flash_player_options']);
+               echo($GLOBALS['base_url'].'/'.$GLOBALS['flash_player_swf'].$GLOBALS['flash_player_options']);
                if(isset($_GET['song'])) echo(rawurlencode($_GET['song']));
                if(isset($_GET['playlist'])) generate_m3u($GLOBALS['dir'], dirname($GLOBALS['music_dir_url']), isset($_GET['recursive']), ',', true);
        ?>"
old mode 100644 (file)
new mode 100755 (executable)
This page took 0.217147 seconds and 4 git commands to generate.