Empty commit

This commit is contained in:
Git 2012-11-01 08:00:21 +00:00
parent e95360f48f
commit 138fa8ed3e
21 changed files with 692 additions and 537 deletions

View File

@ -119,6 +119,9 @@ public function escape_string($String) {
'!'=>'\\\\!', '!'=>'\\\\!',
'"'=>'\\\\"', '"'=>'\\\\"',
'/'=>'\\\\/', '/'=>'\\\\/',
'*'=>'\\\\*',
'$'=>'\\\\$',
'^'=>'\\\\^',
'\\'=>'\\\\\\\\') '\\'=>'\\\\\\\\')
); );
} }
@ -262,35 +265,50 @@ public function where_match($Expr, $Field = '*', $Escape = true) {
/** /**
* Specify the order of the matches. Calling this function multiple times sets secondary priorities * Specify the order of the matches. Calling this function multiple times sets secondary priorities
* *
* @param string $Attribute attribute to use for sorting * @param string $Attribute attribute to use for sorting.
* Passing an empty attribute value will clear the current sort settings
* @param string $Mode sort method to apply to the selected attribute * @param string $Mode sort method to apply to the selected attribute
* @return current SphinxQL query object * @return current SphinxQL query object
*/ */
public function order_by($Attribute, $Mode) { public function order_by($Attribute = false, $Mode) {
$this->SortBy[] = "$Attribute $Mode"; if (empty($Attribute)) {
$this->SortBy = array();
} else {
$this->SortBy[] = "$Attribute $Mode";
}
return $this; return $this;
} }
/** /**
* Specify how the results are grouped * Specify how the results are grouped
* *
* @param string $Attribute group matches with the same $Attribute value * @param string $Attribute group matches with the same $Attribute value.
* Passing an empty attribute value will clear the current group settings
* @return current SphinxQL query object * @return current SphinxQL query object
*/ */
public function group_by($Attribute) { public function group_by($Attribute = false) {
$this->GroupBy = "$Attribute"; if (empty($Attribute)) {
$this->GroupBy = '';
} else {
$this->GroupBy = $Attribute;
}
return $this; return $this;
} }
/** /**
* Specify the order of the results within groups * Specify the order of the results within groups
* *
* @param string $Attribute attribute to use for sorting * @param string $Attribute attribute to use for sorting.
* Passing an empty attribute will clear the current group sort settings
* @param string $Mode sort method to apply to the selected attribute * @param string $Mode sort method to apply to the selected attribute
* @return current SphinxQL query object * @return current SphinxQL query object
*/ */
public function order_group_by($Attribute, $Mode) { public function order_group_by($Attribute = false, $Mode) {
$this->SortGroupBy = "$Attribute $Mode"; if (empty($Attribute)) {
$this->SortGroupBy = '';
} else {
$this->SortGroupBy = "$Attribute $Mode";
}
return $this; return $this;
} }
@ -302,7 +320,7 @@ public function order_group_by($Attribute, $Mode) {
* @param int $MaxMatches number of results to store in the Sphinx server's memory. Must be >= ($Offset+$Limit) * @param int $MaxMatches number of results to store in the Sphinx server's memory. Must be >= ($Offset+$Limit)
* @return current SphinxQL query object * @return current SphinxQL query object
*/ */
public function limit($Offset, $Limit, $MaxMatches = SPHINX_MATCHES_START) { public function limit($Offset, $Limit, $MaxMatches = SPHINX_MAX_MATCHES) {
$this->Limits = "$Offset, $Limit"; $this->Limits = "$Offset, $Limit";
$this->set('max_matches', $MaxMatches); $this->set('max_matches', $MaxMatches);
return $this; return $this;
@ -340,7 +358,7 @@ private function build_query() {
if(!$this->Indexes) { if(!$this->Indexes) {
$this->error('Index name is required.'); $this->error('Index name is required.');
} }
$this->QueryString = "SELECT $this->Select FROM $this->Indexes"; $this->QueryString = "SELECT $this->Select\nFROM $this->Indexes";
if(!empty($this->Expressions)) { if(!empty($this->Expressions)) {
$this->Filters['expr'] = "MATCH('".implode(" ", $this->Expressions)."')"; $this->Filters['expr'] = "MATCH('".implode(" ", $this->Expressions)."')";
} }
@ -524,7 +542,7 @@ public function to_array($Key, $ResultType = MYSQLI_ASSOC) {
*/ */
public function to_pair($Key1, $Key2) { public function to_pair($Key1, $Key2) {
$Return = array(); $Return = array();
while($Row = $this->fetch_row()) { while($Row = $this->fetch_array()) {
$Return[$Row[$Key1]] = $Row[$Key2]; $Return[$Row[$Key1]] = $Row[$Key2];
} }
$this->data_seek(0); $this->data_seek(0);

View File

@ -42,8 +42,7 @@ public static function get_groups($GroupIDs, $Return = true, $GetArtists = true,
return array('matches'=>array(),'notfound'=>array()); return array('matches'=>array(),'notfound'=>array());
} }
$Found = array_flip($GroupIDs); $Found = $NotFound = array_flip($GroupIDs);
$NotFound = array_flip($GroupIDs);
$Key = $Torrents ? 'torrent_group_' : 'torrent_group_light_'; $Key = $Torrents ? 'torrent_group_' : 'torrent_group_light_';
foreach ($GroupIDs as $GroupID) { foreach ($GroupIDs as $GroupID) {
@ -247,6 +246,10 @@ public static function delete_torrent($ID, $GroupID=0, $OcelotReason=-1) {
$DB->query("DELETE FROM torrents_cassette_approved WHERE TorrentID = ".$ID); $DB->query("DELETE FROM torrents_cassette_approved WHERE TorrentID = ".$ID);
$DB->query("DELETE FROM torrents_lossymaster_approved WHERE TorrentID = ".$ID); $DB->query("DELETE FROM torrents_lossymaster_approved WHERE TorrentID = ".$ID);
$DB->query("DELETE FROM torrents_lossyweb_approved WHERE TorrentID = ".$ID); $DB->query("DELETE FROM torrents_lossyweb_approved WHERE TorrentID = ".$ID);
// Tells Sphinx that the group is removed
$DB->query("REPLACE INTO sphinx_delta (ID,Time) VALUES ($ID, UNIX_TIMESTAMP())");
$Cache->delete_value('torrent_download_'.$ID); $Cache->delete_value('torrent_download_'.$ID);
$Cache->delete_value('torrent_group_'.$GroupID); $Cache->delete_value('torrent_group_'.$GroupID);
$Cache->delete_value('torrents_details_'.$GroupID); $Cache->delete_value('torrents_details_'.$GroupID);
@ -332,9 +335,6 @@ public static function delete_group($GroupID) {
$DB->query("DELETE FROM bookmarks_torrents WHERE GroupID='$GroupID'"); $DB->query("DELETE FROM bookmarks_torrents WHERE GroupID='$GroupID'");
$DB->query("DELETE FROM wiki_torrents WHERE PageID='$GroupID'"); $DB->query("DELETE FROM wiki_torrents WHERE PageID='$GroupID'");
// Tells Sphinx that the group is removed
$DB->query("REPLACE INTO sphinx_delta (ID,Time) VALUES ('$GroupID',UNIX_TIMESTAMP())");
$Cache->delete_value('torrents_details_'.$GroupID); $Cache->delete_value('torrents_details_'.$GroupID);
$Cache->delete_value('torrent_group_'.$GroupID); $Cache->delete_value('torrent_group_'.$GroupID);
$Cache->delete_value('groups_artists_'.$GroupID); $Cache->delete_value('groups_artists_'.$GroupID);
@ -356,53 +356,38 @@ public static function update_hash($GroupID) {
WHERE ID='$GroupID'"); WHERE ID='$GroupID'");
$DB->query("REPLACE INTO sphinx_delta $DB->query("REPLACE INTO sphinx_delta
(ID, GroupName, TagList, Year, CategoryID, Time, ReleaseType, RecordLabel, (ID, GroupID, GroupName, TagList, Year, CategoryID, Time, ReleaseType, RecordLabel,
CatalogueNumber, VanityHouse, Size, Snatched, Seeders, Leechers, LogScore, CatalogueNumber, VanityHouse, Size, Snatched, Seeders, Leechers, LogScore,
Scene, HasLog, HasCue, FreeTorrent, Media, Format, Encoding, RemasterYear, Scene, HasLog, HasCue, FreeTorrent, Media, Format, Encoding, RemasterYear,
RemasterTitle, RemasterRecordLabel, RemasterCatalogueNumber, FileList) RemasterTitle, RemasterRecordLabel, RemasterCatalogueNumber, FileList)
SELECT SELECT
g.ID AS ID, t.ID, g.ID, Name, TagList, Year, CategoryID, UNIX_TIMESTAMP(t.Time), ReleaseType,
g.Name AS GroupName, RecordLabel, CatalogueNumber, VanityHouse, Size >> 10 AS Size, Snatched, Seeders,
g.TagList, Leechers, LogScore, CAST(Scene AS CHAR), CAST(HasLog AS CHAR), CAST(HasCue AS CHAR),
g.Year, CAST(FreeTorrent AS CHAR), Media, Format, Encoding,
g.CategoryID, RemasterYear, RemasterTitle, RemasterRecordLabel, RemasterCatalogueNumber,
UNIX_TIMESTAMP(g.Time) AS Time, REPLACE(REPLACE(REPLACE(REPLACE(FileList,
g.ReleaseType, '.flac', ' .flac'),
g.RecordLabel, '.mp3', ' .mp3'),
g.CatalogueNumber, '|||', '\n '),
g.VanityHouse, '_', ' ')
MAX(CEIL(t.Size/1024)) AS Size, AS FileList
SUM(t.Snatched) AS Snatched,
SUM(t.Seeders) AS Seeders,
SUM(t.Leechers) AS Leechers,
MAX(t.LogScore) AS LogScore,
MAX(t.Scene) AS Scene,
MAX(t.HasLog) AS HasLog,
MAX(t.HasCue) AS HasCue,
BIT_OR(t.FreeTorrent-1) AS FreeTorrent,
GROUP_CONCAT(DISTINCT t.Media SEPARATOR ' ') AS Media,
GROUP_CONCAT(DISTINCT t.Format SEPARATOR ' ') AS Format,
GROUP_CONCAT(DISTINCT t.Encoding SEPARATOR ' ') AS Encoding,
GROUP_CONCAT(DISTINCT t.RemasterYear SEPARATOR ' ') AS RemasterYear,
GROUP_CONCAT(DISTINCT t.RemasterTitle SEPARATOR ' ') AS RemasterTitle,
GROUP_CONCAT(DISTINCT t.RemasterRecordLabel SEPARATOR ' ') AS RemasterRecordLabel,
GROUP_CONCAT(DISTINCT t.RemasterCatalogueNumber SEPARATOR ' ') AS RemasterCatalogueNumber,
GROUP_CONCAT(REPLACE(REPLACE(FileList, '|||', '\n '), '_', ' ') SEPARATOR '\n ') AS FileList
FROM torrents AS t FROM torrents AS t
JOIN torrents_group AS g ON g.ID=t.GroupID JOIN torrents_group AS g ON g.ID=t.GroupID
WHERE g.ID=$GroupID WHERE g.ID=$GroupID");
GROUP BY g.ID");
$DB->query("INSERT INTO sphinx_delta $DB->query("INSERT INTO sphinx_delta
(ID, ArtistName) (ID, ArtistName)
SELECT SELECT torrents.ID, artists.ArtistName FROM (
GroupID, SELECT
GROUP_CONCAT(aa.Name separator ' ') GroupID,
FROM torrents_artists AS ta GROUP_CONCAT(aa.Name separator ' ') AS ArtistName
JOIN artists_alias AS aa ON aa.AliasID=ta.AliasID FROM torrents_artists AS ta
JOIN torrents_group AS tg ON tg.ID=ta.GroupID JOIN artists_alias AS aa ON aa.AliasID=ta.AliasID
WHERE ta.GroupID=$GroupID AND ta.Importance IN ('1', '4', '5', '6') WHERE ta.GroupID=$GroupID AND ta.Importance IN ('1', '4', '5', '6')
GROUP BY tg.ID GROUP BY ta.GroupID
) AS artists
JOIN torrents USING(GroupID)
ON DUPLICATE KEY UPDATE ArtistName=values(ArtistName)"); ON DUPLICATE KEY UPDATE ArtistName=values(ArtistName)");
$Cache->delete_value('torrents_details_'.$GroupID); $Cache->delete_value('torrents_details_'.$GroupID);

View File

@ -487,4 +487,83 @@ function bookmark_data ($UserID)
return array($K, $GroupIDs, $CollageDataList, $TorrentList); return array($K, $GroupIDs, $CollageDataList, $TorrentList);
} }
/**
* Generate HTML for a user's avatar or just return the avatar url
* @param unknown $Avatar
* @param unknown $Username
* @param unknown $Setting
* @param number $Size
* @param string $ReturnHTML
* @return string
*/
public static function show_avatar($Avatar, $Username, $Setting, $Size=150, $ReturnHTML = True) {
global $LoggedUser;
//case 1 is avatars disabled
switch($Setting) {
case 0:
if(!empty($Avatar)) {
$ToReturn = $ReturnHTML ? "<img src='$Avatar' width='$Size' style='max-height:400px;' alt='$Username avatar' />" : $Avatar;
}
else {
$URL = STATIC_SERVER."common/avatars/default.png";
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
}
break;
case 2:
$ShowAvatar = True;
case 3:
switch($LoggedUser['Identicons']) {
case 0:
$Type = "identicon";
break;
case 1:
$Type = "monsterid";
break;
case 2:
$Type = "wavatar";
break;
case 3:
$Type = "retro";
break;
case 4:
$Type = "1";
$Robot = True;
break;
case 5:
$Type = "2";
$Robot = True;
break;
case 6:
$Type = "3";
$Robot = True;
break;
default:
$Type = "identicon";
}
$Rating = "pg";
if(!$Robot) {
$URL = "https://www.gravatar.com/avatar/".md5(strtolower(trim($Username)))."?s=$Size&d=$Type&r=$Rating";
}
else {
$URL = "https://static1.robohash.org/".md5($Username)."?set=set".$Type."&size=".$Size."x".$Size;
}
if($ShowAvatar == True && !empty($Avatar)) {
$ToReturn = $ReturnHTML ? "<img src='$Avatar' width='$Size' style='max-height:400px;' alt='$Username avatar' />" : $Avatar;
}
else {
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
}
break;
default:
$URL = STATIC_SERVER."common/avatars/default.png";
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
}
return $ToReturn;
}
public static function has_avatars_enabled() {
global $HeavyInfo;
return $HeavyInfo['DisableAvatars'] != 1;
}
} }

View File

@ -415,12 +415,6 @@
<div class="rippy" onclick="rippyclick();"></div> <div class="rippy" onclick="rippyclick();"></div>
</div> </div>
<script>
//Random rippy image script, moved to here instead of js file because opera sucks
var n = Math.floor((Math.random()*3)+1);
var background = "transparent url('static/rippy/rippy_halloween_" + n + ".png') no-repeat bottom center";
document.getElementById('rippywrap').style.background = background;
</script>
<? <?
} }
} }

View File

@ -668,6 +668,7 @@ CREATE TABLE `sphinx_delta` (
`RemasterRecordLabel` varchar(50) DEFAULT NULL, `RemasterRecordLabel` varchar(50) DEFAULT NULL,
`RemasterCatalogueNumber` varchar(50) DEFAULT NULL, `RemasterCatalogueNumber` varchar(50) DEFAULT NULL,
`FileList` mediumtext, `FileList` mediumtext,
`VoteScore` float NOT NULL DEFAULT '0',
PRIMARY KEY (`ID`), PRIMARY KEY (`ID`),
KEY `GroupID` (`GroupID`) KEY `GroupID` (`GroupID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View File

@ -36,7 +36,7 @@ function compare($X, $Y){
if (!is_array($Data)) { if (!is_array($Data)) {
$Data = unserialize($Data); $Data = unserialize($Data);
} }
list($K, list($Name, $Image, $Body, $NumSimilar, $SimilarArray, ,,,, $VanityHouseArtist)) = each($Data); list($K, list($Name, $Image, $Body, $NumSimilar, $SimilarArray, , , $VanityHouseArtist)) = each($Data);
} else { } else {
if ($RevisionID) { if ($RevisionID) {
$sql = "SELECT $sql = "SELECT
@ -964,15 +964,15 @@ function require(file, callback) {
list($PostID, $AuthorID, $AddedTime, $CommentBody, $EditedUserID, $EditedTime, $EditedUsername) = array_values($Post); list($PostID, $AuthorID, $AddedTime, $CommentBody, $EditedUserID, $EditedTime, $EditedUsername) = array_values($Post);
list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID)); list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID));
?> ?>
<table class="forum_post box vertical_margin<?=$HeavyInfo['DisableAvatars'] ? ' noavatar' : ''?>" id="post<?=$PostID?>"> <table class="forum_post box vertical_margin<?=!Users::has_avatars_enabled() ? ' noavatar' : ''?>" id="post<?=$PostID?>">
<colgroup> <colgroup>
<? if (empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<col class="col_avatar" /> <col class="col_avatar" />
<? } ?> <? } ?>
<col class="col_post_body" /> <col class="col_post_body" />
</colgroup> </colgroup>
<tr class="colhead_dark"> <tr class="colhead_dark">
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>"> <td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
<div style="float:left;"><a class="post_id" href='artist.php?id=<?=$ArtistID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>'>#<?=$PostID?></a> <div style="float:left;"><a class="post_id" href='artist.php?id=<?=$ArtistID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>'>#<?=$PostID?></a>
<strong><?=Users::format_username($AuthorID, true, true, true, true)?></strong> <?=time_diff($AddedTime)?> <strong><?=Users::format_username($AuthorID, true, true, true, true)?></strong> <?=time_diff($AddedTime)?>
- <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');">[Quote]</a> - <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');">[Quote]</a>
@ -1006,13 +1006,9 @@ function require(file, callback) {
</td> </td>
</tr> </tr>
<tr> <tr>
<? if (empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<td class="avatar" valign="top"> <td class="avatar" valign="top">
<? if ($Avatar) { ?> <?=Users::show_avatar($Avatar, $Username, $HeavyInfo['DisableAvatars'])?>
<img src="<?=$Avatar?>" width="150" alt="<?=$Username ?>'s avatar" />
<? } else { ?>
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
<? } ?>
</td> </td>
<? } ?> <? } ?>
<td class="body" valign="top"> <td class="body" valign="top">
@ -1042,7 +1038,7 @@ function require(file, callback) {
<div class="box pad"> <div class="box pad">
<table id="quickreplypreview" class="forum_post box vertical_margin hidden" style="text-align:left;"> <table id="quickreplypreview" class="forum_post box vertical_margin hidden" style="text-align:left;">
<colgroup> <colgroup>
<? if (empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<col class="col_avatar" /> <col class="col_avatar" />
<? } ?> <? } ?>
<col class="col_post_body" /> <col class="col_post_body" />
@ -1060,15 +1056,11 @@ function require(file, callback) {
</td> </td>
</tr> </tr>
<tr> <tr>
<? if (empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<td class="avatar" valign="top"> <td class="avatar" valign="top">
<? if (!empty($LoggedUser['Avatar'])) { ?> <?=Users::show_avatar($LoggedUser['Avatar'], $LoggedUser['Username'], $HeavyInfo['DisableAvatars'])?>
<img src="<?=$LoggedUser['Avatar']?>" width="150" alt="<?=$LoggedUser['Username']?>'s avatar" />
<? } else { ?>
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
<? } ?>
</td> </td>
<? } ?> <? } ?>
<td class="body" valign="top"> <td class="body" valign="top">
<div id="contentpreview" style="text-align:left;"></div> <div id="contentpreview" style="text-align:left;"></div>
</td> </td>

View File

@ -72,15 +72,15 @@
list($PostID, $AuthorID, $AddedTime, $Body) = $Post; list($PostID, $AuthorID, $AddedTime, $Body) = $Post;
list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID)); list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID));
?> ?>
<table class="forum_post box vertical_margin<?=$HeavyInfo['DisableAvatars'] ? ' noavatar' : ''?>" id="post<?=$PostID?>"> <table class="forum_post box vertical_margin<?=!Users::has_avatars_enabled() ? ' noavatar' : ''?>" id="post<?=$PostID?>">
<colgroup> <colgroup>
<? if(empty($HeavyInfo['DisableAvatars'])) { ?> <? if(Users::has_avatars_enabled()) { ?>
<col class="col_avatar" /> <col class="col_avatar" />
<? } ?> <? } ?>
<col class="col_post_body" /> <col class="col_post_body" />
</colgroup> </colgroup>
<tr class="colhead_dark"> <tr class="colhead_dark">
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>"> <td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
<span style="float:left;"><a href='#post<?=$PostID?>'>#<?=$PostID?></a> <span style="float:left;"><a href='#post<?=$PostID?>'>#<?=$PostID?></a>
by <?=Users::format_username($AuthorID, true, true, true, true, true)?> <?=time_diff($AddedTime)?> <a href="reports.php?action=report&amp;type=collages_comment&amp;id=<?=$PostID?>">[Report Comment]</a> by <?=Users::format_username($AuthorID, true, true, true, true, true)?> <?=time_diff($AddedTime)?> <a href="reports.php?action=report&amp;type=collages_comment&amp;id=<?=$PostID?>">[Report Comment]</a>
<? if (!$ThreadInfo['IsLocked']){ ?> - <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');">[Quote]</a><? } <? if (!$ThreadInfo['IsLocked']){ ?> - <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');">[Quote]</a><? }
@ -93,15 +93,11 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<? if(empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<td class="avatar" valign="top"> <td class="avatar" valign="top">
<? if ($Avatar) { ?> <?=Users::show_avatar($Avatar, $Username, $HeavyInfo['DisableAvatars'])?>
<img src="<?=$Avatar?>" width="150" alt="<?=$Username ?>'s avatar" />
<? } else { ?>
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
<? } ?>
</td> </td>
<? } ?> <? } ?>
<td class="body" valign="top"> <td class="body" valign="top">
<div id="content<?=$PostID?>"> <div id="content<?=$PostID?>">
<?=$Text->full_format($Body)?> <?=$Text->full_format($Body)?>

View File

@ -22,7 +22,7 @@ function compare($X, $Y){
if (!is_array($Data)) { if (!is_array($Data)) {
$Data = unserialize($Data); $Data = unserialize($Data);
} }
list($K, list($Name, $Description, ,,,, $CommentList, $Deleted, $CollageCategoryID, $CreatorID)) = each($Data); list($K, list($Name, $Description, , , $CommentList, $Deleted, $CollageCategoryID, $CreatorID, $Locked, $MaxGroups, $MaxGroupsPerUser)) = each($Data);
} else { } else {
$DB->query("SELECT Name, Description, UserID, Deleted, CategoryID, Locked, MaxGroups, MaxGroupsPerUser FROM collages WHERE ID='$CollageID'"); $DB->query("SELECT Name, Description, UserID, Deleted, CategoryID, Locked, MaxGroups, MaxGroupsPerUser FROM collages WHERE ID='$CollageID'");
if($DB->record_count() > 0) { if($DB->record_count() > 0) {

View File

@ -31,6 +31,7 @@
?> ?>
<div class="thin"> <div class="thin">
<h2>Forums</h2> <h2>Forums</h2>
<div class="forum_list">
<? <?
$Row = 'a'; $Row = 'a';
@ -106,6 +107,7 @@
</tr> </tr>
<? } ?> <? } ?>
</table> </table>
</div>
<div class="linkbox"><a href="forums.php?action=catchup&amp;forumid=all&amp;auth=<?=$LoggedUser['AuthKey']?>">Catch up</a></div> <div class="linkbox"><a href="forums.php?action=catchup&amp;forumid=all&amp;auth=<?=$LoggedUser['AuthKey']?>">Catch up</a></div>
</div> </div>
<? View::show_footer(); <? View::show_footer();

View File

@ -29,7 +29,7 @@
$ForumID = db_string($ForumID); $ForumID = db_string($ForumID);
$TopicID = db_string($TopicID); $TopicID = db_string($TopicID);
$PostID = db_string($PostID); $PostID = db_string($PostID);
$DB->query("INSERT INTO users_notify_quoted (UserID, QuoterID, ForumID, TopicID, PostID, Date) $DB->query("INSERT IGNORE INTO users_notify_quoted (UserID, QuoterID, ForumID, TopicID, PostID, Date)
VALUES ('$UserID', '$QuoterID', '$ForumID', '$TopicID', '$PostID', '" . sqltime() . "')"); VALUES ('$UserID', '$QuoterID', '$ForumID', '$TopicID', '$PostID', '" . sqltime() . "')");
$Cache->delete_value('forums_quotes_' . $UserID); $Cache->delete_value('forums_quotes_' . $UserID);
} }

View File

@ -399,20 +399,20 @@
if (((!$ThreadInfo['IsLocked'] || $ThreadInfo['IsSticky']) && $PostID>$LastRead && strtotime($AddedTime)>$LoggedUser['CatchupTime']) || (isset($RequestKey) && $Key==$RequestKey)) { if (((!$ThreadInfo['IsLocked'] || $ThreadInfo['IsSticky']) && $PostID>$LastRead && strtotime($AddedTime)>$LoggedUser['CatchupTime']) || (isset($RequestKey) && $Key==$RequestKey)) {
echo ' forum_unread'; echo ' forum_unread';
} }
if ($HeavyInfo['DisableAvatars']) { if (!Users::has_avatars_enabled()) {
echo ' noavatar'; echo ' noavatar';
} }
if ($ThreadInfo['OP'] == $AuthorID) { if ($ThreadInfo['OP'] == $AuthorID) {
echo ' important_user'; echo ' important_user';
} ?>" id="post<?=$PostID?>"> } ?>" id="post<?=$PostID?>">
<colgroup> <colgroup>
<? if (empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<col class="col_avatar" /> <col class="col_avatar" />
<? } ?> <? } ?>
<col class="col_post_body" /> <col class="col_post_body" />
</colgroup> </colgroup>
<tr class="colhead_dark"> <tr class="colhead_dark">
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>"> <td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
<div style="float:left;"><a class="post_id" href="forums.php?action=viewthread&amp;threadid=<?=$ThreadID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>">#<?=$PostID?></a> <div style="float:left;"><a class="post_id" href="forums.php?action=viewthread&amp;threadid=<?=$ThreadID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>">#<?=$PostID?></a>
<?=Users::format_username($AuthorID, true, true, true, true, true)?> <?=Users::format_username($AuthorID, true, true, true, true, true)?>
<?=time_diff($AddedTime,2)?> <?=time_diff($AddedTime,2)?>
@ -459,16 +459,12 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<? if (empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<td class="avatar" valign="top"> <td class="avatar" valign="top">
<? if ($Avatar) { ?> <?=Users::show_avatar($Avatar, $Username, $HeavyInfo['DisableAvatars'])?>
<img src="<?=$Avatar?>" width="150" style="max-height:400px;" alt="<?=$Username ?>'s avatar" />
<? } else { ?>
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
<? } ?>
</td> </td>
<? } ?> <? } ?>
<td class="body" valign="top"<? if(!empty($HeavyInfo['DisableAvatars'])) { echo ' colspan="2"'; } ?>> <td class="body" valign="top"<? if(!Users::has_avatars_enabled()) { echo ' colspan="2"'; } ?>>
<div id="content<?=$PostID?>"> <div id="content<?=$PostID?>">
<?=$Text->full_format($Body) ?> <?=$Text->full_format($Body) ?>
<? if ($EditedUserID) { ?> <? if ($EditedUserID) { ?>
@ -504,13 +500,13 @@
<div class="box pad"> <div class="box pad">
<table id="quickreplypreview" class="forum_post box vertical_margin hidden" style="text-align:left;"> <table id="quickreplypreview" class="forum_post box vertical_margin hidden" style="text-align:left;">
<colgroup> <colgroup>
<? if(empty($HeavyInfo['DisableAvatars'])) { ?> <? if(Users::has_avatars_enabled()) { ?>
<col class="col_avatar" /> <col class="col_avatar" />
<? } ?> <? } ?>
<col class="col_post_body" /> <col class="col_post_body" />
</colgroup> </colgroup>
<tr class="colhead_dark"> <tr class="colhead_dark">
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>"> <td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
<span style="float:left;"><a href='#quickreplypreview'>#XXXXXX</a> <span style="float:left;"><a href='#quickreplypreview'>#XXXXXX</a>
by <?=Users::format_username($LoggedUser['ID'], true, true, true, true, true)?> Just now by <?=Users::format_username($LoggedUser['ID'], true, true, true, true, true)?> Just now
</span> </span>
@ -522,15 +518,11 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<? if (empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<td class="avatar" valign="top"> <td class="avatar" valign="top">
<? if (!empty($LoggedUser['Avatar'])) { ?> <?=Users::show_avatar($LoggedUser['Avatar'], $LoggedUser['Username'], $HeavyInfo['DisableAvatars'])?>
<img src="<?=$LoggedUser['Avatar']?>" width="150" alt="<?=$LoggedUser['Username']?>'s avatar" /> </td>
<? } else { ?> <? } ?>
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
<? } ?>
</td>
<? } ?>
<td class="body" valign="top"> <td class="body" valign="top">
<div id="contentpreview" style="text-align:left;"></div> <div id="contentpreview" style="text-align:left;"></div>
</td> </td>

View File

@ -519,15 +519,15 @@
list($PostID, $AuthorID, $AddedTime, $Body, $EditedUserID, $EditedTime, $EditedUsername) = array_values($Post); list($PostID, $AuthorID, $AddedTime, $Body, $EditedUserID, $EditedTime, $EditedUsername) = array_values($Post);
list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID)); list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID));
?> ?>
<table class="forum_post box vertical_margin<?=$HeavyInfo['DisableAvatars'] ? ' noavatar' : ''?>" id="post<?=$PostID?>"> <table class="forum_post box vertical_margin<?=!Users::has_avatars_enabled() ? ' noavatar' : ''?>" id="post<?=$PostID?>">
<colgroup> <colgroup>
<? if(empty($HeavyInfo['DisableAvatars'])) { ?> <? if(Users::has_avatars_enabled()) { ?>
<col class="col_avatar" /> <col class="col_avatar" />
<? } ?> <? } ?>
<col class="col_post_body" /> <col class="col_post_body" />
</colgroup> </colgroup>
<tr class="colhead_dark"> <tr class="colhead_dark">
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>"> <td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
<div style="float:left;"><a href='#post<?=$PostID?>'>#<?=$PostID?></a> <div style="float:left;"><a href='#post<?=$PostID?>'>#<?=$PostID?></a>
by <strong><?=Users::format_username($AuthorID, true, true, true, true)?></strong> <?=time_diff($AddedTime)?> by <strong><?=Users::format_username($AuthorID, true, true, true, true)?></strong> <?=time_diff($AddedTime)?>
- <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');">[Quote]</a> - <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');">[Quote]</a>
@ -546,13 +546,9 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<? if (empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<td class="avatar" valign="top"> <td class="avatar" valign="top">
<? if ($Avatar) { ?> <?=Users::show_avatar($Avatar, $Username, $HeavyInfo['DisableAvatars'])?>
<img src="<?=$Avatar?>" width="150" alt="<?=$Username ?>'s avatar" />
<? } else { ?>
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
<? } ?>
</td> </td>
<? } ?> <? } ?>
<td class="body" valign="top"> <td class="body" valign="top">
@ -582,13 +578,13 @@
<div class="box pad" style="padding:20px 10px 10px 10px;"> <div class="box pad" style="padding:20px 10px 10px 10px;">
<table id="quickreplypreview" class="hidden forum_post box vertical_margin" id="preview"> <table id="quickreplypreview" class="hidden forum_post box vertical_margin" id="preview">
<colgroup> <colgroup>
<? if(empty($HeavyInfo['DisableAvatars'])) { ?> <? if(Users::has_avatars_enabled()) { ?>
<col class="col_avatar" /> <col class="col_avatar" />
<? } ?> <? } ?>
<col class="col_post_body" /> <col class="col_post_body" />
</colgroup> </colgroup>
<tr class="colhead_dark"> <tr class="colhead_dark">
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>"> <td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
<div style="float:left;"><a href='#quickreplypreview'>#XXXXXX</a> <div style="float:left;"><a href='#quickreplypreview'>#XXXXXX</a>
by <strong><?=Users::format_username($LoggedUser['ID'], true, true, true, true)?></strong> Just now by <strong><?=Users::format_username($LoggedUser['ID'], true, true, true, true)?></strong> Just now
</div> </div>
@ -600,15 +596,11 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<? if(empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<td class="avatar" valign="top"> <td class="avatar" valign="top">
<? if (!empty($LoggedUser['Avatar'])) { ?> <?=Users::show_avatar($LoggedUser['Avatar'], $LoggedUser['Username'], $HeavyInfo['DisableAvatars'])?>
<img src="<?=$LoggedUser['Avatar']?>" width="150" alt="<?=$LoggedUser['Username']?>'s avatar" />
<? } else { ?>
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
<? } ?>
</td> </td>
<? } ?> <? } ?>
<td class="body" valign="top"> <td class="body" valign="top">
<div id="contentpreview" style="text-align:left;"></div> <div id="contentpreview" style="text-align:left;"></div>
</td> </td>

View File

@ -932,6 +932,11 @@ function next_hour() {
Misc::send_pm($UserID, 0, db_string('Unseeded torrent notification'), db_string($MessageInfo['Count']." of your uploads will be deleted for inactivity soon. Unseeded torrents are deleted after 4 weeks. If you still have the files, you can seed your uploads by ensuring the torrents are in your client and that they aren't stopped. You can view the time that a torrent has been unseeded by clicking on the torrent description line and looking for the \"Last active\" time. For more information, please go [url=https://what.cd/wiki.php?action=article&amp;id=663]here[/url].\n\nThe following torrent".($MessageInfo['Count']>1?'s':'')." will be removed for inactivity:".$MessageInfo['Msg']."\n\nIf you no longer wish to receive these notifications, please disable them in your profile settings.")); Misc::send_pm($UserID, 0, db_string('Unseeded torrent notification'), db_string($MessageInfo['Count']." of your uploads will be deleted for inactivity soon. Unseeded torrents are deleted after 4 weeks. If you still have the files, you can seed your uploads by ensuring the torrents are in your client and that they aren't stopped. You can view the time that a torrent has been unseeded by clicking on the torrent description line and looking for the \"Last active\" time. For more information, please go [url=https://what.cd/wiki.php?action=article&amp;id=663]here[/url].\n\nThe following torrent".($MessageInfo['Count']>1?'s':'')." will be removed for inactivity:".$MessageInfo['Msg']."\n\nIf you no longer wish to receive these notifications, please disable them in your profile settings."));
} }
} }
$DB->query("UPDATE staff_pm_conversations
SET Status = 'Resolved', ResolverID = '0'
WHERE Date < NOW() - INTERVAL 1 MONTH AND Status = 'Open' AND AssignedToUser IS NULL");
} }
/*************************************************************************\ /*************************************************************************\
//--------------Run twice per month -------------------------------------// //--------------Run twice per month -------------------------------------//

File diff suppressed because it is too large Load Diff

View File

@ -802,15 +802,15 @@ function filelist($Str) {
list($PostID, $AuthorID, $AddedTime, $Body, $EditedUserID, $EditedTime, $EditedUsername) = array_values($Post); list($PostID, $AuthorID, $AddedTime, $Body, $EditedUserID, $EditedTime, $EditedUsername) = array_values($Post);
list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID)); list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID));
?> ?>
<table class="forum_post box vertical_margin<?=$HeavyInfo['DisableAvatars'] ? ' noavatar' : ''?>" id="post<?=$PostID?>"> <table class="forum_post box vertical_margin<?=!Users::has_avatars_enabled() ? ' noavatar' : ''?>" id="post<?=$PostID?>">
<colgroup> <colgroup>
<? if (empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<col class="col_avatar" /> <col class="col_avatar" />
<? } ?> <? } ?>
<col class="col_post_body" /> <col class="col_post_body" />
</colgroup> </colgroup>
<tr class="colhead_dark"> <tr class="colhead_dark">
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>"> <td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
<div style="float:left;"><a class="post_id" href="torrents.php?id=<?=$GroupID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>">#<?=$PostID?></a> <div style="float:left;"><a class="post_id" href="torrents.php?id=<?=$GroupID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>">#<?=$PostID?></a>
<strong><?=Users::format_username($AuthorID, true, true, true, true)?></strong> <?=time_diff($AddedTime)?> <strong><?=Users::format_username($AuthorID, true, true, true, true)?></strong> <?=time_diff($AddedTime)?>
- <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');">[Quote]</a> - <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');">[Quote]</a>
@ -844,13 +844,9 @@ function filelist($Str) {
</td> </td>
</tr> </tr>
<tr> <tr>
<? if(empty($HeavyInfo['DisableAvatars'])) { ?> <? if (Users::has_avatars_enabled()) { ?>
<td class="avatar" valign="top"> <td class="avatar" valign="top">
<? if ($Avatar) { ?> <?=Users::show_avatar($Avatar, $Username, $HeavyInfo['DisableAvatars'])?>
<img src="<?=$Avatar?>" width="150" alt="<?=$Username ?>'s avatar" />
<? } else { ?>
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
<? } ?>
</td> </td>
<? } ?> <? } ?>
<td class="body" valign="top"> <td class="body" valign="top">
@ -880,13 +876,13 @@ function filelist($Str) {
<div class="box pad"> <div class="box pad">
<table id="quickreplypreview" class="forum_post box vertical_margin hidden" style="text-align:left;"> <table id="quickreplypreview" class="forum_post box vertical_margin hidden" style="text-align:left;">
<colgroup> <colgroup>
<? if(empty($HeavyInfo['DisableAvatars'])) { ?> <? if(Users::has_avatars_enabled()) { ?>
<col class="col_avatar" /> <col class="col_avatar" />
<? } ?> <? } ?>
<col class="col_post_body" /> <col class="col_post_body" />
</colgroup> </colgroup>
<tr class="colhead_dark"> <tr class="colhead_dark">
<td colspan="<?=empty($HeavyInfo['DisableAvatars']) ? 2 : 1?>"> <td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
<span style="float:left;"><a href='#quickreplypreview'>#XXXXXX</a> <span style="float:left;"><a href='#quickreplypreview'>#XXXXXX</a>
by <strong><?=Users::format_username($LoggedUser['ID'], true, true, true, true)?></strong> Just now by <strong><?=Users::format_username($LoggedUser['ID'], true, true, true, true)?></strong> Just now
<a href="#quickreplypreview">[Report Comment]</a> <a href="#quickreplypreview">[Report Comment]</a>
@ -897,13 +893,11 @@ function filelist($Str) {
</td> </td>
</tr> </tr>
<tr> <tr>
<? if (Users::has_avatars_enabled()) { ?>
<td class="avatar" valign="top"> <td class="avatar" valign="top">
<? if (!empty($LoggedUser['Avatar'])) { ?> <?=Users::show_avatar($LoggedUser['Avatar'], $LoggedUser['Username'], $HeavyInfo['DisableAvatars'])?>
<img src="<?=$LoggedUser['Avatar']?>" width="150" alt="<?=$LoggedUser['Username']?>'s avatar" />
<? } else { ?>
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
<? } ?>
</td> </td>
<? } ?>
<td class="body" valign="top"> <td class="body" valign="top">
<div id="contentpreview" style="text-align:left;"></div> <div id="contentpreview" style="text-align:left;"></div>
</td> </td>

View File

@ -115,8 +115,8 @@ function checked($Checked) {
<td class="label"><strong>Torrent Grouping</strong></td> <td class="label"><strong>Torrent Grouping</strong></td>
<td> <td>
<select name="disablegrouping" id="disablegrouping"> <select name="disablegrouping" id="disablegrouping">
<option value="0"<? if ($SiteOptions['DisableGrouping'] == 0) { ?>selected="selected"<? } ?>>Group torrents by default</option> <option value="0"<? if ($SiteOptions['DisableGrouping2'] == 0) { ?>selected="selected"<? } ?>>Group torrents by default</option>
<option value="1"<? if ($SiteOptions['DisableGrouping'] == 1) { ?>selected="selected"<? } ?>>DO NOT Group torrents by default</option> <option value="1"<? if ($SiteOptions['DisableGrouping2'] == 1) { ?>selected="selected"<? } ?>>DO NOT Group torrents by default</option>
</select>&nbsp; </select>&nbsp;
<select name="torrentgrouping" id="torrentgrouping"> <select name="torrentgrouping" id="torrentgrouping">
<option value="0"<? if ($SiteOptions['TorrentGrouping'] == 0) { ?>selected="selected"<? } ?>>Groups are open by default</option> <option value="0"<? if ($SiteOptions['TorrentGrouping'] == 0) { ?>selected="selected"<? } ?>>Groups are open by default</option>
@ -264,12 +264,25 @@ function checked($Checked) {
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label"><strong>Avatars</strong></td> <td class="label"><strong>Avatars</strong></td>
<td> <td>
<input type="checkbox" name="disableavatars" id="disableavatars" <? if (!empty($SiteOptions['DisableAvatars'])) { ?>checked="checked"<? } ?> /> <select name="disableavatars" id="disableavatars" onclick="ToggleIdenticons();">
<label for="disableavatars">Disable avatars</label> <option value="1" <? if($SiteOptions['DisableAvatars'] == 1) { ?> selected="selected" <? } ?>/>Disable avatars</option>
</td> <option value="0" <? if($SiteOptions['DisableAvatars'] == 0) { ?> selected="selected" <? } ?>/>Show avatars</option>
</tr> <option value="2" <? if($SiteOptions['DisableAvatars'] == 2) { ?> selected="selected" <? } ?>/>Show avatars or:</option>
<option value="3" <? if($SiteOptions['DisableAvatars'] == 3) { ?> selected="selected" <? } ?>/>Replace all avatars with:</option>
</select>
<select name="identicons" id="identicons">
<option value="0" <? if($SiteOptions['Identicons'] == 0) { ?> selected="selected" <? } ?>/>Identicon</option>
<option value="1" <? if($SiteOptions['Identicons'] == 1) { ?> selected="selected" <? } ?>/>MonsterID</option>
<option value="2" <? if($SiteOptions['Identicons'] == 2) { ?> selected="selected" <? } ?>/>Wavatar</option>
<option value="3" <? if($SiteOptions['Identicons'] == 3) { ?> selected="selected" <? } ?>/>Retro</option>
<option value="4" <? if($SiteOptions['Identicons'] == 4) { ?> selected="selected" <? } ?>/>Robots 1</option>
<option value="5" <? if($SiteOptions['Identicons'] == 5) { ?> selected="selected" <? } ?>/>Robots 2</option>
<option value="6" <? if($SiteOptions['Identicons'] == 6) { ?> selected="selected" <? } ?>/>Robots 3</option>
</select>
</td>
</tr>
<tr> <tr>
<td class="label"><strong>Push Notifications</strong></td> <td class="label"><strong>Push Notifications</strong></td>
<td> <td>

View File

@ -181,7 +181,7 @@
if(!empty($LoggedUser['DefaultSearch'])) { if(!empty($LoggedUser['DefaultSearch'])) {
$Options['DefaultSearch'] = $LoggedUser['DefaultSearch']; $Options['DefaultSearch'] = $LoggedUser['DefaultSearch'];
} }
$Options['DisableGrouping'] = (!empty($_POST['disablegrouping']) ? 1 : 0); $Options['DisableGrouping2'] = (!empty($_POST['disablegrouping']) ? 1 : 0);
$Options['TorrentGrouping'] = (!empty($_POST['torrentgrouping']) ? 1 : 0); $Options['TorrentGrouping'] = (!empty($_POST['torrentgrouping']) ? 1 : 0);
$Options['DiscogView'] = (!empty($_POST['discogview']) ? 1 : 0); $Options['DiscogView'] = (!empty($_POST['discogview']) ? 1 : 0);
$Options['PostsPerPage'] = (int) $_POST['postsperpage']; $Options['PostsPerPage'] = (int) $_POST['postsperpage'];
@ -190,7 +190,8 @@
$Options['ShowTags'] = (!empty($_POST['showtags']) ? 1 : 0); $Options['ShowTags'] = (!empty($_POST['showtags']) ? 1 : 0);
$Options['AutoSubscribe'] = (!empty($_POST['autosubscribe']) ? 1 : 0); $Options['AutoSubscribe'] = (!empty($_POST['autosubscribe']) ? 1 : 0);
$Options['DisableSmileys'] = (!empty($_POST['disablesmileys']) ? 1 : 0); $Options['DisableSmileys'] = (!empty($_POST['disablesmileys']) ? 1 : 0);
$Options['DisableAvatars'] = (!empty($_POST['disableavatars']) ? 1 : 0); $Options['DisableAvatars'] = db_string($_POST['disableavatars']);
$Options['Identicons'] = (!empty($_POST['identicons']) ? (int) $_POST['identicons'] : 0);
$Options['DisablePMAvatars'] = (!empty($_POST['disablepmavatars']) ? 1 : 0); $Options['DisablePMAvatars'] = (!empty($_POST['disablepmavatars']) ? 1 : 0);
$Options['NotifyOnQuote'] = (!empty($_POST['notifyquotes']) ? 1 : 0); $Options['NotifyOnQuote'] = (!empty($_POST['notifyquotes']) ? 1 : 0);
$Options['ShowSnatched'] = (!empty($_POST['showsnatched']) ? 1 : 0); $Options['ShowSnatched'] = (!empty($_POST['showsnatched']) ? 1 : 0);

View File

@ -144,4 +144,15 @@ function ToggleWarningAdjust(selector) {
$('#ReduceWarningTR').hide(); $('#ReduceWarningTR').hide();
$('#ReduceWarning').raw().disabled = true; $('#ReduceWarning').raw().disabled = true;
} }
}
addDOMLoadEvent(ToggleIdenticons);
function ToggleIdenticons() {
var selected = $('#disableavatars').raw().selectedIndex;
if(selected == 2 || selected == 3) {
$('#identicons').show();
}
else {
$('#identicons').hide();
}
} }

View File

@ -0,0 +1 @@
@import url('https://whatimg.com/htrd/darkmono2/darkmono2.css');

View File

@ -190,7 +190,7 @@ div#AddArtists a {
z-index: 25; z-index: 25;
display: block; display: block;
position: fixed; position: fixed;
background: transparent no-repeat bottom background: transparent url('../rippy/rippy_halloween_1.png') no-repeat bottom
center; center;
color: black; color: black;
text-align: center; text-align: center;

View File

@ -767,7 +767,8 @@ tr.group td,
tr.torrent td { tr.torrent td {
color: #646054; color: #646054;
} }
.torrent_table.grouping tr.torrent { .torrent_table.grouping tr.torrent,
.torrent_table.no_grouping tr.torrent {
background-color:#EFEFEF; background-color:#EFEFEF;
} }