yokcel (yokcel) wrote in changelog,
yokcel
yokcel
changelog

[ljcom] r11921: LJSUP-10007: Need html for new S2 style....

Committer: ybuhvalova
LJSUP-10007: Need html for new S2 style. Friends times S2 style
U   trunk/bin/upgrading/s2layers/sup/themes.s2
Modified: trunk/bin/upgrading/s2layers/sup/themes.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sup/themes.s2	2012-05-11 11:52:00 UTC (rev 11920)
+++ trunk/bin/upgrading/s2layers/sup/themes.s2	2012-05-11 12:21:04 UTC (rev 11921)
@@ -2808,6 +2808,8 @@
 layerinfo "name" = "Friendstimes";
 layerinfo "redist_uniq" = "sup/friendstimes";
 set theme_css = "friendstimes.css";
+set show_title_on_tagpage = true;
+set hide_comment_controls = true;
 
 function CommentInfo::print() {
 
@@ -3028,6 +3030,7 @@
     var string poster = defined $c.poster ? _user_print($c.poster, "microformatted") : "<em>$*text_poster_anonymous</em>";
     var string evenodd = $c.depth % 2 ? "odd" : "even";
     var string commdate = _dateTime($c.time);
+    var string hide_controls = $*hide_comment_controls ? " hide-comment-controls" : "";
 
     if (defined $c.userpic and $*comment_userpic_style != "off") {
         var int w = $c.userpic.width;
@@ -3054,29 +3057,29 @@
         "</p>";
         "</div>";
     } else {
-        """<div class="comment-head-in">""";
-        if (defined $c.subject_icon or $c.subject != "") {
-            """<h3>$c.subject_icon $c.subject</h3>""";
-        }
-        """<span class="c-poster">$poster</span>"""; 
-        """ <span class="c-time">$commdate</span>""";
-       
-        if ($c.metadata{"poster_ip"}) { 
-                """ <span class="c-ip">IP: """; 
-                    print $c.metadata{"poster_ip"}; 
-                """</span>"""; 
-            }
-        
-        if ($this.multiform_on) {
-            """<span class="c-multyform">""";
-                print safe """ <label for="ljcomsel_$c.talkid">$*text_multiform_check</label>""";
-                $c->print_multiform_check();
-            "</span>";
-        }
-
-        """<div class="c-linkbar">""";
-            $c->print_linkbar();
-        "</div></div>";
+        """<div class="comment-head-in""" + $hide_controls + """">""";
+            if (defined $c.subject_icon or $c.subject != "") {
+                """<h3>$c.subject_icon $c.subject</h3>""";
+                }
+            """<span class="c-poster">$poster</span>"""; 
+            """ <span class="c-time">$commdate</span>""";
+           
+            if ($c.metadata{"poster_ip"}) { 
+                    """ <span class="c-ip">IP: """; 
+                        print $c.metadata{"poster_ip"}; 
+                    """</span>"""; 
+                }
+            
+            if ($this.multiform_on) {
+                """<span class="c-multyform">""";
+                    print safe """ <label for="ljcomsel_$c.talkid">$*text_multiform_check</label>""";
+                    $c->print_multiform_check();
+                "</span>";
+                }
+            """<div class="c-linkbar">""";
+                $c->print_linkbar();
+                "</div>";
+        "</div>";
     }
     
     "</div>";
@@ -3102,6 +3105,41 @@
     """</div><div class="hr"><hr /></div>""";
 }
 
+function _linklist {
+    var Page p = get_page();
+    var UserLink[] links = $p.linklist;
+    var bool Open = false;
+
+    var int counter = 0;
+
+    """<dt><div> </div></dt>""";
+    """<dd><div class="sidebar-block-inner"><ul>""";
+
+        foreach var UserLink link ($links) {
+                $counter++;
+
+                if ($link.url == "") {
+                    if($counter != 1) {
+                        """</ul>""";
+                    }
+
+                    """<h4 class="links-header">$link.title</h4>""";
+                    
+                    if($counter < size($links)) {
+                        """<ul>""";
+                    }
+                }
+                elseif ($link.title->starts_with("http://") and ($link.title->ends_with(".jpg") or $link.title->ends_with(".png") or $link.title->ends_with(".gif"))) {
+                    """<li class="img"><a href="$link.url"><img src="$link.title" alt="" /></a></li>""";
+                } else {
+                    """<li><a href="$link.url">$link.title</a></li>""";
+                }
+                
+            }
+        
+    """</ul></div></dd>""";
+}
+
 function _Sidebar {
     var Page p=get_page();
     var int visible_counter = 0;
@@ -3145,7 +3183,7 @@
         if ($*layout_show_calendar) {
             $visible_counter++;
             """<div class="hr"><hr /></div>""";}
-"""
+"""                 
                     <dl class="sidebar-block sidebar-links item-$visible_counter">
                         """; _linklist(); """
                     </dl>
@@ -3163,8 +3201,9 @@
             _taglist($*tag_cloud_max,108);
         } else {
             _taglist(108);
-        } """</div></dd>
-                            </dl>
+        }               
+                        """</div></dd>
+                     </dl>
         """;
             }
 
@@ -3173,19 +3212,15 @@
         if ($*layout_show_calendar or (size($p.linklist) > 0 and $*layout_show_links) or (bool($*layout_customHTML) and $*layout_show_custom)) {"""<div class="hr"><hr /></div>""";}
 """
                     <dl class="sidebar-block sidebar-custom item-$visible_counter">
+                        <dt><div> </div></dt>
                         <dd><div class="sidebar-block-inner">$*layout_customHTML</div></dd>
                     </dl>
-
 """;
     }
 
-
-    """
-                        </div>
-                    </div>
+    """</div>
+    </div>
     """;
-    
-
 }
 
 

Tags: ljcom, s2, ybuhvalova, yokcel
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