diff options
author | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-08-17 20:59:16 +0000 |
---|---|---|
committer | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-08-17 20:59:16 +0000 |
commit | df80bd72432011010dc0e91ab564659ca6b2c500 (patch) | |
tree | c68f957da32a382bf3a542b7e7f3e54b886483ca /templates/show_recommended_artists.inc.php | |
parent | 34d1449660437c2ea24dd55989efebf4e01d485f (diff) | |
download | ampache-df80bd72432011010dc0e91ab564659ca6b2c500.tar.gz ampache-df80bd72432011010dc0e91ab564659ca6b2c500.tar.bz2 ampache-df80bd72432011010dc0e91ab564659ca6b2c500.zip |
Refactored Last.FM recommendations; drop new dependency on curl since
Snoopy works just as well for this application.
Diffstat (limited to 'templates/show_recommended_artists.inc.php')
-rw-r--r-- | templates/show_recommended_artists.inc.php | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/templates/show_recommended_artists.inc.php b/templates/show_recommended_artists.inc.php new file mode 100644 index 00000000..459e2d63 --- /dev/null +++ b/templates/show_recommended_artists.inc.php @@ -0,0 +1,72 @@ +<?php +/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */ +/* + + Copyright (c) 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. +*/ + +?> +<?php show_box_top(_('Similar Artists'), 'info-box'); ?> +<table class="tabledata" cellpadding="0" cellspacing="0"> +<colgroup> + <col id="col_add" /> + <col id="col_artist" /> + <col id="col_songs" /> + <col id="col_albums" /> + <col id="col_tags" /> + <col id="col_rating" /> + <col id="col_action" /> +</colgroup> +<tr class="th-top"> + <th class="cel_add"><?php echo _('Add'); ?></th> + <th class="cel_artist"><?php echo _('Artist'); ?></th> + <th class="cel_songs"><?php echo _('Songs'); ?></th> + <th class="cel_albums"><?php echo _('Albums'); ?></th> + <th class="cel_time"><?php echo _('Time'); ?></th> + <th class="cel_tags"><?php echo _('Tags'); ?></th> + <th class="cel_rating"> <?php echo _('Rating'); ?> </th> + <th class="cel_action"> <?php echo _('Action'); ?> </th> +</tr> +<?php +// Cache the ratings we are going to use +if (Config::get('ratings')) { Rating::build_cache('artist',$object_ids); } + +/* Foreach through every artist that has been passed to us */ +foreach ($object_ids as $artist_id) { + $artist = new Artist($artist_id); + $artist->format(); +?> +<tr id="artist_<?php echo $artist->id; ?>" class="<?php echo flip_class(); ?>"> + <?php require Config::get('prefix') . '/templates/show_artist_row.inc.php'; ?> +</tr> +<?php } //end foreach ($artists as $artist) ?> +<?php if (!count($object_ids)) { ?> +<tr class="<?php echo flip_class(); ?>"> + <td colspan="5"><span class="fatalerror"><?php echo _('Not Enough Data'); ?></span></td> +</tr> +<?php } ?> +<tr class="th-bottom"> + <th class="cel_add"><?php echo _('Add'); ?></th> + <th class="cel_artist"><?php echo _('Artist'); ?></th> + <th class="cel_songs"> <?php echo _('Songs'); ?> </th> + <th class="cel_albums"> <?php echo _('Albums'); ?> </th> + <th class="cel_time"> <?php echo _('Time'); ?> </th> + <th class="cel_tags"><?php echo _('Tags'); ?></th> + <th class="cel_rating"> <?php echo _('Rating'); ?> </th> + <th class="cel_action"> <?php echo _('Action'); ?> </th> +</tr> +</table> |