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

[ljcom] r12302: LJSUP-13008: Component Style Sidebar Bug...

Committer: esavintcev
LJSUP-13008: Component Style Sidebar Bug
U   trunk/bin/upgrading/s2layers/component/layout.s2
Modified: trunk/bin/upgrading/s2layers/component/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/component/layout.s2	2012-07-17 11:33:36 UTC (rev 12301)
+++ trunk/bin/upgrading/s2layers/component/layout.s2	2012-07-17 11:55:52 UTC (rev 12302)
@@ -1035,25 +1035,29 @@
 }
 
 
+
 # Top of the table to each new thread
-function print_comment_bottom() {
-    """                <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr><tr>
-                    <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr>
-            </table>
-            <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>
-    """;
+function print_comment_top() {
+"""
+    <table cellspacing="0" cellpadding="0" border="0" width="100%">
+        <tr>
+            <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            <td class="entryHolderBg" width="100%">
+""";
 }
 
 # Bottom of the table to each new thread
-function print_comment_top() {
-    """
-                <table cellspacing="0" cellpadding="0" border="0" width="100%">
-                    <tr>
-                        <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                        <td class="entryHolderBg" width="100%">
-    """;
+function print_comment_bottom() {
+"""
+            </td>
+            <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        </tr>
+        <tr>
+            <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        </tr>
+    </table>
+    <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>
+""";
 }
 
 # Top of lt gray table
@@ -1080,7 +1084,7 @@
 }
 
 function print_spacer() {
-    """</div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>""";
+    """<div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>""";
 }
 
 
@@ -1092,37 +1096,41 @@
     var int cspan3 = 5;
 
 """
-            <table cellspacing="0" cellpadding="0" border="0" width="100%">
-                <tr>
-                    <td valign="top" rowspan="3" colspan="3" width="5"><!--HERE --><img src="$*ctl" width="5" height="5" alt="" border="0" /></td>
-                    <td class="dkLine" colspan="$cspan"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                    <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*ctr" width="5" height="5" alt="" border="0" /></td>
-                </tr><tr>
-                    <td class="ltLine" colspan="$cspan"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr><tr>
-                    <td class="tabBg" colspan="$cspan"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                </tr><tr>
-                    <td class="dkLine" width="1" rowspan="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                    <td class="ltLine" width="1" rowspan="2"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                    <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                    <td class="tabBg" width="100%"><!-- HEADER CONTENT -->
-                        <div class="entryDate">
+    <table cellspacing="0" cellpadding="0" border="0" width="100%">
+        <tr>
+            <td valign="top" rowspan="3" colspan="3" width="5"><!--HERE --><img src="$*ctl" width="5" height="5" alt="" border="0" /></td>
+            <td class="dkLine" colspan="$cspan"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*ctr" width="5" height="5" alt="" border="0" /></td>
+        </tr>
+        <tr>
+            <td class="ltLine" colspan="$cspan"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        </tr>
+        <tr>
+            <td class="tabBg" colspan="$cspan"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+        </tr>
+        <tr>
+            <td class="dkLine" width="1" rowspan="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            <td class="ltLine" width="1" rowspan="2"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+            <td class="tabBg" width="100%">
+                <!-- HEADER CONTENT -->
+                <div class="entryDate">
 """;
-
-                        print safe $content;
-
+                    print safe $content;
 """
-                        </div>
-                    </td>
-                    <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                    <td class="ltLine" width="1" rowspan="2"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                    <td class="dkLine" width="1" rowspan="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr><tr>
-                    <td class="medLine" colspan="$cspan2"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr><tr>
-                    <td class="dkLine" colspan="$cspan3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr>
-            </table>
+                </div>
+            </td>
+            <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+            <td class="ltLine" width="1" rowspan="2"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            <td class="dkLine" width="1" rowspan="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        </tr>
+        <tr>
+            <td class="medLine" colspan="$cspan2"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        </tr>
+        <tr>
+            <td class="dkLine" colspan="$cspan3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        </tr>
+    </table>
 """;
 }
 
