Максим Червонный (fiskus_boulder) wrote in changelog,
Максим Червонный
fiskus_boulder
changelog

[livejournal] r18563: LJSUP-8126: number of spam comments

Committer: mchervonniy
LJSUP-8126: number of spam comments
U   trunk/bin/upgrading/s2layers/deardiary/layout.s2
U   trunk/bin/upgrading/s2layers/digitalmultiplex/layout.s2
U   trunk/bin/upgrading/s2layers/disjointed/layout.s2
U   trunk/bin/upgrading/s2layers/generator/layout.s2
Modified: trunk/bin/upgrading/s2layers/deardiary/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/deardiary/layout.s2	2011-03-16 04:21:09 UTC (rev 18562)
+++ trunk/bin/upgrading/s2layers/deardiary/layout.s2	2011-03-16 04:52:18 UTC (rev 18563)
@@ -841,18 +841,18 @@
             "<li>"; $.comments->print_postlink(); "</li>";
         }
         var string comments_showspam = "";
-        if ($.comments.count > 0 and not $.comments.locked) {
+        if ($.comments.count > 0 and $.comments.read_spam_url != "") {
             if ($p.showspam) {
-                $comments_showspam = """<a href="$.comments.read_spam_url">$*text_hidespam ($.comments.spam_counter)</a>""";
+                $comments_showspam = """<li>""" + get_plural_phrase($.comments.spam_counter, "text_read_spam_comments") + """</li>""";
             } else {
-                $comments_showspam = """<a href="$.comments.read_spam_url">$*text_showspam ($.comments.spam_counter)</a>""";
+                $comments_showspam = """<li><a href="$.comments.read_spam_url">""" + get_plural_phrase($.comments.spam_counter, "text_read_all_spam_comments") + """</a></li>""";
             }
         } else {
             $comments_showspam = "";
         }
 
         if ($p.view == "entry") {
-            print safe " <li> $comments_showspam </li>";
+            print safe "$comments_showspam";
         }
         println """</ul>""";
     }

Modified: trunk/bin/upgrading/s2layers/digitalmultiplex/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/digitalmultiplex/layout.s2	2011-03-16 04:21:09 UTC (rev 18562)
+++ trunk/bin/upgrading/s2layers/digitalmultiplex/layout.s2	2011-03-16 04:52:18 UTC (rev 18563)
@@ -1168,11 +1168,11 @@
     {
         var string pages;
         var string comments_showspam = "";
-        if ($.entry.comments.count > 0 and not $.entry.comments.locked) {
+        if ($.entry.comments.count > 0 and $.entry.comments.read_spam_url != "") {
             if ($p.showspam) {
-                $comments_showspam = """ &mdash  <a href=\"$.entry.comments.read_spam_url\">$*text_hidespam ($.entry.comments.spam_counter)</a> """;
+                $comments_showspam = """ &mdash; """ + get_plural_phrase($.entry.comments.spam_counter, "text_read_spam_comments");
             } else {
-                $comments_showspam = """ &mdash  <a href=\"$.entry.comments.read_spam_url\">$*text_showspam ($.entry.comments.spam_counter)</a> """;
+                $comments_showspam = """ &mdash; <a href=\"$.entry.comments.read_spam_url\">""" + get_plural_phrase($.entry.comments.spam_counter, "text_read_all_spam_comments") + """</a> """;
             }
         }
         if ($.comment_pages.all_subitems_displayed) {

Modified: trunk/bin/upgrading/s2layers/disjointed/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/disjointed/layout.s2	2011-03-16 04:21:09 UTC (rev 18562)
+++ trunk/bin/upgrading/s2layers/disjointed/layout.s2	2011-03-16 04:52:18 UTC (rev 18563)
@@ -1143,14 +1143,14 @@
 
 
     var string comments_showspam = "";
-    if ($en.comments.count > 0 and not $en.comments.locked) {
+    if ($en.comments.count > 0 and $en.comments.read_spam_url != "") {
         if ($p.showspam) {
-            $comments_showspam = """<a href=\"$en.comments.read_spam_url\">$*text_hidespam ($en.comments.spam_counter)</a> """;
+            $comments_showspam = get_plural_phrase($en.comments.spam_counter, "text_read_spam_comments") + "&ndash;";
         } else {
-            $comments_showspam = """<a href=\"$en.comments.read_spam_url\">$*text_showspam ($en.comments.spam_counter)</a> """;
+            $comments_showspam = """<a href=\"$en.comments.read_spam_url\">""" + get_plural_phrase($en.comments.spam_counter, "text_read_all_spam_comments") + """</a> &ndash """;
         }
     }
-    if ($p.view == "entry") { $linkbar = $linkbar + $comments_showspam + " &ndash "; }
+    if ($p.view == "entry") { $linkbar = $linkbar + $comments_showspam; }
 
     if ($en.comments.maxcomments) {
       $linkbar = $linkbar + "$*text_max_comments$btwn_comments";

Modified: trunk/bin/upgrading/s2layers/generator/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/generator/layout.s2	2011-03-16 04:21:09 UTC (rev 18562)
+++ trunk/bin/upgrading/s2layers/generator/layout.s2	2011-03-16 04:52:18 UTC (rev 18563)
@@ -906,17 +906,18 @@
     $p->print_reply_container({"target" => "topcomment", "class" => "quickreply"});
 
     var string comments_showspam = "";
-    if ($e.comments.count > 0 and not $e.comments.locked) {
+    if ($e.comments.count > 0 and $e.comments.read_spam_url != "") {
         if ($p.showspam) {
-            $comments_showspam = """<a href=\"$e.comments.read_spam_url\">$*text_hidespam ($e.comments.spam_counter)</a></span> """;
+            $comments_showspam = """ | <span>""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span> """;
+
         } else {
-            $comments_showspam = """<a href=\"$e.comments.read_spam_url\">$*text_showspam ($e.comments.spam_counter)</a></span> """;
+            $comments_showspam = """ | <a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> """;
         }
     }
 """</td></tr>
 <tr bgcolor="$*weak_back"><td align='left' class='comments' valign='top'>
     <a href="$e.permalink_url">$*text_permalink</a>""";
-    if ($p.view == "entry") { print " | $comments_showspam";}
+    if ($p.view == "entry") { print "$comments_showspam";}
 """</td>""";
     if ($p.view != "entry" and $p.view != "reply") {
         "<td align='right' class='comments'>"; $e.comments->print();

Tags: fiskus_boulder, livejournal, s2
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments