mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-21 20:59:02 +00:00
Empty commit
This commit is contained in:
parent
b04c53f9a3
commit
39956ded1f
@ -447,6 +447,26 @@ public static function display_array($Array, $Escape = array()) {
|
||||
return $Array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches for a key/value pair in an array.
|
||||
*
|
||||
* @return array of results
|
||||
*/
|
||||
public static function search_array($Array, $Key, $Value) {
|
||||
$Results = array();
|
||||
if (is_array($Array))
|
||||
{
|
||||
if (isset($Array[$Key]) && $Array[$Key] == $Value) {
|
||||
$Results[] = $Array;
|
||||
}
|
||||
|
||||
foreach ($Array as $subarray) {
|
||||
$Results = array_merge($Results, self::search_array($subarray, $Key, $Value));
|
||||
}
|
||||
}
|
||||
return $Results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for a : in the beginning of a torrent meta data string
|
||||
* to see if it's stored in the old base64-encoded format
|
||||
|
@ -19,6 +19,7 @@
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Wiki" href="opensearch.php?type=wiki" />
|
||||
<link rel="alternate" type="application/rss+xml" href="feeds.php?feed=feed_news&user=<?=$LoggedUser['ID']?>&auth=<?=$LoggedUser['RSS_Auth']?>&passkey=<?=$LoggedUser['torrent_pass']?>&authkey=<?=$LoggedUser['AuthKey']?>" title="<?=SITE_NAME?> - News" />
|
||||
<link rel="alternate" type="application/rss+xml" href="feeds.php?feed=feed_blog&user=<?=$LoggedUser['ID']?>&auth=<?=$LoggedUser['RSS_Auth']?>&passkey=<?=$LoggedUser['torrent_pass']?>&authkey=<?=$LoggedUser['AuthKey']?>" title="<?=SITE_NAME?> - Blog" />
|
||||
<link rel="alternate" type="application/rss+xml" href="feeds.php?feed=feed_changelog&user=<?=$LoggedUser['ID']?>&auth=<?=$LoggedUser['RSS_Auth']?>&passkey=<?=$LoggedUser['torrent_pass']?>&authkey=<?=$LoggedUser['AuthKey']?>" title="<?=SITE_NAME?> - Gazelle Change Log" />
|
||||
<link rel="alternate" type="application/rss+xml" href="feeds.php?feed=torrents_notify_<?=$LoggedUser['torrent_pass']?>&user=<?=$LoggedUser['ID']?>&auth=<?=$LoggedUser['RSS_Auth']?>&passkey=<?=$LoggedUser['torrent_pass']?>&authkey=<?=$LoggedUser['AuthKey']?>" title="<?=SITE_NAME?> - P.T.N." />
|
||||
<?
|
||||
if (isset($LoggedUser['Notify'])) {
|
||||
|
@ -1,5 +1,11 @@
|
||||
CHANGELOG
|
||||
|
||||
2013-06-15 by Ajax
|
||||
Adding &artistreleases=1 to artist api url will display only releases by the current artist
|
||||
|
||||
2013-06-15 by Ajax
|
||||
Added artist and extended artist information to torrent groups in artist json output
|
||||
|
||||
2013-06-14 by eth
|
||||
Adds option to load news posts using ajax
|
||||
|
||||
|
10
gazelle.sql
10
gazelle.sql
@ -155,11 +155,11 @@ CREATE TABLE `bookmarks_torrents` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `changelog` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`time` datetime DEFAULT NULL,
|
||||
`message` text COLLATE utf8_swedish_ci,
|
||||
`author` varchar(30) COLLATE utf8_swedish_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
`ID` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`Message` text COLLATE utf8_swedish_ci NOT NULL,
|
||||
`Author` varchar(30) COLLATE utf8_swedish_ci NOT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;
|
||||
|
||||
CREATE TABLE `collages` (
|
||||
|
@ -7,6 +7,10 @@ function compare($X, $Y) {
|
||||
include(SERVER_ROOT.'/classes/text.class.php'); // Text formatting class
|
||||
$Text = new TEXT;
|
||||
|
||||
if (!empty($_GET['artistreleases'])) {
|
||||
$OnlyArtistReleases = true;
|
||||
}
|
||||
|
||||
if ($_GET['id'] && $_GET['artistname']) {
|
||||
json_die("failure", "bad parameters");
|
||||
}
|
||||
@ -169,6 +173,24 @@ function compare($X, $Y) {
|
||||
foreach ($TorrentList as $GroupID => $Group) {
|
||||
extract(Torrents::array_group($Group));
|
||||
|
||||
foreach($Artists as &$Artist) {
|
||||
$Artist['id'] = (int) $Artist['id'];
|
||||
$Artist['aliasid'] = (int) $Artist['aliasid'];
|
||||
}
|
||||
|
||||
foreach($ExtendedArtists as &$ArtistGroup) {
|
||||
foreach($ArtistGroup as &$Artist) {
|
||||
$Artist['id'] = (int) $Artist['id'];
|
||||
$Artist['aliasid'] = (int) $Artist['aliasid'];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$Found = Misc::search_array($Artists, 'id', $ArtistID);
|
||||
if (isset($OnlyArtistReleases) && empty($Found)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$GroupVanityHouse = $Importances[$GroupID]['VanityHouse'];
|
||||
|
||||
$TagList = explode(' ',str_replace('_','.',$TagList));
|
||||
@ -224,7 +246,10 @@ function compare($X, $Y) {
|
||||
'wikiImage' => $WikiImage,
|
||||
'groupVanityHouse' => $GroupVanityHouse == 1,
|
||||
'hasBookmarked' => Bookmarks::has_bookmarked('torrent', $GroupID),
|
||||
'torrent' => $InnerTorrents
|
||||
'artists' => $Artists,
|
||||
'extendedArtists' => $ExtendedArtists,
|
||||
'torrent' => $InnerTorrents,
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -102,6 +102,22 @@
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'feed_changelog':
|
||||
$Feed->channel('Gazelle Change Log', 'RSS feed for Gazelle\'s changelog.');
|
||||
if (!$Changelog = $Cache->get_value('changelog')) {
|
||||
require(SERVER_ROOT.'/classes/mysql.class.php');
|
||||
require(SERVER_ROOT.'/classes/misc.class.php');
|
||||
|
||||
$DB = NEW DB_MYSQL;
|
||||
$DB->query("SELECT Message, Author, Date(Time) FROM changelog ORDER BY Time DESC LIMIT 20");
|
||||
$Changelog = $DB->to_array();
|
||||
$Cache->cache_value('changelog', $Changelog, 86400);
|
||||
}
|
||||
foreach ($Changelog as $Change) {
|
||||
list($Message, $Author, $Date) = $Change;
|
||||
echo $Feed->item($Date . " by " . $Author, $Message, 'tools.php?action=change_log', SITE_NAME.' Staff','','',$Date);
|
||||
}
|
||||
break;
|
||||
case 'torrents_all':
|
||||
$Feed->channel('All Torrents', 'RSS feed for all new torrent uploads.');
|
||||
$Feed->retrieve('torrents_all',$_GET['authkey'],$_GET['passkey']);
|
||||
|
@ -45,32 +45,35 @@
|
||||
echo "\t\t$Pages\n";
|
||||
?>
|
||||
</div>
|
||||
<div class="main_column">
|
||||
<br />
|
||||
<? if ($CanEdit) { ?>
|
||||
<form method="post">
|
||||
<div class="box">
|
||||
<div class="box2 edit_changelog">
|
||||
<div class="head">
|
||||
Manually submit a new change to the change log
|
||||
<strong>Manually submit a new change to the change log</strong>
|
||||
</div>
|
||||
<div class="pad">
|
||||
<form method="post">
|
||||
<input type="hidden" name="perform" value="add" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<label><strong>Commit message: </strong><input type="text" name="message" size="50" value="" /></label>
|
||||
<br /><br />
|
||||
<label><strong>Author: </strong><input type="text" name="author" value="<?=$LoggedUser['Username']?>" /></label>
|
||||
<br /><br />
|
||||
<div class="field_div" id="cl_message">
|
||||
<span class="label">Commit message:</span><br />
|
||||
<textarea name="message" /></textarea>
|
||||
</div>
|
||||
<div class="field_div" id="cl_author">
|
||||
<span class="label">Author:</span><br />
|
||||
<input type="text" name="author" value="<?=$LoggedUser['Username']?>" />
|
||||
</div>
|
||||
<div class="submit_div" id="cl_submit">
|
||||
<input type="submit" value="Submit" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<? }
|
||||
|
||||
foreach ($ChangeLog as $Change) { ?>
|
||||
<div class="box">
|
||||
<div class="box2">
|
||||
<div class="head">
|
||||
<span style="float: left;"><?=$Change['Time']?> by <?=$Change['Author']?></span>
|
||||
<span><?=$Change['Time']?> by <?=$Change['Author']?></span>
|
||||
<? if ($CanEdit) { ?>
|
||||
<span style="float: right;">
|
||||
<form id="delete_<?=$Change['ID']?>" method="POST">
|
||||
@ -81,7 +84,6 @@
|
||||
<a href="#" onclick="$('#delete_<?=$Change['ID']?>').raw().submit(); return false;" class="brackets">Delete</a>
|
||||
</span>
|
||||
<? } ?>
|
||||
<br />
|
||||
</div>
|
||||
<div class="pad">
|
||||
<?=$Change['Message']?>
|
||||
@ -89,5 +91,4 @@
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -33,7 +33,7 @@
|
||||
<? } if (check_perms('users_mod') || $LoggedUser['ExtraClasses'][DELTA_TEAM]) { ?>
|
||||
<tr><td><a href="tools.php?action=label_aliases">Label aliases</a></td></tr>
|
||||
<? } if (check_perms('users_mod')) { ?>
|
||||
<tr><td><a href="tools.php?action=change_log">Change Log</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=change_log">Change log</a></td></tr>
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -364,6 +364,13 @@ p.min_padding {
|
||||
border: 1px solid #65430F;
|
||||
}
|
||||
|
||||
.box2 {
|
||||
font-size: 8pt;
|
||||
background-color: #DCB881;
|
||||
border: 1px solid #65430F;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.pad h3, .pad h4, .padbox h3, .padbox h4 {
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
@ -809,3 +816,11 @@ ul .invitetree {
|
||||
.brackets:before, .brackets:after {
|
||||
color: #492802;
|
||||
}
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
@ -166,7 +166,8 @@ select {
|
||||
}
|
||||
|
||||
.main_column .pad,
|
||||
.sidebar .pad {
|
||||
.sidebar .pad,
|
||||
.box2 .pad {
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
@ -511,7 +512,8 @@ margin-left:20px;
|
||||
z-index:3;
|
||||
}
|
||||
|
||||
#content .box h2 {
|
||||
#content .box h2,
|
||||
#content .box2 h2 {
|
||||
background: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@ -988,14 +990,16 @@ strong.quoteheader{color: #878787;}
|
||||
}
|
||||
|
||||
.sidebar .box .head,
|
||||
.main_column .box .head {
|
||||
.main_column .box .head,
|
||||
.box2 .head {
|
||||
background-color: #212121;
|
||||
padding: 10px !important;
|
||||
border-bottom: 1px solid #1a1a1a;
|
||||
}
|
||||
|
||||
.sidebar .box,
|
||||
.main_column .box {
|
||||
.main_column .box,
|
||||
.box2 {
|
||||
background-color: #212121;
|
||||
border: 1px solid #1a1a1a;
|
||||
margin: 0 0 20px 0;
|
||||
@ -2000,3 +2004,11 @@ tr.torrent .bookmark > a:after { content:""; }
|
||||
.group_image + .group_info { margin: 0; padding: 0 5px; display: table-cell; vertical-align: middle; height: 90px; }
|
||||
#torrents .group_image + .group_info { width: 450px; }
|
||||
#top10 .group_image + .group_info { width: 585px; }
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
@ -493,6 +493,13 @@ p.min_padding {
|
||||
border: 1px solid #303030;
|
||||
}
|
||||
|
||||
.box2 {
|
||||
font-size: 8pt;
|
||||
background-color: #282828;
|
||||
border: 1px solid #303030;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.pad h3,.pad h4,.padbox h3,.padbox h4 {
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
@ -907,3 +914,11 @@ tr.torrent .bookmark > a:after { color:#999; }
|
||||
.top10_quantity_links .brackets:after {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
@ -376,6 +376,13 @@ p.min_padding {
|
||||
border: 1px solid #666666;
|
||||
}
|
||||
|
||||
.box2 {
|
||||
margin-bottom: 10px;
|
||||
font-size: 8pt;
|
||||
background-color: #EAEAEA;
|
||||
border: 1px solid #666666;
|
||||
}
|
||||
|
||||
.pad h3, .pad h4, .padbox h3, .padbox h4 {
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
@ -784,3 +791,11 @@ tr.torrent .bookmark > a:before {
|
||||
tr.torrent .bookmark > a:after {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
@ -353,6 +353,13 @@ p.min_padding {
|
||||
border: 1px solid #666666;
|
||||
}
|
||||
|
||||
.box2 {
|
||||
font-size: 8pt;
|
||||
background-color: #EAEAEA;
|
||||
border: 1px solid #666666;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.pad h3, .pad h4, .padbox h3, .padbox h4 {
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
@ -736,3 +743,11 @@ ul .invitetree {
|
||||
z-index:1002;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ input#file, input[type="file"]{color:#000}
|
||||
textarea#quickpost{margin:0; padding:0}
|
||||
|
||||
/* GENERAL */
|
||||
.box, #content table tr td{background: #373737; margin-bottom: 15px;}
|
||||
.box, .box2, #content table tr td{background: #373737; margin-bottom: 15px;}
|
||||
.pad{padding: 10px;}
|
||||
|
||||
.sidebar .box{position:relative}
|
||||
@ -554,3 +554,11 @@ tr.torrent .bookmark > a:after { content: ""; }
|
||||
.group_image + .group_info { margin: 0; padding: 0 5px; display: table-cell; vertical-align: middle; height: 90px; }
|
||||
#torrents .group_image + .group_info { width: 520px; }
|
||||
#top10 .group_image + .group_info { width: 585px; }
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ input#file, input[type="file"]{color:#fff}
|
||||
textarea#quickpost{margin:0; padding:0}
|
||||
|
||||
/* GENERAL */
|
||||
.box, #content table tr td{background:#373737; margin-bottom:15px}
|
||||
.box, .box2, #content table tr td{background:#373737; margin-bottom:15px}
|
||||
.pad{padding:10px}
|
||||
|
||||
.sidebar .box{position:relative}
|
||||
@ -477,3 +477,11 @@ h3{margin:10px 0}
|
||||
.group_image + .group_info { margin: 0; padding: 0 5px; display: table-cell; vertical-align: middle; height: 90px; }
|
||||
#torrents .group_image + .group_info { width: 520px; }
|
||||
#top10 .group_image + .group_info { width: 585px; }
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
@ -502,7 +502,7 @@ ul.collage_images li a:hover img {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
table[width="100%"],.box,.torrent_table,#log_table,#request_table,#collages,.forum_index,table.border,.linkbox+table,form#messageform table ,.main_column table ,form[action="user.php"] table,table.staff,#userhistory table {
|
||||
table[width="100%"],.box,.box2,.torrent_table,#log_table,#request_table,#collages,.forum_index,table.border,.linkbox+table,form#messageform table ,.main_column table ,form[action="user.php"] table,table.staff,#userhistory table {
|
||||
margin-bottom: 20px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
@ -1337,3 +1337,11 @@ form.manage_form[name=friends] .left input[type=submit] {
|
||||
.group_image + .group_info { margin: 0; padding: 0 5px; display: table-cell; vertical-align: middle; height: 90px; }
|
||||
#torrents .group_image + .group_info { width: 450px; }
|
||||
#top10 .group_image + .group_info { width: 585px; }
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
@ -96,7 +96,8 @@ h1 a:hover, h2 a:hover, h3 a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.box h1, .box h2, .box h3, .box h4 {
|
||||
.box h1, .box h2, .box h3, .box h4
|
||||
.box2 h1, .box2 h2, .box2 h3, .box2 h4 {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
@ -524,6 +525,12 @@ p.min_padding {
|
||||
background-color: #F7F6F2;
|
||||
}
|
||||
|
||||
.box2 {
|
||||
font-size: 10pt;
|
||||
background-color: #F7F6F2;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.pad h3, .pad h4, .padbox h3, .padbox h4 {
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
@ -1068,3 +1075,11 @@ tr.torrent .bookmark > a:after {
|
||||
#userinfo_username .brackets:after {
|
||||
content: "]";
|
||||
}
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
@ -171,6 +171,7 @@ select {
|
||||
|
||||
.main_column .pad,
|
||||
.sidebar .pad,
|
||||
.box2 .pad,
|
||||
#blog .pad {
|
||||
padding: 10px !important;
|
||||
}
|
||||
@ -1131,6 +1132,7 @@ tr.torrent .bookmark > a:after {
|
||||
|
||||
.sidebar .box .head,
|
||||
.main_column .box .head,
|
||||
.box2 .head,
|
||||
#blog .box .head {
|
||||
background-color: #f0f0f0;
|
||||
padding: 10px !important;
|
||||
@ -1150,7 +1152,8 @@ tr.torrent .bookmark > a:after {
|
||||
|
||||
.sidebar .box,
|
||||
.main_column .box:not(.forum_post),
|
||||
#blog .box {
|
||||
#blog .box,
|
||||
.box2 {
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #dcdcdc;
|
||||
margin: 0 0 20px 0;
|
||||
@ -2044,3 +2047,11 @@ tr.torrent .bookmark > a:after {
|
||||
background-size: 90px;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
@ -404,12 +404,12 @@ textarea {
|
||||
* html .main_column {
|
||||
overflow-x:hidden;
|
||||
}
|
||||
.box {
|
||||
.box, .box2 {
|
||||
border-bottom:1px solid #eee;
|
||||
margin-bottom:20px;
|
||||
padding-bottom:20px;
|
||||
}
|
||||
.box:last-child {
|
||||
.box:last-child, .box2:last-child {
|
||||
border-bottom:0;
|
||||
}
|
||||
.head strong {
|
||||
@ -778,3 +778,15 @@ tr.torrent .bookmark > a:after { content: ""; }
|
||||
.top10_quantity_links .brackets:after {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.field_div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.edit_changelog textarea {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.field_div#cl_message {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user