@@ -1132,51 +1140,62 @@
 function print_comp_header(string content) {
 
 """
-                        <tr>
-                            <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*ctl" width="5" height="5" alt="" border="0" /></td>
-                            <td class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                            <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*ctr" width="5" height="5" alt="" border="0" /></td>
-                        </tr><tr>
-                            <td class="ltLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                        </tr><tr>
-                            <td class="tabBg"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                        </tr><tr>
-                            <td class="dkLine" width="1" rowspan="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                            <td class="ltLine" width="1" rowspan="2"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                            <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                            <td class="tabBg" width="100%"><div class="sideHeader">
+    <tr>
+        <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*ctl" width="5" height="5" alt="" border="0" /></td>
+        <td class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*ctr" width="5" height="5" alt="" border="0" /></td>
+    </tr>
+    <tr>
+        <td class="ltLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+    </tr>
+    <tr>
+        <td class="tabBg"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+    </tr>
+    <tr>
+        <td class="dkLine" width="1" rowspan="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        <td class="ltLine" width="1" rowspan="2"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+        <td class="tabBg" width="100%">
+            <div class="sideHeader">
 """;
-                            print safe $content;
+                print safe $content;
 """
-                            </div></td>
-                            <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                            <td class="ltLine" width="1" rowspan="2"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                            <td class="dkLine" width="1" rowspan="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                        </tr><tr>
-                            <td class="medLine" colspan="4"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                        </tr><tr>
-                            <td class="dkLine" colspan="5"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                        </tr><tr>
-                            <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                            <td class="compBg" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                            <td class="compBg" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                            <td class="compBg"><div class="compFont">
+            </div>
+        </td>
+        <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+        <td class="ltLine" width="1" rowspan="2"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        <td class="dkLine" width="1" rowspan="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+    </tr>
+    <tr>
+        <td class="medLine" colspan="4"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+    </tr>
+    <tr>
+        <td class="dkLine" colspan="5"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+    </tr>
+    <tr>
+        <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+        <td class="compBg" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+        <td class="compBg" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+        <td class="compBg">
+            <div class="compFont">
 """;
 }
 
 # this ends a comp
 function print_comp_footer() {
 """
-                            </div></td>
-                            <td class="compBg" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                            <td class="compBg" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                            <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                        </tr><tr>
-                            <td class="dkLine" colspan="8"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                        </tr>
-                        <tr>
-                            <td><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                        </tr>
+            </div>
+        </td>
+        <td class="compBg" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+        <td class="compBg" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+        <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+    </tr>
+    <tr>
+        <td class="dkLine" colspan="8"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+    </tr>
+    <tr>
+        <td><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+    </tr>
 
 """;
 }
@@ -1231,7 +1250,7 @@
         if($num > 0) {
             $text = $text + " [+" + string($num) + "] ";
         }
-        "</div>";
+        $text = $text + "</div>";
     }
     print $text;
     print_comp_footer();
@@ -1846,12 +1865,20 @@
         }
 
 
-        "            </table>\n";
+"""
+            </table>
+""";
+
         if (viewer_sees_vbox() and viewer_sees_ad_box("s2.vertical.2")) {
-            """<div class="compBg compContent box-vertical2" style="margin: 5px 0 0; padding: 6px; border: 1px solid $*outside_border;">""";
-            $p->print_ad_box("s2.vertical.2");
-            """</div>""";
+"""
+            <div class="compBg compContent box-vertical2" style="margin: 5px 0 0; padding: 6px; border: 1px solid $*outside_border;">
+""";
+                $p->print_ad_box("s2.vertical.2");
+"""
+            </div>
+""";
         }
+
         "</td>";
     }
 }
