mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 04:01:35 +00:00
Empty commit
This commit is contained in:
parent
c90667b447
commit
446205141d
@ -90,14 +90,14 @@ public static function create_event($Title, $Body, $Category, $Importance, $Team
|
||||
$StartDate = db_string($StartDate);
|
||||
$EndDate = db_string($EndDate);
|
||||
|
||||
// $QueryID = G::$DB->get_query_id();
|
||||
$QueryID = G::$DB->get_query_id();
|
||||
G::$DB->query("
|
||||
INSERT INTO calendar
|
||||
(Title, Body, Category, Importance, Team, StartDate, EndDate, AddedBy)
|
||||
VALUES
|
||||
('$Title', '$Body', '$Category', '$Importance', '$Team', '$StartDate', '$EndDate', '$UserID')");
|
||||
// G::$DB->set_query_id($QueryID);
|
||||
send_irc("PRIVMSG " . ADMIN_CHAN . " :New calendar event created! Event: $Title; Starts: $StartDate; Ends: $EndDate.");
|
||||
G::$DB->set_query_id($QueryID);
|
||||
send_irc("PRIVMSG " . ADMIN_CHAN . " :!mod New calendar event created! Event: $Title; Starts: $StartDate; Ends: $EndDate.");
|
||||
}
|
||||
|
||||
public static function update_event($ID, $Title, $Body, $Category, $Importance, $Team, $StartDate, $EndDate = null) {
|
||||
|
@ -185,7 +185,7 @@ public static function process($Url, $Thumb = false) {
|
||||
}
|
||||
|
||||
if (check_perms('site_proxy_images')) {
|
||||
$ProcessedUrl = self::proxy_url($ProcessedUrl);
|
||||
// $ProcessedUrl = self::proxy_url($ProcessedUrl);
|
||||
}
|
||||
|
||||
self::store($Url . ($Thumb ? '_thumb' : ''), $ProcessedUrl);
|
||||
|
@ -5,9 +5,7 @@ class Top10View {
|
||||
public static function render_linkbox($Selected) { ?>
|
||||
<div class="linkbox">
|
||||
<a href="top10.php?type=torrents" class="brackets"><?=self::get_selected_link("Torrents", $Selected == "torrents")?></a>
|
||||
<? if (check_perms("users_mod")) { ?>
|
||||
<a href="top10.php?type=artists" class="brackets"><?=self::get_selected_link("Artists", $Selected == "artists")?></a>
|
||||
<? } ?>
|
||||
<a href="top10.php?type=users" class="brackets"><?=self::get_selected_link("Users", $Selected == "users")?></a>
|
||||
<a href="top10.php?type=tags" class="brackets"><?=self::get_selected_link("Tags", $Selected == "tags")?></a>
|
||||
<a href="top10.php?type=votes" class="brackets"><?=self::get_selected_link("Favorites", $Selected == "votes")?></a>
|
||||
|
@ -1,5 +1,8 @@
|
||||
CHANGELOG
|
||||
|
||||
2013-09-28 by Ajax
|
||||
Added top artists data to top10 page using last.fm chart data
|
||||
|
||||
2013-09-22 by Ajax
|
||||
Show tags on collage and bookmark tooltips
|
||||
|
||||
|
@ -1,12 +1,9 @@
|
||||
<?
|
||||
if (!check_perms("users_mod")) {
|
||||
error(404);
|
||||
}
|
||||
define('LIMIT', 100);
|
||||
|
||||
//$Limit = isset($_GET['limit']) ? intval($_GET['limit']) : 100;
|
||||
//$Limit = in_array($Limit, array(100, 250, 500)) ? $Limit : 100;
|
||||
|
||||
$Limit = 100;
|
||||
|
||||
$Category = isset($_GET['category']) ? ($_GET['category']) : 'weekly';
|
||||
$Category = in_array($Category, array('all_time', 'weekly', 'hyped')) ? $Category : 'weekly';
|
||||
@ -17,10 +14,10 @@
|
||||
switch ($Category) {
|
||||
|
||||
case 'weekly':
|
||||
$Artists = json_decode(LastFM::get_weekly_artists($Limit), true)['artists']['artist'];
|
||||
$Artists = json_decode(LastFM::get_weekly_artists(LIMIT), true)['artists']['artist'];
|
||||
break;
|
||||
case 'hyped':
|
||||
$Artists = json_decode(LastFM::get_hyped_artists($Limit), true)['artists']['artist'];
|
||||
$Artists = json_decode(LastFM::get_hyped_artists(LIMIT), true)['artists']['artist'];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -30,7 +27,7 @@
|
||||
?>
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
<h2>Top Artists</h2>
|
||||
<h2>Top <?=LIMIT?> Artists</h2>
|
||||
<? Top10View::render_linkbox("artists"); ?>
|
||||
</div>
|
||||
<? Top10View::render_artist_links($Category, $View); ?>
|
||||
|
@ -617,7 +617,9 @@ function check_paranoia_here($Setting) {
|
||||
<tr>
|
||||
<? foreach ($RecentSnatches as $RS) { ?>
|
||||
<td>
|
||||
<a href="torrents.php?id=<?=$RS['ID']?>" title="<?=display_str($RS['Artist'])?><?=display_str($RS['Name'])?>"><img src="<?=ImageTools::process($RS['WikiImage'], true)?>" alt="<?=display_str($RS['Artist'])?><?=display_str($RS['Name'])?>" width="107" /></a>
|
||||
<a href="torrents.php?id=<?=$RS['ID']?>" title="<?=display_str($RS['Artist'])?><?=display_str($RS['Name'])?>">
|
||||
<img class="tooltip" title="<?=display_str($RS['Artist'])?><?=display_str($RS['Name'])?>" src="<?=ImageTools::process($RS['WikiImage'], true)?>" alt="<?=display_str($RS['Artist'])?><?=display_str($RS['Name'])?>" width="107" />
|
||||
</a>
|
||||
</td>
|
||||
<? } ?>
|
||||
</tr>
|
||||
@ -660,7 +662,9 @@ function check_paranoia_here($Setting) {
|
||||
<tr>
|
||||
<? foreach ($RecentUploads as $RU) { ?>
|
||||
<td>
|
||||
<a href="torrents.php?id=<?=$RU['ID']?>" title="<?=$RU['Artist']?><?=$RU['Name']?>"><img src="<?=ImageTools::process($RU['WikiImage'], true)?>" alt="<?=$RU['Artist']?><?=$RU['Name']?>" width="107" /></a>
|
||||
<a href="torrents.php?id=<?=$RU['ID']?>">
|
||||
<img class="tooltip" title="<?=$RU['Artist']?><?=$RU['Name']?>" src="<?=ImageTools::process($RU['WikiImage'], true)?>" alt="<?=$RU['Artist']?><?=$RU['Name']?>" width="107" />
|
||||
</a>
|
||||
</td>
|
||||
<? } ?>
|
||||
</tr>
|
||||
@ -713,7 +717,9 @@ function check_paranoia_here($Setting) {
|
||||
$Name .= $GroupName;
|
||||
?>
|
||||
<td>
|
||||
<a href="torrents.php?id=<?=$GroupID?>" title="<?=$Name?>"><img src="<?=ImageTools::process($C['WikiImage'], true)?>" alt="<?=$Name?>" width="107" /></a>
|
||||
<a href="torrents.php?id=<?=$GroupID?>" title="<?=$Name?>">
|
||||
<img class="tooltip" title="<?=$Name?>" src="<?=ImageTools::process($C['WikiImage'], true)?>" alt="<?=$Name?>" width="107" />
|
||||
</a>
|
||||
</td>
|
||||
<? } ?>
|
||||
</tr>
|
||||
@ -721,32 +727,6 @@ function check_paranoia_here($Setting) {
|
||||
<?
|
||||
$FirstCol = false;
|
||||
}
|
||||
?>
|
||||
<? if (!empty($LastFMUsername) && check_perms("users_mod")) {
|
||||
$TopArtists = json_decode(LastFM::get_top_artists($LastFMUsername, 15), true);
|
||||
$TopArtists = $TopArtists['topartists']['artist'];
|
||||
?>
|
||||
<table class="layout recent" id="top_artists" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr class="colhead">
|
||||
<td colspan="5">
|
||||
<a href="#top_artists" class="brackets anchor">#</a> Top Artists
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<? for ($i = 0; $i < 5; $i++) {
|
||||
$Name = $TopArtists[$i]['name'];
|
||||
$Image = $TopArtists[$i]['image'][2]['#text'];
|
||||
$Url = "artist.php?artistname=" . $Name;
|
||||
?>
|
||||
<td>
|
||||
<a href="<?=$Url?>" title="<?=$Name?>">
|
||||
<img src="<?=ImageTools::process($Image, true)?>" alt="<?=$RU['Name']?>" width="107" />
|
||||
</a>
|
||||
</td>
|
||||
<? } ?>
|
||||
</tr>
|
||||
</table>
|
||||
<? }
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user