Empty commit

This commit is contained in:
Git 2011-11-20 08:00:18 +00:00
parent e5704e96b7
commit 5ae500286b
30 changed files with 921 additions and 340 deletions

View File

@ -198,9 +198,12 @@ function music_form($GenreTags) {
?>
<input type="text" id="artist" name="artists[]" size="45" value="<?=display_str($Artist['name']) ?>" onblur="CheckVA();" <?=$this->Disabled?>/>
<select id="importance" name="importance[]" <?=$this->Disabled?>>
<option value="1"<?=($Importance == '1' ? ' selected="selected"' : '')?>>Main</option>
<option value="2"<?=($Importance == '2' ? ' selected="selected"' : '')?>>Guest</option>
<option value="3"<?=($Importance == '3' ? ' selected="selected"' : '')?>>Remixer</option>
<option value="1"<?=($Importance == '1' ? ' selected="selected"' : '')?>>Main</option>
<option value="2"<?=($Importance == '2' ? ' selected="selected"' : '')?>>Guest</option>
<option value="4"<?=($Importance == '4' ? ' selected="selected"' : '')?>>Composer</option>
<option value="5"<?=($Importance == '5' ? ' selected="selected"' : '')?>>Conductor</option>
<option value="6"<?=($Importance == '6' ? ' selected="selected"' : '')?>>DJ / Compiler</option>
<option value="3"<?=($Importance == '3' ? ' selected="selected"' : '')?>>Remixer</option>
</select>
<br />
<? }
@ -209,9 +212,12 @@ function music_form($GenreTags) {
?>
<input type="text" id="artist" name="artists[]" size="45" onblur="CheckVA();"<?=$this->Disabled?>/>
<select id="importance" name="importance[]" <?=$this->Disabled?>>
<option value="1">Main</option>
<option value="2">Guest</option>
<option value="3">Remixer</option>
<option value="1">Main</option>
<option value="2">Guest</option>
<option value="4">Composer</option>
<option value="5">Conductor</option>
<option value="6">DJ / Compiler</option>
<option value="3">Remixer</option>
</select>
[<a href="#" onclick="AddArtistField();return false;">+</a>] [<a href="#" onclick="RemoveArtistField();return false;">-</a>]
<?
@ -514,7 +520,7 @@ function music_form($GenreTags) {
<br />
Tags should be comma separated, and you should use a period ('.') to separate words inside a tag - eg. '<strong style="color:green;">hip.hop</strong>'.
<br /><br />
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 '<strong style="color:green;">drum.and.bass</strong>' tag, instead of an unofficial '<strong style="color:red;">dnb</strong>' 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 '<strong style="color:green;">drum.and.bass</strong>' tag, instead of an unofficial '<strong style="color:red;">dnb</strong>' tag). <strong>Please note that the '2000s' tag refers to music produced between 2000 and 2009.</strong>
<br /><br />
Avoid abbreviations if at all possible. So instead of tagging an album as '<strong style="color:red;">alt</strong>', tag it as '<strong style="color:green;">alternative</strong>'. Make sure that you use correct spelling.
<br /><br />
@ -522,7 +528,7 @@ function music_form($GenreTags) {
<br /><br />
Don't use 'useless' tags, such as '<strong style="color:red;">seen.live</strong>', '<strong style="color:red;">awesome</strong>', '<strong style="color:red;">rap</strong>' (is encompassed by '<strong style="color:green;">hip.hop</strong>'), etc. If an album is live, you can tag it as '<strong style="color:green;">live</strong>'.
<br /><br />
Only tag information on the album itself - NOT THE INDIVIDUAL RELEASE. Tags such as '<strong style="color:red;">v0</strong>', '<strong style="color:red;">eac</strong>', '<strong style="color:red;">vinyl</strong>', '<strong style="color:red;">from.oink</strong>' 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 '<strong style="color:red;">v0</strong>', '<strong style="color:red;">eac</strong>', '<strong style="color:red;">vinyl</strong>', '<strong style="color:red;">from.oink</strong>' etc. are strictly forbidden. Remember that these tags will be used for other versions of the same album.
<br /><br />
<strong>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.</strong>
</td>

View File

@ -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) ? ' &amp; ' : ' & ';
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;
}
}

