mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 02:21:36 +00:00
Empty commit
This commit is contained in:
parent
ac26edc0ca
commit
cae775e7e2
@ -106,7 +106,13 @@
|
||||
<div title="<?=$TorrentTags->title()?>" class="<?=Format::css_category($GroupCategoryID)?> <?=$TorrentTags->css_name()?>"></div>
|
||||
</td>
|
||||
<td colspan="5">
|
||||
<strong><?=$DisplayName?></strong> <?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>
|
||||
<strong><?=$DisplayName?></strong>
|
||||
<? if (Bookmarks::has_bookmarked('torrent', $GroupID)) {
|
||||
echo "<a style = \"float: right;\" href=\"#\" id=\"bookmarklink_torrent_$GroupID\" class=\"remove_bookmark brackets\" title=\"Unbookmark\" onclick=\"Unbookmark('torrent',$GroupID,'Bookmark');return false;\">Unbookmark</a>";
|
||||
} else {
|
||||
echo "<a style = \"float: right;\" href=\"#\" id=\"bookmarklink_torrent_$GroupID\" class=\"add_bookmark brackets\" title=\"Bookmark\" onclick=\"Bookmark('torrent',$GroupID,'Unbookmark');return false;\">Bookmark</a>";
|
||||
} ?>
|
||||
<?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>
|
||||
<div class="tags"><?=$TorrentTags->format()?></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
100
sections/comments/collagecomments.php
Normal file
100
sections/comments/collagecomments.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?
|
||||
/*
|
||||
* $_REQUEST['type']:
|
||||
* created = comments left on one's collages
|
||||
* contributed = comments left on collages one contributed to
|
||||
* * = one's request comments
|
||||
*/
|
||||
|
||||
$Mode = 'normal';
|
||||
|
||||
$ExtraJoin = $Conditions = '';
|
||||
$Conditions = "c.Deleted = '0' AND ";
|
||||
if (!empty($_REQUEST['type'])) {
|
||||
if ($_REQUEST['type'] == 'created') {
|
||||
$Conditions .= "c.UserID = $UserID AND cc.UserID != $UserID";
|
||||
$Title = 'Comments left on collages ' . ($Self ? 'you' : $Username) . ' created';
|
||||
$Header = 'Comments left on collages ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false)) . ' created';
|
||||
$Mode = 'created';
|
||||
} elseif ($_REQUEST['type'] == 'contributed') {
|
||||
$Conditions .= "IF(c.CategoryID = " . array_search('Artists', $CollageCats) . ", ca.ArtistID, ct.GroupID) IS NOT NULL AND cc.UserID != $UserID";
|
||||
$ExtraJoin .=
|
||||
"LEFT JOIN collages_torrents as ct ON ct.CollageID = c.ID AND ct.UserID = $UserID
|
||||
LEFT JOIN collages_artists as ca ON ca.CollageID = c.ID AND ca.UserID = $UserID";
|
||||
$Title = 'Comments left on collages ' . ($Self ? 'you\'ve' : $Username . ' has') . ' contributed to';
|
||||
$Header = 'Comments left on collages ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false).' has') . ' contributed to';
|
||||
$Mode = 'contributed';
|
||||
}
|
||||
}
|
||||
if (!isset($Title)) {
|
||||
$Conditions .= "cc.UserID = $UserID";
|
||||
$Title = 'Collage comments made by ' . ($Self ? 'you' : $Username);
|
||||
$Header = 'Collage comments made by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
|
||||
}
|
||||
|
||||
$Comments = $DB->query("
|
||||
SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
cc.UserID,
|
||||
c.ID as CollageID,
|
||||
c.Name,
|
||||
cc.ID as PostID,
|
||||
cc.Body,
|
||||
cc.Time
|
||||
FROM collages as c
|
||||
JOIN collages_comments as cc ON cc.CollageID = c.ID
|
||||
$ExtraJoin
|
||||
WHERE $Conditions
|
||||
GROUP BY cc.ID
|
||||
ORDER BY cc.ID DESC
|
||||
LIMIT $Limit;");
|
||||
$Count = $DB->record_count();
|
||||
|
||||
$DB->query("SELECT FOUND_ROWS()");
|
||||
list($Results) = $DB->next_record();
|
||||
$Pages = Format::get_pages($Page, $Results, $PerPage, 11);
|
||||
|
||||
View::show_header($Title,'bbcode');
|
||||
$DB->set_query_id($Comments);
|
||||
|
||||
$Links = array();
|
||||
$BaseLink = 'comments.php?action=collages' . (!$Self ? '&id='.$UserID : '');
|
||||
if ($Mode != 'normal') {
|
||||
$Links[] = '<a href="' . $BaseLink . '" class="brackets">Display collage comments ' . ($Self ? 'you\'ve' : $Username . ' has') . ' made</a>';
|
||||
}
|
||||
if ($Mode != 'created') {
|
||||
$Links[] = '<a href="' . $BaseLink . '&type=created" class="brackets">Display comments left on ' . ($Self ? 'your collages' : 'collages created by ' .$Username) . '</a>';
|
||||
}
|
||||
if ($Mode != 'contributed') {
|
||||
$Links[] = '<a href="' . $BaseLink . '&type=contributed" class="brackets">Display comments left on collages ' . ($Self ? 'you\'ve' : $Username . ' has') . ' contributed to</a>';
|
||||
}
|
||||
$Links = implode(' ', $Links);
|
||||
|
||||
?><div class="thin">
|
||||
<div class="header">
|
||||
<h2><?=$Header?></h2>
|
||||
<? if ($Links !== '') { ?>
|
||||
<div class="linkbox">
|
||||
<?=$Links?>
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
<div class="linkbox">
|
||||
<?=$Pages?>
|
||||
</div>
|
||||
<?
|
||||
if ($Count > 0) {
|
||||
while (list($UserID, $CollageID, $Name, $PostID, $Body, $AddedTime) = $DB->next_record()) {
|
||||
$permalink = "collages.php?action=comments&collageid=$CollageID&postid=$PostID#post$PostID";
|
||||
$postheader = " on <a href=\"collages.php?id=$CollageID\">$Name</a>";
|
||||
comment_body($UserID, $PostID, $postheader, $permalink, $Body, 0, $AddedTime, 0);
|
||||
}
|
||||
} else { ?>
|
||||
<div class="center">No results.</div>
|
||||
<? } ?>
|
||||
<div class="linkbox">
|
||||
<?=$Pages?>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();
|
@ -56,6 +56,9 @@
|
||||
case 'artists':
|
||||
require (SERVER_ROOT.'/sections/comments/artistcomments.php');
|
||||
break;
|
||||
case 'collages':
|
||||
require (SERVER_ROOT.'/sections/comments/collagecomments.php');
|
||||
break;
|
||||
case 'torrents':
|
||||
case 'my_torrents':
|
||||
default:
|
||||
|
@ -12,7 +12,7 @@
|
||||
$MyTorrents = false;
|
||||
}
|
||||
|
||||
$OtherLink = '<a href="comments.php?action=requests" class="brackets">Request comments</a> <a href="comments.php?action=artists" class="brackets">Artist comments</a><br/>';
|
||||
$OtherLink = '<a href="comments.php?action=artists" class="brackets">Artist comments</a> <a href="comments.php?action=collages" class="brackets">Collage comments</a> <a href="comments.php?action=requests" class="brackets">Request comments</a><br/>';
|
||||
|
||||
if ($MyTorrents) {
|
||||
$Conditions = "WHERE t.UserID = $UserID AND tc.AuthorID != t.UserID AND tc.AddedTime > t.Time";
|
||||
|
@ -15,6 +15,9 @@
|
||||
$DB->query("SELECT COUNT(ID) FROM artist_comments WHERE AuthorID='$UserID'");
|
||||
list($NumArtistComments) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM collages_comments WHERE UserID='$UserID'");
|
||||
list($NumCollageComments) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM requests_comments WHERE AuthorID='$UserID'");
|
||||
list($NumRequestComments) = $DB->next_record();
|
||||
|
||||
@ -60,6 +63,11 @@
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Artist comments: <?=number_format($NumArtistComments)?>
|
||||
<? if ($Override = check_paranoia_here('torrentcomments')) { ?>
|
||||
<a href="comments.php?id=<?=$UserID?>&action=artists" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Collage comments: <?=number_format($NumCollageComments)?>
|
||||
<? if ($Override = check_paranoia_here('torrentcomments')) { ?>
|
||||
<a href="comments.php?id=<?=$UserID?>&action=collages" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Request comments: <?=number_format($NumRequestComments)?>
|
||||
|
@ -62,14 +62,14 @@
|
||||
<form class="search_form" name="articles" action="wiki.php" method="get">
|
||||
<input type="hidden" name="action" value="search" />
|
||||
<input
|
||||
onfocus="if (this.value == 'Search Articles') this.value='';"
|
||||
onblur="if (this.value == '') this.value='Search Articles';"
|
||||
value="Search Articles" type="text" name="search" size="20"
|
||||
onfocus="if (this.value == 'Search articles') this.value='';"
|
||||
onblur="if (this.value == '') this.value='Search articles';"
|
||||
value="Search articles" type="text" name="search" size="20"
|
||||
/>
|
||||
<input value="Search" type="submit" class="hidden" />
|
||||
</form>
|
||||
<br style="line-height: 10px;" />
|
||||
<strong><a href="wiki.php?action=browse" class="brackets">Browse articles</a></strong>
|
||||
<a href="wiki.php?action=browse" class="brackets">Browse articles</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
@ -121,9 +121,9 @@
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="hidden" name="article" value="<?=$ArticleID?>" />
|
||||
<input
|
||||
onfocus="if (this.value == 'Add Alias') this.value='';"
|
||||
onblur="if (this.value == '') this.value='Add Alias';"
|
||||
value="Add Alias" type="text" name="alias" size="20"
|
||||
onfocus="if (this.value == 'Add alias') this.value='';"
|
||||
onblur="if (this.value == '') this.value='Add alias';"
|
||||
value="Add alias" type="text" name="alias" size="20"
|
||||
/>
|
||||
<input type="submit" value="+" />
|
||||
</form>
|
||||
|
@ -1,14 +1,14 @@
|
||||
(function($) {
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
// If the custom stylesheet field is empty, select the current style from the previews
|
||||
if(!$('input#styleurl').val()){
|
||||
var radiobutton = $('input[name="stylesheet_gallery"][value="'+$('select#stylesheet').val()+'"]');
|
||||
if (!$('input#styleurl').val()){
|
||||
var radiobutton = $('input[name="stylesheet_gallery"][value="' + $('select#stylesheet').val() + '"]');
|
||||
radiobutton.click();
|
||||
$('.preview_wrapper').removeClass('selected');
|
||||
radiobutton.parent().parent().addClass('selected');
|
||||
}
|
||||
// If an overlay is clicked, select the right item in the dropdown and clear the custom css field
|
||||
// If an overlay is clicked, select the right item in the drop-down and clear the custom CSS field
|
||||
$('div.preview_image').click(function() {
|
||||
$('.preview_wrapper').removeClass('selected');
|
||||
var parent = $(this).parent();
|
||||
@ -22,9 +22,9 @@
|
||||
$('input[name="stylesheet_gallery"]').change(function() {
|
||||
$(this).parent().parent().find('div.preview_image').click();
|
||||
})
|
||||
// If the dropdown is changed, select the appropriate item in gallery, clear the custom CSS field
|
||||
// If the drop-down is changed, select the appropriate item in gallery, clear the custom CSS field
|
||||
$('select#stylesheet').change(function() {
|
||||
var radiobutton = $('input[name="stylesheet_gallery"][value="'+$(this).val()+'"]');
|
||||
var radiobutton = $('input[name="stylesheet_gallery"][value="' + $(this).val() + '"]');
|
||||
radiobutton.prop('checked', true);
|
||||
$('.preview_wrapper').removeClass('selected');
|
||||
radiobutton.parent().parent().addClass('selected');
|
||||
@ -37,7 +37,7 @@
|
||||
})
|
||||
$('.preview_wrapper').removeClass('selected');
|
||||
})
|
||||
// If the input is empty, select appropriate gallery item again by the dropdown
|
||||
// If the input is empty, select appropriate gallery item again by the drop-down
|
||||
$('input#styleurl').keyup(function() {
|
||||
if (!$(this).val()){
|
||||
$('select#stylesheet').change();
|
||||
|
Loading…
Reference in New Issue
Block a user