summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/class/stream.class.php5
-rw-r--r--lib/preferences.php1
-rw-r--r--modules/flash/XSPF_RadioV.swfbin0 -> 8923 bytes
-rw-r--r--templates/show_embed_xspf.inc.php38
-rw-r--r--templates/show_index.inc.php8
-rw-r--r--templates/show_users.inc.php2
-rw-r--r--themes/classic/templates/default.css12
7 files changed, 60 insertions, 6 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php
index a5d1f5a8..8d081824 100644
--- a/lib/class/stream.class.php
+++ b/lib/class/stream.class.php
@@ -296,6 +296,9 @@ class Stream {
// start ugly evil javascript code
//FIXME: This needs to go in a template, here for now though
+ if ($GLOBALS['user']->prefs['embed_xspf'] == 1 ){
+ header("Location: ".conf('web_path')."/index.php?xspf&play_info=".$tmp_playlist->id);
+ }else{
echo "<html><head>\n";
echo "<title>" . conf('site_title') . "</title>\n";
echo "<script language=\"javascript\" type=\"text/javascript\">\n";
@@ -312,7 +315,7 @@ class Stream {
echo "<body onLoad=\"javascript:PlayerPopUp('" . conf('web_path') . "/modules/flash/xspf_player.php" . $play_info . "')\">\n";
echo "</body>\n";
echo "</html>\n";
-
+ }
} // create_xspf_player
diff --git a/lib/preferences.php b/lib/preferences.php
index 76e06fc6..b1448d94 100644
--- a/lib/preferences.php
+++ b/lib/preferences.php
@@ -253,6 +253,7 @@ function create_preference_input($name,$value) {
case 'condPL':
case 'rio_track_stats':
case 'rio_global_stats':
+ case 'embed_xspf':
case 'direct_link':
if ($value == '1') { $is_true = "selected=\"selected\""; }
else { $is_false = "selected=\"selected\""; }
diff --git a/modules/flash/XSPF_RadioV.swf b/modules/flash/XSPF_RadioV.swf
new file mode 100644
index 00000000..06257f11
--- /dev/null
+++ b/modules/flash/XSPF_RadioV.swf
Binary files differ
diff --git a/templates/show_embed_xspf.inc.php b/templates/show_embed_xspf.inc.php
new file mode 100644
index 00000000..2530d863
--- /dev/null
+++ b/templates/show_embed_xspf.inc.php
@@ -0,0 +1,38 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2006 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License v2
+ as published by the Free Software Foundation
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+<span class="xspf_player">
+<?php
+show_box_top(_('XSPF Player'));
+?>
+<div id="mp3player">
+<script type="text/javascript" src="<?php echo conf('web_path'); ?>/modules/flash/swfobject.js"></script>
+<script type="text/javascript">
+<!--
+var flashObj = new SWFObject ("<?php echo conf('web_path'); ?>/modules/flash/XSPF_RadioV.swf?action=play&playlist=<?php echo conf('web_path'); ?>/modules/flash/xspf_player.php?tmp_id=<?php echo $play_info; ?>&folder=<?php echo conf('web_path'); ?>/modules/flash/&textcolor=033066&color=E6E6E6&loop=playlist&lma=yes&viewinfo=true&vol=30&display=1@. - @2@ - @", "FMP3", "270", "190", 7, "#FFFFFF", true);
+flashObj.write ("mp3player");
+// -->
+</script>
+</div>
+<?php
+show_box_bottom();
+?>
+</span> \ No newline at end of file
diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php
index 17021597..f9536acf 100644
--- a/templates/show_index.inc.php
+++ b/templates/show_index.inc.php
@@ -19,6 +19,14 @@
*/
?>
+<?php
+if (isset($_REQUEST['xspf']) && isset ($_REQUEST['play_info'])){
+
+require_once(conf('prefix') . '/templates/show_embed_xspf.inc.php');
+}
+
+?>
+
<div id="np_data">
<?php show_now_playing(); ?>
</div> <!-- Close Now Playing Div -->
diff --git a/templates/show_users.inc.php b/templates/show_users.inc.php
index f0c5e2b1..3bb1abd4 100644
--- a/templates/show_users.inc.php
+++ b/templates/show_users.inc.php
@@ -141,7 +141,7 @@ foreach ($users as $working_user) {
</td>
<?php
//FIXME: Fix this for the extra permission levels
- if ($user->disabled == '1') {
+ if ($working_user->disabled == '1') {
echo "<td><a href=\"".$web_path."/admin/users.php?action=enable&amp;user_id=$working_user->id\">" . get_user_icon('enable') . "</a></td>";
}
else {
diff --git a/themes/classic/templates/default.css b/themes/classic/templates/default.css
index 87a3b9d3..e156acd7 100644
--- a/themes/classic/templates/default.css
+++ b/themes/classic/templates/default.css
@@ -77,6 +77,14 @@ input {
float: left;
}
+/************************************************/
+/* XSPF Player */
+/************************************************/
+
+.xspf_player {
+ right: 20px;
+ position: absolute;
+}
/************************************************/
/* Footer */
@@ -621,7 +629,3 @@ table.tabledata {}
.display {}
-
-
-
-