From 1c45369828af80ddfbdf7d9081e50d09c0587a83 Mon Sep 17 00:00:00 2001 From: Git Date: Fri, 20 Sep 2013 08:00:56 +0000 Subject: [PATCH] Empty commit --- classes/calendar.class.php | 27 +-- classes/calendarview.class.php | 4 +- classes/donations.class.php | 2 +- classes/rules.class.php | 88 +++++++++- classes/subscriptions.class.php | 161 ++++++++++++------ sections/inbox/conversation.php | 38 ++--- sections/requests/requests.php | 2 +- sections/rules/chat.php | 72 +------- sections/rules/ratio.php | 1 + sections/tools/data/bitcoin_unproc.php | 2 +- .../managers/ajax_get_calendar_event.php | 6 +- sections/top10/artists.php | 6 +- static/functions/calendar.js | 12 -- 13 files changed, 243 insertions(+), 178 deletions(-) diff --git a/classes/calendar.class.php b/classes/calendar.class.php index 397cc221..260141d3 100644 --- a/classes/calendar.class.php +++ b/classes/calendar.class.php @@ -1,6 +1,6 @@ "IRC Meeting", "IRC Brainstorm", "Poll Deadline", "Feature Release", "Blog Post", "Announcement", "Featured Album", "Product Release", "Staff Picks", "Forum Brainstorm", "Forum Discussion", "Promotion"); + public static $Categories = array(1 => "IRC Meeting", "IRC Brainstorm", "Poll Deadline", "Feature Release", "Blog Post", "Announcement", "Featured Album", "Product Release", "Staff Picks", "Forum Brainstorm", "Forum Discussion", "Promotion", "Absence", "Task"); public static $Importances = array(1 => "Critical", "Important", "Average", "Meh"); public static $Colors = array( "Critical" => "red", @@ -36,8 +36,8 @@ public static function get_events($Month, $Year) { $Month = $Date['mon']; $Year = $Date['year']; } - $Month = (int) $Month; - $Year = (int) $Year; + $Month = (int)$Month; + $Year = (int)$Year; $TeamsSQL = self::get_teams_query(); @@ -58,7 +58,7 @@ public static function get_events($Month, $Year) { } public static function get_event($ID) { - $ID = (int) $ID; + $ID = (int)$ID; if (empty($ID)) { error("Invalid ID"); } @@ -83,10 +83,10 @@ public static function create_event($Title, $Body, $Category, $Importance, $Team } $Title = db_string($Title); $Body = db_string($Body); - $Category = (int) $Category; - $Importance = (int) $Importance; - $UserID = (int) $UserID; - $Team = (int) $Team; + $Category = (int)$Category; + $Importance = (int)$Importance; + $UserID = (int)$UserID; + $Team = (int)$Team; $StartDate = db_string($StartDate); $EndDate = db_string($EndDate); @@ -97,18 +97,19 @@ public static function create_event($Title, $Body, $Category, $Importance, $Team 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."); } public static function update_event($ID, $Title, $Body, $Category, $Importance, $Team, $StartDate, $EndDate = null) { if (!is_number($ID) || empty($Title) || empty($Body) || !is_number($Category) || !is_number($Importance) || !is_number($Team) || empty($StartDate)) { error("Error updating event"); } - $ID = (int) $ID; + $ID = (int)$ID; $Title = db_string($Title); $Body = db_string($Body); - $Category = (int) $Category; - $Importance = (int) $Importance; - $Team = (int) $Team; + $Category = (int)$Category; + $Importance = (int)$Importance; + $Team = (int)$Team; $StartDate = db_string($StartDate); $EndDate = db_string($EndDate); $QueryID = G::$DB->get_query_id(); @@ -128,7 +129,7 @@ public static function update_event($ID, $Title, $Body, $Category, $Importance, } public static function remove_event($ID) { - $ID = (int) $ID; + $ID = (int)$ID; if (!empty($ID)) { $QueryID = G::$DB->get_query_id(); G::$DB->query("DELETE FROM calendar WHERE ID = '$ID'"); diff --git a/classes/calendarview.class.php b/classes/calendarview.class.php index c6c2fdad..759d9521 100644 --- a/classes/calendarview.class.php +++ b/classes/calendarview.class.php @@ -29,7 +29,7 @@ public static function render_title($Month, $Year) { private static function get_events_on($Day, $Events) { // Linear search, Lol. $Results = array(); - foreach($Events as $Event) { + foreach ($Events as $Event) { if ($Event['StartDay'] == $Day || ($Event['StartDay'] <= $Day && $Event['EndDay'] >= $Day)) { $Results[] = $Event; } @@ -60,7 +60,7 @@ public static function render_calendar($Month, $Year, $Events) { ?> - + diff --git a/classes/donations.class.php b/classes/donations.class.php index 1ea7aad8..8863249e 100644 --- a/classes/donations.class.php +++ b/classes/donations.class.php @@ -50,7 +50,7 @@ public static function donate($UserID, $Args) { G::$DB->query("SELECT 1 FROM users_main WHERE ID = '$UserID' LIMIT 1"); if (G::$DB->has_results()) { G::$Cache->InternalCache = false; - foreach($Args as &$Arg) { + foreach ($Args as &$Arg) { $Arg = db_string($Arg); } extract($Args); diff --git a/classes/rules.class.php b/classes/rules.class.php index 304669cb..2fb4e2c1 100644 --- a/classes/rules.class.php +++ b/classes/rules.class.php @@ -7,7 +7,7 @@ class Rules { */ public static function display_golden_rules() { ?> - + +
    +
  1. + Many forums (Tutorials, The Library, etc.) have their own set of rules. Make sure you read and take note of these rules before you attempt to post in one of these forums. +
  2. +
  3. + Don't use all capital letters, excessive !!! (exclamation marks) or ??? (question marks). It seems like you're shouting! +
  4. +
  5. + No lame referral schemes. This includes freeipods.com, freepsps.com, or any other similar scheme in which the poster gets personal gain from users clicking a link. +
  6. +
  7. + No asking for money for any reason whatsoever. We don't know or care about your friend who lost everything, or dying relative who wants to enjoy their last few moments alive by being given lots of money. +
  8. +
  9. + Do not inappropriately advertise your uploads. In special cases, it is acceptable to mention new uploads in an approved thread (e.g. New Users — We'll Snatch Your First 100% FLAC), but be sure to carefully read the thread's rules before posting. It is also acceptable to discuss releases you have uploaded when conversing about the music itself. Blatant attempts to advertise your uploads outside of the appropriate forums or threads may result in a warning or the loss of forum privileges. +
  10. +
  11. + No posting music requests in forums. There's a request link at the top of the page; please use that instead. +
  12. +
  13. + No flaming; be pleasant and polite. Don't use offensive language, and don't be confrontational for the sake of confrontation. +
  14. +
  15. + Don't point out or attack other members' share ratios. A higher ratio does not make you better than someone else. +
  16. +
  17. + Try not to ask stupid questions. A stupid question is one that you could have found the answer to yourself with a little research, or one that you're asking in the wrong place. If you do the basic research suggested (i.e., read the rules/wiki) or search the forums and don't find the answer to your question, then go ahead and ask. Staff and First Line Support (FLS) are not here to hand-feed you the answers you could have found on your own with a little bit of effort. +
  18. +
  19. + Be sure you read all the sticky threads in a forum before you post. +
  20. +
  21. + Use descriptive and specific subject lines. This helps others decide whether your particular words of wisdom relate to a topic they care about. +
  22. +
  23. + Try not to post comments that don't add anything to the discussion. When you're just cruising through a thread in a leisurely manner, it's not too annoying to read through a lot of "hear, hear"'s and "I agree"'s. But if you're actually trying to find information, it's a pain in the neck. So save those one-word responses for threads that have degenerated to the point where none but true aficionados are following them any more. +

    + Or short: NO spamming +

    +
  24. +
  25. + Refrain from quoting excessively. When quoting someone, use only the portion of the quote that is absolutely necessary. This includes quoting pictures! +
  26. +
  27. + No posting of requests for serials or cracks. No links to warez or crack sites in the forums. +
  28. +
  29. + No political or religious discussions. These types of discussions lead to arguments and flaming users, something that will not be tolerated. The only exception to this rule is The Library forum, which exists solely for the purpose of intellectual discussion and civilized debate. +
  30. +
  31. + Don't waste other people's bandwidth by posting images of a large file size. +
  32. +
  33. + Be patient with newcomers. Once you have become an expert, it is easy to forget that you started out as a newbie too. +
  34. +
  35. + No requesting invites to any sites anywhere on the site or IRC. Invites may be offered in the invite forum, and nowhere else. +
  36. +
  37. + No language other than English is permitted in the forums. If we can't understand it, we can't moderate it. +
  38. +
  39. + Be cautious when posting mature content on the forums. All mature imagery must abide by the rules found here. Gratuitously sexual or violent content which falls outside of the allowable categories will result in a warning or worse. +
  40. +
  41. + Mature content in posts must be properly tagged. The correct format is as follows: [mature=description] ...content... [/mature], where "description" is a mandatory description of the post contents. Misleading or inadequate descriptions will be penalized. +
  42. +
  43. + Threads created for the exclusive purpose of posting mature imagery will be trashed. Mature content (including graphic album art) should be contextually relevant to the thread and/or forum you're posting in. Mature content is only allowed in: The Lounge, The Lounge +1, The Library, Music, Power Users, Elite, Torrent Masters, VIPs, Comics, Contests & Designs, The Laboratory. If you are in doubt about a post's appropriateness, send a Staff PM to the Forum Moderators and wait for a reply before proceeding. +
  44. +
+ - + delete_value('notify_quoted_' . $UserID); + G::$Cache->delete_value("notify_quoted_$UserID"); } G::$DB->set_query_id($QueryID); @@ -80,14 +80,19 @@ public static function subscribe($TopicID, $UserID = 0) { $UserSubscriptions = self::get_subscriptions(); $Key = self::has_subscribed($TopicID); if ($Key !== false) { - G::$DB->query('DELETE FROM users_subscriptions WHERE UserID = ' . db_string($UserID) . ' AND TopicID = ' . db_string($TopicID)); + G::$DB->query(' + DELETE FROM users_subscriptions + WHERE UserID = ' . db_string($UserID) . ' + AND TopicID = ' . db_string($TopicID)); unset($UserSubscriptions[$Key]); } else { - G::$DB->query("INSERT IGNORE INTO users_subscriptions (UserID, TopicID) VALUES ($UserID, " . db_string($TopicID) . ")"); + G::$DB->query(" + INSERT IGNORE INTO users_subscriptions (UserID, TopicID) + VALUES ($UserID, " . db_string($TopicID) . ")"); array_push($UserSubscriptions, $TopicID); } - G::$Cache->replace_value('subscriptions_user_' . $UserID, $UserSubscriptions, 0); - G::$Cache->delete_value('subscriptions_user_new_' . $UserID); + G::$Cache->replace_value("subscriptions_user_$UserID", $UserSubscriptions, 0); + G::$Cache->delete_value("subscriptions_user_new_$UserID"); G::$DB->set_query_id($QueryID); } @@ -106,14 +111,22 @@ public static function subscribe_comments($Page, $PageID, $UserID = 0) { $UserCommentSubscriptions = self::get_comment_subscriptions(); $Key = self::has_subscribed_comments($Page, $PageID); if ($Key !== false) { - G::$DB->query("DELETE FROM users_subscriptions_comments WHERE UserID = " . db_string($UserID) . " AND Page = '" . db_string($Page) . "' AND PageID = " . db_string($PageID)); + G::$DB->query(" + DELETE FROM users_subscriptions_comments + WHERE UserID = " . db_string($UserID) . " + AND Page = '" . db_string($Page) . "' + AND PageID = " . db_string($PageID)); unset($UserCommentSubscriptions[$Key]); } else { - G::$DB->query("INSERT IGNORE INTO users_subscriptions_comments (UserID, Page, PageID) VALUES ($UserID, '" . db_string($Page) . "', " . db_string($PageID) . ")"); + G::$DB->query(" + INSERT IGNORE INTO users_subscriptions_comments + (UserID, Page, PageID) + VALUES + ($UserID, '" . db_string($Page) . "', " . db_string($PageID) . ")"); array_push($UserCommentSubscriptions, array($Page, $PageID)); } - G::$Cache->replace_value('subscriptions_comments_user_' . $UserID, $UserCommentSubscriptions, 0); - G::$Cache->delete_value('subscriptions_comments_user_new_' . $UserID); + G::$Cache->replace_value("subscriptions_comments_user_$UserID", $UserCommentSubscriptions, 0); + G::$Cache->delete_value("subscriptions_comments_user_new_$UserID"); G::$DB->set_query_id($QueryID); } @@ -128,11 +141,14 @@ public static function get_subscriptions($UserID = 0) { $UserID = G::$LoggedUser['ID']; } $QueryID = G::$DB->get_query_id(); - $UserSubscriptions = G::$Cache->get_value('subscriptions_user_' . $UserID); + $UserSubscriptions = G::$Cache->get_value("subscriptions_user_$UserID"); if ($UserSubscriptions === false) { - G::$DB->query('SELECT TopicID FROM users_subscriptions WHERE UserID = ' . db_string($UserID)); + G::$DB->query(' + SELECT TopicID + FROM users_subscriptions + WHERE UserID = ' . db_string($UserID)); $UserSubscriptions = G::$DB->collect(0); - G::$Cache->cache_value('subscriptions_user_' . $UserID, $UserSubscriptions, 0); + G::$Cache->cache_value("subscriptions_user_$UserID", $UserSubscriptions, 0); } G::$DB->set_query_id($QueryID); return $UserSubscriptions; @@ -148,11 +164,14 @@ public static function get_comment_subscriptions($UserID = 0) { $UserID = G::$LoggedUser['ID']; } $QueryID = G::$DB->get_query_id(); - $UserCommentSubscriptions = G::$Cache->get_value('subscriptions_comments_user_' . $UserID); + $UserCommentSubscriptions = G::$Cache->get_value("subscriptions_comments_user_$UserID"); if ($UserCommentSubscriptions === false) { - G::$DB->query('SELECT Page, PageID FROM users_subscriptions_comments WHERE UserID = ' . db_string($UserID)); + G::$DB->query(' + SELECT Page, PageID + FROM users_subscriptions_comments + WHERE UserID = ' . db_string($UserID)); $UserCommentSubscriptions = G::$DB->to_array(false, MYSQLI_NUM); - G::$Cache->cache_value('subscriptions_comments_user_' . $UserID, $UserCommentSubscriptions, 0); + G::$Cache->cache_value("subscriptions_comments_user_$UserID", $UserCommentSubscriptions, 0); } G::$DB->set_query_id($QueryID); return $UserCommentSubscriptions; @@ -168,25 +187,27 @@ public static function has_new_subscriptions() { $NewSubscriptions = G::$Cache->get_value('subscriptions_user_new_' . G::$LoggedUser['ID']); if ($NewSubscriptions === false) { // forum subscriptions - G::$DB->query("SELECT COUNT(1) - FROM users_subscriptions AS s - LEFT JOIN forums_last_read_topics AS l ON l.UserID = s.UserID AND l.TopicID = s.TopicID - JOIN forums_topics AS t ON t.ID = s.TopicID - JOIN forums AS f ON f.ID = t.ForumID - WHERE " . Forums::user_forums_sql() . " - AND IF(t.IsLocked = '1' AND t.IsSticky = '0'" . ", t.LastPostID, IF(l.PostID IS NULL, 0, l.PostID)) < t.LastPostID - AND s.UserID = " . G::$LoggedUser['ID']); + G::$DB->query(" + SELECT COUNT(1) + FROM users_subscriptions AS s + LEFT JOIN forums_last_read_topics AS l ON l.UserID = s.UserID AND l.TopicID = s.TopicID + JOIN forums_topics AS t ON t.ID = s.TopicID + JOIN forums AS f ON f.ID = t.ForumID + WHERE " . Forums::user_forums_sql() . " + AND IF(t.IsLocked = '1' AND t.IsSticky = '0'" . ", t.LastPostID, IF(l.PostID IS NULL, 0, l.PostID)) < t.LastPostID + AND s.UserID = " . G::$LoggedUser['ID']); list($NewForumSubscriptions) = G::$DB->next_record(); // comment subscriptions - G::$DB->query("SELECT COUNT(1) - FROM users_subscriptions_comments AS s - LEFT JOIN users_comments_last_read AS lr ON lr.UserID = s.UserID AND lr.Page = s.Page AND lr.PageID = s.PageID - LEFT JOIN comments AS c ON c.ID = (SELECT MAX(ID) FROM comments WHERE Page = s.Page AND PageID = s.PageID) - LEFT JOIN collages AS co ON s.Page = 'collages' AND co.ID = s.PageID - WHERE s.UserID = " . G::$LoggedUser['ID'] . " - AND (s.Page != 'collages' OR co.Deleted = '0') - AND IF(lr.PostID IS NULL, 0, lr.PostID) < c.ID"); + G::$DB->query(" + SELECT COUNT(1) + FROM users_subscriptions_comments AS s + LEFT JOIN users_comments_last_read AS lr ON lr.UserID = s.UserID AND lr.Page = s.Page AND lr.PageID = s.PageID + LEFT JOIN comments AS c ON c.ID = (SELECT MAX(ID) FROM comments WHERE Page = s.Page AND PageID = s.PageID) + LEFT JOIN collages AS co ON s.Page = 'collages' AND co.ID = s.PageID + WHERE s.UserID = " . G::$LoggedUser['ID'] . " + AND (s.Page != 'collages' OR co.Deleted = '0') + AND IF(lr.PostID IS NULL, 0, lr.PostID) < c.ID"); list($NewCommentSubscriptions) = G::$DB->next_record(); $NewSubscriptions = $NewForumSubscriptions + $NewCommentSubscriptions; @@ -252,13 +273,20 @@ public static function has_subscribed_comments($Page, $PageID) { public static function flush_subscriptions($Page, $PageID) { $QueryID = G::$DB->get_query_id(); if ($Page == 'forums') { - G::$DB->query("SELECT UserID FROM users_subscriptions WHERE TopicID = '$PageID'"); + G::$DB->query(" + SELECT UserID + FROM users_subscriptions + WHERE TopicID = '$PageID'"); } else { - G::$DB->query("SELECT UserID FROM users_subscriptions_comments WHERE Page = '$Page' AND PageID = '$PageID'"); + G::$DB->query(" + SELECT UserID + FROM users_subscriptions_comments + WHERE Page = '$Page' + AND PageID = '$PageID'"); } $Subscribers = G::$DB->collect('UserID'); - foreach($Subscribers as $Subscriber) { - G::$Cache->delete_value('subscriptions_user_new_'.$Subscriber); + foreach ($Subscribers as $Subscriber) { + G::$Cache->delete_value("subscriptions_user_new_$Subscriber"); } G::$DB->set_query_id($QueryID); } @@ -275,9 +303,15 @@ public static function move_subscriptions($Page, $OldPageID, $NewPageID) { $QueryID = G::$DB->get_query_id(); if ($Page == 'forums') { if ($NewPageID !== null) { - G::$DB->query("UPDATE IGNORE users_subscriptions SET TopicID = '$NewPageID' WHERE TopicID = '$OldPageID'"); + G::$DB->query(" + UPDATE IGNORE users_subscriptions + SET TopicID = '$NewPageID' + WHERE TopicID = '$OldPageID'"); // explanation see below - G::$DB->query("UPDATE IGNORE forums_last_read_topics SET TopicID = $NewPageID WHERE TopicID = $OldPageID"); + G::$DB->query(" + UPDATE IGNORE forums_last_read_topics + SET TopicID = $NewPageID + WHERE TopicID = $OldPageID"); G::$DB->query(" SELECT UserID, MIN(PostID) FROM forums_last_read_topics @@ -286,17 +320,33 @@ public static function move_subscriptions($Page, $OldPageID, $NewPageID) { HAVING COUNT(1) = 2"); $Results = G::$DB->to_array(false, MYSQLI_NUM); foreach ($Results as $Result) { - G::$DB->query("UPDATE forums_last_read_topics SET PostID = $Result[1] WHERE TopicID = $NewPageID AND UserID = $Result[0]"); + G::$DB->query(" + UPDATE forums_last_read_topics + SET PostID = $Result[1] + WHERE TopicID = $NewPageID + AND UserID = $Result[0]"); } } - G::$DB->query("DELETE FROM users_subscriptions WHERE TopicID = '$OldPageID'"); - G::$DB->query("DELETE FROM forums_last_read_topics WHERE TopicID = $OldPageID"); + G::$DB->query(" + DELETE FROM users_subscriptions + WHERE TopicID = '$OldPageID'"); + G::$DB->query(" + DELETE FROM forums_last_read_topics + WHERE TopicID = $OldPageID"); } else { if ($NewPageID !== null) { - G::$DB->query("UPDATE IGNORE users_subscriptions_comments SET PageID = '$NewPageID' WHERE Page = '$Page' AND PageID = '$OldPageID'"); + G::$DB->query(" + UPDATE IGNORE users_subscriptions_comments + SET PageID = '$NewPageID' + WHERE Page = '$Page' + AND PageID = '$OldPageID'"); // last read handling // 1) update all rows that have no key collisions (i.e. users that haven't previously read both pages or if there are only comments on one page) - G::$DB->query("UPDATE IGNORE users_comments_last_read SET PageID = '$NewPageID' WHERE Page = '$Page' AND PageID = $OldPageID"); + G::$DB->query(" + UPDATE IGNORE users_comments_last_read + SET PageID = '$NewPageID' + WHERE Page = '$Page' + AND PageID = $OldPageID"); // 2) get all last read records with key collisions (i.e. there are records for one user for both PageIDs) G::$DB->query(" SELECT UserID, MIN(PostID) @@ -308,11 +358,22 @@ public static function move_subscriptions($Page, $OldPageID, $NewPageID) { $Results = G::$DB->to_array(false, MYSQLI_NUM); // 3) update rows for those people found in 2) to the earlier post foreach ($Results as $Result) { - G::$DB->query("UPDATE users_comments_last_read SET PostID = $Result[1] WHERE Page = '$Page' AND PageID = $NewPageID AND UserID = $Result[0]"); + G::$DB->query(" + UPDATE users_comments_last_read + SET PostID = $Result[1] + WHERE Page = '$Page' + AND PageID = $NewPageID + AND UserID = $Result[0]"); } } - G::$DB->query("DELETE FROM users_subscriptions_comments WHERE Page = '$Page' AND PageID = '$OldPageID'"); - G::$DB->query("DELETE FROM users_comments_last_read WHERE Page = '$Page' AND PageID = '$OldPageID'"); + G::$DB->query(" + DELETE FROM users_subscriptions_comments + WHERE Page = '$Page' + AND PageID = '$OldPageID'"); + G::$DB->query(" + DELETE FROM users_comments_last_read + WHERE Page = '$Page' + AND PageID = '$OldPageID'"); } G::$DB->set_query_id($QueryID); } @@ -324,10 +385,14 @@ public static function move_subscriptions($Page, $OldPageID, $NewPageID) { */ public static function flush_quote_notifications($Page, $PageID) { $QueryID = G::$DB->get_query_id(); - G::$DB->query("SELECT UserID FROM users_notify_quoted WHERE Page = '$Page' AND PageID = $PageID"); + G::$DB->query(" + SELECT UserID + FROM users_notify_quoted + WHERE Page = '$Page' + AND PageID = $PageID"); $Subscribers = G::$DB->collect('UserID'); - foreach($Subscribers as $Subscriber) { - G::$Cache->delete_value('notify_quoted_'.$Subscriber); + foreach ($Subscribers as $Subscriber) { + G::$Cache->delete_value("notify_quoted_$Subscriber"); } G::$DB->set_query_id($QueryID); } diff --git a/sections/inbox/conversation.php b/sections/inbox/conversation.php index b803dad6..d5d6719e 100644 --- a/sections/inbox/conversation.php +++ b/sections/inbox/conversation.php @@ -12,8 +12,8 @@ $DB->query(" SELECT InInbox, InSentbox FROM pm_conversations_users - WHERE UserID='$UserID' - AND ConvID='$ConvID'"); + WHERE UserID = '$UserID' + AND ConvID = '$ConvID'"); if (!$DB->has_results()) { error(403); } @@ -34,21 +34,21 @@ cu.UnRead, cu.ForwardedTo FROM pm_conversations AS c - JOIN pm_conversations_users AS cu ON c.ID=cu.ConvID - WHERE c.ID='$ConvID' - AND UserID='$UserID'"); + JOIN pm_conversations_users AS cu ON c.ID = cu.ConvID + WHERE c.ID = '$ConvID' + AND UserID = '$UserID'"); list($Subject, $Sticky, $UnRead, $ForwardedID) = $DB->next_record(); $DB->query(" SELECT um.ID, Username FROM pm_messages AS pm - JOIN users_main AS um ON um.ID=pm.SenderID - WHERE pm.ConvID='$ConvID'"); + JOIN users_main AS um ON um.ID = pm.SenderID + WHERE pm.ConvID = '$ConvID'"); $ConverstionParticipants = $DB->to_array(); -foreach($ConverstionParticipants as $Participant) { +foreach ($ConverstionParticipants as $Participant) { $PMUserID = (int) $Participant['ID']; $Users[$PMUserID]['UserStr'] = Users::format_username($PMUserID, true, true, true, true); $Users[$PMUserID]['Username'] = $Participant['Username']; @@ -62,24 +62,24 @@ $DB->query(" UPDATE pm_conversations_users - SET UnRead='0' - WHERE ConvID='$ConvID' - AND UserID='$UserID'"); + SET UnRead = '0' + WHERE ConvID = '$ConvID' + AND UserID = '$UserID'"); // Clear the caches of the inbox and sentbox - $Cache->decrement('inbox_new_'.$UserID); + $Cache->decrement("inbox_new_$UserID"); } -View::show_header('View conversation '.$Subject, 'comments,inbox,bbcode,jquery.validate,form_validate'); +View::show_header("View conversation $Subject", 'comments,inbox,bbcode,jquery.validate,form_validate'); // Get messages $DB->query(" SELECT SentDate, SenderID, Body, ID FROM pm_messages AS m - WHERE ConvID='$ConvID' + WHERE ConvID = '$ConvID' ORDER BY ID"); ?>
-

0 ? ' (Forwarded to '.$ForwardedName.')' : '')?>

+

0 ? " (Forwarded to $ForwardedName)" : '')?>

@@ -102,9 +102,9 @@ $DB->query(" SELECT UserID FROM pm_conversations_users - WHERE UserID!='$LoggedUser[ID]' - AND ConvID='$ConvID' - AND (ForwardedTo=0 OR ForwardedTo=UserID)"); + WHERE UserID != '$LoggedUser[ID]' + AND ConvID = '$ConvID' + AND (ForwardedTo = 0 OR ForwardedTo = UserID)"); $ReceiverIDs = $DB->collect('UserID'); @@ -117,7 +117,7 @@ -
+
diff --git a/sections/requests/requests.php b/sections/requests/requests.php index 436ff0c1..dfe83183 100644 --- a/sections/requests/requests.php +++ b/sections/requests/requests.php @@ -601,7 +601,7 @@ $TagName) { - $TagList[] = '' . display_str($TagName) . ''; + $TagList[] = ''.display_str($TagName).''; } $TagList = implode(', ', $TagList); ?> diff --git a/sections/rules/chat.php b/sections/rules/chat.php index 824a1aff..fe37a617 100644 --- a/sections/rules/chat.php +++ b/sections/rules/chat.php @@ -10,77 +10,7 @@

Forum Rules

-
    -
  • - Many forums (Tutorials, The Library, etc.) have their own set of rules. Make sure you read and take note of these rules before you attempt to post in one of these forums. -
  • -
  • - Don't use all capital letters, excessive !!! (exclamation marks) or ??? (question marks). It seems like you're shouting! -
  • -
  • - No lame referral schemes. This includes freeipods.com, freepsps.com, or any other similar scheme in which the poster gets personal gain from users clicking a link. -
  • -
  • - No asking for money for any reason whatsoever. We don't know or care about your friend who lost everything, or dying relative who wants to enjoy their last few moments alive by being given lots of money. -
  • -
  • - Do not inappropriately advertise your uploads. In special cases, it is acceptable to mention new uploads in an approved thread (e.g. New Users — We'll Snatch Your First 100% FLAC), but be sure to carefully read the thread's rules before posting. It is also acceptable to discuss releases you have uploaded when conversing about the music itself. Blatant attempts to advertise your uploads outside of the appropriate forums or threads may result in a warning or the loss of forum privileges. -
  • -
  • - No posting music requests in forums. There's a request link at the top of the page; please use that instead. -
  • -
  • - No flaming; be pleasant and polite. Don't use offensive language, and don't be confrontational for the sake of confrontation. -
  • -
  • - Don't point out or attack other members' share ratios. A higher ratio does not make you better than someone else. -
  • -
  • - Try not to ask stupid questions. A stupid question is one that you could have found the answer to yourself with a little research, or one that you're asking in the wrong place. If you do the basic research suggested (i.e., read the rules/wiki) or search the forums and don't find the answer to your question, then go ahead and ask. Staff and First Line Support (FLS) are not here to hand-feed you the answers you could have found on your own with a little bit of effort. -
  • -
  • - Be sure you read all the sticky threads in a forum before you post. -
  • -
  • - Use descriptive and specific subject lines. This helps others decide whether your particular words of wisdom relate to a topic they care about. -
  • -
  • - Try not to post comments that don't add anything to the discussion. When you're just cruising through a thread in a leisurely manner, it's not too annoying to read through a lot of "hear, hear"'s and "I agree"'s. But if you're actually trying to find information, it's a pain in the neck. So save those one-word responses for threads that have degenerated to the point where none but true aficionados are following them any more. -

    - Or short: NO spamming -

    -
  • -
  • - Refrain from quoting excessively. When quoting someone, use only the portion of the quote that is absolutely necessary. This includes quoting pictures! -
  • -
  • - No posting of requests for serials or cracks. No links to warez or crack sites in the forums. -
  • -
  • - No political or religious discussions. These types of discussions lead to arguments and flaming users, something that will not be tolerated. The only exception to this rule is The Library forum, which exists solely for the purpose of intellectual discussion and civilized debate. -
  • -
  • - Don't waste other people's bandwidth by posting images of a large file size. -
  • -
  • - Be patient with newcomers. Once you have become an expert, it is easy to forget that you started out as a newbie too. -
  • -
  • - No requesting invites to any sites anywhere on the site or IRC. Invites may be offered in the invite forum, and nowhere else. -
  • -
  • - No language other than English is permitted in the forums. If we can't understand it, we can't moderate it. -
  • -
  • - Be cautious when posting mature content on the forums. All mature imagery must abide by the rules found here. Gratuitously sexual or violent content which falls outside of the allowable categories will result in a warning or worse. -
  • -
  • - Mature content in posts must be properly tagged. The correct format is as follows: [mature=description] ...content... [/mature], where "description" is a mandatory description of the post contents. Misleading or inadequate descriptions will be penalized. -
  • -
  • - Threads created for the exclusive purpose of posting mature imagery will be trashed. Mature content (including graphic album art) should be contextually relevant to the thread and/or forum you're posting in. Mature content is only allowed in: The Lounge, The Lounge +1, The Library, Music, Power Users, Elite, Torrent Masters, VIPs, Comics, Contests & Designs, The Laboratory. If you are in doubt about a post's appropriateness, send a Staff PM to the Forum Moderators and wait for a reply before proceeding. -
  • -
+
diff --git a/sections/rules/ratio.php b/sections/rules/ratio.php index e7a5552d..d1d04125 100644 --- a/sections/rules/ratio.php +++ b/sections/rules/ratio.php @@ -185,6 +185,7 @@

+
diff --git a/sections/tools/data/bitcoin_unproc.php b/sections/tools/data/bitcoin_unproc.php index a409966e..56a1ecbd 100644 --- a/sections/tools/data/bitcoin_unproc.php +++ b/sections/tools/data/bitcoin_unproc.php @@ -48,7 +48,7 @@ $UserID) { + foreach (DonationsBitcoin::get_userids(array_keys($NewDonations)) as $Address => $UserID) { ?> diff --git a/sections/tools/managers/ajax_get_calendar_event.php b/sections/tools/managers/ajax_get_calendar_event.php index 0cb0f169..ea365a8b 100644 --- a/sections/tools/managers/ajax_get_calendar_event.php +++ b/sections/tools/managers/ajax_get_calendar_event.php @@ -38,7 +38,7 @@
@@ -49,7 +49,7 @@ @@ -60,7 +60,7 @@ diff --git a/sections/top10/artists.php b/sections/top10/artists.php index 242d1ca2..e1a49f78 100644 --- a/sections/top10/artists.php +++ b/sections/top10/artists.php @@ -38,7 +38,7 @@
    -
@@ -46,7 +46,7 @@
    -
@@ -55,4 +55,4 @@
\ No newline at end of file +?> diff --git a/static/functions/calendar.js b/static/functions/calendar.js index 76b6a2dd..388ed262 100644 --- a/static/functions/calendar.js +++ b/static/functions/calendar.js @@ -1,16 +1,4 @@ $(document).ready(function() { - $('.tooltip_interactive').tooltipster({ - interactive: true, - interactiveTolerance: 500, - delay: 100, - maxWidth : 400 - }); - - $('.tooltip').tooltipster({ - delay: 100, - maxWidth : 400 - }); - var month = $("#month").val(); var year = $("#year").val(); $(".event_day, .day-number").click(function(e) {