@@ -1865,75 +1892,80 @@
 function print_my_entries (Page p, string title) {
 
 """
-                        <!-- USER HEADER -->
-                    <td valign="top" width="99%">
-                        <table cellspacing="0" cellpadding="0" border="0" width="100%">
-                            <tr>
-                                <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*ctl" width="5" height="5" alt="" border="0" /></td>
-                                <td class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                                <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*ctr" width="5" height="5" alt="" border="0" /></td>
-                            </tr><tr>
-                                <td class="ltLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                            </tr><tr>
-                                <td class="tabBg"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                            </tr><tr>
-                                <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                                <td class="ltLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                                <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                                <td class="tabBg" width="100%"><!-- HEADER CONTENT -->
-                                    <div class="userTitle">
+    <!-- USER HEADER -->
+    <td valign="top" width="99%">
+        <table cellspacing="0" cellpadding="0" border="0" width="100%">
+            <tr>
+                <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*ctl" width="5" height="5" alt="" border="0" /></td>
+                <td class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+                <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*ctr" width="5" height="5" alt="" border="0" /></td>
+            </tr>
+            <tr>
+                <td class="ltLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            </tr>
+            <tr>
+                <td class="tabBg"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+            </tr>
+            <tr>
+                <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+                <td class="ltLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+                <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+                <td class="tabBg" width="100%">
+                    <!-- HEADER CONTENT -->
+                    <div class="userTitle">
 """;
+                        print safe $title;
+"""
+                    </div>
+""";
 
-print safe $title;
-
+                    if($p.global_subtitle != "") {
 """
-                                    </div>
-                            """;
+                        <div class=\"userSubTitle\">$p.global_subtitle</div>
+""";
+                    }
 
-                            if($p.global_subtitle != "") {
-"                                    <div class=\"userSubTitle\">$p.global_subtitle</div>";
-                            }
-
-                            """
-
-                                </td>
-                                <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                                <td class="ltLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                                <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+                    """
+                </td>
+                <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+                <td class="ltLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+                <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            </tr>
+            <tr>
+                <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*cbl" width="5" height="5" alt="" border="0" /></td>
+                <td class="tabBg"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
+                <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*cbr" width="5" height="5" alt="" border="0" /></td>
+            </tr>
+            <tr>
+                <td class="ltLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
                             </tr><tr>
-                                <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*cbl" width="5" height="5" alt="" border="0" /></td>
-                                <td class="tabBg"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
-                                <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*cbr" width="5" height="5" alt="" border="0" /></td>
-                            </tr><tr>
-                                <td class="ltLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                            </tr><tr>
-                                <td class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                            </tr>
-                        </table>
+                <td class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            </tr>
+        </table>
 
-                    <!-- HBOX_TOP -->
-                    """;
-                    if (viewer_sees_hbox_top()) {
-                    """
-                    <!-- SPACER -->
+        <!-- HBOX_TOP -->
+""";
+        if (viewer_sees_hbox_top()) {
+"""
+            <!-- SPACER -->
+            <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="4" alt="" border="0" /></div>
 
-                        <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="4" alt="" border="0" /></div>
+            <div class="compBg compContent" style="border: 1px solid $*outside_border; text-align: center;">""";
+                $p->print_hbox_top();
+"""
+            </div>
+""";
+        }
+"""
+        <!-- SPACER -->
+        <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="4" alt="" border="0" /></div>
+""";
 
-                        <div class="compBg compContent" style="border: 1px solid $*outside_border; text-align: center;">""";
-                        $p->print_hbox_top();
-                        "</div>";
-                    }
-                    """
-                    <!-- SPACER -->
+        $p->print_body();
 
-                        <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="4" alt="" border="0" /></div>
-    """;
-
-    $p->print_body();
-
-    """
-                </td>
-    """;
+"""
+    </td>
+""";
 }
 
 function page_layout(Page p) {
@@ -1984,36 +2016,65 @@
         <td><img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" /></td>
 """;
             if($*comp_state == "right" or $*comp_state == "none") {
+
                 if (viewer_sees_vbox()) {
-                    """<td valign="top" width="184" style="padding: 3px;">""";
-                    """<div class="compBg compContent box-vertical1" style="padding: 6px; border: 1px solid $*outside_border;">""";
-                    $p->print_vbox();
-                    "</div>";
-                    if ($*comp_state == "none" and viewer_sees_ad_box("s2.vertical.2")) {
-                        """<div class="compBg compContent box-vertical2" style="margin: 10px 0 0; padding: 6px; border: 1px solid $*outside_border;">""";
-                        $p->print_ad_box("s2.vertical.2");
-                        """</div>""";
-                    }
-                    "</td>";
+"""
+                    <td valign="top" width="184" style="padding: 3px;">
+                        <div class="compBg compContent box-vertical1" style="padding: 6px; border: 1px solid $*outside_border;">
+""";
+                            $p->print_vbox();
+"""
+                        </div>
+""";
+                        if ($*comp_state == "none" and viewer_sees_ad_box("s2.vertical.2")) {
+"""
+                            <div class="compBg compContent box-vertical2" style="margin: 10px 0 0; padding: 6px; border: 1px solid $*outside_border;">
+""";
+                                $p->print_ad_box("s2.vertical.2");
+"""
+                            </div>
+""";
+                        }
+"""
+                    </td>
+""";
                 }
+
+                #"""<td>1print_my_entries</td>""";
                 print_my_entries($p, $title);
+
             } elseif($*comp_state == "left") {
+
+                #"""<td>1print_my_components</td>""";
                 print_my_components($p);
+
             }
 """
         <td><img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" /></td>
 """;
 
-        if($*comp_state == "right") {
-            print_my_components($p);
-        } elseif($*comp_state == "left") {
-            print_my_entries($p, $title);
-            if (viewer_sees_vbox()) {
-                """<td valign="top" width="184" style="padding: 3px;"><div class="compBg compContent" style="border: 1px solid $*outside_border;">""";
-                $p->print_vbox();
-                "</div></td>";
+            if($*comp_state == "right") {
+
+                #"""<td>2print_my_components</td>""";
+                print_my_components($p);
+
+            } elseif($*comp_state == "left") {
+
+                #"""<td>2print_my_entries</td>""";
+                print_my_entries($p, $title);
+
+                if (viewer_sees_vbox()) {
+"""
+                    <td valign="top" width="184" style="padding: 3px;">
+                        <div class="compBg compContent" style="border: 1px solid $*outside_border;">
+""";
+                            $p->print_vbox();
+"""
+                        </div>
+                    </td>
+""";
+                }
             }
-        }
 """
         <td><img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" /></td>
     </tr>
@@ -2647,98 +2708,105 @@
     }
 }
 
