Савинцев Егор 🚶 (savintsev_egor) wrote in changelog,
Савинцев Егор 🚶
savintsev_egor
changelog

[livejournal] r18393: LJSUP-7758: AntiSpam S2

Committer: esavintcev
LJSUP-7758: AntiSpam S2
U   trunk/bin/upgrading/s2layers/tabularindent/layout.s2
Modified: trunk/bin/upgrading/s2layers/tabularindent/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/tabularindent/layout.s2	2011-02-24 05:38:39 UTC (rev 18392)
+++ trunk/bin/upgrading/s2layers/tabularindent/layout.s2	2011-02-24 07:48:07 UTC (rev 18393)
@@ -221,6 +221,8 @@
   property string date_monthpage_format {
         des = "Month format for the month page";
   }
+  property use text_showspam;
+  property use text_hidespam;
 }
 set text_left_comments = "comments: ";
 set text_btwn_comments = " or ";
@@ -918,6 +920,7 @@
 }
 
 function EntryPage::print_body () {
+    var Page p = get_page();
         set_handler("unscreen_comment_#", [
                                            [ "style_bgcolor", "cmtbar#", "$*comment_bar_one_bgcolor", ],
                                            [ "style_color", "cmtbar#", "$*comment_bar_one_fgcolor", ],
@@ -934,6 +937,11 @@
         $this->print_multiform_start();
 
         print_header("Comments:");
+        if ($p.showspam) {
+            print """<p width='95%' style='text-align:center;'><a href=\"$.entry.permalink_url\">$*text_hidespam</a></p>""";
+        } else {
+            print """<p width='95%' style='text-align:center;'><a href=\"$.entry.permalink_url?mode=showspam\">$*text_showspam</a></p>""";
+        }
         if ($.comment_pages.total_subitems > 0) {
             $.comment_pages->print();
             $this->print_comments($.comments);

Tags: livejournal, s2, savintsev_egor
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