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

[ljcom] r12142: LJSUP-12572: Minimalism's Old S1 style o...

Committer: esavintcev
LJSUP-12572: Minimalism's Old S1 style on iPad & Football themes
U   trunk/bin/upgrading/s2layers/sup/themes.s2
Modified: trunk/bin/upgrading/s2layers/sup/themes.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sup/themes.s2	2012-06-20 08:41:10 UTC (rev 12141)
+++ trunk/bin/upgrading/s2layers/sup/themes.s2	2012-06-20 11:50:07 UTC (rev 12142)
@@ -773,35 +773,66 @@
 
 function ItemRange::print() {
     if ($.all_subitems_displayed) { return; }
-    
-    """<ul class="comments-pages">""";
-    
-    var string url_prev = $this->url_of($.current - 1);
-    if ($.current != 1) {
-        """<li class="comments-pages-prev"><a href="$url_prev#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></a></li>""";
+
+    if ($*old_s1) {
+        """<div class="comments-pages">""";
+            print "<table align='center' border='0' cellpadding='3'>";
+            print "<tr><td align='center' colspan='3'><b>" +
+                lang_page_of_pages($.current, $.total) + "</b>";
+            print "</td></tr>";
+            var string url_prev = $this->url_of($.current - 1);
+            if ($.current != 1) {
+                print "<tr><td align='center'><a href='$url_prev#comments'>&lt;&lt;</a></td>";
+            } else {
+                print "<tr><td align='center'>&lt;&lt;</td>";
+            }
+            print "<td align='center'>";
+            foreach var int i (1..$.total) {
+                if ($i == $.current) { "<b>[$i]</b> "; }
+                else {
+                    var string url_of = $this->url_of($i);
+                    "<a href='$url_of#comments'><b>[$i]</b></a> ";
+                }
+            }
+            print "</td>";
+            var string url_next = $this->url_of($.current + 1);
+            if ($.current != $.total) {
+                print "<td align='center'><a href='$url_next#comments'>&gt;&gt;</a></td>";
+            } else {
+                print "<td align='center'>&gt;&gt;</td>";
+            }
+            print "</tr></table>";
+        """</div>""";
     } else {
-        """<li class="comments-pages-prev comments-pages-prev-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></li>""";
-    }
-    
-    foreach var int i (1..$.total) {
-        var string class_first = ($i == 1 ? " comments-pages-first" : "");
-        if ($i == $.current) {
-            """<li class="comments-pages-item comments-pages-current$class_first">$i</li>""";
+        """<ul class="comments-pages">""";
+        
+        var string url_prev = $this->url_of($.current - 1);
+        if ($.current != 1) {
+            """<li class="comments-pages-prev"><a href="$url_prev#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></a></li>""";
+        } else {
+            """<li class="comments-pages-prev comments-pages-prev-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></li>""";
         }
-        else {
-            var string url_of = $this->url_of($i);
-            """<li class="comments-pages-item$class_first"><a href="$url_of#comments">$i</a></li>""";
+        
+        foreach var int i (1..$.total) {
+            var string class_first = ($i == 1 ? " comments-pages-first" : "");
+            if ($i == $.current) {
+                """<li class="comments-pages-item comments-pages-current$class_first">$i</li>""";
+            }
+            else {
+                var string url_of = $this->url_of($i);
+                """<li class="comments-pages-item$class_first"><a href="$url_of#comments">$i</a></li>""";
+            }
         }
-    }
 
-    var string url_next = $this->url_of($.current + 1);
-    if ($.current != $.total) {
-        """<li class="comments-pages-next"><a href="$url_next#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></a></li>""";
-    } else {
-        """<li class="comments-pages-next comments-pages-next-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></li>""";
+        var string url_next = $this->url_of($.current + 1);
+        if ($.current != $.total) {
+            """<li class="comments-pages-next"><a href="$url_next#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></a></li>""";
+        } else {
+            """<li class="comments-pages-next comments-pages-next-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></li>""";
+        }
+        
+        """</ul>""";
     }
-    
-    """</ul>""";
 }
 
 
@@ -809,81 +840,158 @@
     var Page p = get_page();
     var Entry e = $.entry;
 
-    _print_entry($e);
-    
-    if ($.entry.comments.enabled) {
-"""
-                    <div class="entry-wrap entry-comments" id="comments">
-                    <div class="entry">
-                        <div class="entry-text"><div class="entry-comments-text">
-""";
+    if ($*old_s1) {
+
         var string comments_count = string($e.comments.count);
         if ($.viewing_thread or $p.showspam) {
-            var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#comments";
+            var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url);
             $comments_count = """<a href="$toplink">"""+ get_plural_phrase($e.comments.count, "text_read_all_comments") +"""</a>""";
         } else {
             $comments_count = get_plural_phrase($e.comments.count, "text_read_comments");
         }
-        if (not $.entry.comments.locked) {
-            $comments_count = """<span class="comments-count">$comments_count</span>""";
+        if ($e.comments.count > 0 and not $.entry.comments.locked) {
+            $comments_count = """<span class="comments-count">$comments_count</span> <span class="emdash">—</span> """;
+        } elseif ($e.comments.count > 0) {
+            $comments_count = """<span class="comments-count">$comments_count</span> """;
         } else {
             $comments_count = "";
         }
-        var string comments_showspam = "";
-        if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
-            if ($p.showspam) {
-                $comments_showspam = """<br /><span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span>""";
+        _print_entry($e);
+        if ($.entry.comments.enabled) {
+"""
+                        <div id="$*text_comments_id" class="entry-wrap entry-comments entry-comments-s1">
+                        <div class="entry">
+                            <div class="entry-text"><div class="entry-comments-text">
+""";
+            "<a name='comments'></a>";
+
+            if ($*old_s1 and $.comment_pages.total_subitems > 0) {
+                """<div class="comments-pages">""";$.comment_pages->print();"""</div>""";
+            }
+
+            var string comments_showspam = "";
+            if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
+                if ($p.showspam) {
+                    $comments_showspam = """<span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span> <span class="emdash">—</span> """;
+                } else {
+                    $comments_showspam = """<span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> <span class="emdash">—</span> """;
+                }
             } else {
-                $comments_showspam = """<br /><span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span>""";
+                $comments_showspam = "";
             }
-        } else {
-            $comments_showspam = "";
-        }
-        """<div class="comments-links">$comments_count$comments_showspam</div>""";
+            """<div class="comments-links">( $comments_count $comments_showspam""";
+            if (not $.entry.comments.locked) {
+            """<span class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment", "reply_url" => $e.comments.post_url });"""</span>""";
+            }
 
-        if ($.comment_pages.total_subitems > 0) {
-            $.comment_pages->print();
-        }
-        
-        if (not $.entry.comments.locked) {
-            """
-            <div class="comments-reply">
-                <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment", "reply_url" => $e.comments.post_url });"""</p>
-                """;
-                """
-            </div>
-            """;
+            """ )</div>""";
+
             $this->print_reply_container({ "target" => "topcomment" });
+            if ($.comment_pages.total_subitems > 0) {
+                if (not $*old_s1) {"""<div class="comments-pages">""";$.comment_pages->print();"""</div>""";}
+                $this->print_multiform_start();
+                $this->print_comments($.comments);
+                """<div class="comments-footer">""";
+                """<div class="comments-links">( $comments_count $comments_showspam""";
+                if (not $.entry.comments.locked) { 
+                """<span class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment", "reply_url" => $e.comments.post_url }); """</span>""";
+                }
+                """ )</div>""";
+                $this->print_reply_container({"target" => "bottomcomment"});
+                if ($.comment_pages.all_subitems_displayed) { """<div class="hr"><hr /></div>"""; }
+                $this->print_multiform_actionline();
+                $this->print_multiform_end();
+                """</div>""";
+                """<div class="comments-pages">""";$.comment_pages->print();"""</div>""";
+            }
+
+"""
+                            </div></div>
+                        </div>
+                    </div>
+""";
         }
 
-        if ($.comment_pages.total_subitems > 0) {
-            $this->print_multiform_start();
+    } else {
 
-            $this->print_comments($.comments);
+        _print_entry($e);
+        
+        if ($.entry.comments.enabled) {
+"""
+                        <div class="entry-wrap entry-comments" id="comments">
+                        <div class="entry">
+                            <div class="entry-text"><div class="entry-comments-text">
+""";
+            var string comments_count = string($e.comments.count);
+            if ($.viewing_thread or $p.showspam) {
+                var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#comments";
+                $comments_count = """<a href="$toplink">"""+ get_plural_phrase($e.comments.count, "text_read_all_comments") +"""</a>""";
+            } else {
+                $comments_count = get_plural_phrase($e.comments.count, "text_read_comments");
+            }
+            if (not $.entry.comments.locked) {
+                $comments_count = """<span class="comments-count">$comments_count</span>""";
+            } else {
+                $comments_count = "";
+            }
+            var string comments_showspam = "";
+            if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
+                if ($p.showspam) {
+                    $comments_showspam = """<br /><span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span>""";
+                } else {
+                    $comments_showspam = """<br /><span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span>""";
+                }
+            } else {
+                $comments_showspam = "";
+            }
+            """<div class="comments-links">$comments_count$comments_showspam</div>""";
 
-            $this->print_multiform_actionline();
-            $this->print_multiform_end();
-
-            if (not $.entry.comments.locked) { 
+            if ($.comment_pages.total_subitems > 0) {
+                $.comment_pages->print();
+            }
+            
+            if (not $.entry.comments.locked) {
                 """
                 <div class="comments-reply">
-                    <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment", "reply_url" => $e.comments.post_url });"""</p>
+                    <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment", "reply_url" => $e.comments.post_url });"""</p>
                     """;
                     """
                 </div>
                 """;
-                $this->print_reply_container({ "target" => "bottomcomment" });
+                $this->print_reply_container({ "target" => "topcomment" });
             }
 
-            $.comment_pages->print();
-        }
+            if ($.comment_pages.total_subitems > 0) {
+                $this->print_multiform_start();
 
+                $this->print_comments($.comments);
+
+                $this->print_multiform_actionline();
+                $this->print_multiform_end();
+
+                if (not $.entry.comments.locked) { 
+                    """
+                    <div class="comments-reply">
+                        <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment", "reply_url" => $e.comments.post_url });"""</p>
+                        """;
+                        """
+                    </div>
+                    """;
+                    $this->print_reply_container({ "target" => "bottomcomment" });
+                }
+
+                $.comment_pages->print();
+            }
+
 """
-                        </div></div>
-                    </div>
-                    </div>
+                            </div></div>
+                        </div>
+                        </div>
 """;
+        }
+
     }
+
 }
 
 function EntryPage::print_comment_full (Comment c) {
@@ -913,21 +1021,39 @@
 
     """<div class="comment-text""" + (defined $c.userpic and $*comment_userpic_style != "off" ? "" : " comment-text-cwoup") + """\">"""; $c->print_text(); "</div>";
     """<div class="comment-menu">""";
-    """<ul>""";
-    if ($c.frozen) {
-        print safe "<li>$*text_comment_frozen</li>";
-    } elseif($c.screened) {
-        var Link link = $c->get_link("unscreen_to_reply");
-        """<li><a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a></li>""";
-    } elseif ((not $c.spam) or ($p.showspam)) {
-        """<li>"""; $c->print_reply_link({"linktext" => $*text_comment_reply}); """</li>""";
+    if ($*old_s1) {
+        if ($c.frozen) {
+            print safe "($*text_comment_frozen) ";
+        } elseif($c.screened) {
+            var Link link = $c->get_link("unscreen_to_reply");
+            """(<a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a>) """;
+        } elseif ((not $c.spam) or ($p.showspam)) {
+            "("; $c->print_reply_link({"linktext" => $*text_comment_reply}); ") ";
+        }
+        if ($c.parent_url != "") { print safe """(<a href="$c.parent_url">$*text_comment_parent</a>) """; }
+        if (($c.thread_url != "") and (not $c.spam)) {
+            print safe """(<a href="$c.thread_url">$*text_comment_thread</a>) """;
+            if ($c.parent_url != "") {
+                $c->print_expand_collapse_links({ "expand"=>"(%_)", "collapse"=>"(%_)"}); 
+            }
+        }
+    } else {
+        """<ul>""";
+        if ($c.frozen) {
+            print safe "<li>$*text_comment_frozen</li>";
+        } elseif($c.screened) {
+            var Link link = $c->get_link("unscreen_to_reply");
+            """<li><a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a></li>""";
+        } elseif ((not $c.spam) or ($p.showspam)) {
+            """<li>"""; $c->print_reply_link({"linktext" => $*text_comment_reply}); """</li>""";
+        }
+        if ($c.parent_url != "") { print safe """<li><a href="$c.parent_url">$*text_comment_parent</a></li>"""; }
+        if (($c.thread_url != "") and (not $c.spam)) {
+            print safe """<li><a href="$c.thread_url">$*text_comment_thread</a></li>""";
+            """<li>"""; $c->print_expand_collapse_links(); """</li>""";
+        }
+        """</ul>""";
     }
-    if ($c.parent_url != "") { print safe """<li><a href="$c.parent_url">$*text_comment_parent</a></li>"""; }
-    if (($c.thread_url != "") and (not $c.spam)) {
-        print safe """<li><a href="$c.thread_url">$*text_comment_thread</a></li>""";
-        """<li>"""; $c->print_expand_collapse_links(); """</li>""";
-    }
-    """</ul>""";
     """</div><div class="hr"><hr /></div>""";
 }
 
@@ -1162,35 +1288,66 @@
 
 function ItemRange::print() {
     if ($.all_subitems_displayed) { return; }
-    
-    """<ul class="comments-pages">""";
-    
-    var string url_prev = $this->url_of($.current - 1);
-    if ($.current != 1) {
-        """<li class="comments-pages-prev"><a href="$url_prev#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></a></li>""";
+
+    if ($*old_s1) {
+        """<div class="comments-pages">""";
+            print "<table align='center' border='0' cellpadding='3'>";
+            print "<tr><td align='center' colspan='3'><b>" +
+                lang_page_of_pages($.current, $.total) + "</b>";
+            print "</td></tr>";
+            var string url_prev = $this->url_of($.current - 1);
+            if ($.current != 1) {
+                print "<tr><td align='center'><a href='$url_prev#comments'>&lt;&lt;</a></td>";
+            } else {
+                print "<tr><td align='center'>&lt;&lt;</td>";
+            }
+            print "<td align='center'>";
+            foreach var int i (1..$.total) {
+                if ($i == $.current) { "<b>[$i]</b> "; }
+                else {
+                    var string url_of = $this->url_of($i);
+                    "<a href='$url_of#comments'><b>[$i]</b></a> ";
+                }
+            }
+            print "</td>";
+            var string url_next = $this->url_of($.current + 1);
+            if ($.current != $.total) {
+                print "<td align='center'><a href='$url_next#comments'>&gt;&gt;</a></td>";
+            } else {
+                print "<td align='center'>&gt;&gt;</td>";
+            }
+            print "</tr></table>";
+        """</div>""";
     } else {
-        """<li class="comments-pages-prev comments-pages-prev-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></li>""";
-    }
-    
-    foreach var int i (1..$.total) {
-        var string class_first = ($i == 1 ? " comments-pages-first" : "");
-        if ($i == $.current) {
-            """<li class="comments-pages-item comments-pages-current$class_first">$i</li>""";
+        """<ul class="comments-pages">""";
+        
+        var string url_prev = $this->url_of($.current - 1);
+        if ($.current != 1) {
+            """<li class="comments-pages-prev"><a href="$url_prev#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></a></li>""";
+        } else {
+            """<li class="comments-pages-prev comments-pages-prev-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></li>""";
         }
-        else {
-            var string url_of = $this->url_of($i);
-            """<li class="comments-pages-item$class_first"><a href="$url_of#comments">$i</a></li>""";
+        
+        foreach var int i (1..$.total) {
+            var string class_first = ($i == 1 ? " comments-pages-first" : "");
+            if ($i == $.current) {
+                """<li class="comments-pages-item comments-pages-current$class_first">$i</li>""";
+            }
+            else {
+                var string url_of = $this->url_of($i);
+                """<li class="comments-pages-item$class_first"><a href="$url_of#comments">$i</a></li>""";
+            }
         }
-    }
 
-    var string url_next = $this->url_of($.current + 1);
-    if ($.current != $.total) {
-        """<li class="comments-pages-next"><a href="$url_next#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></a></li>""";
-    } else {
-        """<li class="comments-pages-next comments-pages-next-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></li>""";
+        var string url_next = $this->url_of($.current + 1);
+        if ($.current != $.total) {
+            """<li class="comments-pages-next"><a href="$url_next#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></a></li>""";
+        } else {
+            """<li class="comments-pages-next comments-pages-next-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></li>""";
+        }
+        
+        """</ul>""";
     }
-    
-    """</ul>""";
 }
 
 
@@ -1198,81 +1355,158 @@
     var Page p = get_page();
     var Entry e = $.entry;
 
-    _print_entry($e);
-    
-    if ($.entry.comments.enabled) {
-"""
-                    <div class="entry-wrap entry-comments" id="comments">
-                    <div class="entry">
-                        <div class="entry-text"><div class="entry-comments-text">
-""";
+    if ($*old_s1) {
+
         var string comments_count = string($e.comments.count);
         if ($.viewing_thread or $p.showspam) {
-            var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#comments";
+            var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url);
             $comments_count = """<a href="$toplink">"""+ get_plural_phrase($e.comments.count, "text_read_all_comments") +"""</a>""";
         } else {
             $comments_count = get_plural_phrase($e.comments.count, "text_read_comments");
         }
-        if (not $.entry.comments.locked) {
-            $comments_count = """<span class="comments-count">$comments_count</span>""";
+        if ($e.comments.count > 0 and not $.entry.comments.locked) {
+            $comments_count = """<span class="comments-count">$comments_count</span> <span class="emdash">—</span> """;
+        } elseif ($e.comments.count > 0) {
+            $comments_count = """<span class="comments-count">$comments_count</span> """;
         } else {
             $comments_count = "";
         }
-        var string comments_showspam = "";
-        if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
-            if ($p.showspam) {
-                $comments_showspam = """<br /><span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span>""";
+        _print_entry($e);
+        if ($.entry.comments.enabled) {
+"""
+                        <div id="$*text_comments_id" class="entry-wrap entry-comments entry-comments-s1">
+                        <div class="entry">
+                            <div class="entry-text"><div class="entry-comments-text">
+""";
+            "<a name='comments'></a>";
+
+            if ($*old_s1 and $.comment_pages.total_subitems > 0) {
+                """<div class="comments-pages">""";$.comment_pages->print();"""</div>""";
+            }
+
+            var string comments_showspam = "";
+            if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
+                if ($p.showspam) {
+                    $comments_showspam = """<span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span> <span class="emdash">—</span> """;
+                } else {
+                    $comments_showspam = """<span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> <span class="emdash">—</span> """;
+                }
             } else {
-                $comments_showspam = """<br /><span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span>""";
+                $comments_showspam = "";
             }
-        } else {
-            $comments_showspam = "";
-        }
-        """<div class="comments-links">$comments_count$comments_showspam</div>""";
+            """<div class="comments-links">( $comments_count $comments_showspam""";
+            if (not $.entry.comments.locked) {
+            """<span class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment", "reply_url" => $e.comments.post_url });"""</span>""";
+            }
 
-        if ($.comment_pages.total_subitems > 0) {
-            $.comment_pages->print();
-        }
-        
-        if (not $.entry.comments.locked) {
-            """
-            <div class="comments-reply">
-                <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment", "reply_url" => $e.comments.post_url });"""</p>
-                """;
-                """
-            </div>
-            """;
+            """ )</div>""";
+
             $this->print_reply_container({ "target" => "topcomment" });
+            if ($.comment_pages.total_subitems > 0) {
+                if (not $*old_s1) {"""<div class="comments-pages">""";$.comment_pages->print();"""</div>""";}
+                $this->print_multiform_start();
+                $this->print_comments($.comments);
+                """<div class="comments-footer">""";
+                """<div class="comments-links">( $comments_count $comments_showspam""";
+                if (not $.entry.comments.locked) { 
+                """<span class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment", "reply_url" => $e.comments.post_url }); """</span>""";
+                }
+                """ )</div>""";
+                $this->print_reply_container({"target" => "bottomcomment"});
+                if ($.comment_pages.all_subitems_displayed) { """<div class="hr"><hr /></div>"""; }
+                $this->print_multiform_actionline();
+                $this->print_multiform_end();
+                """</div>""";
+                """<div class="comments-pages">""";$.comment_pages->print();"""</div>""";
+            }
+
+"""
+                            </div></div>
+                        </div>
+                    </div>
+""";
         }
 
-        if ($.comment_pages.total_subitems > 0) {
-            $this->print_multiform_start();
+    } else {
 
-            $this->print_comments($.comments);
+        _print_entry($e);
+        
+        if ($.entry.comments.enabled) {
+"""
+                        <div class="entry-wrap entry-comments" id="comments">
+                        <div class="entry">
+                            <div class="entry-text"><div class="entry-comments-text">
+""";
+            var string comments_count = string($e.comments.count);
+            if ($.viewing_thread or $p.showspam) {
+                var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#comments";
+                $comments_count = """<a href="$toplink">"""+ get_plural_phrase($e.comments.count, "text_read_all_comments") +"""</a>""";
+            } else {
+                $comments_count = get_plural_phrase($e.comments.count, "text_read_comments");
+            }
+            if (not $.entry.comments.locked) {
+                $comments_count = """<span class="comments-count">$comments_count</span>""";
+            } else {
+                $comments_count = "";
+            }
+            var string comments_showspam = "";
+            if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
+                if ($p.showspam) {
+                    $comments_showspam = """<br /><span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span>""";
+                } else {
+                    $comments_showspam = """<br /><span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span>""";
+                }
+            } else {
+                $comments_showspam = "";
+            }
+            """<div class="comments-links">$comments_count$comments_showspam</div>""";
 
-            $this->print_multiform_actionline();
-            $this->print_multiform_end();
-
-            if (not $.entry.comments.locked) { 
+            if ($.comment_pages.total_subitems > 0) {
+                $.comment_pages->print();
+            }
+            
+            if (not $.entry.comments.locked) {
                 """
                 <div class="comments-reply">
-                    <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment", "reply_url" => $e.comments.post_url });"""</p>
+                    <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment", "reply_url" => $e.comments.post_url });"""</p>
                     """;
                     """
                 </div>
                 """;
-                $this->print_reply_container({ "target" => "bottomcomment" });
+                $this->print_reply_container({ "target" => "topcomment" });
             }
 
-            $.comment_pages->print();
-        }
+            if ($.comment_pages.total_subitems > 0) {
+                $this->print_multiform_start();
 
+                $this->print_comments($.comments);
+
+                $this->print_multiform_actionline();
+                $this->print_multiform_end();
+
+                if (not $.entry.comments.locked) { 
+                    """
+                    <div class="comments-reply">
+                        <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment", "reply_url" => $e.comments.post_url });"""</p>
+                        """;
+                        """
+                    </div>
+                    """;
+                    $this->print_reply_container({ "target" => "bottomcomment" });
+                }
+
+                $.comment_pages->print();
+            }
+
 """
-                        </div></div>
-                    </div>
-                    </div>
+                            </div></div>
+                        </div>
+                        </div>
 """;
+        }
+
     }
+
 }
 
 function EntryPage::print_comment_full (Comment c) {
@@ -1302,21 +1536,39 @@
 
     """<div class="comment-text""" + (defined $c.userpic and $*comment_userpic_style != "off" ? "" : " comment-text-cwoup") + """\">"""; $c->print_text(); "</div>";
     """<div class="comment-menu">""";
-    """<ul>""";
-    if ($c.frozen) {
-        print safe "<li>$*text_comment_frozen</li>";
-    } elseif($c.screened) {
-        var Link link = $c->get_link("unscreen_to_reply");
-        """<li><a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a></li>""";
-    } elseif ((not $c.spam) or ($p.showspam)) {
-        """<li>"""; $c->print_reply_link({"linktext" => $*text_comment_reply}); """</li>""";
+    if ($*old_s1) {
+        if ($c.frozen) {
+            print safe "($*text_comment_frozen) ";
+        } elseif($c.screened) {
+            var Link link = $c->get_link("unscreen_to_reply");
+            """(<a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a>) """;
+        } elseif ((not $c.spam) or ($p.showspam)) {
+            "("; $c->print_reply_link({"linktext" => $*text_comment_reply}); ") ";
+        }
+        if ($c.parent_url != "") { print safe """(<a href="$c.parent_url">$*text_comment_parent</a>) """; }
+        if (($c.thread_url != "") and (not $c.spam)) {
+            print safe """(<a href="$c.thread_url">$*text_comment_thread</a>) """;
+            if ($c.parent_url != "") {
+                $c->print_expand_collapse_links({ "expand"=>"(%_)", "collapse"=>"(%_)"}); 
+            }
+        }
+    } else {
+        """<ul>""";
+        if ($c.frozen) {
+            print safe "<li>$*text_comment_frozen</li>";
+        } elseif($c.screened) {
+            var Link link = $c->get_link("unscreen_to_reply");
+            """<li><a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a></li>""";
+        } elseif ((not $c.spam) or ($p.showspam)) {
+            """<li>"""; $c->print_reply_link({"linktext" => $*text_comment_reply}); """</li>""";
+        }
+        if ($c.parent_url != "") { print safe """<li><a href="$c.parent_url">$*text_comment_parent</a></li>"""; }
+        if (($c.thread_url != "") and (not $c.spam)) {
+            print safe """<li><a href="$c.thread_url">$*text_comment_thread</a></li>""";
+            """<li>"""; $c->print_expand_collapse_links(); """</li>""";
+        }
+        """</ul>""";
     }
-    if ($c.parent_url != "") { print safe """<li><a href="$c.parent_url">$*text_comment_parent</a></li>"""; }
-    if (($c.thread_url != "") and (not $c.spam)) {
-        print safe """<li><a href="$c.thread_url">$*text_comment_thread</a></li>""";
-        """<li>"""; $c->print_expand_collapse_links(); """</li>""";
-    }
-    """</ul>""";
     """</div><div class="hr"><hr /></div>""";
 }
 
@@ -1551,35 +1803,66 @@
 
 function ItemRange::print() {
     if ($.all_subitems_displayed) { return; }
-    
-    """<ul class="comments-pages">""";
-    
-    var string url_prev = $this->url_of($.current - 1);
-    if ($.current != 1) {
-        """<li class="comments-pages-prev"><a href="$url_prev#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></a></li>""";
+
+    if ($*old_s1) {
+        """<div class="comments-pages">""";
+            print "<table align='center' border='0' cellpadding='3'>";
+            print "<tr><td align='center' colspan='3'><b>" +
+                lang_page_of_pages($.current, $.total) + "</b>";
+            print "</td></tr>";
+            var string url_prev = $this->url_of($.current - 1);
+            if ($.current != 1) {
+                print "<tr><td align='center'><a href='$url_prev#comments'>&lt;&lt;</a></td>";
+            } else {
+                print "<tr><td align='center'>&lt;&lt;</td>";
+            }
+            print "<td align='center'>";
+            foreach var int i (1..$.total) {
+                if ($i == $.current) { "<b>[$i]</b> "; }
+                else {
+                    var string url_of = $this->url_of($i);
+                    "<a href='$url_of#comments'><b>[$i]</b></a> ";
+                }
+            }
+            print "</td>";
+            var string url_next = $this->url_of($.current + 1);
+            if ($.current != $.total) {
+                print "<td align='center'><a href='$url_next#comments'>&gt;&gt;</a></td>";
+            } else {
+                print "<td align='center'>&gt;&gt;</td>";
+            }
+            print "</tr></table>";
+        """</div>""";
     } else {
-        """<li class="comments-pages-prev comments-pages-prev-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></li>""";
-    }
-    
-    foreach var int i (1..$.total) {
-        var string class_first = ($i == 1 ? " comments-pages-first" : "");
-        if ($i == $.current) {
-            """<li class="comments-pages-item comments-pages-current$class_first">$i</li>""";
+        """<ul class="comments-pages">""";
+        
+        var string url_prev = $this->url_of($.current - 1);
+        if ($.current != 1) {
+            """<li class="comments-pages-prev"><a href="$url_prev#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></a></li>""";
+        } else {
+            """<li class="comments-pages-prev comments-pages-prev-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></li>""";
         }
-        else {
-            var string url_of = $this->url_of($i);
-            """<li class="comments-pages-item$class_first"><a href="$url_of#comments">$i</a></li>""";
+        
+        foreach var int i (1..$.total) {
+            var string class_first = ($i == 1 ? " comments-pages-first" : "");
+            if ($i == $.current) {
+                """<li class="comments-pages-item comments-pages-current$class_first">$i</li>""";
+            }
+            else {
+                var string url_of = $this->url_of($i);
+                """<li class="comments-pages-item$class_first"><a href="$url_of#comments">$i</a></li>""";
+            }
         }
-    }
 
-    var string url_next = $this->url_of($.current + 1);
-    if ($.current != $.total) {
-        """<li class="comments-pages-next"><a href="$url_next#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></a></li>""";
-    } else {
-        """<li class="comments-pages-next comments-pages-next-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></li>""";
+        var string url_next = $this->url_of($.current + 1);
+        if ($.current != $.total) {
+            """<li class="comments-pages-next"><a href="$url_next#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></a></li>""";
+        } else {
+            """<li class="comments-pages-next comments-pages-next-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></li>""";
+        }
+        
+        """</ul>""";
     }
-    
-    """</ul>""";
 }
 
 
@@ -1587,81 +1870,158 @@
     var Page p = get_page();
     var Entry e = $.entry;
 
-    _print_entry($e);
-    
-    if ($.entry.comments.enabled) {
-"""
-                    <div class="entry-wrap entry-comments" id="comments">
-                    <div class="entry">
-                        <div class="entry-text"><div class="entry-comments-text">
-""";
+    if ($*old_s1) {
+
         var string comments_count = string($e.comments.count);
         if ($.viewing_thread or $p.showspam) {
-            var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#comments";
+            var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url);
             $comments_count = """<a href="$toplink">"""+ get_plural_phrase($e.comments.count, "text_read_all_comments") +"""</a>""";
         } else {
             $comments_count = get_plural_phrase($e.comments.count, "text_read_comments");
         }
-        if (not $.entry.comments.locked) {
-            $comments_count = """<span class="comments-count">$comments_count</span>""";
+        if ($e.comments.count > 0 and not $.entry.comments.locked) {
+            $comments_count = """<span class="comments-count">$comments_count</span> <span class="emdash">—</span> """;
+        } elseif ($e.comments.count > 0) {
+            $comments_count = """<span class="comments-count">$comments_count</span> """;
         } else {
             $comments_count = "";
         }
-        var string comments_showspam = "";
-        if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
-            if ($p.showspam) {
-                $comments_showspam = """<br /><span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span>""";
+        _print_entry($e);
+        if ($.entry.comments.enabled) {
+"""
+                        <div id="$*text_comments_id" class="entry-wrap entry-comments entry-comments-s1">
+                        <div class="entry">
+                            <div class="entry-text"><div class="entry-comments-text">
+""";
+            "<a name='comments'></a>";
+
+            if ($*old_s1 and $.comment_pages.total_subitems > 0) {
+                """<div class="comments-pages">""";$.comment_pages->print();"""</div>""";
+            }
+
+            var string comments_showspam = "";
+            if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
+                if ($p.showspam) {
+                    $comments_showspam = """<span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span> <span class="emdash">—</span> """;
+                } else {
+                    $comments_showspam = """<span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> <span class="emdash">—</span> """;
+                }
             } else {
-                $comments_showspam = """<br /><span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span>""";
+                $comments_showspam = "";
             }
-        } else {
-            $comments_showspam = "";
-        }
-        """<div class="comments-links">$comments_count$comments_showspam</div>""";
+            """<div class="comments-links">( $comments_count $comments_showspam""";
+            if (not $.entry.comments.locked) {
+            """<span class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment", "reply_url" => $e.comments.post_url });"""</span>""";
+            }
 
-        if ($.comment_pages.total_subitems > 0) {
-            $.comment_pages->print();
-        }
-        
-        if (not $.entry.comments.locked) {
-            """
-            <div class="comments-reply">
-                <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment", "reply_url" => $e.comments.post_url });"""</p>
-                """;
-                """
-            </div>
-            """;
+            """ )</div>""";
+
             $this->print_reply_container({ "target" => "topcomment" });
+            if ($.comment_pages.total_subitems > 0) {
+                if (not $*old_s1) {"""<div class="comments-pages">""";$.comment_pages->print();"""</div>""";}
+                $this->print_multiform_start();
+                $this->print_comments($.comments);
+                """<div class="comments-footer">""";
+                """<div class="comments-links">( $comments_count $comments_showspam""";
+                if (not $.entry.comments.locked) { 
+                """<span class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment", "reply_url" => $e.comments.post_url }); """</span>""";
+                }
+                """ )</div>""";
+                $this->print_reply_container({"target" => "bottomcomment"});
+                if ($.comment_pages.all_subitems_displayed) { """<div class="hr"><hr /></div>"""; }
+                $this->print_multiform_actionline();
+                $this->print_multiform_end();
+                """</div>""";
+                """<div class="comments-pages">""";$.comment_pages->print();"""</div>""";
+            }
+
+"""
+                            </div></div>
+                        </div>
+                    </div>
+""";
         }
 
-        if ($.comment_pages.total_subitems > 0) {
-            $this->print_multiform_start();
+    } else {
 
-            $this->print_comments($.comments);
+        _print_entry($e);
+        
+        if ($.entry.comments.enabled) {
+"""
+                        <div class="entry-wrap entry-comments" id="comments">
+                        <div class="entry">
+                            <div class="entry-text"><div class="entry-comments-text">
+""";
+            var string comments_count = string($e.comments.count);
+            if ($.viewing_thread or $p.showspam) {
+                var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#comments";
+                $comments_count = """<a href="$toplink">"""+ get_plural_phrase($e.comments.count, "text_read_all_comments") +"""</a>""";
+            } else {
+                $comments_count = get_plural_phrase($e.comments.count, "text_read_comments");
+            }
+            if (not $.entry.comments.locked) {
+                $comments_count = """<span class="comments-count">$comments_count</span>""";
+            } else {
+                $comments_count = "";
+            }
+            var string comments_showspam = "";
+            if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
+                if ($p.showspam) {
+                    $comments_showspam = """<br /><span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span>""";
+                } else {
+                    $comments_showspam = """<br /><span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span>""";
+                }
+            } else {
+                $comments_showspam = "";
+            }
+            """<div class="comments-links">$comments_count$comments_showspam</div>""";
 
-            $this->print_multiform_actionline();
-            $this->print_multiform_end();
-
-            if (not $.entry.comments.locked) { 
+            if ($.comment_pages.total_subitems > 0) {
+                $.comment_pages->print();
+            }
+            
+            if (not $.entry.comments.locked) {
                 """
                 <div class="comments-reply">
-                    <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment", "reply_url" => $e.comments.post_url });"""</p>
+                    <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment", "reply_url" => $e.comments.post_url });"""</p>
                     """;
                     """
                 </div>
                 """;
-                $this->print_reply_container({ "target" => "bottomcomment" });
+                $this->print_reply_container({ "target" => "topcomment" });
             }
 
-            $.comment_pages->print();
-        }
+            if ($.comment_pages.total_subitems > 0) {
+                $this->print_multiform_start();
 
+                $this->print_comments($.comments);
+
+                $this->print_multiform_actionline();
+                $this->print_multiform_end();
+
+                if (not $.entry.comments.locked) { 
+                    """
+                    <div class="comments-reply">
+                        <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment", "reply_url" => $e.comments.post_url });"""</p>
+                        """;
+                        """
+                    </div>
+                    """;
+                    $this->print_reply_container({ "target" => "bottomcomment" });
+                }
+
+                $.comment_pages->print();
+            }
+
 """
-                        </div></div>
-                    </div>
-                    </div>
+                            </div></div>
+                        </div>
+                        </div>
 """;
+        }
+
     }
+
 }
 
 function EntryPage::print_comment_full (Comment c) {
@@ -1691,21 +2051,39 @@
 
     """<div class="comment-text""" + (defined $c.userpic and $*comment_userpic_style != "off" ? "" : " comment-text-cwoup") + """\">"""; $c->print_text(); "</div>";
     """<div class="comment-menu">""";
-    """<ul>""";
-    if ($c.frozen) {
-        print safe "<li>$*text_comment_frozen</li>";
-    } elseif($c.screened) {
-        var Link link = $c->get_link("unscreen_to_reply");
-        """<li><a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a></li>""";
-    } elseif ((not $c.spam) or ($p.showspam)) {
-        """<li>"""; $c->print_reply_link({"linktext" => $*text_comment_reply}); """</li>""";
+    if ($*old_s1) {
+        if ($c.frozen) {
+            print safe "($*text_comment_frozen) ";
+        } elseif($c.screened) {
+            var Link link = $c->get_link("unscreen_to_reply");
+            """(<a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a>) """;
+        } elseif ((not $c.spam) or ($p.showspam)) {
+            "("; $c->print_reply_link({"linktext" => $*text_comment_reply}); ") ";
+        }
+        if ($c.parent_url != "") { print safe """(<a href="$c.parent_url">$*text_comment_parent</a>) """; }
+        if (($c.thread_url != "") and (not $c.spam)) {
+            print safe """(<a href="$c.thread_url">$*text_comment_thread</a>) """;
+            if ($c.parent_url != "") {
+                $c->print_expand_collapse_links({ "expand"=>"(%_)", "collapse"=>"(%_)"}); 
+            }
+        }
+    } else {
+        """<ul>""";
+        if ($c.frozen) {
+            print safe "<li>$*text_comment_frozen</li>";
+        } elseif($c.screened) {
+            var Link link = $c->get_link("unscreen_to_reply");
+            """<li><a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a></li>""";
+        } elseif ((not $c.spam) or ($p.showspam)) {
+            """<li>"""; $c->print_reply_link({"linktext" => $*text_comment_reply}); """</li>""";
+        }
+        if ($c.parent_url != "") { print safe """<li><a href="$c.parent_url">$*text_comment_parent</a></li>"""; }
+        if (($c.thread_url != "") and (not $c.spam)) {
+            print safe """<li><a href="$c.thread_url">$*text_comment_thread</a></li>""";
+            """<li>"""; $c->print_expand_collapse_links(); """</li>""";
+        }
+        """</ul>""";
     }
-    if ($c.parent_url != "") { print safe """<li><a href="$c.parent_url">$*text_comment_parent</a></li>"""; }
-    if (($c.thread_url != "") and (not $c.spam)) {
-        print safe """<li><a href="$c.thread_url">$*text_comment_thread</a></li>""";
-        """<li>"""; $c->print_expand_collapse_links(); """</li>""";
-    }
-    """</ul>""";
     """</div><div class="hr"><hr /></div>""";
 }
 
@@ -1940,35 +2318,66 @@
 
 function ItemRange::print() {
     if ($.all_subitems_displayed) { return; }
-    
-    """<ul class="comments-pages">""";
-    
-    var string url_prev = $this->url_of($.current - 1);
-    if ($.current != 1) {
-        """<li class="comments-pages-prev"><a href="$url_prev#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></a></li>""";
+
+    if ($*old_s1) {
+        """<div class="comments-pages">""";
+            print "<table align='center' border='0' cellpadding='3'>";
+            print "<tr><td align='center' colspan='3'><b>" +
+                lang_page_of_pages($.current, $.total) + "</b>";
+            print "</td></tr>";
+            var string url_prev = $this->url_of($.current - 1);
+            if ($.current != 1) {
+                print "<tr><td align='center'><a href='$url_prev#comments'>&lt;&lt;</a></td>";
+            } else {
+                print "<tr><td align='center'>&lt;&lt;</td>";
+            }
+            print "<td align='center'>";
+            foreach var int i (1..$.total) {
+                if ($i == $.current) { "<b>[$i]</b> "; }
+                else {
+                    var string url_of = $this->url_of($i);
+                    "<a href='$url_of#comments'><b>[$i]</b></a> ";
+                }
+            }
+            print "</td>";
+            var string url_next = $this->url_of($.current + 1);
+            if ($.current != $.total) {
+                print "<td align='center'><a href='$url_next#comments'>&gt;&gt;</a></td>";
+            } else {
+                print "<td align='center'>&gt;&gt;</td>";
+            }
+            print "</tr></table>";
+        """</div>""";
     } else {
-        """<li class="comments-pages-prev comments-pages-prev-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></li>""";
-    }
-    
-    foreach var int i (1..$.total) {
-        var string class_first = ($i == 1 ? " comments-pages-first" : "");
-        if ($i == $.current) {
-            """<li class="comments-pages-item comments-pages-current$class_first">$i</li>""";
+        """<ul class="comments-pages">""";
+        
+        var string url_prev = $this->url_of($.current - 1);
+        if ($.current != 1) {
+            """<li class="comments-pages-prev"><a href="$url_prev#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></a></li>""";
+        } else {
+            """<li class="comments-pages-prev comments-pages-prev-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" class="comments-pages-arr" /></li>""";
         }
-        else {
-            var string url_of = $this->url_of($i);
-            """<li class="comments-pages-item$class_first"><a href="$url_of#comments">$i</a></li>""";
+        
+        foreach var int i (1..$.total) {
+            var string class_first = ($i == 1 ? " comments-pages-first" : "");
+            if ($i == $.current) {
+                """<li class="comments-pages-item comments-pages-current$class_first">$i</li>""";
+            }
+            else {
+                var string url_of = $this->url_of($i);
+                """<li class="comments-pages-item$class_first"><a href="$url_of#comments">$i</a></li>""";
+            }
         }
-    }
 
-    var string url_next = $this->url_of($.current + 1);
-    if ($.current != $.total) {
-        """<li class="comments-pages-next"><a href="$url_next#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></a></li>""";
-    } else {
-        """<li class="comments-pages-next comments-pages-next-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></li>""";
+        var string url_next = $this->url_of($.current + 1);
+        if ($.current != $.total) {
+            """<li class="comments-pages-next"><a href="$url_next#comments"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" class="comments-pages-arr" /></a></li>""";
+        } else {
+            """<li class="comments-pages-next comments-pages-next-dis"><img src="$*IMGDIR/spacer.gif" width="7" height="13...
 (truncated)
Tags: esavintcev, ljcom, 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