From cae775e7e27882e672acde54527d9289c116510b Mon Sep 17 00:00:00 2001 From: Git Date: Fri, 7 Jun 2013 08:00:54 +0000 Subject: [PATCH] Empty commit --- sections/collages/torrent_collage.php | 8 ++- sections/comments/collagecomments.php | 100 ++++++++++++++++++++++++++ sections/comments/index.php | 3 + sections/comments/torrentcomments.php | 2 +- sections/user/community_stats.php | 8 +++ sections/wiki/article.php | 14 ++-- static/functions/cssgallery.js | 14 ++-- 7 files changed, 133 insertions(+), 16 deletions(-) create mode 100644 sections/comments/collagecomments.php diff --git a/sections/collages/torrent_collage.php b/sections/collages/torrent_collage.php index 33acf607..7e29daa4 100644 --- a/sections/collages/torrent_collage.php +++ b/sections/collages/torrent_collage.php @@ -106,7 +106,13 @@
- + + Unbookmark"; + } else { + echo "Bookmark"; + } ?> +
format()?>
diff --git a/sections/comments/collagecomments.php b/sections/comments/collagecomments.php new file mode 100644 index 00000000..70da9197 --- /dev/null +++ b/sections/comments/collagecomments.php @@ -0,0 +1,100 @@ +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[] = 'Display collage comments ' . ($Self ? 'you\'ve' : $Username . ' has') . ' made'; +} +if ($Mode != 'created') { + $Links[] = 'Display comments left on ' . ($Self ? 'your collages' : 'collages created by ' .$Username) . ''; +} +if ($Mode != 'contributed') { + $Links[] = 'Display comments left on collages ' . ($Self ? 'you\'ve' : $Username . ' has') . ' contributed to'; +} +$Links = implode(' ', $Links); + +?>
+
+

+ + + +
+ + 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 $Name"; + comment_body($UserID, $PostID, $postheader, $permalink, $Body, 0, $AddedTime, 0); + } +} else { ?> +
No results.
+ + +
+Request comments Artist comments
'; +$OtherLink = 'Artist comments Collage comments Request comments
'; if ($MyTorrents) { $Conditions = "WHERE t.UserID = $UserID AND tc.AuthorID != t.UserID AND tc.AddedTime > t.Time"; diff --git a/sections/user/community_stats.php b/sections/user/community_stats.php index 02c20265..fc85058f 100644 --- a/sections/user/community_stats.php +++ b/sections/user/community_stats.php @@ -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 @@ >Artist comments: View + + + >Collage comments: + + View >Request comments: diff --git a/sections/wiki/article.php b/sections/wiki/article.php index 93e08d9b..6e5f6eb2 100644 --- a/sections/wiki/article.php +++ b/sections/wiki/article.php @@ -62,14 +62,14 @@

- Browse articles + Browse articles
@@ -121,9 +121,9 @@ diff --git a/static/functions/cssgallery.js b/static/functions/cssgallery.js index 77e1a60b..ce6af752 100644 --- a/static/functions/cssgallery.js +++ b/static/functions/cssgallery.js @@ -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();