diff --git a/classes/class_torrent_form.php b/classes/class_torrent_form.php index 3474340d..41b00cb7 100644 --- a/classes/class_torrent_form.php +++ b/classes/class_torrent_form.php @@ -198,9 +198,12 @@ function music_form($GenreTags) { ?> Disabled?>/>
Disabled?>/> [+] [-] Tags should be comma separated, and you should use a period ('.') to separate words inside a tag - eg. 'hip.hop'.

- There is a list of official tags to the left of the text box. Please use these tags instead of 'unofficial' tags (eg. use the official 'drum.and.bass' tag, instead of an unofficial 'dnb' tag.) + There is a list of official tags to the left of the text box. Please use these tags instead of 'unofficial' tags (e.g. use the official 'drum.and.bass' tag, instead of an unofficial 'dnb' tag). Please note that the '2000s' tag refers to music produced between 2000 and 2009.

Avoid abbreviations if at all possible. So instead of tagging an album as 'alt', tag it as 'alternative'. Make sure that you use correct spelling.

@@ -522,7 +528,7 @@ function music_form($GenreTags) {

Don't use 'useless' tags, such as 'seen.live', 'awesome', 'rap' (is encompassed by 'hip.hop'), etc. If an album is live, you can tag it as 'live'.

- Only tag information on the album itself - NOT THE INDIVIDUAL RELEASE. Tags such as 'v0', 'eac', 'vinyl', 'from.oink' etc are strictly forbidden. Remember that these tags will be used for other versions of the same album. + Only tag information on the album itself - NOT THE INDIVIDUAL RELEASE. Tags such as 'v0', 'eac', 'vinyl', 'from.oink' etc. are strictly forbidden. Remember that these tags will be used for other versions of the same album.

You should be able to build up a list of tags using only the official tags to the left of the text box. If you are in any doubt about whether or not a tag is acceptable, do not add it. diff --git a/classes/script_start.php b/classes/script_start.php index ae1cd3dd..6751aaad 100644 --- a/classes/script_start.php +++ b/classes/script_start.php @@ -1358,7 +1358,7 @@ function update_hash($GroupID) { FROM torrents_artists AS ta JOIN artists_alias AS aa ON aa.AliasID=ta.AliasID JOIN torrents_group AS tg ON tg.ID=ta.GroupID - WHERE ta.GroupID=$GroupID AND ta.Importance='1' + WHERE ta.GroupID=$GroupID AND ta.Importance IN ('1', '4', '5') GROUP BY tg.ID ON DUPLICATE KEY UPDATE ArtistName=values(ArtistName)"); @@ -1627,28 +1627,94 @@ function get_artist($GroupID) { function display_artists($Artists, $MakeLink = true, $IncludeHyphen = true, $Escape = true) { if(!empty($Artists)) { $ampersand = ($Escape) ? ' & ' : ' & '; - switch(count($Artists[1])) { + $link = ''; + + $MainArtists = $Artists[1]; + $Guests = $Artists[2]; + $Composers = $Artists[4]; + $Conductors = $Artists[5]; + $DJs = $Artists[6]; + + if (count($MainArtists) + count($Composers) + count($Conductors) == 0) { + return ''; + } + + switch(count($Composers)) { case 0: - return ''; + break; case 1: - $link = display_artist($Artists[1][0], $MakeLink, $Escape); + $link .= display_artist($Composers[0], $MakeLink, $Escape); break; case 2: - $link = display_artist($Artists[1][0], $MakeLink, $Escape).$ampersand.display_artist($Artists[1][1], $MakeLink, $Escape); + $link .= display_artist($Composers[0], $MakeLink, $Escape).$ampersand.display_artist($Composers[1], $MakeLink, $Escape); break; default: - $link = 'Various Artists'; + $link .= 'Various Composers'; } - if(!empty($Artists[2]) && (count($Artists[1]) < 3)) { - switch(count($Artists[2])) { + $ComposerStr .= $link; + + if ((count($Composers) > 0) && (count($MainArtists) > 0)) { + $link .= ' performed by '; + } + + switch(count($MainArtists)) { + case 0: + break; + case 1: + $link .= display_artist($MainArtists[0], $MakeLink, $Escape); + break; + case 2: + $link .= display_artist($MainArtists[0], $MakeLink, $Escape).$ampersand.display_artist($MainArtists[1], $MakeLink, $Escape); + break; + default: + $link .= 'Various Artists'; + } + + if(!empty($Guests) && (count($MainArtists) + count($Composers) + count($Conductors) < 3)) { + switch(count($Guests)) { case 1: - $link .= ' with '.display_artist($Artists[2][0], $MakeLink, $Escape); + $link .= ' with '.display_artist($Guests[0], $MakeLink, $Escape); break; case 2: - $link .= ' with '.display_artist($Artists[2][0], $MakeLink, $Escape).$ampersand.display_artist($Artists[2][1], $MakeLink, $Escape); + $link .= ' with '.display_artist($Guests[0], $MakeLink, $Escape).$ampersand.display_artist($Guests[1], $MakeLink, $Escape); break; } } + + if ((count($Conductors) > 0) && (count($MainArtists) + count($Composers) > 0)) { + $link .= ' under '; + } + switch(count($Conductors)) { + case 0: + break; + case 1: + $link .= display_artist($Conductors[0], $MakeLink, $Escape); + break; + case 2: + $link .= display_artist($Conductors[0], $MakeLink, $Escape).$ampersand.display_artist($Conductors[1], $MakeLink, $Escape); + break; + default: + $link .= 'under various conductors'; + } + + if ((count($Composers) > 0) && (count($MainArtists) + count($Conductors) > 3)) { + $link = $ComposerStr . ' performed by Various Artists'; + } + + // DJs override everything else + switch(count($DJs)) { + case 0: + break; + case 1: + $link = display_artist($DJs[0], $MakeLink, $Escape); + break; + case 2: + $link = display_artist($DJs[0], $MakeLink, $Escape).$ampersand.display_artist($DJs[1], $MakeLink, $Escape); + break; + default : + $link = 'Various DJs'; + } + return $link.($IncludeHyphen?' - ':''); } else { return ''; @@ -1721,7 +1787,16 @@ function get_groups($GroupIDs, $Return = true, $GetArtists = true) { if($Return) { // If we're interested in the data, and not just caching it foreach($Artists as $GroupID=>$Data) { if(array_key_exists(1, $Data)) { - $Found[$GroupID]['Artists']=$Data[1]; // Only use main artists + $Found[$GroupID]['Artists']=$Data[1]; // Only use main artists (legacy) + $Found[$GroupID]['ExtendedArtists'][1]=$Data[1]; + $Found[$GroupID]['ExtendedArtists'][2]=$Data[2]; + $Found[$GroupID]['ExtendedArtists'][3]=$Data[3]; + $Found[$GroupID]['ExtendedArtists'][4]=$Data[4]; + $Found[$GroupID]['ExtendedArtists'][5]=$Data[5]; + $Found[$GroupID]['ExtendedArtists'][6]=$Data[6]; + } + else { + $Found[$GroupID]['ExtendedArtists'] = false; } } diff --git a/sections/artist/artist.php b/sections/artist/artist.php index adeee81a..819d4bf9 100644 --- a/sections/artist/artist.php +++ b/sections/artist/artist.php @@ -106,7 +106,8 @@ function compare($X, $Y){ FROM torrents_artists AS ta JOIN torrents_group AS tg ON tg.ID=ta.GroupID WHERE ta.ArtistID='$ArtistID' - ORDER BY ta.Importance, tg.ReleaseType ASC, tg.Year DESC, tg.Name DESC"); + ORDER BY IF(ta.Importance = '2' OR ta.Importance = '3' OR ta.Importance = '4',ta.Importance, 1), + tg.ReleaseType ASC, tg.Year DESC, tg.Name DESC"); $GroupIDs = $DB->collect('GroupID'); $Importances = $DB->to_array('GroupID', MYSQLI_BOTH, false); @@ -136,6 +137,10 @@ function compare($X, $Y){ $TorrentList[$GroupID]['ReleaseType'] = 1023; $RemixerAlbums = true; } + if($Importances[$GroupID]['Importance'] == '4') { + $TorrentList[$GroupID]['ReleaseType'] = 1022; + $ComposerAlbums = true; + } if(!in_array($TorrentList[$GroupID]['ReleaseType'], $UsedReleases)) { $UsedReleases[] = $TorrentList[$GroupID]['ReleaseType']; } @@ -147,6 +152,9 @@ function compare($X, $Y){ if(!empty($RemixerAlbums)) { $ReleaseTypes[1023] = "Remixed By"; } +if(!empty($ComposerAlbums)) { + $ReleaseTypes[1022] = "Composition"; +} reset($TorrentList); @@ -161,6 +169,9 @@ function compare($X, $Y){ case "Anthology" : $DisplayName = "Anthologies"; break; + case "DJ Mix" : + $DisplayName = "DJ Mixes"; + break; default : $DisplayName = $ReleaseTypes[$ReleaseID]."s"; break; @@ -187,7 +198,7 @@ function compare($X, $Y){ $HideTorrents = ($ShowGroups ? '' : ' hidden'); foreach ($TorrentList as $GroupID=>$Group) { - list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group); + list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists) = array_values($Group); $GroupVanityHouse = $Importances[$GroupID]['VanityHouse']; $TagList = explode(' ',str_replace('_','.',$TagList)); @@ -221,6 +232,9 @@ function compare($X, $Y){ case "Anthology" : $DisplayName = "Anthologies"; break; + case "DJ Mix" : + $DisplayName = "DJ Mixes"; + break; default : $DisplayName = $ReleaseTypes[$ReleaseType]."s"; break; @@ -249,8 +263,15 @@ function compare($X, $Y){ $DisplayName .= ' [Fix]'; } - if (($ReleaseType == 1023) || ($ReleaseType == 1024)) { - $DisplayName = display_artists(array(1 => $Artists), true, true).$DisplayName; + // Remixes, DJ Mixes, and Guest artists need the artist name + if (($ReleaseType == 1023) || ($ReleaseType == 1024) || ($ReleaseType == 8)) { + if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])) { + unset($ExtendedArtists[2]); + unset($ExtendedArtists[3]); + $DisplayName = display_artists($ExtendedArtists).$DisplayName; + } elseif(count($GroupArtists)>0) { + $DisplayName = display_artists(array(1 => $Artists), true, true).$DisplayName; + } } if($GroupYear>0) { $DisplayName = $GroupYear. ' - '.$DisplayName; } diff --git a/sections/bookmarks/torrents.php b/sections/bookmarks/torrents.php index 68bac2b5..60c48b30 100644 --- a/sections/bookmarks/torrents.php +++ b/sections/bookmarks/torrents.php @@ -55,8 +55,6 @@ function compare($X, $Y){ $Title = ($Sneaky)?"$Username's bookmarked torrents":'Your bookmarked torrents'; -show_header($Title, 'browse'); - // Loop through the result set, building up $Collage and $TorrentTable // Then we print them. $Collage = array(); @@ -67,7 +65,7 @@ function compare($X, $Y){ $Tags = array(); foreach ($TorrentList as $GroupID=>$Group) { - list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists) = array_values($Group); + list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists) = array_values($Group); list($GroupID2, $Image, $GroupCategoryID, $AddedTime) = array_values($CollageDataList[$GroupID]); // Handle stats and stuff @@ -98,9 +96,14 @@ function compare($X, $Y){ $TorrentTags = implode(', ', $TorrentTags); $TorrentTags='
'.$TorrentTags.'
'; - $DisplayName = ''; - if(count($GroupArtists)>0) { - $DisplayName = display_artists(array('1'=>$GroupArtists)); + if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) { + unset($ExtendedArtists[2]); + unset($ExtendedArtists[3]); + $DisplayName = display_artists($ExtendedArtists); + } elseif(count($GroupArtists)>0) { + $DisplayName = display_artists(array('1'=>$GroupArtists)); + } else { + $DisplayName = ''; } $DisplayName .= ''.$GroupName.''; if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';} @@ -282,6 +285,18 @@ function compare($X, $Y){ } +$CollageCovers = isset($LoggedUser['CollageCovers'])?$LoggedUser['CollageCovers']:25; +$CollagePages = array(); +for ($i=0; $i < $NumGroups/$CollageCovers; $i++) { + $Groups = array_slice($Collage, $i*$CollageCovers, $CollageCovers); + $CollagePage = ''; + foreach ($Groups as $Group) { + $CollagePage .= $Group; + } + $CollagePages[] = $CollagePage; +} + +show_header($Title, 'browse,collage'); ?>

@@ -350,13 +365,35 @@ function compare($X, $Y){
- - - + +
+
Cover Art
+ +
+ $CollageCovers) { ?> + + +
diff --git a/sections/collages/collage.php b/sections/collages/collage.php index 12bcd74b..facb2bf9 100644 --- a/sections/collages/collage.php +++ b/sections/collages/collage.php @@ -62,9 +62,8 @@ function compare($X, $Y){ } $DB->query("UPDATE users_collage_subs SET LastVisit=NOW() WHERE UserID = ".$LoggedUser['ID']." AND CollageID=$CollageID"); -show_header($Name,'browse,collage,bbcode'); -// Build the data for the collage and the torrent list +// Build the data for the collage and the torrent list if(!is_array($TorrentList)) { $DB->query("SELECT ct.GroupID, tg.WikiImage, @@ -100,7 +99,7 @@ function compare($X, $Y){ $Number = 0; foreach ($TorrentList as $GroupID=>$Group) { - list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists) = array_values($Group); + list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists) = array_values($Group); list($GroupID2, $Image, $GroupCategoryID, $UserID, $Username) = array_values($CollageDataList[$GroupID]); // Handle stats and stuff @@ -110,8 +109,14 @@ function compare($X, $Y){ $NumGroupsByUser++; } - if($GroupArtists) { - foreach($GroupArtists as $Artist) { + if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) { + $CountArtists = array_merge((array)$ExtendedArtists[1], (array)$ExtendedArtists[4], (array)$ExtendedArtists[5], (array)$ExtendedArtists[6]); + } else{ + $CountArtists = $GroupArtists; + } + + if($CountArtists) { + foreach($CountArtists as $Artist) { if(!isset($Artists[$Artist['id']])) { $Artists[$Artist['id']] = array('name'=>$Artist['name'], 'count'=>1); } else { @@ -144,14 +149,21 @@ function compare($X, $Y){ $TorrentTags='
'.$TorrentTags.'
'; $DisplayName = $Number.' - '; - if(count($GroupArtists)>0) { - $DisplayName .= display_artists(array('1'=>$GroupArtists)); + + if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])|| !empty($ExtendedArtists[6])) { + unset($ExtendedArtists[2]); + unset($ExtendedArtists[3]); + $DisplayName .= display_artists($ExtendedArtists); + } elseif(count($GroupArtists)>0) { + $DisplayName .= display_artists(array('1'=>$GroupArtists)); } + $DisplayName .= ''.$GroupName.''; if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';} if($GroupVanityHouse) { $DisplayName .= ' [VH]'; } // Start an output buffer, so we can store this output in $TorrentTable ob_start(); + if(count($Torrents)>1 || $GroupCategoryID==1) { // Grouped torrents $ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1); @@ -298,26 +310,46 @@ function compare($X, $Y){ } $DisplayName .= $GroupName; if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';} - //if($GroupVanityHouse) { $DisplayName .= ' [VH]'; } ?> - + 0 && $NumGroups>=$MaxGroups) || ($MaxGroupsPerUser>0 && $NumGroupsByUser>=$MaxGroupsPerUser)) { $Locked = true; } +// Silly hack for people who are on the old setting +$CollageCovers = isset($LoggedUser['CollageCovers'])?$LoggedUser['CollageCovers']:25*(abs($LoggedUser['HideCollage'] - 1)); +$CollagePages = array(); + +// Pad it out +if ($NumGroups > $CollageCovers) { + for ($i = $NumGroups + 1; $i <= ceil($NumGroups/$CollageCovers)*$CollageCovers; $i++) { + $Collage[] = '
  • '; + } +} + + +for ($i=0; $i < $NumGroups/$CollageCovers; $i++) { + $Groups = array_slice($Collage, $i*$CollageCovers, $CollageCovers); + $CollagePage = ''; + foreach ($Groups as $Group) { + $CollagePage .= $Group; + } + $CollagePages[] = $CollagePage; +} + +show_header($Name,'browse,collage,bbcode'); ?>

    @@ -549,29 +581,34 @@ function compare($X, $Y){
    -
    +
  • - <?=$DisplayName?> + <?=$DisplayName?>
    -
  • - +if($CollageCovers != 0) { ?> +
    +
    Cover Art
    +
    - - - - - - -
    - +}?> + +
    + $CollageCovers) { ?> + + + diff --git a/sections/requests/new_edit.php b/sections/requests/new_edit.php index 93da9cc8..521ac0e9 100644 --- a/sections/requests/new_edit.php +++ b/sections/requests/new_edit.php @@ -159,9 +159,12 @@ ?> [+] [-]
    @@ -170,9 +173,12 @@ } else { ?> [+] [-] Artists diff --git a/sections/torrents/add_alias.php b/sections/torrents/add_alias.php index 892f8d86..6afe2896 100644 --- a/sections/torrents/add_alias.php +++ b/sections/torrents/add_alias.php @@ -16,7 +16,7 @@ $AliasName = normalise_artist_name($AliasNames[$i]); $Importance = $Importances[$i]; - if($Importance!='1' && $Importance!='2' && $Importance!='3') { + if($Importance!='1' && $Importance!='2' && $Importance!='3' && $Importance!='4' && $Importance!='5' && $Importance!='6') { break; } diff --git a/sections/torrents/browse2.php b/sections/torrents/browse2.php index f304e537..e81b7d2c 100644 --- a/sections/torrents/browse2.php +++ b/sections/torrents/browse2.php @@ -688,7 +688,7 @@ function header_link($SortKey,$DefaultWay="desc") { // Start printing torrent list foreach($Results as $GroupID=>$Data) { - list($Artists, $GroupCatalogueNumber, $GroupID2, $GroupName, $GroupRecordLabel, $ReleaseType, $TagList, $Torrents, $GroupVanityHouse, $GroupYear, $CategoryID, $FreeTorrent, $HasCue, $HasLog, $TotalLeechers, $LogScore, $ReleaseType, $ReleaseType, $TotalSeeders, $MaxSize, $TotalSnatched, $GroupTime) = array_values($Data); + list($Artists, $GroupCatalogueNumber, $ExtendedArtists, $GroupID2, $GroupName, $GroupRecordLabel, $ReleaseType, $TagList, $Torrents, $GroupVanityHouse, $GroupYear, $CategoryID, $FreeTorrent, $HasCue, $HasLog, $TotalLeechers, $LogScore, $ReleaseType, $ReleaseType, $TotalSeeders, $MaxSize, $TotalSnatched, $GroupTime) = array_values($Data); $TagList = explode(' ',str_replace('_','.',$TagList)); @@ -700,7 +700,11 @@ function header_link($SortKey,$DefaultWay="desc") { if(count($Torrents)>1 || $CategoryID==1) { // These torrents are in a group - if(!empty($Artists)) { + if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) { + unset($ExtendedArtists[2]); + unset($ExtendedArtists[3]); + $DisplayName = display_artists($ExtendedArtists); + } elseif(!empty($Artists)) { $DisplayName = display_artists(array(1=>$Artists)); } else { $DisplayName=''; diff --git a/sections/torrents/details.php b/sections/torrents/details.php index 3d012bd3..3b0bdd2f 100644 --- a/sections/torrents/details.php +++ b/sections/torrents/details.php @@ -131,7 +131,50 @@ function compare($X, $Y){ [Edit]' : ''?>
    - + + + Collage album covers to show per page + + + Browse Page Tag list diff --git a/sections/user/takeedit.php b/sections/user/takeedit.php index 2b815ddc..cdc88d4f 100644 --- a/sections/user/takeedit.php +++ b/sections/user/takeedit.php @@ -25,7 +25,8 @@ $Val->SetFields('torrentgrouping',1,"number","You forgot to select your torrent grouping option.",array('minlength'=>0,'maxlength'=>1)); $Val->SetFields('discogview',1,"number","You forgot to select your discography view option.",array('minlength'=>0,'maxlength'=>1)); $Val->SetFields('postsperpage',1,"number","You forgot to select your posts per page option.",array('inarray'=>array(25,50,100))); -$Val->SetFields('hidecollage',1,"number","You forgot to select your collage option.",array('minlength'=>0,'maxlength'=>1)); +//$Val->SetFields('hidecollage',1,"number","You forgot to select your collage option.",array('minlength'=>0,'maxlength'=>1)); +$Val->SetFields('collagecovers',1,"number","You forgot to select your collage option."); $Val->SetFields('showtags',1,"number","You forgot to select your show tags option.",array('minlength'=>0,'maxlength'=>1)); $Val->SetFields('avatar',0,"regex","You did not enter a valid avatar url.",array('regex'=>"/^".IMAGE_REGEX."$/i")); $Val->SetFields('email',1,"email","You did not enter a valid email address."); @@ -184,11 +185,13 @@ $Options['TorrentGrouping'] = (!empty($_POST['torrentgrouping']) ? 1 : 0); $Options['DiscogView'] = (!empty($_POST['discogview']) ? 1 : 0); $Options['PostsPerPage'] = (int) $_POST['postsperpage']; -$Options['HideCollage'] = (!empty($_POST['hidecollage']) ? 1 : 0); +//$Options['HideCollage'] = (!empty($_POST['hidecollage']) ? 1 : 0); +$Options['CollageCovers'] = empty($_POST['collagecovers']) ? 0 : $_POST['collagecovers']; $Options['ShowTags'] = (!empty($_POST['showtags']) ? 1 : 0); $Options['AutoSubscribe'] = (!empty($_POST['autosubscribe']) ? 1 : 0); $Options['DisableSmileys'] = (!empty($_POST['disablesmileys']) ? 1 : 0); $Options['DisableAvatars'] = (!empty($_POST['disableavatars']) ? 1 : 0); +$Options['DisablePMAvatars'] = (!empty($_POST['disablepmavatars']) ? 1 : 0); if(isset($LoggedUser['DisableFreeTorrentTop10'])) { diff --git a/sphinx.conf b/sphinx.conf index 0d56a957..c4be7089 100644 --- a/sphinx.conf +++ b/sphinx.conf @@ -43,7 +43,7 @@ source torrents { FROM torrents_artists AS ta \ JOIN artists_alias AS aa ON aa.AliasID=ta.AliasID \ JOIN torrents_group AS tg ON tg.ID=ta.GroupID \ - WHERE ta.Importance='1' AND Time<=@StartTime \ + WHERE ta.Importance IN ('1', '4', '5', '6') AND Time<=@StartTime \ GROUP BY tg.ID \ ON DUPLICATE KEY UPDATE ArtistName=values(ArtistName) diff --git a/static/functions/browse.js b/static/functions/browse.js index 0dee27a8..c53a08ff 100644 --- a/static/functions/browse.js +++ b/static/functions/browse.js @@ -176,7 +176,7 @@ function AddArtistField() { x.appendChild(document.createTextNode(' ')); var Importance = document.createElement("select"); Importance.name = "importance[]"; - Importance.innerHTML = ''; + Importance.innerHTML = ''; x.appendChild(Importance); ArtistFieldCount++; } diff --git a/static/functions/collage.js b/static/functions/collage.js index 84860d3e..cbf13fd5 100644 --- a/static/functions/collage.js +++ b/static/functions/collage.js @@ -31,4 +31,102 @@ function CollageSubscribe(collageid) { } } }); -} \ No newline at end of file +} + +var collageShow = { + pg:0, + pages:false, + wrap:false, + init:function(collagePages){ + this.wrap = document.getElementById('coverart'); + this.pages = collagePages; + this.max = this.pages.length-1; + }, + selected:function(){ + return $('.linkbox .selected').raw(); + }, + createUL:function(data){ + var ul = document.createElement('ul'); + $(ul).add_class('collage_images'); + ul.id = 'collage_page'+this.pg; + $(ul).html(data); + this.wrap.appendChild(ul); + return ul; + }, + page:function(num,el){ + var ul = $('#collage_page'+num).raw(), s = this.selected(), covers, lists, i; + this.pg = num; + + if(!ul){ + covers = this.pages[num]; + if(covers){ + ul = this.createUL(covers); + } + } + + lists = $('.collage_images').objects; + i = lists.length; + while(i--){ $(lists[i]).hide(); } + + $(ul).show(); + if(s){ $(s).remove_class('selected'); } + if(el){ $(el.parentNode).add_class('selected'); } + + + // Toggle the page number links + first = Math.max(0, this.pg - 2); + if (this.max - this.pg < 2) { + first = Math.max(this.max - 4, 0); + } + last = Math.min(first + 4, this.max); + for (i = 0; i < first; i++) { + $('#pagelink' + i).hide(); + } + for (i = first; i <= last; i++) { + $('#pagelink' + i).show(); + } + for (i = last + 1; i <= this.max; i++) { + $('#pagelink' + i).hide(); + } + + // Toggle the first, prev, next, and last links + if (this.pg > 0) { + $('#prevpage').remove_class('invisible'); + } else { + $('#prevpage').add_class('invisible'); + } + if (this.pg > 1) { + $('#firstpage').remove_class('invisible'); + } else { + $('#firstpage').add_class('invisible'); + } + if (this.pg < this.max) { + $('#nextpage').remove_class('invisible'); + } else { + $('#nextpage').add_class('invisible'); + } + if (this.pg < this.max - 1) { + $('#lastpage').remove_class('invisible'); + } else { + $('#lastpage').add_class('invisible'); + } + + // Toggle the bar + if ((last == this.max) && (this.pg != this.max)) { + $('#nextbar').show(); + } else { + $('#nextbar').hide(); + } + }, + nextPage:function(){ + this.pg = this.pg < this.max ? this.pg+1 : this.pg; + this.pager(); + }, + prevPage:function(){ + this.pg = this.pg > 0 ? this.pg-1 : this.pg; + this.pager(); + }, + pager:function(){ + this.page(this.pg,$('#pagelink'+this.pg).raw().firstChild); + } +}; \ No newline at end of file diff --git a/static/functions/requests.js b/static/functions/requests.js index 685f03ea..a02d3657 100644 --- a/static/functions/requests.js +++ b/static/functions/requests.js @@ -80,7 +80,10 @@ function AddArtistField() { ImportanceField.name = "importance[]"; ImportanceField.options[0] = new Option("Main", "1"); ImportanceField.options[1] = new Option("Guest", "2"); - ImportanceField.options[2] = new Option("Remixer", "3"); + ImportanceField.options[2] = new Option("Composer", "4"); + ImportanceField.options[3] = new Option("Conductor", "5"); + ImportanceField.options[4] = new Option("DJ / Compiler", "6"); + ImportanceField.options[5] = new Option("Remixer", "3"); var x = $('#artistfields').raw(); x.appendChild(document.createElement("br")); diff --git a/static/functions/torrent.js b/static/functions/torrent.js index 0ca15f40..e12207d4 100644 --- a/static/functions/torrent.js +++ b/static/functions/torrent.js @@ -1,172 +1,202 @@ -function ChangeCategory(catid) { - if(catid == 1) { - $('#split_releasetype').show(); - $('#split_artist').show(); - $('#split_year').show(); - } else if(catid == 4 || catid == 6) { - $('#split_releasetype').hide(); - $('#split_year').show(); - $('#split_artist').hide(); - } else { - $('#split_releasetype').hide(); - $('#split_artist').hide(); - $('#split_year').hide(); - } -} - -function ArtistManager() { - var GroupID = window.location.search.match(/[?&]id=(\d+)/); - if(typeof GroupID == 'undefined') { - return; - } else { - GroupID = GroupID[1]; - } - var ArtistList; - if(!(ArtistList = $('#artist_list').raw())) { - return false; - } else if($('#artistmanager').raw()) { - $('#artistmanager').toggle(); - $('#artist_list').toggle(); - } else { - MainArtistCount = 0; - var elArtistManager = document.createElement('div'); - elArtistManager.id = 'artistmanager'; - - var elArtistList = ArtistList.cloneNode(true); - elArtistList.id = 'artistmanager_list'; - for(var i=0, importance = 1; i StartBox ? 1 : -1); - var checked = obj.checked; - for(var i = StartBox; i != EndBox; i += Dir) { - var key, importance = obj.value.substr(0,1), id = obj.value.substr(2); - $('#artistmanager_box'+i).raw().checked = checked; - } - StartBox = Number(obj.id.substr(17)); -} - -function ArtistManagerSubmit() { - var Selection = new Array(); - var MainSelectionCount = 0; - for(var i = 0, boxes = $('[name="artistmanager_box"]'); boxes.raw(i); i++) { - if(boxes.raw(i).checked) { - Selection.push(boxes.raw(i).value.substr(2)); - if(boxes.raw(i).value.substr(0,1) == '1') { - MainSelectionCount++; - } - } - } - if(Selection.length == 0 || ($('#manager_action').raw().value == 'delete' && !confirm('Are you sure you want to delete '+Selection.length+' artists from this group?'))) { - return; - } - $('#artists_selection').raw().value = Selection.join(','); - if(($('#artists_importance').raw().value != 1 || $('#manager_action').raw().value == 'delete') && MainSelectionCount == MainArtistCount) { - if(!$('.error_message').raw()) { - error_message('All groups need to have at least one main artist.'); - } - $('.error_message').raw().scrollIntoView(); - return; - } - $('#artistmanager_form').raw().submit(); -} - -function ArtistManagerDelete() { - $('#manager_action').raw().value = 'delete'; - ArtistManagerSubmit(); - $('#manager_action').raw().value = 'manage'; -} +function ChangeCategory(catid) { + if(catid == 1) { + $('#split_releasetype').show(); + $('#split_artist').show(); + $('#split_year').show(); + } else if(catid == 4 || catid == 6) { + $('#split_releasetype').hide(); + $('#split_year').show(); + $('#split_artist').hide(); + } else { + $('#split_releasetype').hide(); + $('#split_artist').hide(); + $('#split_year').hide(); + } +} + +function ArtistManager() { + var GroupID = window.location.search.match(/[?&]id=(\d+)/); + if(typeof GroupID == 'undefined') { + return; + } else { + GroupID = GroupID[1]; + } + var ArtistList; + if(!(ArtistList = $('#artist_list').raw())) { + return false; + } else if($('#artistmanager').raw()) { + $('#artistmanager').toggle(); + $('#artist_list').toggle(); + } else { + MainArtistCount = 0; + var elArtistManager = document.createElement('div'); + elArtistManager.id = 'artistmanager'; + + var elArtistList = ArtistList.cloneNode(true); + elArtistList.id = 'artistmanager_list'; + for(var i=0; i StartBox ? 1 : -1); + var checked = obj.checked; + for(var i = StartBox; i != EndBox; i += Dir) { + var key, importance = obj.value.substr(0,1), id = obj.value.substr(2); + $('#artistmanager_box'+i).raw().checked = checked; + } + StartBox = Number(obj.id.substr(17)); +} + +function ArtistManagerSubmit() { + var Selection = new Array(); + var MainSelectionCount = 0; + for(var i = 0, boxes = $('[name="artistmanager_box"]'); boxes.raw(i); i++) { + if(boxes.raw(i).checked) { + Selection.push(boxes.raw(i).value.substr(2)); + if(boxes.raw(i).value.substr(0,1) == '1') { + MainSelectionCount++; + } + } + } + if(Selection.length == 0 || ($('#manager_action').raw().value == 'delete' && !confirm('Are you sure you want to delete '+Selection.length+' artists from this group?'))) { + return; + } + $('#artists_selection').raw().value = Selection.join(','); + if((($('#artists_importance').raw().value != 1 && $('#artists_importance').raw().value != 4 && $('#artists_importance').raw().value != 6) || $('#manager_action').raw().value == 'delete') && MainSelectionCount == MainArtistCount) { + if(!$('.error_message').raw()) { + error_message('All groups need to have at least one main artist, composer, or DJ.'); + } + $('.error_message').raw().scrollIntoView(); + return; + } + $('#artistmanager_form').raw().submit(); +} + +function ArtistManagerDelete() { + $('#manager_action').raw().value = 'delete'; + ArtistManagerSubmit(); + $('#manager_action').raw().value = 'manage'; +} diff --git a/static/functions/upload.js b/static/functions/upload.js index ec61b279..c062e15b 100644 --- a/static/functions/upload.js +++ b/static/functions/upload.js @@ -191,7 +191,10 @@ function AddArtistField() { ImportanceField.name = "importance[]"; ImportanceField.options[0] = new Option("Main", "1"); ImportanceField.options[1] = new Option("Guest", "2"); - ImportanceField.options[2] = new Option("Remixer", "3"); + ImportanceField.options[2] = new Option("Composer", "4"); + ImportanceField.options[3] = new Option("Conductor", "5"); + ImportanceField.options[4] = new Option("DJ / Compiler", "6"); + ImportanceField.options[5] = new Option("Remixer", "3"); var x = $('#artistfields').raw(); x.appendChild(document.createElement("br")); diff --git a/static/styles/dark_ambient/style.css b/static/styles/dark_ambient/style.css index 0fe0dae8..687baf91 100644 --- a/static/styles/dark_ambient/style.css +++ b/static/styles/dark_ambient/style.css @@ -1328,32 +1328,38 @@ td.r00 { /* COLLAGES */ -#collage_table td { - padding: 0 !important; - border: 0 !important; - width: 129px !important; - height:129px !important; +ul.collage_images { + margin: 2px auto; + width: 635px; } -#collage_table td img { - width: 129px !important; - height:129px !important; - float: left; +ul.collage_images li { + width: 127px !important; + height: 127px !important; } +ul.collage_images li a { + width: 127px !important; + height: 127px !important; + overflow: visible !important; +} +ul.collage_images li a img{ + width: 127px !important; + height: 127px !important; +} -#collage_table td a:hover { +ul.collage_images li a:hover { position: relative; } -#collage_table td a:hover img { +ul.collage_images li a:hover img { position: absolute; - top: -148px; - left: -85px; + top: -55px; + left: -55px; z-index: 4; - width: 300px !important; - height: 300px !important; + width: 250px !important; + height: 250px !important; } diff --git a/static/styles/global.css b/static/styles/global.css index b238cbd1..023b4c61 100644 --- a/static/styles/global.css +++ b/static/styles/global.css @@ -9,6 +9,10 @@ ul.collage_images { border-collapse: collapse; } +.collage_images { + display: table; +} + ul.collage_images li { border: none; float: left; @@ -16,6 +20,28 @@ ul.collage_images li { width: 118px; height: 118px; list-style: none; + list-style-type: none; +} + +ul.collage_images li a { + display: block; + height: 118px; + overflow: hidden; +} + +ul.collage_images img { + height: 118px; + width: 118px; +} + + +.selected a{ + font-weight: bold; + text-decoration: underline; +} + +.invisible { + visibility: hidden; } .collage td { diff --git a/static/styles/minimal/style.css b/static/styles/minimal/style.css index 32445187..0870f2e9 100644 --- a/static/styles/minimal/style.css +++ b/static/styles/minimal/style.css @@ -445,12 +445,46 @@ div.sidebar, #content, #footer{display:block} /* End hide from IE-mac */ /* COLLAGES + User profile page */ -#collage_table td{padding:0 !important; border:0 !important; width:140px !important; height:140px !important} -#collage_table td img{width:140px !important; height:140px !important; float:left} -#collage_table td img:hover{width:300px !important; height:300px !important; float:left; margin:-80px; z-index:100} +ul.collage_images { + margin: 0 2px 3px !important; +} + +ul.collage_images img { + height: 139px !important; + width: 139px !important; +} + +ul.collage_images li a { + height: 139px !important; +} + +ul.collage_images li { + width: 139px !important; + height: 139px !important; + /*border: 1px solid #757575;*/ +} + +ul.collage_images li a:hover { + position: relative; + overflow: visible !important; +} + +ul.collage_images li a:hover img { + position: absolute; + margin: -80px; + z-index: 4; + width: 300px !important; + height: 300px !important; +} + +ul.collage_images { + width: 695px !important; +} + + #user .main_column td img{width:130px !important; height:130px !important} -#user .main_column td img:hover{width:280px !important; height:280px !important; margin:-75px; z-index:100} -#collage_table{width:645px} +#user .main_column td img:hover{width:300px !important; height:300px !important; margin:-75px; z-index:100} +.collage_images{width:645px} #requests .tags{color:#656565} #requests .tags a{color:#8c8c8c} diff --git a/static/styles/minimal_mod_alt.css b/static/styles/minimal_mod_alt.css index 9268f5be..ec0392ff 100644 --- a/static/styles/minimal_mod_alt.css +++ b/static/styles/minimal_mod_alt.css @@ -1186,25 +1186,40 @@ forum_post box vertical_margin pre { height: 1%; } -#collage_table td { - border: 0!important; - height: 140px!important; - width: 140px!important; - padding: 0!important; +ul.collage_images { + margin: 0 2px 3px !important; } -#collage_table td img { - float: left; - height: 140px!important; - width: 140px!important; +ul.collage_images img { + height: 139px !important; + width: 139px !important; } -#collage_table td img:hover { - float: left; - height: 300px!important; - width: 300px!important; - z-index: 100; - margin: -80px; +ul.collage_images li a { + height: 139px !important; +} + +ul.collage_images li { + width: 139px !important; + height: 139px !important; + /*border: 1px solid #757575;*/ +} + +ul.collage_images li a:hover { + position: relative; + overflow: visible !important; +} + +ul.collage_images li a:hover img { + position: absolute; + margin: -80px; + z-index: 4; + width: 300px !important; + height: 300px !important; +} + +ul.collage_images { + width: 695px !important; } #user .main_column td img { diff --git a/static/styles/mono/style.css b/static/styles/mono/style.css index 5e834b3f..4e1f2c77 100644 --- a/static/styles/mono/style.css +++ b/static/styles/mono/style.css @@ -372,10 +372,20 @@ textarea { } #content,.thin { - overflow: hidden; + /*overflow: hidden;*/ clear: both; } +#content:after, +.thin:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} + #searchbars { float: left; width: 667px; @@ -424,7 +434,7 @@ textarea { #content { width: 960px; margin: 0 auto !important; - overflow: hidden; + /*overflow: hidden;*/ } #content .main_column,#content .sidebar { @@ -441,17 +451,36 @@ textarea { width: 245px; } -#collage_table { - margin-bottom: 20px; - background: none; - border: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; +ul.collage_images { + width: 675px !important; } -#collage_table td img { - width: 140px; - height: 140px; +ul.collage_images li { + height: 135px !important; + width: 135px !important; +} + +ul.collage_images li a { + height: 135px !important; + width: 135px !important; +} + +ul.collage_images li a img { + height: 135px !important; + width: 135px !important; +} + +ul.collage_images li a:hover { + position: relative; + overflow: visible !important; +} + +ul.collage_images li a:hover img { + position: absolute; + margin: -80px; + z-index: 4; + width: 300px !important; + height: 300px !important; } #collages,#collage_table,.forum_index,.torrent_table,.forum_post.box,.recent,table.border,.torrent_table.grouping,#userhistory table { diff --git a/static/styles/postmod/style.css b/static/styles/postmod/style.css index 68b1194b..913cc352 100644 --- a/static/styles/postmod/style.css +++ b/static/styles/postmod/style.css @@ -285,6 +285,7 @@ ul.thin li { margin:0px 0px; padding:0px; } #staff #nav_staff a { background-position: -675px -69px; } */ + #userinfo { position: absolute; color: #FFF; @@ -839,6 +840,12 @@ tr.unreadpm { background-color: #E0EBEF; } +/* Layout (collages) */ +.collage_images li { + background-color: #F7F6F2; + vertical-align: middle; +} + /* Layout (Permission Page) */ .permission_head { diff --git a/static/styles/proton/style.css b/static/styles/proton/style.css index 6ae3fb2a..f54d4335 100644 --- a/static/styles/proton/style.css +++ b/static/styles/proton/style.css @@ -1412,39 +1412,37 @@ td.r00 { /* COLLAGES */ - -#collage_table td { - padding: 0 !important; - border: 0 !important; - width: 129px !important; - height:129px !important; +ul.collage_images img { + height: 127px !important; + width: 127px !important; } -#collage_table td img { - width: 129px !important; - height:129px !important; - float: left; +ul.collage_images li a { + height: 129px !important; + overflow: visible !important; } +ul.collage_images li { + width: 129px !important; + height: 129px !important; +} - -#collage_table td a:hover { +ul.collage_images li a:hover { position: relative; } -#collage_table td a:hover img { +ul.collage_images li a:hover img { + left: -50px; position: absolute; - top: -148px; - left: -85px; + top: -50px; + width: 230px !important; + height: 230px !important; z-index: 4; - width: 300px !important; - height: 300px !important; } - - -#collage_table { - width: 645px; +ul.collage_images { + width: 645px !important; + margin: 0 !important; } diff --git a/static/styles/white.cd/style.css b/static/styles/white.cd/style.css index c8e71e6e..f0a730cd 100644 --- a/static/styles/white.cd/style.css +++ b/static/styles/white.cd/style.css @@ -2,3 +2,21 @@ .last_read {width: 15px; height: 15px; background: url(images/go_last_read.png) no-repeat center center; margin-left: 5px;} .last_read a { border: none; width: 100%; height: 100%; display: block; } .last_read a:hover { border: none; } + +ul.collage_images { + width: 650px !important; +} + +ul.collage_images li { + width: 130px !important; + height: 130px !important; +} + +ul.collage_images li a { + height: 130px !important; +} + +ul.collage_images img { + height: 130px !important; + width: 130px !important; +} \ No newline at end of file