diff --git a/classes/rules.class.php b/classes/rules.class.php index 874fd967..b5c3b03f 100644 --- a/classes/rules.class.php +++ b/classes/rules.class.php @@ -8,17 +8,17 @@ class Rules { public static function display_site_tag_rules($OnUpload = false) { ?> @@ -40,9 +40,9 @@ public static function display_irc_chat_rules() {
  • No arguing. You can't win an argument over the Internet, so you are just wasting your time trying.
  • No prejudice, especially related to race, religion, politics, ethnic background, etc. It is highly suggested to avoid this entirely.
  • Flooding is irritating and will warrant you a kick. This includes, but is not limited to, automatic "now playing" scripts, pasting large amounts of text, and multiple consecutive lines with no relevance to the conversation at hand.
  • -
  • Impersonation of other members—particularly staff members—will not go unpunished. If you are uncertain of a user's identity, check their vhost.
  • +
  • Impersonation of other members — particularly staff members — will not go unpunished. If you are uncertain of a user's identity, check their vhost.
  • Spamming is strictly forbidden. This includes, but is not limited to, personal sites, online auctions, and torrent uploads.
  • -
  • Obsessive annoyance—both to other users and staff—will not be tolerated.
  • +
  • Obsessive annoyance — both to other users and staff — will not be tolerated.
  • Do not PM, DCC, or Query anyone you don't know or have never talked to without asking first; this applies specifically to staff.
  • No language other than English is permitted in the official IRC channels. If we cannot understand it, we cannot moderate it.
  • The offering, selling, trading, and giving away of invites to this or any other site on our IRC network is strictly forbidden.
  • diff --git a/gazelle.sql b/gazelle.sql index 5a90926f..3b95584f 100644 --- a/gazelle.sql +++ b/gazelle.sql @@ -154,6 +154,14 @@ CREATE TABLE `bookmarks_torrents` ( KEY `GroupID` (`GroupID`) ) 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`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci; + CREATE TABLE `collages` ( `ID` int(10) NOT NULL AUTO_INCREMENT, `Name` varchar(100) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL DEFAULT '', diff --git a/sections/forums/newthread.php b/sections/forums/newthread.php index 7abd2f8e..796da98a 100644 --- a/sections/forums/newthread.php +++ b/sections/forums/newthread.php @@ -39,7 +39,7 @@

    -


    +


    diff --git a/sections/forums/poll_vote.php b/sections/forums/poll_vote.php index fb8c576c..d0e6032d 100644 --- a/sections/forums/poll_vote.php +++ b/sections/forums/poll_vote.php @@ -94,7 +94,7 @@
    -


    +



  • -
    +
  • diff --git a/sections/index/private.php b/sections/index/private.php index e1c43af9..793a8998 100644 --- a/sections/index/private.php +++ b/sections/index/private.php @@ -22,7 +22,10 @@ $Cache->begin_transaction('user_info_heavy_'.$UserID); $Cache->update_row(false, array('LastReadNews' => $News[0][0])); $Cache->commit_transaction(0); - $DB->query("UPDATE users_info SET LastReadNews = '".$News[0][0]."' WHERE UserID = ".$UserID); + $DB->query(" + UPDATE users_info + SET LastReadNews = '".$News[0][0]."' + WHERE UserID = $UserID"); $LoggedUser['LastReadNews'] = $News[0][0]; } @@ -38,7 +41,9 @@ ?>
    -
    Latest staff blog posts
    +
    + Latest staff blog posts +
    get_value('staff_blog')) === false) { $DB->query(" @@ -55,7 +60,10 @@ $Cache->cache_value('staff_blog', $Blog, 1209600); } if (($SBlogReadTime = $Cache->get_value('staff_blog_read_'.$LoggedUser['ID'])) === false) { - $DB->query("SELECT Time FROM staff_blog_visits WHERE UserID = ".$LoggedUser['ID']); + $DB->query(" + SELECT Time + FROM staff_blog_visits + WHERE UserID = ".$LoggedUser['ID']); if (list($SBlogReadTime) = $DB->next_record()) { $SBlogReadTime = strtotime($SBlogReadTime); } else { @@ -90,18 +98,20 @@
    Latest blog posts
    get_value('blog')) === false) { - $DB->query("SELECT - b.ID, - um.Username, - b.Title, - b.Body, - b.Time, - b.ThreadID - FROM blog AS b LEFT JOIN users_main AS um ON b.UserID=um.ID + $DB->query(" + SELECT + b.ID, + um.Username, + b.Title, + b.Body, + b.Time, + b.ThreadID + FROM blog AS b + LEFT JOIN users_main AS um ON b.UserID=um.ID ORDER BY Time DESC LIMIT 20"); $Blog = $DB->to_array(); - $Cache->cache_value('blog',$Blog,1209600); + $Cache->cache_value('blog', $Blog, 1209600); } ?>
    @@ -381,10 +396,10 @@ ORDER BY tr.Time DESC LIMIT 10"); $Recommend = $DB->to_array(); - $Cache->cache_value('recommend',$Recommend,1209600); + $Cache->cache_value('recommend', $Recommend, 1209600); $Recommend_artists = Artists::get_artists($DB->collect('GroupID')); - $Cache->cache_value('recommend_artists',$Recommend_artists,1209600); + $Cache->cache_value('recommend_artists', $Recommend_artists, 1209600); } if (count($Recommend) >= 4) { @@ -393,7 +408,7 @@
    diff --git a/sections/user/notify_edit.php b/sections/user/notify_edit.php index bd64a98b..dabcb8a5 100644 --- a/sections/user/notify_edit.php +++ b/sections/user/notify_edit.php @@ -118,7 +118,7 @@ One of these artists -

    Comma-separated list — e.g. Pink Floyd, Led Zeppelin, Neil Young

    +

    Comma-separated list — e.g. Pink Floyd, Led Zeppelin, Neil Young

    /> @@ -134,14 +134,14 @@ At least one of these tags -

    Comma-separated list — e.g. rock, jazz, pop

    +

    Comma-separated list — e.g. rock, jazz, pop

    None of these tags -

    Comma-separated list — e.g. rock, jazz, pop

    +

    Comma-separated list — e.g. rock, jazz, pop

    diff --git a/static/functions/news_ajax.js b/static/functions/news_ajax.js index 7e512c7f..729cb4c7 100644 --- a/static/functions/news_ajax.js +++ b/static/functions/news_ajax.js @@ -1,55 +1,55 @@ -function news_ajax(event, count, offset, privileged){ - /* +function news_ajax(event, count, offset, privileged) { + /* * event - The click event, passed to hide the element when necessary. * count - Number of news items to fetch. * offset - Database offset for fetching news. * privilege - Gotta check your privilege (used to show/hide [Edit] on news). - * + * * This function isn't wrapped in jQuery, be sure we use it * instead of the mix-mashed Gazelle $ function. */ var $ = jQuery.noConflict(); - //Unbind onclick to avoid spamclicks. + // Unbind onclick to avoid spamclicks. $(event.target).attr('onclick', 'return false;'); - //Fetch news data, check for errors etc. + // Fetch news data, check for errors etc. $.get("ajax.php", { - action: "news_ajax", - count: count, + action: "news_ajax", + count: count, offset: offset }) .done(function(data) { var response = $.parseJSON(data.response); - if (typeof data == 'undefined' || data == null || data.status != "success" || typeof response == 'undefined' || response == null){ - console.log("ERR ajax_news("+(new Error).lineNumber+"): Unknown data or failure returned."); - //Return to original paremeters, no news were added. - $(event.target).attr('onclick', 'news_ajax(event, ' + count + ', '+ offset +', '+privileged+'); return false;'); + if (typeof data == 'undefined' || data == null || data.status != "success" || typeof response == 'undefined' || response == null) { + console.log("ERR ajax_news(" + (new Error).lineNumber + "): Unknown data or failure returned."); + // Return to original paremeters, no news were added. + $(event.target).attr('onclick', 'news_ajax(event, ' + count + ', ' + offset + ', ' + privileged + '); return false;'); } else { - if(response.length == 0){ + if (response.length == 0) { $(event.target).parent().remove(); } else { var targetClass = $('#more_news').prev().attr('class'); - $.each(response, function(){ - //Create a new element, insert the news. + $.each(response, function() { + // Create a new element, insert the news. $('#more_news').before($('
    ', { - id: 'news'+this[0], + id: 'news' + this[0], Class: targetClass })); - //I'm so happy with this condition statement. - if(privileged){ - $('#news'+this[0]).append('
    '+this[1]+' '+this[2]+' - Edit
    '); + // I'm so happy with this condition statement. + if (privileged) { + $('#news' + this[0]).append('
    ' + this[1] + ' ' + this[2] + ' - Edit
    '); } else { - $('#news'+this[0]).append('
    '+this[1]+' '+this[2]+'
    '); + $('#news' + this[0]).append('
    ' + this[1] + ' ' + this[2] + '
    '); } - $('#news'+this[0]).append('
    '+this[3]+'
    '); + $('#news' + this[0]).append('
    ' + this[3] + '
    '); }); - //Update the onclick parameters to appropriate offset. - $(event.target).attr('onclick', 'news_ajax(event, ' + count + ', '+ (count+offset) +', '+privileged+'); return false;'); + // Update the onclick parameters to appropriate offset. + $(event.target).attr('onclick', 'news_ajax(event, ' + count + ', ' + (count + offset) + ', ' + privileged + '); return false;'); } } }) .fail(function() { - console.log("WARN ajax_news("+(new Error).lineNumber+"): Ajax get failed."); - //Return to original paremeters, no news were added. - $(event.target).attr('onclick', 'news_ajax(event, ' + count + ', '+ offset +', '+privileged+'); return false;'); + console.log("WARN ajax_news(" + (new Error).lineNumber + "): AJAX get failed."); + // Return to original paremeters, no news were added. + $(event.target).attr('onclick', 'news_ajax(event, ' + count + ', ' + offset + ', ' + privileged + '); return false;'); }); -} \ No newline at end of file +}