diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-12-28 02:44:31 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-12-28 02:44:31 +0000 |
commit | 223143ed3a95ad59ff2945f6746da73992012354 (patch) | |
tree | ea735da45550f98dbd6adc23f35df957ea13f84e | |
parent | 936c78c2b8f0e5fdeaea81e9758d277a90ea62ad (diff) | |
download | ampache-223143ed3a95ad59ff2945f6746da73992012354.tar.gz ampache-223143ed3a95ad59ff2945f6746da73992012354.tar.bz2 ampache-223143ed3a95ad59ff2945f6746da73992012354.zip |
fixed display of now playing and fixed ordering of themes in preferences
-rwxr-xr-x | docs/CHANGELOG | 2 | ||||
-rw-r--r-- | lib/themes.php | 6 | ||||
-rw-r--r-- | templates/default.css | 1 | ||||
-rw-r--r-- | templates/show_now_playing.inc | 23 | ||||
-rw-r--r-- | templates/show_now_playing_row.inc.php | 20 | ||||
-rw-r--r-- | themes/classic/templates/default.css | 1 |
6 files changed, 20 insertions, 33 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index edfe578e..c5ecdc7f 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,8 @@ -------------------------------------------------------------------------- v.3.3.3-Beta3 + - Fixed sorting of Themes, now sorted by Alpha of theme name + - Fixed long standing Now Playing display in Classic Theme - Fixed Now Playing to account for Windows Media Player 11s 3 HTTP Requests per song stupidity - Added ability to mass tag using play selected functionality diff --git a/lib/themes.php b/lib/themes.php index 5b1101b2..1ce57dae 100644 --- a/lib/themes.php +++ b/lib/themes.php @@ -46,11 +46,15 @@ function get_themes() { /* Open the theme.cfg.php file */ $r = read_config($config_file); $r['path'] = $file; - $results[] = $r; + $name = $r['name']; + $results[$name] = $r; } } // end while directory + // Sort by the theme name + ksort($results); + return $results; } // get_themes diff --git a/templates/default.css b/templates/default.css index 6bc33087..d267cc0d 100644 --- a/templates/default.css +++ b/templates/default.css @@ -594,7 +594,6 @@ li.current-rating{ .np_row { padding-top: 3px; padding-bottom: 3px; - display: block; } .np_cell { margin: 10px; diff --git a/templates/show_now_playing.inc b/templates/show_now_playing.inc index 2f06dece..5c0cc2b5 100644 --- a/templates/show_now_playing.inc +++ b/templates/show_now_playing.inc @@ -29,18 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. if (count($results)) { ?> -<table class="box" cellspacing="0"> -<tr> - <td class="box-left-top"></td> - <td class="box-top"></td> - <td class="box-right-top"></td> -</tr> -<tr> - <td class="box-left" rowspan="2"></td> - <td class="box-title"><?php echo _('Now Playing'); ?></td> - <td class="box-right" rowspan="2"></td> -</tr> -<tr><td style="padding-top:3px;"> +<?php show_box_top(_('Now Playing')); ?> +<table> <?php foreach ($results as $item) { $song = $item['song']; @@ -50,15 +40,12 @@ foreach ($results as $item) { if (!is_object($song)) { continue; } if (!$np_user->fullname) { $np_user->fullname = "Ampache User"; } + echo '<tr class="np_row">'; require(conf('prefix') . '/templates/show_now_playing_row.inc.php'); + echo '</tr>'; } // end foreach ?> -</td></tr> -<tr> - <td class="box-left-bottom"></td> - <td class="box-bottom" style="width:100%;"></td> - <td class="box-right-bottom"></td> -</tr> </table> +<?php show_box_bottom(); ?> <?php } // end if count results ?> diff --git a/templates/show_now_playing_row.inc.php b/templates/show_now_playing_row.inc.php index 50f32859..08ae5da5 100644 --- a/templates/show_now_playing_row.inc.php +++ b/templates/show_now_playing_row.inc.php @@ -26,26 +26,22 @@ $album = scrub_out(truncate_with_ellipse($song->f_album_full,'25')); $artist = scrub_out(truncate_with_ellipse($song->f_artist_full,'25')); ?> -<table class="np_row"> -<tr> - <td class="np_cell"><?php echo scrub_out($np_user->fullname); ?></td> - <td class="np_cell"> +<td class="np_cell"><?php echo scrub_out($np_user->fullname); ?></td> +<td class="np_cell"> <a title="<?php echo scrub_out($song->title); ?>" href="<?php echo $web_path; ?>/song.php?action=single_song&song_id=<?php echo $song->id; ?>"> <?php echo $title; ?> </a> - </td> - <td class="np_cell"> +</td> +<td class="np_cell"> <a title="<?php echo scrub_out($song->album_full); ?>" href="<?php echo $web_path; ?>/albums.php?action=show&album=<?php echo $song->album; ?>"> <?php echo $album; ?></a> / <a title="<?php echo scrub_out($song->artist_full); ?>" href="<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $song->artist; ?>"> <?php echo $artist; ?> </a> - </td> +</td> <?php if (conf('play_album_art')) { ?> - <td class="np_cell"> +<td class="np_cell"> <a target="_blank" href="<?php echo $web_path; ?>/albumart.php?id=<?php echo $song->album; ?>&type=popup" onclick="popup_art('<?php echo $web_path; ?>/albumart.php?id=<?php echo $song->album; ?>&type=popup'); return false;"> <img align="middle" border="0" src="<?php echo $web_path; ?>/albumart.php?id=<?php echo $song->album; ?>&fast=1&thumb=1" alt="Album Art" height="75" /></a> - </td> - <?php } // end play album art ?> -</tr> -</table> +</td> +<?php } // end play album art ?> diff --git a/themes/classic/templates/default.css b/themes/classic/templates/default.css index ddc3b459..e9c2ff89 100644 --- a/themes/classic/templates/default.css +++ b/themes/classic/templates/default.css @@ -519,7 +519,6 @@ margin-right:5em; .np_row { padding-top: 3px; padding-bottom: 3px; - display: block; } .np_cell { margin: 10px; |