diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-07 20:35:49 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-07 20:35:49 +0000 |
commit | b6cfe134badb2d4393e9081b13b2dfca011ed736 (patch) | |
tree | 4f6213e626fa90b4b280b5e663e791559c4a7f8f /templates | |
parent | 90d2acbc54b24b6e8207e12f1cabcbc7541ca447 (diff) | |
download | ampache-b6cfe134badb2d4393e9081b13b2dfca011ed736.tar.gz ampache-b6cfe134badb2d4393e9081b13b2dfca011ed736.tar.bz2 ampache-b6cfe134badb2d4393e9081b13b2dfca011ed736.zip |
* Re-worked Main page of Ampache, adding Album of the moment.
* Moved stats to /stats.php page
* Fixed logic error in resize that could cause nothign to display
if resize was on, but it still failed
* Fixed Upload Album art from Find Album Art
* Added Menu to the TV page
* Fixed logic error that showed localplay if user had access
regardless of global config
* Changed default action of browse.php to song browse
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_all_popular.inc.php | 25 | ||||
-rw-r--r-- | templates/show_all_recent.inc.php | 13 | ||||
-rw-r--r-- | templates/show_index.inc.php | 37 | ||||
-rw-r--r-- | templates/show_random_albums.inc.php | 42 | ||||
-rw-r--r-- | templates/show_tv.inc.php | 17 | ||||
-rw-r--r-- | templates/sidebar.inc.php | 4 |
6 files changed, 101 insertions, 37 deletions
diff --git a/templates/show_all_popular.inc.php b/templates/show_all_popular.inc.php index 551c453e..e9f12a5c 100644 --- a/templates/show_all_popular.inc.php +++ b/templates/show_all_popular.inc.php @@ -5,9 +5,8 @@ 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 - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + 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 @@ -24,20 +23,24 @@ <table class="tabledata"> <tr> <td valign="top" > - <?php show_info_box(_("Most Popular Artists"), 'artist', $artists); ?> + <?php show_info_box(_('Most Popular Artists'), 'artist', $artists); ?> </td> <td valign="top" align="left"> - <?php show_info_box(_("Most Popular Albums"), '', $albums); ?> + <?php show_info_box(_('Most Popular Albums'), '', $albums); ?> + </td> + <td valign="top" align="left"> + <?php show_info_box(_('Most Popular Genres'), '', $genres); ?> </td> - </tr> <tr><td colspan="2"> </td></tr> <tr> - <td valign="top" align="left"> - <?php show_info_box(_("Most Popular Genres"), '', $genres); ?> + <td valign="top"> + <?php show_info_box(_('Most Popular Songs'), 'song', $songs); ?> </td> - <td valign="top" > - <?php show_info_box(_("Most Popular Songs"), 'song', $songs); ?> + <td valign="top"> + <?php show_info_box(_('Most Popular Live Streams'),'live_stream',$live_streams); ?> + </td> + <td valign="top"> + <?php show_info_box(_('Most Popular Tags'),'tags',$tags); ?> </td> </tr> -</table> diff --git a/templates/show_all_recent.inc.php b/templates/show_all_recent.inc.php index aec905fe..e0867f0d 100644 --- a/templates/show_all_recent.inc.php +++ b/templates/show_all_recent.inc.php @@ -5,9 +5,8 @@ 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 - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + 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 @@ -21,13 +20,15 @@ */ ?> -<table class="tabledata"> <tr> <td valign="top"> - <?php show_info_box(_("Newest Artist Additions"), '', $artists); ?> + <?php show_info_box(_('Newest Artist Additions'), '', $artists); ?> </td> <td valign="top"> - <?php show_info_box(_("Newest Album Additions"), '', $albums); ?> + <?php show_info_box(_('Newest Album Additions'), '', $albums); ?> + </td> + <td valign="top"> + <?php show_info_box(_('Newest Live Stream Additions'),'',$tags); ?> </td> </tr> </table> diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php new file mode 100644 index 00000000..bc782046 --- /dev/null +++ b/templates/show_index.inc.php @@ -0,0 +1,37 @@ +<?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. + +*/ +?> +<div id="np_data"> + <?php show_now_playing(); ?> +</div> <!-- Close Now Playing Div --> +<!-- Recently Played --> +<div id="recently_played"> + <?php + $data = get_recently_played(); + if (count($data)) { require_once(conf('prefix') . '/templates/show_recently_played.inc.php'); } + ?> +</div> +<div id="random_selection"> + <?php + $albums = get_random_albums('5'); + if (count($albums)) { require_once(conf('prefix') . '/templates/show_random_albums.inc.php'); } + ?> +</div> diff --git a/templates/show_random_albums.inc.php b/templates/show_random_albums.inc.php new file mode 100644 index 00000000..04280235 --- /dev/null +++ b/templates/show_random_albums.inc.php @@ -0,0 +1,42 @@ +<?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. + +*/ +$web_path = conf('web_path'); +?> +<?php show_box_top(_('Albums of the Moment')); ?> +<table class="tabledata"> +<tr> + <?php + foreach ($albums as $album_id) { + $album = new Album($album_id); + $album->format(); + ?> + <td> + <a target="_blank" href="<?php echo $web_path; ?>/image.php?type=popup&id=<?php echo $album_id; ?>"> + <img src="<?php echo $web_path; ?>/image.php?thumb=1&id=<?php echo $album_id; ?>" width="75" height="75" border="0"> + </a> + + <br /> + <?php echo $album->f_link; ?> + </td> + <?php } ?> +</tr> +</table> +<?php show_box_bottom(); ?> diff --git a/templates/show_tv.inc.php b/templates/show_tv.inc.php index 567e8ce8..72f8aa92 100644 --- a/templates/show_tv.inc.php +++ b/templates/show_tv.inc.php @@ -22,20 +22,6 @@ $htmllang = str_replace("_","-",conf('lang')); $location = get_location(); -?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>"> -<head> -<link rel="shortcut icon" href="<?php echo $web_path; ?>/favicon.ico" /> -<meta http-equiv="Content-Type" content="text/html; charset=<?php echo conf('site_charset'); ?>" /> -<title><?php echo conf('site_title'); ?> - <?php echo $location['title']; ?></title> -<link rel="stylesheet" href="<?php echo $web_path; ?><?php echo conf('theme_path'); ?>/templates/default.css" type="text/css" /> -</head> -<body> -<script src="<?php echo $web_path; ?>/lib/javascript-base.js" language="javascript" type="text/javascript"></script> -<script src="<?php echo $web_path; ?>/modules/kajax/ajax.js" language="javascript" type="text/javascript"></script> -<?php - /** * Check for the refresh mojo, if it's there then require the * refresh_javascript include. Must be greater then 5, I'm not @@ -52,9 +38,6 @@ if (conf('refresh_limit') > 5) { <!-- Left Col --> <div id="tv_left"> <?php show_box_top(_('Controls')); ?> -<div class="text-action"> - <a href="<?php echo conf('web_path'); ?>/index.php"><?php echo _('Home'); ?></a> -</div> <!-- Control DIV --> <div id="tv_control"> <?php diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php index 06962c10..6f55def1 100644 --- a/templates/sidebar.inc.php +++ b/templates/sidebar.inc.php @@ -35,8 +35,6 @@ $browse_items[] = array('title'=>_("Albums"),'url'=>'albums.php','active'=>$loca $browse_items[] = array('title'=>_("Artists"),'url'=>'artists.php','active'=>$location['page'], 'cssclass'=>'sidebar_browse_artists'); $browse_items[] = array('title'=>_("Genre"),'url'=>'browse.php?action=genre','active'=>$location['page'], 'cssclass'=>'sidebar_browse_genre'); $browse_items[] = array('title'=>_('Song Title'),'url'=>'browse.php?action=song_title','active'=>$location['page'], 'cssclass'=>'sidebar_browse_song_title'); -$browse_items[] = array('title'=>_("Lists"),'url'=>'browse.php','active'=>$location['page'], 'cssclass'=>'sidebar_browse_lists'); -//$browse_items[] = array('title'=>'File','url'=>'files.php','active'=>''); <!--pb1dft: this can be cleaned up --> $web_path = conf('web_path'); @@ -165,7 +163,7 @@ $web_path = conf('web_path'); </form> </li> <?php } // end if ($GLOBALS['theme']['orientation'] != 'horizontal') ?> -<?php if ($GLOBALS['user']->prefs['localplay_level'] > 0) { ?> +<?php if ($GLOBALS['user']->prefs['localplay_level'] > 0 AND conf('allow_localplay_playback')) { ?> <li id="sidebar_localplay"> <a href="<?php echo $web_path; ?>/localplay.php"><?php echo _('Localplay'); ?></a> </li> |