-function EntryPage::print_body ()
-{
-        set_handler("unscreen_comment_#", [
-                                           [ "style_bgcolor", "cmtbar#", "$*comments_bgcolor", ],
-                                           ]);
-        set_handler("screen_comment_#", [
-                                         [ "style_bgcolor", "cmtbar#", "$*comments_screened_bgcolor", ],
-                                         ]);
+function EntryPage::print_body () {
 
+    set_handler("unscreen_comment_#", [
+                                        [ "style_bgcolor", "cmtbar#", "$*comments_bgcolor", ],
+                                    ]);
+
+    set_handler("screen_comment_#", [
+                                        [ "style_bgcolor", "cmtbar#", "$*comments_screened_bgcolor", ],
+                                    ]);
+
     print_entry($this, $.entry, null Color, null Color, $.viewing_thread);
+
     print_ebox($.entry);
-    if ($.entry.comments.enabled and $.comment_pages.total_subitems > 0)
-    {
+
+    if ($.entry.comments.enabled and $.comment_pages.total_subitems > 0) {
+
         $this->print_multiform_start();
-    """
-                <table cellspacing="0" cellpadding="0" border="0" id="$*text_comments_id">
-                    <tr>
-                        <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                    </tr><tr>
-                        <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                        <td class="entryHolderBg" width="100%"><b>Comments</b>
-    """;
-                            if ($.comment_pages.total_subitems > 0) {
-                                $.comment_pages->print();
-                        }
-    """
-                        </td>
-                        <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                    </tr><tr>
-                        <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                    </tr>
-                </table>
-    """;
+"""
+        <table cellspacing="0" cellpadding="0" border="0" id="$*text_comments_id">
+            <tr>
+                <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            </tr>
+            <tr>
+                <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+                <td class="entryHolderBg" width="100%"><b>Comments</b>
+""";
+                    if ($.comment_pages.total_subitems > 0) {
+                        $.comment_pages->print();
+                    }
+"""
+                </td>
+                <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            </tr>
+            <tr>
+                <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            </tr>
+        </table>
+""";
+
         print_spacer();
 
         if ($.comment_pages.total_subitems > 0) {
             $this->print_comments($.comments);
         }
-"""                    <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr><tr>
-                    <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr>
-            </table>
 
-            <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>
+"""
+        <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>
 
-            <table cellspacing="0" cellpadding="0" border="0">
-                <tr>
-                    <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr><tr>
-                    <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                    <td class="entryHolderBg" width="100%"><b>
+        <table cellspacing="0" cellpadding="0" border="0">
+            <tr>
+                <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            </tr>
+            <tr>
+                <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+                <td class="entryHolderBg" width="100%">
+                    <b>
 """;
-
                         $.entry.comments->print();
-
 """
-</b>
+                    </b>
 """;
                     if ($.comment_pages.total_subitems > 0) {
                         $.comment_pages->print();
                     }
 """
-                    </td>
-                    <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr><tr>
-                    <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr>
-            </table>
+                </td>
+                <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            </tr>
+            <tr>
+                <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+            </tr>
+        </table>
 
+        <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>
+""";
 
-            <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>
-""";
         if ($this.multiform_on) {
 """
             <table cellspacing="0" cellpadding="0" border="0" width="100%">
                 <tr>
                     <td class="dkLine" colspan="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr><tr>
+                </tr>
+                <tr>
                     <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                    <td class="entryHolderBg" width="100%"><b>
+                    <td class="entryHolderBg" width="100%">
+                        <h2>Mass Action</h2>
+                        <div style="margin-left: 30px;">
 """;
-            "<h2>Mass Action</h2><div style=\"margin-left: 30px;\">";
-            $this->print_multiform_actionline();
-            $this->print_multiform_end();
-            "</div>";
-"""                    <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
-                </tr><tr>
+                            $this->print_multiform_actionline();
+"""
+                        </div>
+                    <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
+                </tr>
+                <tr>
                     <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
                 </tr>
             </table>
 """;
+            $this->print_multiform_end();
         }
     }
 
@@ -2750,7 +2818,7 @@
 
     var int indent = ($c.depth - 1) * 25;
 
-    """
+"""
     <table cellspacing="0" cellpadding="0" border="0" width="100%">
         <tr>
             <td><img src="$*PALIMGROOT/component/clear.gif" width="${indent}" height="1"></td>
@@ -2764,13 +2832,13 @@
                     <tr>
                         <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
                         <td class="entry">
-    """;
+""";
 
 }
 
 # Bottom of the table for each comment
 function print_comment_content_bottom() {
-    """
+"""
                         </td>
                         <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
                     </tr>
@@ -2784,8 +2852,7 @@
         </tr>
     </table>
     <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>
-    """;
-    "\n\n<!-- END OF COMMENT -->\n\n";
+""";
 }
 
 #  partial entries such as collapsed and screened.
@@ -2814,47 +2881,64 @@
         var string subj = $c.subject != "" ? $c.subject : $*text_nosubject;
         $content =  "<a href=\"$c.permalink_url\">$subj</a> - $poster";
     }
+
     print_comment_content_top($c);
+
     "$content";
     if ($c.thread_url != "") {
         $c->print_expand_collapse_links({ "expand"=>" - %_", "collapse"=>" - %_"});
     }
+
     print_comment_content_bottom();
+
+    if($c.depth == 1) {
+        print_comment_bottom();
+    }
 }
 
 function EntryPage::print_comments (Comment[] cs) {
     if (size $cs == 0) { return; }
     var bool first = true;
     foreach var Comment c ($cs) {
-        if($c.depth == 1) {
-            if($first != true) {
-                print_comment_bottom();
-            } else {
-                $first = false;
-            }
-        }
         $this->print_comment($c);
         $this->print_comments($c.replies);
     }
 }
 
 function EntryPage::print_comment (Comment c) {
-        var Page p = get_page();
-        var int margin = ($c.depth - 1) * 25;
-        """<div id="$c.dom_id">""";
-        """<a name="$c.anchor"></a>""";
+    var Page p = get_page();
+    var int margin = ($c.depth - 1) * 25;
+
+"""
+    <div id="$c.dom_id">
+        <a name="$c.anchor"></a>
+""";
         if ($c.screened and not $c.full and not viewer_is_owner()) {
-            """<div style="margin:3px 0 3px """ + $margin + """px;"><strong>$*text_comment_screened</strong></div>""";
+"""
+            <div style="margin:3px 0 3px """ + $margin + """px;">
+                <strong>$*text_comment_screened</strong>
+            </div>
+""";
         } elseif ($c.deleted) {
-            """<div style="margin:3px 0 3px """ + $margin + """px;"><strong>$*text_comment_deleted</strong></div>""";
+"""
+            <div style="margin:3px 0 3px """ + $margin + """px;">
+                <strong>$*text_comment_deleted</strong>
+            </div>
+""";
         } elseif (($c.spam) and (not $p.showspam) and (not $c.can_marked_as_spam) and (size($c.replies) > 0)) {
-            print "<div style=\"margin:3px 0 3px " + $margin + "px;border:1px solid #D6D6D6;\" class=\"entry\"><strong>$*text_spam_comment</strong></div>";
+"""
+            <div style="margin:3px 0 3px " + $margin + "px;border:1px solid #D6D6D6;" class="entry">
+                <strong>$*text_spam_comment</strong>
+            </div>
+""";
         } elseif ($c.full) {
             $this->print_comment_full($c);
         } else {
             $this->print_comment_partial($c);
         }
-	""" </div> """;
+"""
+    </div>
+""";
 }
 # Runs for every entry found
 function EntryPage::print_comment_full (Comment c) {
@@ -2896,11 +2980,13 @@
             print_comment_top();
     }
 
-    # print "<a name=\"t$c.talkid\"></a>";
     print_comment_content_top($c);
 
-    "\n\n<div style=\"background-color: $background; color: $color; margin-top: 10px;\">\n";
-    "    <table id='cmtbar$c.talkid' cellpadding=\"2\" cellspacing=\"0\" summary=\"0\" width=\"100%\" bgcolor=\"$background\">\n        <tr valign=\"top\">\n";
+"""
+    <div style="background-color: $background; color: $color; margin-top: 10px;">
+        <table id='cmtbar$c.talkid' cellpadding="2" cellspacing="0" summary="0" width="100%" bgcolor="$background">
+            <tr valign="top">
+""";
     var int td = 6;
     if (defined $c.userpic and $*comment_userpic_style != "off") {
         $td = 7;
@@ -2913,13 +2999,19 @@
             $w = $w / 2;
             $h = $h / 2;
         }
-    "            <td rowspan=\"2\" align=\"center\"><img src=\"$c.userpic.url\" width=\"$w\" height=\"$h\" alt=\"$c.poster.username\" border=\"1\" class=\"userpic\"></td>\n";
+"""
+                <td rowspan="2" align="center"><img src="$c.userpic.url" width="$w" height="$h" alt="$c.poster.username" border="1" class="userpic"></td>
+""";
     }
-    "            <td align=\"left\" style=\"white-space: nowrap\"><strong>From:</strong> $poster</td>\n";
-    "            <td align=\"left\" style=\"white-space: nowrap\"><strong>Date:</strong> " + $c->time_display("long", "") + "</td>\n";
+"""
+                <td align="left" style="white-space: nowrap"><strong>From:</strong> $poster</td>
+                <td align="left" style="white-space: nowrap"><strong>Date:</strong>
+""";
+                    $c->time_display("long", "");
+"""
+                </td>
+                <td style='text-align: center;'>""";
 
-    "<td style='text-align: center;'>";
-
     # action links (screen, unscreen, delete, freeze, etc)
     var Link link;
     var string icon;
@@ -2945,8 +3037,12 @@
         $icon = "";
     }
 
-    print safe "            <td align=\"right\"><strong>(<a href=\"$c.permalink_url\">$*text_permalink</a>)</strong></td>\n        </tr>\n";
-    "        <tr valign=\"top\">\n            <td colspan=\"$td\" style=\"width: 95%\">";
+"""
+                <td align="right"><strong>(<a href="$c.permalink_url">$*text_permalink</a>)</strong></td>
+            </tr>
+            <tr valign="top">
+                <td colspan="$td" style="width: 95%">
+""";
     if (defined $c.subject_icon or $c.subject != "") {     "<p class=\"subject\">$c.subject_icon $c.subject</p>\n"; }
     if ($c.metadata{"poster_ip"}) {     " (IP Address: " + $c.metadata{"poster_ip"} + ")<br>"; }
 
@@ -2955,9 +3051,18 @@
         $c->print_multiform_check();
     }
 
-    "</td>\n        </tr>\n</table>\n</div>\n";
-    "<div style=\"margin-left: 5px\">"; $c->print_text(); "</div>\n";
-    "<div class=\"small\">";
+"""
+                </td>
+            </tr>
+        </table>
+    </div>
+    <div style="margin-left: 5px">
+""";
+        $c->print_text();
+"""
+    </div>;
+    <div class="small">
+""";
     if ($c.frozen) {
         "(Replies frozen) ";
     } elseif ((not $c.spam) or ($p.showspam)) {
@@ -2988,9 +3093,14 @@
         $c->print_reply_container({"class" => "quickreply"});
     }
 
-   "</div>\n";
+"""
+    </div>
+""";
     print_comment_content_bottom();
 
+    if($c.depth == 1) {
+        print_comment_bottom();
+    }
 }
 
 # The ReplyPage is without any comments...just the item being replied to and form.

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