View File

@ -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 .= ' [<a href="torrents.php?action=fix_group&amp;groupid='.$GroupID.'&amp;artistid='.$ArtistID.'&amp;auth='.$LoggedUser['AuthKey'].'">Fix</a>]';
}
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; }

View File

@ -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='<br /><div class="tags">'.$TorrentTags.'</div>';
$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 .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
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');
?>
<div class="thin">
<h2><?=$Title?></h2>
@ -350,13 +365,35 @@ function compare($X, $Y){
</div>
</div>
<div class="main_column">
<? if(empty($LoggedUser['HideCollage'])) { ?>
<ul class="collage_images">
<? foreach($Collage as $Group) { ?>
<?=$Group?>
<? } ?>
</ul>
<? } ?>
<?
if($CollageCovers != 0) { ?>
<div id="coverart" class="box">
<div class="head" id="coverhead"><strong>Cover Art</strong></div>
<ul class="collage_images" id="collage_page0">
<?
$Page1 = array_slice($Collage, 0, $CollageCovers);
foreach($Page1 as $Group) {
echo $Group;
}?>
</ul>
</div>
<? if ($NumGroups > $CollageCovers) { ?>
<div class="linkbox pager" style="clear: left;" id="pageslinksdiv">
<span id="firstpage" class="invisible"><a href="#" class="pageslink" onClick="collageShow.page(0, this); return false;">&lt;&lt; First</a> | </span>
<span id="prevpage" class="invisible"><a href="#" id="prevpage" class="pageslink" onClick="collageShow.prevPage(); return false;">&lt; Prev</a> | </span>
<? for ($i=0; $i < $NumGroups/$CollageCovers; $i++) { ?>
<span id="pagelink<?=$i?>" class="<?=(($i>4)?'hidden':'')?><?=(($i==0)?' selected':'')?>"><a href="#" class="pageslink" onClick="collageShow.page(<?=$i?>, this); return false;"><?=$CollageCovers*$i+1?>-<?=min($NumGroups,$CollageCovers*($i+1))?></a><?=($i != ceil($NumGroups/$CollageCovers)-1)?' | ':''?></span>
<? } ?>
<span id="nextbar" class="<?=($NumGroups/$CollageCovers > 5)?'hidden':''?>"> | </span>
<span id="nextpage"><a href="#" class="pageslink" onClick="collageShow.nextPage(); return false;">Next &gt;</a></span>
<span id="lastpage" class="<?=ceil($NumGroups/$CollageCovers)==2?'invisible':''?>"> | <a href="#" id="lastpage" class="pageslink" onClick="collageShow.page(<?=ceil($NumGroups/$CollageCovers)-1?>, this); return false;">Last &gt;&gt;</a></span>
</div>
<script type="text/javascript">
//collagePages = <?=json_encode($CollagePages)?>;
collageShow.init(<?=json_encode($CollagePages)?>);
</script>
<? }
} ?>
<br />
<table class="torrent_table" id="torrent_table">
<tr class="colhead_dark">

View File

@ -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='<br /><div class="tags">'.$TorrentTags.'</div>';
$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 .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';}
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
// 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 .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
?>
<td>
<li class="image_group_<?=$GroupID?>">
<a href="#group_<?=$GroupID?>">
<? if($Image) { ?>
<img src="<?=$Image?>" alt="<?=$DisplayName?>" title="<?=$DisplayName?>" width="117" />
<img src="<?=$Image?>" alt="<?=$DisplayName?>" title="<?=$DisplayName?>" width="118" />
<? } else { ?>
<div style="width:107px;padding:5px"><?=$DisplayName?></div>
<? } ?>
</a>
</td>
</li>
<?
$Collage[]=ob_get_clean();
}
if(($MaxGroups>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[] = '<li></li>';
}
}
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');
?>
<div class="thin">
<h2><?=$Name?></h2>
@ -549,29 +581,34 @@ function compare($X, $Y){
</div>
<div class="main_column">
<?
if(!$LoggedUser['HideCollage']) { ?>
<table class="collage" id="collage_table" cellpadding="0" cellspacing="0" border="0">
<tr>
if($CollageCovers != 0) { ?>
<div id="coverart" class="box">
<div class="head" id="coverhead"><strong>Cover Art</strong></div>
<ul class="collage_images" id="collage_page0">
<?
$x = 0;
foreach($Collage as $Group) {
$Page1 = array_slice($Collage, 0, $CollageCovers);
foreach($Page1 as $Group) {
echo $Group;
$x++;
if($x%5==0) {
?>
</tr>
<tr>
<?
}
}
if($x%5!=0) { // Padding
?>
<td colspan="<?=7-($x%7)?>"> </td>
<? } ?>
</tr>
</table>
<? } ?>
}?>
</ul>
</div>
<? if ($NumGroups > $CollageCovers) { ?>
<div class="linkbox pager" style="clear: left;" id="pageslinksdiv">
<span id="firstpage" class="invisible"><a href="#" class="pageslink" onClick="collageShow.page(0, this); return false;">&lt;&lt; First</a> | </span>
<span id="prevpage" class="invisible"><a href="#" id="prevpage" class="pageslink" onClick="collageShow.prevPage(); return false;">&lt; Prev</a> | </span>
<? for ($i=0; $i < $NumGroups/$CollageCovers; $i++) { ?>
<span id="pagelink<?=$i?>" class="<?=(($i>4)?'hidden':'')?><?=(($i==0)?' selected':'')?>"><a href="#" class="pageslink" onClick="collageShow.page(<?=$i?>, this); return false;"><?=$CollageCovers*$i+1?>-<?=min($NumGroups,$CollageCovers*($i+1))?></a><?=($i != ceil($NumGroups/$CollageCovers)-1)?' | ':''?></span>
<? } ?>
<span id="nextbar" class="<?=($NumGroups/$CollageCovers > 5)?'hidden':''?>"> | </span>
<span id="nextpage"><a href="#" class="pageslink" onClick="collageShow.nextPage(); return false;">Next &gt;</a></span>
<span id="lastpage" class="<?=ceil($NumGroups/$CollageCovers)==2?'invisible':''?>"> | <a href="#" id="lastpage" class="pageslink" onClick="collageShow.page(<?=ceil($NumGroups/$CollageCovers)-1?>, this); return false;">Last &gt;&gt;</a></span>
</div>
<script type="text/javascript">
//collagePages = <?=json_encode($CollagePages)?>;
collageShow.init(<?=json_encode($CollagePages)?>);
</script>
<? }
} ?>
<table class="torrent_table" id="discog_table">
<tr class="colhead_dark">
<td><!-- expand/collapse --></td>

View File

@ -159,9 +159,12 @@
?>
<input type="text" id="artist" name="artists[]" size="45" value="<?=display_str($Artist['name']) ?>" />
<select id="importance" name="importance[]" >
<option value="1"<?=($Importance == '1' ? ' selected="selected"' : '')?>>Main</option>
<option value="2"<?=($Importance == '2' ? ' selected="selected"' : '')?>>Guest</option>
<option value="3"<?=($Importance == '3' ? ' selected="selected"' : '')?>>Remixer</option>
<option value="1"<?=($Importance == '1' ? ' selected="selected"' : '')?>>Main</option>
<option value="2"<?=($Importance == '2' ? ' selected="selected"' : '')?>>Guest</option>
<option value="4"<?=($Importance == '4' ? ' selected="selected"' : '')?>>Composer</option>
<option value="5"<?=($Importance == '5' ? ' selected="selected"' : '')?>>Conductor</option>
<option value="6"<?=($Importance == '6' ? ' selected="selected"' : '')?>>DJ / Compiler</option>
<option value="3"<?=($Importance == '3' ? ' selected="selected"' : '')?>>Remixer</option>
</select>
<?if($First) { ?>[<a href="#" onclick="AddArtistField();return false;">+</a>] [<a href="#" onclick="RemoveArtistField();return false;">-</a>] <? } $First = false;?>
<br />
@ -170,9 +173,12 @@
} else {
?> <input type="text" id="artist" name="artists[]" size="45" onblur="CheckVA();" />
<select id="importance" name="importance[]" >
<option value="1">Main</option>
<option value="2">Guest</option>
<option value="3">Remixer</option>
<option value="1">Main</option>
<option value="2">Guest</option>
<option value="4">Composer</option>
<option value="5">Conductor</option>
<option value="6">DJ / Compiler</option>
<option value="3">Remixer</option>
</select>
[<a href="#" onclick="AddArtistField();return false;">+</a>] [<a href="#" onclick="RemoveArtistField();return false;">-</a>]
<?

View File

@ -119,30 +119,64 @@
<div class="head"><strong>Artists</strong></div>
<ul class="stats nobullet">
<?
foreach($ArtistForm[1] as $Artist) {
if(!empty($ArtistForm[4]) && count($ArtistForm[4]) > 0) {
?>
<li class="artist_main">
<li class="artists_composer"><strong>Composers:</strong></li>
<? foreach($ArtistForm[4] as $Artist) {
?>
<li class="artists_composer">
<?=display_artist($Artist)?>
</li>
<? }
}
if(!empty($ArtistForm[6]) && count($ArtistForm[6]) > 0) {
?>
<li class="artists_dj"><strong>DJ / Compiler:</strong></li>
<? foreach($ArtistForm[6] as $Artist) {
?>
<li class="artists_dj">
<?=display_artist($Artist)?>
</li>
<?
}
}
if ((count($ArtistForm[6]) > 0) && (count($ArtistForm[1]) > 0)) {
print ' <li class="artists_main"><strong>Artists:</strong></li>';
} elseif ((count($ArtistForm[4]) > 0) && (count($ArtistForm[1]) > 0)) {
print ' <li class="artists_main"><strong>Performers:</strong></li>';
}
foreach($ArtistForm[1] as $Artist) {
?>
<li class="artists_main">
<?=display_artist($Artist)?>
</li>
<? }
if(!empty($ArtistForm[2]) && count($ArtistForm[2]) > 0) {
?>
<li class="artists_with"><strong>With:</strong></li>
<? foreach($ArtistForm[2] as $Artist) {
?>
<li class="artists_with">
<?=display_artist($Artist)?>
</li>
<? }
}
if(!empty($ArtistForm[5]) && count($ArtistForm[5]) > 0) {
?>
<li class="artists_conductor"><strong>Conducted by:</strong></li>
<? foreach($ArtistForm[5] as $Artist) {
?>
<li class="artist_guest">
<?=display_artist($Artist)?>
</li>
<?
}
<? }
}
if(!empty($ArtistForm[3]) && count($ArtistForm[3]) > 0) {
?>
<li class="artists_remix"><strong>Remixed by:</strong></li>
<? foreach($ArtistForm[3] as $Artist) {
?>
<li class="artist_remix">
<li class="artists_remix">
<?=display_artist($Artist)?>
</li>
<?

View File

@ -19,7 +19,7 @@
<b>All users must have an equal chance to fill a request.</b> Trading upload credit is not allowed. Abusing the request system to exchange favors for other users is not tolerated. That includes making specific requests for certain users (whether explicitly named or not). Making requests for releases, and then unfilling so that one particular user can fill the request is not allowed. If reported, both the requester and user filling the request will receive a warning and lose the request bounty.
</li>
<li>
<b>No manipulation of the requester for bounty.</b> Holding out on a request fill for more bounty is bad etiquette. The bounty is a reward or additional gift for helping other users and should not be a ransom.
<b>No manipulation of the requester for bounty.</b> The bounty is a reward for helping other users&mdash;it should not be a ransom. Any user who refuses to fill a request unless the bounty is raised will face harsh punishment.
</li>
</ul>
</div>

View File

@ -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;
}

View File

@ -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='';

View File

@ -131,7 +131,50 @@ function compare($X, $Y){
<?=(check_perms('torrents_edit')) ? '<span style="float:right;"><a onclick="ArtistManager(); return false;" href="#">[Edit]</a></span>' : ''?>
</div>
<ul class="stats nobullet" id="artist_list">
<? if(!empty($Artists[4]) && count($Artists[4]) > 0) {
print ' <li class="artists_composers"><strong>Composers:</strong></li>';
foreach($Artists[4] as $Artist) {
?>
<li class="artists_composers">
<?=display_artist($Artist).'&lrm;'?>
<? if(check_perms('torrents_edit')){
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
list($AliasID) = $DB->next_record();
if (empty($AliasID)) {
$AliasID = $Artist['id'];
}
?>
&nbsp;(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?>
</li>
<? }
}
if (!empty($Artists[6]) && count($Artists[6]) > 0) {
print ' <li class="artists_dj"><strong>DJ / Compiler:</strong></li>';
foreach($Artists[6] as $Artist) {
?>
<li class="artists_dj">
<?=display_artist($Artist).'&lrm;'?>
<? if(check_perms('torrents_edit')){
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
list($AliasID) = $DB->next_record();
if (empty($AliasID)) {
$AliasID = $Artist['id'];
}
?>
&nbsp;(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?>
</li>
<?
}
}
if ((count($Artists[6]) > 0) && (count($Artists[1]) > 0)) {
print ' <li class="artists_main"><strong>Artists:</strong></li>';
} elseif ((count($Artists[4]) > 0) && (count($Artists[1]) > 0)) {
print ' <li class="artists_main"><strong>Performers:</strong></li>';
}
foreach($Artists[1] as $Artist) {
?>
<li class="artist_main">
@ -165,6 +208,26 @@ function compare($X, $Y){
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?>
</li>
<?
}
}
if(!empty($Artists[5]) && count($Artists[5]) > 0) {
print ' <li class="artists_conductors"><strong>Conducted by:</strong></li>';
foreach($Artists[5] as $Artist) {
?>
<li class="artists_conductors">
<?=display_artist($Artist).'&lrm;'?>
<? if(check_perms('torrents_edit')){
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
list($AliasID) = $DB->next_record();
if (empty($AliasID)) {
$AliasID = $Artist['id'];
}
?>
&nbsp;(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?>
</li>
<?
}
}
@ -205,6 +268,9 @@ function compare($X, $Y){
<select name="importance[]">
<option value="1">Main</option>
<option value="2">Guest</option>
<option value="4">Composer</option>
<option value="5">Conductor</option>
<option value="6">DJ / Compiler</option>
<option value="3">Remixer</option>
</select>
</div>

View File

@ -180,6 +180,11 @@
$TorrentInfo.=$Encoding;
}
// Let's try to shorten the filename intelligently before chopping it off
if (strlen($TorrentName) + strlen($TorrentInfo) + 3 > 152) {
$TorrentName = $Name . (($Year>0)?(' - '.$Year):'');
}
if ($TorrentInfo!='') { $TorrentName.=' ('.$TorrentInfo.')'; }
if(!empty($_GET['mode']) && $_GET['mode'] == 'bbb'){
@ -189,7 +194,7 @@
if (!$TorrentName) { $TorrentName="No Name"; }
$FileName = ($Browser == 'Internet Explorer') ? urlencode(file_string($TorrentName)) : file_string($TorrentName);
$MaxLength = $DownloadAlt ? 213 : 209;
$MaxLength = $DownloadAlt ? 192 : 196;
$FileName = cut_string($FileName, $MaxLength, true, false);
$FileName = $DownloadAlt ? $FileName.'.txt' : $FileName.'.torrent';

View File

@ -399,7 +399,7 @@ function header_link($SortKey,$DefaultWay="DESC") {
foreach($TorrentsInfo as $TorrentID=>$Info) {
list($GroupID,, $Time, $CategoryID) = array_values($Info);
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Results[$GroupID]);
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists) = array_values($Results[$GroupID]);
$Torrent = $Torrents[$TorrentID];
@ -410,11 +410,15 @@ function header_link($SortKey,$DefaultWay="DESC") {
$TorrentTags[]='<a href="torrents.php?type='.$Action.'&amp;userid='.$UserID.'&amp;tags='.$Tag.'">'.$Tag.'</a>';
}
$TorrentTags = implode(', ', $TorrentTags);
$DisplayName = '';
if(count($Artists)>0) {
$DisplayName = display_artists(array('1'=>$Artists));
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName = display_artists($ExtendedArtists);
} elseif(!empty($Artists)) {
$DisplayName = display_artists(array(1=>$Artists));
} else {
$DisplayName='';
}
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$TorrentID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }

View File

@ -270,7 +270,9 @@
$ArtistForm = array(
1 => array(),
2 => array(),
3 => array()
3 => array(),
4 => array(),
5 => array()
);
for($i = 0, $il = count($Artists); $i < $il; $i++) {
if(trim($Artists[$i]) != "") {

View File

@ -140,6 +140,7 @@ function checked($Checked) {
<?
$ReleaseTypes[1024] = "Guest Appearance";
$ReleaseTypes[1023] = "Remixed By";
$ReleaseTypes[1022] = "Composition";
for($i = 0; list($Key,$Val) = each($ReleaseTypes); $i++) {
if(!($i % 7)) {
if($i) {
@ -168,13 +169,13 @@ function checked($Checked) {
<td style="border:none;" colspan="<?=7 - ($i % 7)?>"></td>
<?
}
unset($ReleaseTypes[1023], $ReleaseTypes[1024]);
unset($ReleaseTypes[1023], $ReleaseTypes[1024], $ReleaseTypes[1022]);
?>
</tr>
</table>
</td>
</tr>
<tr>
<!-- <tr>
<td class="label"><strong>Collage album art view</strong></td>
<td>
<select name="hidecollage" id="hidecollage">
@ -182,6 +183,19 @@ function checked($Checked) {
<option value="1"<? if ($SiteOptions['HideCollage'] == 1) { ?>selected="selected"<? } ?>>Hide album art</option>
</select>
</td>
</tr>-->
<tr>
<td class="label"><strong>Collage album covers to show per page</strong></td>
<td>
<select name="collagecovers" id="collagecovers">
<option value="10"<? if ($SiteOptions['CollageCovers'] == 10) { ?>selected="selected"<? } ?>>10</option>
<option value="25"<? if (($SiteOptions['CollageCovers'] == 25) || !isset($SiteOptions['CollageCovers'])) { ?>selected="selected"<? } ?>>25 (default)</option>
<option value="50"<? if ($SiteOptions['CollageCovers'] == 50) { ?>selected="selected"<? } ?>>50</option>
<option value="100"<? if ($SiteOptions['CollageCovers'] == 100) { ?>selected="selected"<? } ?>>100</option>
<option value="1000000"<? if ($SiteOptions['CollageCovers'] == 1000000) { ?>selected="selected"<? } ?>>All</option>
<option value="0"<? if (($SiteOptions['CollageCovers'] === 0) || (!isset($SiteOptions['CollageCovers']) && $SiteOptions['HideCollage'])) { ?>selected="selected"<? } ?>>None</option>
</select>
</td>
</tr>
<tr>
<td class="label"><strong>Browse Page Tag list</strong></td>

View File

@ -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'])) {

View File

@ -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)

View File

@ -176,7 +176,7 @@ function AddArtistField() {
x.appendChild(document.createTextNode(' '));
var Importance = document.createElement("select");
Importance.name = "importance[]";
Importance.innerHTML = '<option value="1">Main</option><option value="2">Guest</option><option value="3">Remixer</option>';
Importance.innerHTML = '<option value="1">Main</option><option value="2">Guest</option><option value="4">Composer</option><option value="5">Conductor</option><option value="6">DJ / Compiler</option><option value="3">Remixer</option>';
x.appendChild(Importance);
ArtistFieldCount++;
}

View File

@ -31,4 +31,102 @@ function CollageSubscribe(collageid) {
}
}
});
}
}
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);
}
};

View File

@ -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"));

View File

@ -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<elArtistList.children.length; i++) {
if(elArtistList.children[i].children[0].tagName.toUpperCase() == 'A') {
var ArtistID = elArtistList.children[i].children[0].href.match(/[?&]id=(\d+)/)[1];
var elBox = document.createElement('input');
elBox.type = 'checkbox';
elBox.id = 'artistmanager_box'+(i-importance+1);
elBox.name = 'artistmanager_box';
elBox.value = importance+','+ArtistID;
elBox.onclick = function(e) { SelectArtist(e,this); };
elArtistList.children[i].insertBefore(elBox, elArtistList.children[i].children[0]);
if(importance == 1) {
MainArtistCount++;
}
} else {
importance++;
}
}
elArtistManager.appendChild(elArtistList);
var elArtistForm = document.createElement('form');
elArtistForm.id = 'artistmanager_form';
elArtistForm.method = 'post';
var elGroupID = document.createElement('input');
elGroupID.type = 'hidden';
elGroupID.name = 'groupid';
elGroupID.value = GroupID;
elArtistForm.appendChild(elGroupID);
var elAction = document.createElement('input');
elAction.type = 'hidden';
elAction.name = 'manager_action';
elAction.id = 'manager_action';
elAction.value = 'manage';
elArtistForm.appendChild(elAction);
var elAction = document.createElement('input');
elAction.type = 'hidden';
elAction.name = 'action';
elAction.value = 'manage_artists';
elArtistForm.appendChild(elAction);
var elAuth = document.createElement('input');
elAuth.type = 'hidden';
elAuth.name = 'auth';
elAuth.value = authkey;
elArtistForm.appendChild(elAuth);
var elSelection = document.createElement('input');
elSelection.type = 'hidden';
elSelection.id = 'artists_selection';
elSelection.name = 'artists';
elArtistForm.appendChild(elSelection);
var elSubmitDiv = document.createElement('div');
var elImportance = document.createElement('select');
elImportance.name = 'importance';
elImportance.id = 'artists_importance';
var elOpt = document.createElement('option');
elOpt.value = 1;
elOpt.innerHTML = 'Main artist';
elImportance.appendChild(elOpt);
elOpt = document.createElement('option');
elOpt.value = 2;
elOpt.innerHTML = 'Guest artist';
elImportance.appendChild(elOpt);
elOpt = document.createElement('option');
elOpt.value = 3;
elOpt.innerHTML = 'Remixer';
elImportance.appendChild(elOpt);
elSubmitDiv.appendChild(elImportance);
elSubmitDiv.appendChild(document.createTextNode(' '));
elSubmitDiv.className = 'body';
var elSubmit = document.createElement('input');
elSubmit.type = 'button';
elSubmit.value = 'Update';
elSubmit.onclick = ArtistManagerSubmit;
elSubmitDiv.appendChild(elSubmit);
elSubmitDiv.appendChild(document.createTextNode(' '));
var elDelButton = document.createElement('input');
elDelButton.type = 'button';
elDelButton.value = 'Delete';
elDelButton.onclick = ArtistManagerDelete;
elSubmitDiv.appendChild(elDelButton);
elArtistForm.appendChild(elSubmitDiv);
elArtistManager.appendChild(elArtistForm);
ArtistList.parentNode.appendChild(elArtistManager);
$('#artist_list').hide();
}
}
function SelectArtist(e,obj) {
if(window.event) {
e = window.event;
}
EndBox = Number(obj.id.substr(17));
if(!e.shiftKey || typeof StartBox == 'undefined') {
StartBox = Number(obj.id.substr(17));
}
Dir = (EndBox > 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<elArtistList.children.length; i++) {
switch (elArtistList.children[i].className) {
case 'artist_main':
importance = 1;
break;
case 'artists_with':
importance = 2;
break;
case 'artists_remix':
importance = 3;
break;
case 'artists_composers':
importance = 4;
break;
case 'artists_conductors':
importance = 5;
break;
case 'artists_dj':
importance = 6;
break;
}
if(elArtistList.children[i].children[0].tagName.toUpperCase() == 'A') {
var ArtistID = elArtistList.children[i].children[0].href.match(/[?&]id=(\d+)/)[1];
var elBox = document.createElement('input');
elBox.type = 'checkbox';
elBox.id = 'artistmanager_box'+(i-importance+1);
elBox.name = 'artistmanager_box';
elBox.value = importance+','+ArtistID;
elBox.onclick = function(e) { SelectArtist(e,this); };
elArtistList.children[i].insertBefore(elBox, elArtistList.children[i].children[0]);
if(importance == 1 || importance == 4 || importance == 6) {
MainArtistCount++;
}
}
}
elArtistManager.appendChild(elArtistList);
var elArtistForm = document.createElement('form');
elArtistForm.id = 'artistmanager_form';
elArtistForm.method = 'post';
var elGroupID = document.createElement('input');
elGroupID.type = 'hidden';
elGroupID.name = 'groupid';
elGroupID.value = GroupID;
elArtistForm.appendChild(elGroupID);
var elAction = document.createElement('input');
elAction.type = 'hidden';
elAction.name = 'manager_action';
elAction.id = 'manager_action';
elAction.value = 'manage';
elArtistForm.appendChild(elAction);
var elAction = document.createElement('input');
elAction.type = 'hidden';
elAction.name = 'action';
elAction.value = 'manage_artists';
elArtistForm.appendChild(elAction);
var elAuth = document.createElement('input');
elAuth.type = 'hidden';
elAuth.name = 'auth';
elAuth.value = authkey;
elArtistForm.appendChild(elAuth);
var elSelection = document.createElement('input');
elSelection.type = 'hidden';
elSelection.id = 'artists_selection';
elSelection.name = 'artists';
elArtistForm.appendChild(elSelection);
var elSubmitDiv = document.createElement('div');
var elImportance = document.createElement('select');
elImportance.name = 'importance';
elImportance.id = 'artists_importance';
var elOpt = document.createElement('option');
elOpt.value = 1;
elOpt.innerHTML = 'Main artist';
elImportance.appendChild(elOpt);
elOpt = document.createElement('option');
elOpt.value = 2;
elOpt.innerHTML = 'Guest artist';
elImportance.appendChild(elOpt);
elOpt = document.createElement('option');
elOpt.value = 4;
elOpt.innerHTML = 'Composer';
elImportance.appendChild(elOpt);
elOpt = document.createElement('option');
elOpt.value = 5;
elOpt.innerHTML = 'Conductor';
elImportance.appendChild(elOpt);
elOpt = document.createElement('option');
elOpt.value = 6;
elOpt.innerHTML = 'DJ / Compiler';
elImportance.appendChild(elOpt);
elOpt = document.createElement('option');
elOpt.value = 3;
elOpt.innerHTML = 'Remixer';
elImportance.appendChild(elOpt);
elSubmitDiv.appendChild(elImportance);
elSubmitDiv.appendChild(document.createTextNode(' '));
elSubmitDiv.className = 'body';
var elSubmit = document.createElement('input');
elSubmit.type = 'button';
elSubmit.value = 'Update';
elSubmit.onclick = ArtistManagerSubmit;
elSubmitDiv.appendChild(elSubmit);
elSubmitDiv.appendChild(document.createTextNode(' '));
var elDelButton = document.createElement('input');
elDelButton.type = 'button';
elDelButton.value = 'Delete';
elDelButton.onclick = ArtistManagerDelete;
elSubmitDiv.appendChild(elDelButton);
elArtistForm.appendChild(elSubmitDiv);
elArtistManager.appendChild(elArtistForm);
ArtistList.parentNode.appendChild(elArtistManager);
$('#artist_list').hide();
}
}
function SelectArtist(e,obj) {
if(window.event) {
e = window.event;
}
EndBox = Number(obj.id.substr(17));
if(!e.shiftKey || typeof StartBox == 'undefined') {
StartBox = Number(obj.id.substr(17));
}
Dir = (EndBox > 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';
}

View File

@ -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"));

View File

@ -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;
}

View File

@ -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 {

View File

@ -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}

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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;
}

View File

@ -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;
}