get_value("artist_{$ArtistID}_revision_$RevisionID", true); } else { // viewing the live version $Data = $Cache->get_value("artist_$ArtistID", true); $RevisionID = false; } if ($Data) { list($K, list($Name, $Image, $Body, $NumSimilar, $SimilarArray, , , $VanityHouseArtist)) = each($Data); } else { if ($RevisionID) { $sql = " SELECT a.Name, wiki.Image, wiki.body, a.VanityHouse FROM wiki_artists AS wiki LEFT JOIN artists_group AS a ON wiki.RevisionID = a.RevisionID WHERE wiki.RevisionID = '$RevisionID' "; } else { $sql = " SELECT a.Name, wiki.Image, wiki.body, a.VanityHouse FROM artists_group AS a LEFT JOIN wiki_artists AS wiki ON wiki.RevisionID = a.RevisionID WHERE a.ArtistID = '$ArtistID' "; } $sql .= " GROUP BY a.ArtistID"; $DB->query($sql); if (!$DB->has_results()) { error(404); } list($Name, $Image, $Body, $VanityHouseArtist) = $DB->next_record(MYSQLI_NUM, array(0)); } //----------------- Build list and get stats ob_start(); // Requests $Requests = array(); if (empty($LoggedUser['DisableRequests'])) { $Requests = $Cache->get_value("artists_requests_$ArtistID"); if (!is_array($Requests)) { $DB->query(" SELECT r.ID, r.CategoryID, r.Title, r.Year, r.TimeAdded, COUNT(rv.UserID) AS Votes, SUM(rv.Bounty) AS Bounty FROM requests AS r LEFT JOIN requests_votes AS rv ON rv.RequestID = r.ID LEFT JOIN requests_artists AS ra ON r.ID = ra.RequestID WHERE ra.ArtistID = $ArtistID AND r.TorrentID = 0 GROUP BY r.ID ORDER BY Votes DESC"); if ($DB->has_results()) { $Requests = $DB->to_array('ID', MYSQLI_ASSOC, false); } else { $Requests = array(); } $Cache->cache_value("artists_requests_$ArtistID", $Requests); } } $NumRequests = count($Requests); if (($Importances = $Cache->get_value("artist_groups_$ArtistID")) === false) { $DB->query(" SELECT DISTINCTROW ta.GroupID, ta.Importance, tg.VanityHouse, tg.Year FROM torrents_artists AS ta JOIN torrents_group AS tg ON tg.ID = ta.GroupID WHERE ta.ArtistID = '$ArtistID' ORDER BY tg.Year DESC, tg.Name DESC"); $GroupIDs = $DB->collect('GroupID'); $Importances = $DB->to_array(false, MYSQLI_BOTH, false); $Cache->cache_value("artist_groups_$ArtistID", $Importances, 0); } else { $GroupIDs = array(); foreach ($Importances as $Group) { $GroupIDs[] = $Group['GroupID']; } } if (count($GroupIDs) > 0) { $TorrentList = Torrents::get_groups($GroupIDs, true, true); } else { $TorrentList = array(); } $NumGroups = count($TorrentList); if (!empty($TorrentList)) { ?>
$Group) { switch ($Importances[$ID]['Importance']) { case '2': $Importances[$ID]['ReleaseType'] = 1024; $GuestAlbums = true; break; case '3': $Importances[$ID]['ReleaseType'] = 1023; $RemixerAlbums = true; break; case '4': $Importances[$ID]['ReleaseType'] = 1022; $ComposerAlbums = true; break; case '7': $Importances[$ID]['ReleaseType'] = 1021; $ProducerAlbums = true; break; default: if (!isset($ReleaseTypes[$TorrentList[$Group['GroupID']]['ReleaseType']])) { $TorrentList[$Group['GroupID']]['ReleaseType'] = $UnknownRT; } $Importances[$ID]['ReleaseType'] = $TorrentList[$Group['GroupID']]['ReleaseType']; } if (!isset($UsedReleases[$Importances[$ID]['ReleaseType']])) { $UsedReleases[$Importances[$ID]['ReleaseType']] = true; } $Importances[$ID]['Sort'] = $ID; } if (!empty($GuestAlbums)) { $ReleaseTypes[1024] = 'Guest Appearance'; } if (!empty($RemixerAlbums)) { $ReleaseTypes[1023] = 'Remixed By'; } if (!empty($ComposerAlbums)) { $ReleaseTypes[1022] = 'Composition'; } if (!empty($ProducerAlbums)) { $ReleaseTypes[1021] = 'Produced By'; } //Custom sorting for releases if (!empty($LoggedUser['SortHide'])) { $SortOrder = array_flip(array_keys($LoggedUser['SortHide'])); } else { $SortOrder = $ReleaseTypes; } // If the $SortOrder array doesn't have all release types, put the missing ones at the end $MissingTypes = array_diff_key($ReleaseTypes, $SortOrder); if (!empty($MissingTypes)) { $MaxOrder = max($SortOrder); foreach (array_keys($MissingTypes) as $Missing) { $SortOrder[$Missing] = ++$MaxOrder; } } uasort($Importances, function ($A, $B) use ($SortOrder) { if ($SortOrder[$A['ReleaseType']] == $SortOrder[$B['ReleaseType']]) { return (($A['Sort'] < $B['Sort']) ? -1 : 1); } return (($SortOrder[$A['ReleaseType']] < $SortOrder[$B['ReleaseType']]) ? -1 : 1); }); // Sort the anchors at the top of the page the same way as release types $UsedReleases = array_flip(array_intersect_key($SortOrder, $UsedReleases)); reset($TorrentList); if (!empty($UsedReleases)) { ?>
> 0) { ?> Requests
$Group) { // $Tags array is for the sidebar on the right. // Skip compilations and soundtracks. $Merge = $Group['ReleaseType'] != 7 && $Group['ReleaseType'] != 3; $TorrentTags = new Tags($Group['TagList'], $Merge); foreach ($Group['Torrents'] as $TorrentID => $Torrent) { $NumTorrents++; $Torrent['Seeders'] = (int)$Torrent['Seeders']; $Torrent['Leechers'] = (int)$Torrent['Leechers']; $Torrent['Snatched'] = (int)$Torrent['Snatched']; $NumSeeders += $Torrent['Seeders']; $NumLeechers += $Torrent['Leechers']; $NumSnatches += $Torrent['Snatched']; } } $OpenTable = false; $ShowGroups = !isset($LoggedUser['TorrentGrouping']) || $LoggedUser['TorrentGrouping'] == 0; $HideTorrents = ($ShowGroups ? '' : ' hidden'); $OldGroupID = 0; $LastReleaseType = 0; foreach ($Importances as $Group) { extract(Torrents::array_group($TorrentList[$Group['GroupID']]), EXTR_OVERWRITE); $ReleaseType = $Group['ReleaseType']; if ($GroupID == $OldGroupID && $ReleaseType == $OldReleaseType) { continue; } else { $OldGroupID = $GroupID; $OldReleaseType = $ReleaseType; } /* if (!empty($LoggedUser['DiscogView']) || (isset($LoggedUser['HideTypes']) && in_array($ReleaseType, $LoggedUser['HideTypes']))) { $HideDiscog = ' hidden'; } else { $HideDiscog = ''; } */ if (!empty($LoggedUser['DiscogView']) || (isset($LoggedUser['SortHide']) && array_key_exists($ReleaseType, $LoggedUser['SortHide']) && $LoggedUser['SortHide'][$ReleaseType] == 1)) { $HideDiscog = ' hidden'; } else { $HideDiscog = ''; } $TorrentTags = new Tags($TagList, false); if ($ReleaseType != $LastReleaseType) { switch ($ReleaseTypes[$ReleaseType]) { case 'Remix': $DisplayName = 'Remixes'; break; case 'Anthology': $DisplayName = 'Anthologies'; break; case 'DJ Mix': $DisplayName = 'DJ Mixes'; break; default: $DisplayName = $ReleaseTypes[$ReleaseType].'s'; break; } $ReleaseTypeLabel = strtolower(str_replace(' ', '_', $ReleaseTypes[$ReleaseType])); if ($OpenTable) { ?> $GroupName"; if (check_perms('users_mod') || check_perms('torrents_fix_ghosts')) { $DisplayName .= ' Fix'; } switch ($ReleaseType) { case 1023: // Remixes, DJ Mixes, Guest artists, and Producers need the artist name case 1024: case 1021: case 8: if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) { unset($ExtendedArtists[2]); unset($ExtendedArtists[3]); $DisplayName = Artists::display_artists($ExtendedArtists).$DisplayName; } elseif (count($GroupArtists) > 0) { $DisplayName = Artists::display_artists(array(1 => $Artists), true, true).$DisplayName; } break; case 1022: // Show performers on composer pages if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])) { unset($ExtendedArtists[4]); unset($ExtendedArtists[3]); unset($ExtendedArtists[6]); $DisplayName = Artists::display_artists($ExtendedArtists).$DisplayName; } elseif (count($GroupArtists) > 0) { $DisplayName = Artists::display_artists(array(1 => $Artists), true, true).$DisplayName; } break; default: // Show composers otherwise if (!empty($ExtendedArtists[4])) { $DisplayName = Artists::display_artists(array(4 => $ExtendedArtists[4]), true, true).$DisplayName; } } if ($GroupYear > 0) { $DisplayName = "$GroupYear - $DisplayName"; } if ($GroupVanityHouse) { $DisplayName .= ' [VH]'; } $SnatchedGroupClass = ($GroupFlags['IsSnatched'] ? ' snatched_group' : ''); ?> $Torrent) { if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) { $FirstUnknown = !isset($FirstUnknown); } $SnatchedTorrentClass = ($Torrent['IsSnatched'] ? ' snatched_torrent' : ''); if ($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear || $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || isset($FirstUnknown) && $FirstUnknown || $Torrent['Media'] != $LastMedia ) { $EditionID++; ?>
  (View) Size Snatches Seeders Leechers
Remove bookmark Bookmark
format('torrents.php?taglist=', $Name)?>
[ | FL ]   » 

(Revision #) [Vanity House]

get_value("artists_collages_$ArtistID"); if (!is_array($Collages)) { $DB->query(" SELECT c.Name, c.NumTorrents, c.ID FROM collages AS c JOIN collages_artists AS ca ON ca.CollageID = c.ID WHERE ca.ArtistID = '$ArtistID' AND Deleted = '0' AND CategoryID = '7'"); $Collages = $DB->to_array(); $Cache->cache_value("artists_collages_$ArtistID", $Collages, 3600 * 6); } if (count($Collages) > 0) { if (count($Collages) > MAX_COLLAGES) { // Pick some at random $Range = range(0,count($Collages) - 1); shuffle($Range); $Indices = array_slice($Range, 0, MAX_COLLAGES); $SeeAll = ' (See all)'; } else { $Indices = range(0, count($Collages)-1); $SeeAll = ''; } ?>
 This artist is in collage 1) ? 's' : '')?> # artists
0) { ?> $Request) { $CategoryName = $Categories[$Request['CategoryID'] - 1]; $Title = display_str($Request['Title']); if ($CategoryName == 'Music') { $ArtistForm = Requests::get_artists($RequestID); $ArtistLink = Artists::display_artists($ArtistForm, true, true); $FullName = $ArtistLink."$Title [$Request[Year]]"; } elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') { $FullName = "$Title [$Request[Year]]"; } else { $FullName = "$Title"; } if (!empty($Tags[$RequestID])) { $ReqTagList = array(); foreach ($Tags[$RequestID] as $TagID => $TagName) { $ReqTagList[] = "".display_str($TagName).''; } $ReqTagList = implode(', ', $ReqTagList); } else { $ReqTagList = ''; } ?>
  Request Name Vote Bounty Added
   +
0) { if ($SimilarData = $Cache->get_value("similar_positions_$ArtistID")) { $Similar = new ARTISTS_SIMILAR($ArtistID, $Name); $Similar->load_data($SimilarData); if (!(current($Similar->Artists)->NameLength)) { unset($Similar); } } if (empty($Similar) || empty($Similar->Artists)) { include(SERVER_ROOT.'/classes/image.class.php'); $Img = new IMAGE; $Img->create(WIDTH, HEIGHT); $Img->color(255, 255, 255, 127); $Similar = new ARTISTS_SIMILAR($ArtistID, $Name); $Similar->set_up(); $Similar->set_positions(); $Similar->background_image(); $SimilarData = $Similar->dump_data(); $Cache->cache_value("similar_positions_$ArtistID", $SimilarData, 3600 * 24); } ?>
  Similar Artist Map Switch to cloud
write_artists(); ?>
0 ?>
  Artist Information Toggle
full_format($Body)?>
'pageid', 'InputID' => $ArtistID, 'Action' => 'comments.php?page=artist', 'InputAction' => 'take_post', 'SubscribeBox' => true )); ?>
cache_value($Key, $Data, 3600); ?>