diff --git a/albums.php b/albums.php
index 606104d7..d62097e4 100644
--- a/albums.php
+++ b/albums.php
@@ -151,16 +151,22 @@ elseif ($_REQUEST['action'] === 'update_from_tags') {
else {
- if (strlen($_REQUEST['match']) < '1') { $match = 'none'; }
+ if (strlen($_REQUEST['match']) < '1') { $match = 'a'; }
// Setup the View Ojbect
$view = new View();
$view->import_session_view();
+ if ($match == 'Show_all' || $match == 'Show_missing_art' || $match == 'Browse') { $chr = ''; }
+ else { $chr = $match; }
+
+ require (conf('prefix') . '/templates/show_box_top.inc.php');
+ show_alphabet_list('albums','albums.php',$match);
+ show_alphabet_form($chr,_('Show Albums starting with'),"albums.php?action=match");
+ require (conf('prefix') . '/templates/show_box_bottom.inc.php');
+
switch($match) {
case 'Show_all':
- show_alphabet_list('albums','albums.php','show_all');
- show_alphabet_form('',_("Show Albums starting with"),"albums.php?action=match");
$offset_limit = 99999;
$sql = "SELECT album.id FROM song,album ".
" WHERE song.album=album.id ".
@@ -168,8 +174,6 @@ else {
" HAVING COUNT(song.id) > $min_album_size ";
break;
case 'Show_missing_art':
- show_alphabet_list('albums','albums.php','show_missing_art');
- show_alphabet_form('',_("Show Albums starting with"),"albums.php?action=match");
$offset_limit = 99999;
$sql = "SELECT album.id FROM song,album ".
" WHERE song.album=album.id ".
@@ -179,27 +183,12 @@ else {
break;
case 'Browse':
case 'show_albums':
- show_alphabet_list('albums','albums.php','browse');
- show_alphabet_form('',_("Show Albums starting with"),"albums.php?action=match");
$sql = "SELECT album.id FROM song,album ".
" WHERE song.album=album.id ".
"GROUP BY song.album ".
" HAVING COUNT(song.id) > $min_album_size ";
break;
- case 'none':
- show_alphabet_list('albums','albums.php','a');
- show_alphabet_form('',_("Show Albums starting with"),"albums.php?action=match");
- $sql = "SELECT album.id FROM song,album ".
- " WHERE song.album=album.id ".
- " AND album.name LIKE 'a%'".
- "GROUP BY song.album ".
- " HAVING COUNT(song.id) > $min_album_size ";
- break;
default:
- //FIXME: This is the old way of doing it, move this to browse
- show_alphabet_list('albums','albums.php',$match);
- show_alphabet_form($match,_("Show Albums starting with"),"albums.php?action=match");
- echo " ";
$sql = "SELECT album.id FROM song,album ".
" WHERE song.album=album.id ".
" AND album.name LIKE '$match%'".
diff --git a/artists.php b/artists.php
index 6d4191fb..1f86172d 100644
--- a/artists.php
+++ b/artists.php
@@ -190,21 +190,22 @@ switch($action) {
case 'match':
case 'Match':
$match = scrub_in($_REQUEST['match']);
- preg_match("/^(\w*)/", $match, $matches);
+ if ($match == "Browse" || $match == "Show_all") { $chr = ""; }
+ else { $chr = $match; }
+ /* Enclose this in the purty box! */
+ require (conf('prefix') . '/templates/show_box_top.inc.php');
show_alphabet_list('artists','artists.php',$match);
+ show_alphabet_form($chr,_('Show Artists starting with'),"artists.php?action=match");
+ require (conf('prefix') . '/templates/show_box_bottom.inc.php');
+
if ($match === "Browse") {
- show_alphabet_form('',_('Show Artists starting with'),"artists.php?action=match");
show_artists();
}
elseif ($match === "Show_all") {
- show_alphabet_form('',_('Show Artists starting with'),"artists.php?action=match");
$_SESSION['view_offset_limit'] = 999999;
show_artists();
}
else {
- $chr = preg_replace("/[^a-zA-Z0-9]/", "", $matches[1]);
- show_alphabet_form($chr,_("Show Artists starting with"),"artists.php?action=match");
-
if ($chr == '') {
show_artists('A');
}
diff --git a/browse.php b/browse.php
index 8eb2ea12..d12f672a 100644
--- a/browse.php
+++ b/browse.php
@@ -116,10 +116,12 @@ switch($action) {
$match = scrub_in($_REQUEST['match']);
+ require (conf('prefix') . '/templates/show_box_top.inc.php');
show_alphabet_list('song_title','browse.php',$match,'song_title');
/* Detect if it's Browse, and if so don't fill it in */
if ($match == 'Browse') { $match = ''; }
show_alphabet_form($match,_('Show Titles Starting With'),"browse.php?action=song_title&match=$match");
+ require (conf('prefix') . '/templates/show_box_bottom.inc.php');
$sql = $song->get_sql_from_match($_REQUEST['match']);
@@ -144,12 +146,13 @@ switch($action) {
break;
/* Throw recently added, updated here */
default:
-
+ show_box_top();
/* Show Most Popular artist/album/songs */
show_all_popular();
/* Show Recent Additions */
show_all_recent();
+ show_box_bottom();
break;
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index ee990567..55e82e5a 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.3.2
+ - Introduced new Theming method and 'migrated' all old themes in
+ /contrib results may vary. (Thx Ros)
- Added ability to search by Rating, requires MySQL 4.0 or above
- Page headers now limited to 20 pages with [....] between top
and bottom 10.
diff --git a/index.php b/index.php
index 9cf0b6c7..df7c693d 100644
--- a/index.php
+++ b/index.php
@@ -45,20 +45,21 @@ if (conf('refresh_limit') > 5) {
}
?>
-
+
+
-
+
-
+
5) {
-
+
-
+
5) {
-
+
-
+
5) {
+
diff --git a/lib/class/genre.class.php b/lib/class/genre.class.php
index 49b21c52..5723ec7a 100644
--- a/lib/class/genre.class.php
+++ b/lib/class/genre.class.php
@@ -274,10 +274,12 @@ class Genre {
*/
function show_match_list($match) {
+ require (conf('prefix') . '/templates/show_box_top.inc.php');
show_alphabet_list('genre','browse.php',$match,'genre');
/* Detect if it's Browse, and if so don't fill it in */
if ($match == 'Browse') { $match = ''; }
- show_alphabet_form($match,_("Show Genres starting with"),"browse.php?action=genre&match=$match");
+ show_alphabet_form($match,_('Show Genres starting with'),"browse.php?action=genre&match=$match");
+ require (conf('prefix') . '/templates/show_box_bottom.inc.php');
} // show_match_list
diff --git a/lib/init.php b/lib/init.php
index 329d1494..865593fa 100644
--- a/lib/init.php
+++ b/lib/init.php
@@ -80,7 +80,7 @@ if (!$results['allow_stream_playback']) {
/** This is the version.... fluf nothing more... **/
-$results['version'] = '3.3.2 Build (002)';
+$results['version'] = '3.3.2 Build (003)';
$results['raw_web_path'] = $results['web_path'];
$results['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path'];
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index 7bca9ed2..f4783b53 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -210,7 +210,6 @@ function show_alphabet_list ($type,$script="artist.php",$selected="false",$actio
$style_name = "style_" . strtolower($selected);
${$style_name} = "style=\"font-weight:bold;\"";
unset($title);
- require (conf('prefix') . '/templates/show_box_top.inc.php');
echo "";
foreach ($list as $l) {
$style_name = "style_" . strtolower($l);
@@ -224,7 +223,7 @@ function show_alphabet_list ($type,$script="artist.php",$selected="false",$actio
echo "
" . _("Show all") . " ";
echo "
\n";
- require (conf('prefix') . '/templates/show_box_bottom.inc.php');
+
} // show_alphabet_list
/**
@@ -627,7 +626,7 @@ function show_local_catalog_info() {
if (!mysql_num_rows($db_results)) {
$items[] = "" . _("No Catalogs Found!") . " ";
$items[] = "" ._("Add a Catalog") . " ";
- show_info_box(_("Catalog Statistics"),'catalog',$items);
+ show_info_box(_('Catalog Statistics'),'catalog',$items);
return false;
}
@@ -1264,4 +1263,26 @@ function show_catalog_select($name='catalog',$catalog_id=0,$style='') {
} // show_catalog_select
+/**
+ * show_box_top
+ * This function requires the top part of the box
+ * it takes title as an optional argument
+ */
+function show_box_top($title='') {
+
+ require (conf('prefix') . '/templates/show_box_top.inc.php');
+
+} // show_box_top
+
+/**
+ * show_box_bottom
+ * This function requires the bottom part of the box
+ * it does not take any arguments
+ */
+function show_box_bottom() {
+
+ require (conf('prefix') . '/templates/show_box_bottom.inc.php');
+
+} // show_box_bottom
+
?>
diff --git a/modules/admin.php b/modules/admin.php
index 42e24e48..33cf37d8 100644
--- a/modules/admin.php
+++ b/modules/admin.php
@@ -42,11 +42,10 @@ function show_access_list () {
function show_manage_users () {
- echo "\n\n";
- echo " \n";
+ show_box_top(_('Manage Users'));
echo "Use the following tools to manage the users that access your site.
\n";
echo "\n";
- echo "
";
+ show_box_bottom();
show_users();
} // show_manage_users()
diff --git a/stats.php b/stats.php
index 4a6bf329..5bb87a0c 100644
--- a/stats.php
+++ b/stats.php
@@ -36,10 +36,9 @@ else {
}
show_template('header');
+$title = $working_user->fullname . ' ' . _('Favorites') . ':';
?>
-
-
-
+
@@ -79,4 +78,5 @@ show_template('header');
+
diff --git a/templates/default.css b/templates/default.css
index d8fb9ccc..d94cd4f0 100644
--- a/templates/default.css
+++ b/templates/default.css
@@ -327,7 +327,7 @@ div#sidebar{
/* Styles for Now Playing */
#nowplaying{
clear: all;
- margin: 10px;
+ width: 625px;
}
#np_container1{
@@ -427,7 +427,7 @@ margin-right:5em;
width: 80px;
height: 15px;
position: relative;
- background: url(images/ratings/star_rating.gif) top left repeat-x;
+ background: url(../images/ratings/star_rating.gif) top left repeat-x;
}
.star-rating li{
padding:0px;
@@ -445,18 +445,18 @@ margin-right:5em;
padding: 0px;
}
.star-rating li a:hover{
- background: url(images/ratings/star_rating.gif) left center;
+ background: url(../images/ratings/star_rating.gif) left center;
z-index: 2;
left: 0px;
}
li.zero-stars a:hover {
- background: url(images/ratings/x.gif);
+ background: url(../images/ratings/x.gif);
height: 15px;
left: 80px;
display: block;
}
a.zero-stars {
- background: url(images/ratings/x_off.gif);
+ background: url(../images/ratings/x_off.gif);
height: 15px;
left: 80px;
display: block;
@@ -492,7 +492,7 @@ a.five-stars:hover{
width: 80px;
}
li.current-rating{
- background: url(images/ratings/star_rating.gif) left bottom;
+ background: url(../images/ratings/star_rating.gif) left bottom;
position: absolute;
height: 15px;
display: block;
@@ -504,7 +504,7 @@ li.current-rating{
padding:0px;
background: #f7f7f7;
}
-.box #box-title {
+.box-title {
border-bottom: solid 1px; #000000;
font-weight: bold;
}
diff --git a/templates/header.inc b/templates/header.inc
index 542f556e..06a45f3d 100644
--- a/templates/header.inc
+++ b/templates/header.inc
@@ -37,6 +37,7 @@ if (conf('use_rss')) { ?>
+
diff --git a/templates/show_access_list.inc b/templates/show_access_list.inc
index 25729ded..817dc04f 100644
--- a/templates/show_access_list.inc
+++ b/templates/show_access_list.inc
@@ -31,9 +31,7 @@
$row_classes = array('even','odd');
$web_path = conf('web_path');
?>
-
-
-
+
Since your catalog can be accessed remotely you may want to limit the access from
remote sources so you are not in violation of copyright laws. By default your
server will allow anyone with an account to stream music. It will not allow any
@@ -41,7 +39,11 @@ other Ampache servers to connect to it to share catalog information. Use tool b
to add any server's IP address that you want to access your Ampache catalog or be able to
stream from this server.
-
+
+
+
+
+
+
diff --git a/templates/show_add_access.inc b/templates/show_add_access.inc
index 06827c9b..9c878365 100644
--- a/templates/show_add_access.inc
+++ b/templates/show_add_access.inc
@@ -24,8 +24,7 @@
@header Add Access List Entry
*/
?>
-
-
+
diff --git a/templates/show_admin_info.inc.php b/templates/show_admin_info.inc.php
index b0414611..459355fd 100644
--- a/templates/show_admin_info.inc.php
+++ b/templates/show_admin_info.inc.php
@@ -29,21 +29,19 @@ $total_flagged = $flag->get_total();
/* Disabled Information Gathering */
$catalog = new Catalog();
$songs = $catalog->get_disabled(10);
-
?>
-
-
-
-
+
diff --git a/templates/show_admin_tools.inc.php b/templates/show_admin_tools.inc.php
index b843feca..7c73fda2 100644
--- a/templates/show_admin_tools.inc.php
+++ b/templates/show_admin_tools.inc.php
@@ -25,10 +25,7 @@ $catalogs = $catalog->get_catalogs();
$users = $GLOBALS['user']->get_recent(10);
?>
-
-