<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. https://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="https://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:s2layers</id>
  <title>S2 Layers</title>
  <subtitle>S2 Layers</subtitle>
  <author>
    <name>S2 Layers</name>
  </author>
  <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/"/>
  <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom"/>
  <updated>2008-06-04T14:02:42Z</updated>
  <lj:journal userid="4476045" username="s2layers" type="community"/>
  <link rel="service.feed" type="application/x.atom+xml" href="https://s2layers.livejournal.com/data/atom" title="S2 Layers"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:72678</id>
    <author>
      <name>Накурился</name>
    </author>
    <lj:poster user="ex_hexsex" userid="1373218"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/72678.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=72678"/>
    <title>tag cloud</title>
    <published>2008-06-04T14:02:42Z</published>
    <updated>2008-06-04T14:02:42Z</updated>
    <content type="html">Hallo. &lt;br /&gt;How i can get to my style (Disjointed) tag list or tag cloud? i have paid account and &lt;a target='_blank' href='http://www.livejournal.com/customize/advanced/'&gt;http://www.livejournal.com/customize/advanced/&lt;/a&gt; avaliable.&lt;br /&gt;&lt;br /&gt;Thank You.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:72282</id>
    <author>
      <name>Др. Хоббот</name>
    </author>
    <lj:poster user="drhobbot" userid="7561522"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/72282.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=72282"/>
    <title>Легко настраиваемый дизайн</title>
    <published>2007-12-14T12:29:55Z</published>
    <updated>2007-12-14T12:29:55Z</updated>
    <content type="html">Итак. Хотелось бы предложить идею, так как на реализацию таковой у меня не хватит (совсем) ни знаний ни опыта. Искренне надеюсь, что на нее обратит внимание кто нибудь из создателей стилей и (очень надеюсь!) &lt;span  class="ljuser  i-ljuser  i-ljuser-type-P     "  data-ljuser="camomiletea" lj:user="camomiletea" &gt;&lt;a href="https://camomiletea.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://camomiletea.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;camomiletea&lt;/b&gt;&lt;/a&gt;&lt;a class="i-ljuser-badge i-ljuser-badge--pro" data-badge-type="pro" data-placement="bottom" data-pro-badge data-pro-badge-type="1" data-is-raw hidden href="#"&gt;&lt;span class="i-ljuser-badge__icon"&gt;&lt;svg class="svgicon" width="25" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 24"&gt;&lt;path fill-rule="evenodd" d="M19.326 11.95c0 2.01 1.47 3.45 3.48 3.45 2.02 0 3.49-1.44 3.49-3.45 0-2.01-1.47-3.45-3.49-3.45-2.01 0-3.48 1.44-3.48 3.45Zm5.51 0c0 1.24-.8 2.19-2.03 2.19-1.23 0-2.02-.95-2.02-2.19 0-1.25.79-2.19 2.02-2.19s2.03.94 2.03 2.19ZM7.92 15.28H6.5V8.61h3.12c1.45 0 2.24.98 2.24 2.15 0 1.16-.8 2.15-2.24 2.15h-1.7v2.37Zm1.51-3.62c.56 0 .98-.35.98-.9 0-.56-.42-.9-.98-.9H7.92v1.8h1.51ZM18.3802 15.28h-1.63l-1.31-2.37h-1.04v2.37h-1.42V8.61h3.12c1.39 0 2.24.91 2.24 2.15 0 1.18-.74 1.81-1.46 1.98l1.5 2.54Zm-2.49-3.62c.57 0 1-.34 1-.9s-.43-.9-1-.9h-1.49v1.8h1.49Z" clip-rule="evenodd"/&gt;&lt;path fill-rule="evenodd" d="M2 8c0-2.20914 1.79086-4 4-4h20.5c2.2091 0 4 1.79086 4 4v7.9c0 2.2091-1.7909 4-4 4H6c-2.20914 0-4-1.7909-4-4V8Zm4-2.5h20.5C27.8807 5.5 29 6.61929 29 8v7.9c0 1.3807-1.1193 2.5-2.5 2.5H6c-1.38071 0-2.5-1.1193-2.5-2.5V8c0-1.38071 1.11929-2.5 2.5-2.5Z" clip-rule="evenodd"/&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Так вот. Сколько бы я не искал, но нет среди предложенных даже для платных аккаунтов такого стиля при котором можно бы было максимально контролировать собственный дизайн не обладая при этом какими либо знаниями в программировании и т.п.&lt;br /&gt;&lt;br /&gt;Долго думал я и ковырялся, и вот нашел некоторую систему:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Так или иначе любой стиль в жж (да и вообще в сети) чаще всего имеет схему:&lt;br /&gt;1) topbanner&lt;br /&gt;2) sidebar&lt;br /&gt;3) contentbox&lt;br /&gt;&lt;br /&gt;sidebar в свою очередь помимо всего прочего имеет внутри себя (как правило) некий linkbox в которых и находится все что душеньке угодно, от ссылок до счетчиков, инфоблоков и прочая прочая прочая.&lt;br /&gt;&lt;br /&gt;см. рисунок&lt;br /&gt;&lt;a href="http://www.ljplus.ru/img4/d/r/drhobbot/table2.jpg" target="_blank" target="_blank" rel="nofollow"&gt;&lt;img src="https://www.ljplus.ru/img4/d/r/drhobbot/th_table2.jpg" width="128" height="150" border="0" fetchpriority="high"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Теперь перейду собственно к задумке.&lt;br /&gt;А вот хорошо бы было, что бы пользователь (даже самый непонятливый) имел возможность в настройке своего стиля указывать следующие параметры:&lt;br /&gt;&lt;br /&gt;Общие:&lt;br /&gt;1.общий фон - задать цвет или загрузить картинку&lt;br /&gt;2.topbanner - задать размер в высоту, загрузить картинку&lt;br /&gt;3.общая таблица - задать цвет и толщину бордюра&lt;br /&gt; &lt;br /&gt;sidebar: &lt;br /&gt;1. установить количество linkbox&lt;br /&gt;2. выбрать цвет(и или) картинку для параметров 1-9 linkbox см.картинку&lt;br /&gt;&lt;br /&gt;выбрать расположение usermenu (левый верхний угол topbanner, другие его углы, полоска под topbanner (и местоположение на ней) или один из linkbox в sidebar)&lt;br /&gt;&lt;br /&gt;выбрать шрифт и размер для заголовка и подзаголовка. (хорошо бы было если бы было два topbanner один над другим, тогда некоторые платные пользователи могли бы размещать там свой баннер с рекламой или название жж или еще что нибудь что угодно))&lt;br /&gt;&lt;br /&gt;выбрать шрифт и размер для линков и текста в sidebar, заголовков тем, текста тела сообщения, даты и прочь.&lt;br /&gt;&lt;br /&gt;Добавить постоянную подпись в сообщение.&lt;br /&gt;&lt;br /&gt;Ну и хорошо бы было так же настраисать и тело сообщений, расположение аватара, настроений, цвет подложки для заголовка.... и так далее.&lt;br /&gt;&lt;br /&gt;Спасибо за внимание, надеюсь желающие реализовать эту идею найдутся.&lt;br /&gt;Если что обращайтесь за идеями ко мне )))&lt;br /&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:71697</id>
    <author>
      <name>Др. Хоббот</name>
    </author>
    <lj:poster user="drhobbot" userid="7561522"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/71697.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=71697"/>
    <title>Вопрос про редактируемый sidebar | Question about edited sidebar,</title>
    <published>2007-10-25T12:17:45Z</published>
    <updated>2007-10-25T12:17:45Z</updated>
    <content type="html">S2 платный - Родительский слой - собственный на основе &lt;b&gt;Style Contest/Cleanstyle Black and White&lt;/b&gt;&lt;br /&gt;Не уверен, что мне тут помогут, но....&lt;br /&gt;Ситуация следующая: Style Contest мною был выбран в следствии долгих экспериментов, по причине того, что это единственный родительский слой, в котором прописаны полностью адреса к css файлам оформлений. И единственный слой, в котором внесение мной незначительных изменений изменений дало именно тот результат, который я хотел. В ситуации с Expressive, например, даже внесение своего css файла в custome css давала результат в виде отображение жж вообще без дизайна или с дизайном по умолчению взятом из weblog.css&lt;br /&gt;&lt;br /&gt;Так вот:&lt;br /&gt;Есть S2 родительский слой названный мною &lt;a href="http://www.livejournal.com/customize/advanced/layersource.bml?id=9368144&amp;amp;fmt=html" target="_blank"&gt;LiderBlog&lt;/a&gt; на основе, как я уже говорил &lt;a href="http://www.livejournal.com/customize/advanced/layersource.bml?id=7457659&amp;amp;fmt=html" target="_blank"&gt;Style Contest&lt;/a&gt;&lt;br /&gt;То, чего в нем не реализовано - это внесение изменений в sidebar. Зато это очень красиво реализовано в &lt;a href="http://www.livejournal.com/customize/advanced/layersource.bml?id=420357&amp;amp;fmt=html" target="_blank"&gt;Digital Multiplex (OSWD)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Внимание вопрос: Какие части кода нужно перенести из Digital Multiplex (OSWD) в мой LiderBlog, что бы эти функции там заработали?&lt;br /&gt;Сразу скажу, что тупой перенос группы &lt;pre&gt;&lt;span class=""&gt;propgroup&lt;/span&gt; &lt;span class=""&gt;sidebar&lt;/span&gt;&lt;/pre&gt; результата не дают. В настройках стиля эта фишка появляется, но вносимые изменения в силу не вступают. Тоже самое относится и к "Entry footer HTML"&lt;br /&gt;&lt;br /&gt;Еще один ворос:&lt;br /&gt;Как в принципе работает "Entry footer HTML"? То есть, что дает внесение в это окошко html кода и где он в итоге отображается.&lt;br /&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;S2 Paid - the Parental layer - own on a basis &lt;b&gt; Style Contest/Cleanstyle Black and White &lt;/b&gt;&lt;br /&gt;It is not confident, that to me here will help, but....&lt;br /&gt;Situation following: Style Contest me has been chosen in consequence(investigation) of long experiments for the reason that it is a unique parental layer in which addresses to css to files of registrations are registered completely. And a unique layer in which entering of minor alterations of changes by me has given(allowed) that result which I wanted. In a situation with Expressive, for example, even entering of the css a file in custome css gave result as display жж in general without design or with design by default taken of weblog.css&lt;br /&gt;&lt;br /&gt;And so:&lt;br /&gt;Is S2 a parental layer named me &lt;a href="http:// // www.livejournal.com/customize/advanced/layersource.bml? id=9368144*fmt=html" target="_blank" rel="nofollow"&gt; LiderBlog &lt;/a&gt; on a basis how I already spoke &lt;a href="http:// // www.livejournal.com/customize/advanced/layersource.bml? id=7457659*fmt=html" target="_blank" rel="nofollow"&gt; Style Contest &lt;/a&gt;&lt;br /&gt;What in it(him) it is not realized is a modification in sidebar. But it is very beautifully realized in &lt;a href="http:// // www.livejournal.com/customize/advanced/layersource.bml? id=420357*fmt=html" target="_blank" rel="nofollow"&gt; Digital Multiplex (OSWD) &lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Attention a question: What parts of a code need to be transferred from Digital Multiplex (OSWD) to mine LiderBlog, what these functions there would earn?&lt;br /&gt;At once I shall tell, that stupid(blunt) carry of group &lt;pre&gt; &lt;span class=""&gt; propgroup &lt;/span&gt; &lt;span class=""&gt; sidebar &lt;/span&gt; &lt;/pre&gt; result do not give. In adjustments(options) of style this chesspiece appears, but brought changes valid do not enter. Too most concerns and to " Entry footer HTML "&lt;br /&gt;&lt;br /&gt;One more question:&lt;br /&gt;How basically works " Entry footer HTML "? That is, that entering into it окошко html gives a code and where it(he) in a result is displayed.&lt;br /&gt;&lt;a name='cutid2-end'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#808080"&gt;Beforehand I apologize, that I use the electronic translator - English I do not own :(&lt;/font&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:70332</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/70332.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=70332"/>
    <title>[theme] - [tranqii] - [sticky entry]</title>
    <published>2007-04-01T14:11:58Z</published>
    <updated>2007-04-01T14:12:57Z</updated>
    <category term="function print_body"/>
    <category term="class recentpage"/>
    <category term="layout tranqii"/>
    <content type="html">in response to &lt;span  class="ljuser  i-ljuser  i-ljuser-type-P     "  data-ljuser="sdlucly" lj:user="sdlucly" &gt;&lt;a href="https://sdlucly.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://sdlucly.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;sdlucly&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;a href="http://community.livejournal.com/s2tranquility2/28672.html?thread=152832#t152832" target="_blank"&gt;comment&lt;/a&gt; in &lt;span  class="ljuser  i-ljuser  i-ljuser-type-P     "  data-ljuser="jdark" lj:user="jdark" &gt;&lt;a href="https://jdark.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://jdark.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;jdark&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="s2tranquility2" lj:user="s2tranquility2" &gt;&lt;a href="https://s2tranquility2.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2tranquility2.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2tranquility2&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; &lt;a href="http://community.livejournal.com/s2tranquility2/28672.html" target="_blank"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# -------------------------------
# main page display entries and
# footer
# -------------------------------
function RecentPage::print_body () {
  var bool   enable_sticky      = true;
  var string sticky_subject     = ""; # Welcome
  var string sticky_date        = ""; # Apr. 1st, 2007
  var string sticky_location    = ""; # San Francisco, CA
  var string sticky_mood        = ""; # creative
  var string sticky_music       = ""; # Mirrors on Shoes - LiveJournal
  var string sticky_permalink   = ""; # http://exampleusername.livejournal.com/289.html
  var string sticky_posturl     = ""; # http://exampleusername.livejournal.com/289.html?mode=reply
  var string sticky_poster      = ""; # exampleusername
  var string sticky_userpic     = ""; # http://stat.livejournal.com/img/goat-normal.gif
  var string sticky_userpic_alt = ""; # $.journal.username

  var bool   print_sticky = (not $this isa FriendsPage) and ($.nav.skip == 0) and $enable_sticky;

  # print all entries
  """
  &amp;lt;div id="entries"&amp;gt;""";

  if($print_sticky) {
    var string sticky_meta = "";
    if($sticky_subject == "") {
      $sticky_subject = """&amp;lt;i class="nosubject"&amp;gt;$*text_nosubject&amp;lt;/i&amp;gt;""";
    }
    foreach var string k (["location", "mood", "music"]) {
      var string text = lang_metadata_title($k);
      var string val  = "";
      if($k == "location") {
        $val = $sticky_location;
        if($val != "") {
          $val = """&amp;lt;a href="http://maps.google.com/maps?q=$sticky_location"&amp;gt;$sticky_location&amp;lt;/a&amp;gt;""";
        }
      } elseif ($k == "mood") {
        $val = $sticky_mood;
      } elseif ($k == "music") {
        $val = $sticky_music;
      }
      if($val != "") {
        $sticky_meta = $sticky_meta + "\n" + "        &amp;lt;b&amp;gt;" + $text + ":&amp;lt;/b&amp;gt; " + $val + "&amp;lt;br /&amp;gt;";
      }
    }
    if($sticky_poster != "") {
      var UserLite u = UserLite($sticky_poster);
      $sticky_poster = $u-&amp;gt;ljuser();
      if($u.username != $.journal.username) {
        $sticky_poster = $sticky_poster + " in " + $.journal-&amp;gt;as_string();
      }
      $sticky_poster = "\n" + "        " + $sticky_poster;
    }
    if($sticky_userpic != "") {
      $sticky_userpic = """
      &amp;lt;h3 class="userpic"&amp;gt;&amp;lt;img border="0" src="$sticky_userpic" alt="$sticky_userpic_alt" title="$sticky_userpic_alt" /&amp;gt;&amp;lt;/h3&amp;gt;""";
    }

    """
    &amp;lt;div id="entry_sticky" class="ind-entry"&amp;gt;""";

    print $sticky_userpic;

    """
      &amp;lt;h2&amp;gt;$sticky_subject&amp;lt;/h2&amp;gt;""";

    var bool h4 = ($sticky_date != "") or ($sticky_meta != "") or ($sticky_poster != "");
    if($h4) {
      """
      &amp;lt;h4&amp;gt;""";
      if($sticky_date != "") {
        """
        &amp;lt;b&amp;gt;$sticky_date&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;""";
      }

      print $sticky_meta;

      print $sticky_poster;

      """
      &amp;lt;/h4&amp;gt;""";
    }

    """
      &amp;lt;div class="entry-item"&amp;gt;""";

    """
        Entry text here
    """;

    """
      &amp;lt;/div&amp;gt;""";

    $h4 = ($sticky_permalink != "") or (($sticky_permalink != "") and ($sticky_posturl != ""));

    if($h4) {
      """
      &amp;lt;h4&amp;gt;""";
      "\n";
      "        ";
      var bool print_permalink = get_permalink($sticky_permalink) != "";
      var bool print_posturl   = $sticky_posturl != "";
      if($print_permalink) {
        print get_permalink($sticky_permalink);
      }
      if($print_permalink and $print_posturl) {
        " | ";
      }
      if($print_posturl) {
        """&amp;lt;a href="$sticky_posturl" class="comments" title="$*text_post_comment"&amp;gt;$*text_post_comment&amp;lt;/a&amp;gt;""";
      }
      """
      &amp;lt;/h4&amp;gt;""";
    }

    """
    &amp;lt;/div&amp;gt;""";
  }

  foreach var Entry e ( $.entries ) {
    $this-&amp;gt;print_entry($e);
    if ($e-&amp;gt;viewer_sees_ebox()) {
      """
    &amp;lt;div class="ind-entry"&amp;gt;&amp;lt;table align="center"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;""";
      $e-&amp;gt;print_ebox();
      "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;";
    }
  }
  """
    &amp;lt;/div&amp;gt;""";

  var string range = "most recent entries";
  if ( $.nav.skip &amp;gt; 0 ) {
    $range = "$.nav.skip entries back";
  }

  """
    &amp;lt;div id="footer"&amp;gt;
      &amp;lt;p&amp;gt;
        &amp;lt;b&amp;gt;viewing:&amp;lt;/b&amp;gt; $range&amp;lt;br /&amp;gt;""";

  # go forward/backward if possible
  if ( $.nav.forward_url != "" or $.nav.backward_url != "" ) {
    var string sep;
    var string back;
    var string forward;
    if ( $.nav.backward_url != "" ) {
      $back = """&amp;lt;a href="$.nav.backward_url" title="go earlier"&amp;gt;earlier&amp;lt;/a&amp;gt;""";
    }
    if ( $.nav.forward_url != "" ) {
      $forward = """&amp;lt;a href="$.nav.forward_url" title="go later"&amp;gt;later&amp;lt;/a&amp;gt;""";
    }
    if ( $back != "" and $forward != "" ) {
      $sep = " | ";
    }
    """
        &amp;lt;b&amp;gt;go&amp;lt;/b&amp;gt;: $back$sep$forward&amp;lt;br /&amp;gt;""";
  }
  """
      &amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;""";
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:69869</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/69869.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=69869"/>
    <title>[theme] - [expressive] - [tagspage: limited list of tags]</title>
    <published>2007-03-02T21:52:03Z</published>
    <updated>2007-03-02T21:52:03Z</updated>
    <category term="function print_body"/>
    <category term="layout expressive"/>
    <category term="class tagspage"/>
    <content type="html">in response to &lt;span  class="ljuser  i-ljuser  i-ljuser-type-P     "  data-ljuser="wasd" lj:user="wasd" &gt;&lt;a href="https://wasd.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://wasd.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;wasd&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="s2expressive" lj:user="s2expressive" &gt;&lt;a href="https://s2expressive.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2expressive.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2expressive&lt;/b&gt;&lt;/a&gt;&lt;a class="i-ljuser-badge i-ljuser-badge--pro" data-badge-type="pro" data-placement="bottom" data-pro-badge data-pro-badge-type="1" data-is-raw hidden href="#"&gt;&lt;span class="i-ljuser-badge__icon"&gt;&lt;svg class="svgicon" width="25" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 24"&gt;&lt;path fill-rule="evenodd" d="M19.326 11.95c0 2.01 1.47 3.45 3.48 3.45 2.02 0 3.49-1.44 3.49-3.45 0-2.01-1.47-3.45-3.49-3.45-2.01 0-3.48 1.44-3.48 3.45Zm5.51 0c0 1.24-.8 2.19-2.03 2.19-1.23 0-2.02-.95-2.02-2.19 0-1.25.79-2.19 2.02-2.19s2.03.94 2.03 2.19ZM7.92 15.28H6.5V8.61h3.12c1.45 0 2.24.98 2.24 2.15 0 1.16-.8 2.15-2.24 2.15h-1.7v2.37Zm1.51-3.62c.56 0 .98-.35.98-.9 0-.56-.42-.9-.98-.9H7.92v1.8h1.51ZM18.3802 15.28h-1.63l-1.31-2.37h-1.04v2.37h-1.42V8.61h3.12c1.39 0 2.24.91 2.24 2.15 0 1.18-.74 1.81-1.46 1.98l1.5 2.54Zm-2.49-3.62c.57 0 1-.34 1-.9s-.43-.9-1-.9h-1.49v1.8h1.49Z" clip-rule="evenodd"/&gt;&lt;path fill-rule="evenodd" d="M2 8c0-2.20914 1.79086-4 4-4h20.5c2.2091 0 4 1.79086 4 4v7.9c0 2.2091-1.7909 4-4 4H6c-2.20914 0-4-1.7909-4-4V8Zm4-2.5h20.5C27.8807 5.5 29 6.61929 29 8v7.9c0 1.3807-1.1193 2.5-2.5 2.5H6c-1.38071 0-2.5-1.1193-2.5-2.5V8c0-1.38071 1.11929-2.5 2.5-2.5Z" clip-rule="evenodd"/&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; &lt;a href="http://community.livejournal.com/s2expressive/54777.html" target="_blank"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;class MyClass {
  function quicksort(string[] list, int start, int end) : string[];
  function quicksort(string[] list)                     : string[];
}

###############
# &amp;lt;quicksort&amp;gt; #
###############
#// These two functions perform sorting capabilities
#//
#// Credit goes to 'Tony Chang &amp;lt;tychang1 [at] uiuc [dot] edu&amp;gt;'
#// See: http://www.livejournal.com/customize/advanced/layersource.bml?id=54714
#// % Partitions then recursively calls.
#// % Tested up to 172 sortable elements in a string array
function MyClass::quicksort(string[] list, int start, int end) : string[] {
  if ($end &amp;lt;= $start) {
    return $list;
  }
  
  #// Pick a pivot and move to the front
  var int pivot  = rand($start, $end);
  var string tmp = $list[$start];
  $list[$start]  = $list[$pivot];
  $list[$pivot]  = $tmp;
  
  #// Now Partition
  var int left  = ($start + 1);
  var int right = $end;
  
  foreach var int i ($start .. ($end - 2)) {
    if ($list[$left] &amp;gt; $list[$start]) {
      #// Swap the left and the right, then move the right back
      $tmp          = $list[$left];
      $list[$left]  = $list[$right];
      $list[$right] = $tmp;
      $right--;
    } else {
      $left++;
    }
  }

  # put the pivot back in the middle
  if ($list[$start] &amp;lt; $list[$left]) {
    #// Swap $start and ($left - 1)
    $tmp               = $list[$start];
    $list[$start]      = $list[($left - 1)];
    $list[($left - 1)] = $tmp;
    $pivot             = ($left - 1);
  } else {
    #// Swap $start and $left
    $tmp          = $list[$start];
    $list[$start] = $list[$left];
    $list[$left]  = $tmp;
    $pivot        = $left;
  }
  
  #// Sort either side of the pivot
  $list = $this-&amp;gt;quicksort($list, $start,       ($pivot - 1));
  $list = $this-&amp;gt;quicksort($list, ($pivot + 1), $end);
  
  return $list;
}

#// Recursing Function
function MyClass::quicksort(string[] list) : string[] {
  return $this-&amp;gt;quicksort($list, 0, size $list - 1);
}
################
# &amp;lt;/quicksort&amp;gt; #
################

function TagsPage::print_body() {
  var TagDetail[]   tags      = $this-&amp;gt;visible_tag_list(); # get available tags
  var TagDetail[]{} my_tags   = {};                        # repackage tags, group by use count
  var string{}{}    cloud     = {};                        # final package for individual tags
  var string[]      tag_names = [];                        # keep track of tag names that are in final set
  var int           max_count = 0;                         # keep track of max number of uses for any tag
  var int           max_list  = 20;                        # max number of tags to list

  # print opening to Expressive's TagsPage
  print safe """&amp;lt;h2 class="asset-name page-header2"&amp;gt;$*text_tags_page_header&amp;lt;/h2&amp;gt;""";

  # cycle thru tags
  foreach var TagDetail t ($tags) {
    # get highest count
    if($t.use_count &amp;gt; $max_count) {
      $max_count = $t.use_count;
    }

    # get existing set of tags for this use count
    var TagDetail[] array  = $my_tags{$t.use_count};

    # add this tag
    $array[size($array)]   = $t;

    # save
    $my_tags{$t.use_count} = $array;
  }

  # cycle thru sorted tags
  foreach var int i (0 .. $max_count) {
    # get tag group by use count
    var TagDetail[] ts = $my_tags{$max_count - $i};

    # if this use count has tags
    if($ts) {
      # cycle thru tags with this use count
      foreach var TagDetail t ($ts) {
        var string{} hash = {};
        $hash{"url"}                 = $t.url;            # copy url
        $hash{"uses"}                = $t.use_count + ""; # copy use count
        $hash{"sec"}                 = $t.visibility;     # copy security/visibility
        $hash{"size"}                = ($t.use_count &amp;gt; 1) ? (((($t.use_count * 16) / $max_count) + 7) + "") : "7"; # calculate font size
        $cloud{$t.name}              = $hash;   # add hash to cloud
        $tag_names[size($tag_names)] = $t.name; # add tag name to final set record

        # decrement max list var because we've added a tag to the final set
        $max_list--;

        # if we're at the end of the list, stop adding more
        if($max_list &amp;lt;= 0) {
          break;
        }
      }
    }

    # if we're at the end of the list, stop adding more
    if($max_list &amp;lt;= 0) {
      break;
    }
  }

  # instantiate MyClass object
  var MyClass mc = new MyClass;

  # sort tag names
  $tag_names = $mc-&amp;gt;quicksort($tag_names);

  # cycle thru final set
  foreach var string name ($tag_names) {
    var string{} hash = $cloud{$name}; # get tag data
    var string   url  = $hash{"url"};  # get url
    var string   uses = $hash{"uses"}; # get uses
    var string   sec  = $hash{"sec"};  # get security/visibility
    var string   size = $hash{"size"}; # get font size
    var string   alt  = $uses + " use" + (int($uses) != 1 ? "s" : "") + ", " + $sec; # built alt string

    # put it all together
    """&amp;lt;a href="$url" alt="$alt" title="$alt" style="font-size: ${size}px;"&amp;gt;$name&amp;lt;/a&amp;gt; """;
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:69439</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/69439.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=69439"/>
    <title>[user/theme] - [smoothsailing] - [multi-level tags in sidebar]</title>
    <published>2007-02-14T03:04:16Z</published>
    <updated>2007-02-14T03:06:17Z</updated>
    <category term="function lay_print_sidebar_freetextbox_2"/>
    <category term="class page"/>
    <category term="layout smoothsailing"/>
    <category term="function print_custom_head"/>
    <content type="html">this code is a quick'n'dirty conversion of &lt;span  class="ljuser  i-ljuser  i-ljuser-type-P     "  data-ljuser="s2flexisquared" lj:user="s2flexisquared" &gt;&lt;a href="https://s2flexisquared.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2flexisquared.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2flexisquared&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="s2flexisquares" lj:user="s2flexisquares" &gt;&lt;a href="https://s2flexisquares.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2flexisquares.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2flexisquares&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; &lt;a href="http://www.livejournal.com/community/s2flexisquares/525551.html" target="_blank"&gt;multi-level tags in sidebar&lt;/a&gt;.&lt;br /&gt;the following set commands should be added to your user layer and replace any that are currently in there.&lt;pre&gt;&lt;code&gt;set layout_sidebox_profile_visibility     = "1";
set layout_sidebox_latestmonth_visibility = "2";
set layout_sidebox_links_visibility       = "3";
set layout_sidebox_summary_visibility     = "4";
set layout_sidebox_multisearch_visibility = "5";
set layout_sidebox_freetext_2_visibility  = "6";
set layout_sidebox_tags_visibility        = "hide";&lt;/code&gt;&lt;/pre&gt;the following function overrides should be placed into a theme layer.  if you are using one of the system-provided theme layers, you'll need to move those set commands for the colors into your user layer, create a new theme layer, place this code into it, and attach the new theme layer to your style.&lt;pre&gt;&lt;code&gt;function Page::print_custom_head()
{

    """
    &amp;lt;style type="text/css"&amp;gt;

    /* List Alignment */
    /* Styles to ensure that the tag list is correctly aligned beneath the sidebox title */
    li.tagBox  {padding-left: 0;    margin-left: 0; list-style: none;}
    ul.tagList {padding-left: 0;    margin-left: 0; list-style: none;}
    li.tagItem {padding-left: 15px;                 list-style: none;}
    
    /* Vertical Scroll */
    /* Need to shrink the list width to prevent horizontal scrollbar in Firefox. */
    /* Note this won't prevent it if your tags are super long, it will only */
    /* prevent it from displaying unnecessarily. */
    ul.tagList {width: 90%;}

    &amp;lt;/style&amp;gt;
    """;
}

function Page::lay_print_sidebar_freetextbox_2() {

#####   Config   #####

  # Specify your delimiter.  One char only -- extra chars get truncated.
  var string delimiter = ":";

  # Do you want to show the tag use counts? Set to true or false.
  var bool show_count = true;

  # Specify the text to show just before the use count, if any.
  var string pre_count = "[";

  # Specify the text to show just after the use count, if any.
  var string post_count = "]";

  # Specify the title of your tag box!
  var string tag_title = "Tags";

##### End Config #####

  var Page p = get_page();
  var string list = "";    
  
  if (size $p-&amp;gt;visible_tag_list() &amp;gt; 0) { 
    if ($delimiter-&amp;gt;length() &amp;gt; 1) {
      $delimiter = $delimiter-&amp;gt;substr(0, 1);
    } 

    var string[] closing_html;
    var string[] prev_tags;
    var int tag_list_pos = 0;
    var string tier_code = "";
    $closing_html[0] = "";
    $prev_tags[0] = "";
    foreach var TagDetail t ($p-&amp;gt;visible_tag_list()) {
      var string[] tags;
 
      if ($t.name) {  
        # mt:20050623
        # Split tags into array on delimiter. Oh god, my kingdom
        # for a function.  Stolen shamelessly from lj-user rane500.
        var int array_counter = 0;
        var string buffer = "";
        foreach var string char ($t.name) {
          if($char == $delimiter) {
            $tags[$array_counter] = $buffer;
            $array_counter = $array_counter + 1;
            $buffer = "";
          }
          else {
            $buffer = $buffer + $char;
          } 
        }  
        $tags[$array_counter] = $buffer;
  
        var int pos = 0;
        foreach var string tier($tags) {
          if (size $closing_html &amp;lt;= $pos) {
            # mt:20050623
            # $closing_html keeps track of html that is used to close off open
            # lists.  Its length must be kept &amp;gt;= to that of the current tag.
            $closing_html[$pos] = "";
          }   

          if (size $prev_tags &amp;lt;= $pos) {
            # mt:20050625
            # The current tag has more tiers than the previous tag.  To avoid array
            # ref errors when comparing the current tier to the previous one (which
            # is non-existent, of course) add empty string to $prev_tags.
            $prev_tags[$pos] = "";
          }
    
          # mt:20050623
          # If we're on a tag's last tier, we need to return a link to the tag,
          # otherwise plain text is returned.
          if (size $tags == ($pos + 1)) {
            $tier_code = """&amp;lt;a rel="tag" href="$t.url"&amp;gt;$tier&amp;lt;/a&amp;gt;""";
            if ($show_count) {
              $tier_code = $tier_code + """&amp;amp;nbsp;${pre_count}${t.use_count}${post_count}""";
            }
          }
          else {
            $tier_code = """$tier""";
          }

          # mt:20050625
          # $prev_tags stuffed with dummy empty string when it has fewer tiers than 
          # current tag.
          if ($prev_tags[$pos] == "") {     
            # mt:20050623
            # The current tag has more tiers than the previous tag, so a new
            # list must be opened.  
            if (($tag_list_pos == 0) and ($pos == 0)) {
              # mt:20061216
              # The outermost ul is supplied later by print_sidebar_box,
              # so omit it from this stage.
              $list = $list + """&amp;lt;li class="sbaritem"&amp;gt;$tier_code""";                  
              $closing_html[$pos] = "&amp;lt;/li&amp;gt;";  
            }
            else {
              $list = $list + """&amp;lt;ul&amp;gt;&amp;lt;li class="sbaritem"&amp;gt;$tier_code""";                  
              $closing_html[$pos] = "&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;";
            }
          }
          elseif ($tags[$pos] != $prev_tags[$pos]) {   
            # mt:20050623
            # The current tag's tier is not the same as the previous tag's tier of  
            # the same level.  This means we may need to close some lists.
            var int i = size $closing_html;
            foreach var string html ($closing_html) {
              if ($i &amp;gt; $pos) {
                $list = $list + $closing_html[$i];                                 
                # mt:20050623: As we append the closing code, pop it off the array.
                $closing_html[$i] = "";
              }
              $i--;
            }                    
 
            if ($closing_html[$pos] == "") {          
              # mt:20050623
              # This is the first tier at this level, so open list.
              $list = $list + """&amp;lt;ul&amp;gt;&amp;lt;li class="sbaritem"&amp;gt;$tier_code""";
              $closing_html[$pos] = "&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;";
            }
            else {              
              # mt:20050623
              # There have already been tiers added at this level, so just close the previous
              # list item before adding the new tier.
              $list = $list + """&amp;lt;/li&amp;gt;&amp;lt;li class="sbaritem"&amp;gt;$tier_code""";
            }                    
          }
          else {
            # mt:20050623
            # The current tag's tier is exactly the same as the previous tag's tier at
            # this same level.  It has already been included in the list, so do nothing.
          }  
          # mt:20050623: Moving on to next tier in this tag!
          $pos++;
        }
        $prev_tags = $tags;           
      }        
      # mt:20050623: Next tag in the list!
      $tag_list_pos++;
    }  

    # mt:20050623
    # All the tags have been added so close all outstanding lists.
    var int i = 0;
    var string remaining_html = "";
    foreach var string html ($closing_html) { 
      if ($html != "") {
        $remaining_html = $html + $remaining_html;
        $closing_html[$i] = "";
      }
      $i++;
    }
    $list = $list + $remaining_html;
  }

  if ($list != ""){
    $this-&amp;gt;lay_print_sidebox_top($tag_title);
    print """&amp;lt;ul&amp;gt;""" + $list + """&amp;lt/ul&amp;gt;""";
    $this-&amp;gt;lay_print_sidebox_bottom();
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:68721</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/68721.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=68721"/>
    <title>[theme] - [linkbar/metadata handling]</title>
    <published>2006-12-05T20:25:55Z</published>
    <updated>2007-02-14T02:40:28Z</updated>
    <category term="class comment"/>
    <category term="function print_metadata"/>
    <category term="class entry"/>
    <category term="function print_linkbar"/>
    <content type="html">to make sure that these work, make sure that the function that prints entries calls &lt;code&gt;Entry::print_linkbar()&lt;/code&gt; and &lt;code&gt;Entry::print_metadata()&lt;/code&gt;.  also make sure that &lt;code&gt;Entry::print_comment(Comment c)&lt;/code&gt; calls &lt;code&gt;Comment::print_linkbar()&lt;/code&gt;.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;function Comment::print_linkbar() {
  var bool     add_links     = false;
  var bool     first_sep     = false;
  var bool     last_sep      = false;
  var string   img_id        = "";
  var string   link_key      = "";
  var string   link_link     = "";
  var string   link_sep      = "";
  var string   print         = "";
  var string[] link_keyseq   = [];
  var string{} link_captions = {};
  var string{} link_images   = {};
  var string{} link_urls     = {};
  var Link     link          = new Link;

  # add a sep before the links?
  $first_sep = true;

  # add a sep after the links?
  $last_sep  = false;

  # define the sep
  $link_sep  = """ &amp;lt;span class="separator"&amp;gt;|&amp;lt;/span&amp;gt; """;

  # define the link order
  #   comment_reply    : reply to comment
  #   comment_parent   : parent of comment
  #   comment_thread   : comment thread
  #   delete_comment   : delete comment
  #   freeze_thread    : freeze thread
  #   permalink        : permalink of comment
  #   screen_comment   : screen comment
  #   unfreeze_thread  : unfreeze thread
  #   unscreen_comment : unscreen comment
  #   unwatch_thread   : untrack/unwatch thread
  #   watch_thread     : track/watch thread
  #   watching_parent  : tracking/watching parent of comment
  $link_keyseq = [ # comment_reply, comment_parent, comment_thread, permalink, delete_comment, freeze_thread, screen_comment, unscreen_comment, unfreeze_thread, unwatch_thread, watch_thread, watching_parent
                  "comment_reply",
                  "comment_parent",
                  "comment_thread",
                  "permalink",
                  "delete_comment",
                  "freeze_thread",
                  "screen_comment",
                  "unscreen_comment",
                  "unfreeze_thread",
                  "unwatch_thread",
                  "watch_thread",
                  "watching_parent",
                 ];

  # define the link images
  $link_images = {
                  "permalink"        =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/link.png",

                  "nav_prev"         =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/arrow_left.png",
                  "edit_entry"       =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/pencil.png",
                  "edit_tags"        =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/tag_blue_edit.png",
                  "mem_add"          =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/disk.png",
                  "tell_friend"      =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/email_go.png",
                  "watch_comments"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_add.png",
                  "unwatch_comments" =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_delete.png",
                  "nav_next"         =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/arrow_right.png",

                  "comment_frozen"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/comment_frozen.png",
                  "comment_parent"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/arrow_up.png",
                  "comment_reply"    =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/comment_add.png",
                  "comment_thread"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/comment.png",
                  "delete_comment"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/cancel.png",
                  "freeze_thread"    =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/lightbulb_off.png",
                  "screen_comment"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/eye_cross.png",
                  "unscreen_comment" =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/eye.png",
                  "unfreeze_thread"  =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/lightbulb.png",
                  "unwatch_thread"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_delete.png",
                  "watch_thread"     =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_add.png",
                  "watching_parent"  =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_magnify.png",
                 };

  # define permalink data
  $link_key                  = "permalink";
  $link_captions{$link_key}  = $*text_permalink;
  $link_urls{$link_key}      = $.permalink_url;

  # define reply link data
  $link_key                  = "comment_reply";
  $link_captions{$link_key}  = $.frozen ? $*text_comment_frozen : $*text_comment_reply;
  $link_images{$link_key}    = $.frozen ? $link_images{"comment_frozen"} : $link_images{"comment_reply"};
  $link_urls{$link_key}      = $.frozen ? "" : $.reply_url;

  # define parent link data
  $link_key                  = "comment_parent";
  $link_captions{$link_key}  = $*text_comment_parent;
  $link_urls{$link_key}      = $.parent_url;

  # define thread link data
  $link_key                  = "comment_thread";
  $link_captions{$link_key}  = $*text_comment_thread;
  $link_urls{$link_key}      = $.thread_url;

  # if there aren't any links defined in the array, let's add 'em
  $add_links = (size($link_keyseq) &amp;lt; 1);

  # cycle thru links and gather data
  foreach $link_key ($.link_keyseq) {
    $link                            = $this-&amp;gt;get_link($link_key);
    $link_captions{$link_key}        = $link_captions{$link_key} != "" ? $link_captions{$link_key} : $link.caption;
    $link_images{$link_key}          = $link_images{$link_key}   != "" ? $link_images{$link_key}   : $link.icon.url;
    $link_urls{$link_key}            = $link_urls{$link_key}     != "" ? $link_urls{$link_key}     : $link.url;

    # if we're adding links
    if($add_links) {
      # add it to the array
      $link_keyseq[size($link_keyseq)] = $link_key;
    }
  }

  # give linkbar a css class
  $print = $print + """&amp;lt;span class="comment-linkbar"&amp;gt;""";

  # if we've got links to process
  if(size($link_keyseq) &amp;gt; 0) {
    # if we're adding a first sep
    if($first_sep) {
      # add it
      $print = $print + $link_sep;
    }

    # cycle thru links
    foreach $link_key ($link_keyseq) {
      var bool have_img = $link_images{$link_key} != ""; # do we have an image?
      var bool have_url = $link_urls{$link_key}   != ""; # do we have a url?
      var bool is_reply = $link_key == "comment_reply";  # is this the reply link?

      if($have_url or $is_reply) {                       # if we have a url or it's the reply link
        if($have_url or ($is_reply and not $have_url)) { #   if we have a url, or it's the reply link without a url
          $link_link = $link_captions{$link_key};        #     set the link text
          if($have_img) {                                #     if we have an image
            if($link_key-&amp;gt;contains("freeze")) {          #       if it's the [un]freeze link
              $img_id = "fuf";                           #         set img id prefix of "fuf"
            } elseif ($link_key-&amp;gt;contains("screen")) {   #       if it's the [un]screen link
              $img_id = "sus";                           #         set img id prefix of "sus"
            } elseif ($link_key-&amp;gt;contains("watch")) {    #       if it's the [un]track/watch link
              $img_id = "tut";                           #         set img id prefix of "tut"
            } else {                                     #       else, we're not doing a special image
              $img_id = "";                              #         set img id prefix of nothing
            }

            if($img_id != "") {                          #       if we have an img id prefix
              $img_id = " id=\"${img_id}_${.talkid}\"";  #         set it up
            }

            # add the image
            $link_link = """&amp;lt;img$img_id src="$link_images{$link_key}" alt="$link_link" title="$link_link" border="0" /&amp;gt;""";
          }

          # if we have a url, apply it
          if($have_url) {
            $link_link = """&amp;lt;a href="$link_urls{$link_key}"&amp;gt;$link_link&amp;lt;/a&amp;gt;""";
          }

          # add a link sep
          $print     = $print + $link_link + $link_sep;

        } else {

          # else, we're doing the reply link with a url

          print $print; # print what we've got
          $print = "";  # set print var to nothing

          # create array for QR reply link
          var string{} opts = {};

          # if we have an image
          if($have_img) {
            $opts{"img_url"} = $link_images{$link_key};   # set image url
            $opts{"alt"}     = $link_captions{$link_key}; # set image alt
            $opts{"title"}   = $link_captions{$link_key}; # set image title
          } else {
            # else, we don't have an image
            $opts{"linktext"} = $link_captions{$link_key}; # set linktext
          }

          # set url
          $opts{"reply_url"} = $link_urls{$link_key};

          # print QR reply link
          $this-&amp;gt;print_reply_link($opts);

          # add a link sep
          $print = $print + $link_sep;
        }
      }
    }

    # if we don't have a sep on the end
    if(not $last_sep) {
      # hack it off
      $print = $print-&amp;gt;substr(0, $print-&amp;gt;length() - $link_sep-&amp;gt;length());
    }
  }

  # close span
  $print = $print + "&amp;lt;/span&amp;gt;";

  # print linkbar
  print $print;

  # print reply container
  $this-&amp;gt;print_reply_container();
}

function CommentInfo::print() {
  # define a link sep
  var string link_sep = """ &amp;lt;span class="separator"&amp;gt;|&amp;lt;/span&amp;gt; """;

  var bool show_readlink = $.show_readlink;                   # are we showing the  link to read   comments?
  var bool show_postlink = $.show_postlink;                   # are we showing the  link to post a comment?
  var bool show_sep      = $show_readlink and $show_postlink; # are we showing both and therefore need a sep?

  # give comment links a css class
  """&amp;lt;span class="entry-commentlinks"&amp;gt;""";

  # if we're showing the readlink
  if($show_readlink) {
    # print it
    $this-&amp;gt;print_readlink();
  }

  # if we're showing both links
  if($show_sep) {
    # print a sep
    print $link_sep;
  }

  # if we're showing the postlink
  if($show_postlink) {
    # print it
    $this-&amp;gt;print_postlink();
  }

  "&amp;lt;/span&amp;gt;";
}

function CommentInfo::print_postlink() {
  # get page handle
  var Page   p         = get_page();

  # define image url for postlink
  var string image_url = "http://mike.mm1swebcreations.com/lj/silk/comments_add.png";

  # get postlink url
  var string url       = $.post_url;

  # get postlink text
  var string text      = get_plural_phrase(0, "text_post_comment" + ($p.view == "friends" ? "_friends" : ""));

  # if we've reached max comments
  if($.maxcomments) {
    $url  = "";                  # clear url
    $text = $*text_max_comments; # set max comments text
  }

  # if we have a url
  if($url != "") {
    # open it
    """&amp;lt;a href="$url"&amp;gt;""";
  }

  # if we have an image
  if($image_url != "") {
    # print it
    """&amp;lt;img src="$image_url" alt="$text" title="$text" border="0" /&amp;gt;""";
  } else {
    # else, print text
    print $text;
  }

  # if we have a url
  if($url != "") {
    # close it
    """&amp;lt;/a&amp;gt;""";
  }

}

function CommentInfo::print_readlink() {
  # get page handle
  var Page   p         = get_page();

  # define image url for readlink
  var string image_url = "http://mike.mm1swebcreations.com/lj/silk/comments.png";

  # get readlink url
  var string url       = $.read_url;

  # get readlink text
  var string text      = get_plural_phrase($.count, "text_read_comments" + ($p.view == "friends" ? "_friends" : ""));

  # if we have a url
  if($url != "") {
    # open it
    """&amp;lt;a href="$url"&amp;gt;""";
  }

  # if we have an image
  if($image_url != "") {
    # print it
    """&amp;lt;img src="$image_url" alt="$text" title="$text" border="0" /&amp;gt;""";
  } else {
    # else, print text
    print $text;
  }

  # if we have a url
  if($url != "") {
    # close it
    """&amp;lt;/a&amp;gt;""";
  }

}

function Entry::print_linkbar() {
  var Page     p             = get_page();

  var bool     add_links     = false;
  var bool     first_sep     = false;
  var bool     interentry    = ($p.view == "entry") or ($p.view == "reply");
  var bool     last_sep      = false;
  var string   link_key      = "";
  var string   link_link     = "";
  var string   link_sep      = "";
  var string   print         = "";
  var string[] link_keyseq   = [];
  var string{} link_captions = {};
  var string{} link_images   = {};
  var string{} link_urls     = {};
  var Link     link          = new Link;

  # add a sep before the links?
  $first_sep = true;

  # add a sep after the links?
  $last_sep  = false;

  # define the sep
  $link_sep  = """ &amp;lt;span class="separator"&amp;gt;|&amp;lt;/span&amp;gt; """;

  # define the link order
  #   edit_entry       : edit entry
  #   edit_tags        : edit tags
  #   mem_add          : add to memories
  #   nav_next         : next entry
  #   nav_prev         : previous entry
  #   permalink        : permalink of entry
  #   tell_friend      : tell a friend
  #   unwatch_comments : untrack/unwatch comments
  #   watch_comments   : track/watch comments
  $link_keyseq = [ # permalink, nav_prev, edit_entry, edit_tags, mem_add, tell_friend, watch_comments, unwatch_comments, nav_next
                  "permalink",
                  "nav_prev",
                  "edit_entry",
                  "edit_tags",
                  "mem_add",
                  "tell_friend",
                  "watch_comments",
                  "unwatch_comments",
                  "nav_next",
                 ];

  # define the link images
  $link_images = {
                  "permalink"        =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/link.png",

                  "nav_prev"         =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/arrow_left.png",
                  "edit_entry"       =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/pencil.png",
                  "edit_tags"        =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/tag_blue_edit.png",
                  "mem_add"          =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/disk.png",
                  "tell_friend"      =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/email_go.png",
                  "watch_comments"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_add.png",
                  "unwatch_comments" =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_delete.png",
                  "nav_next"         =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/arrow_right.png",

                  "comment_parent"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/arrow_up.png",
                  "comment_reply"    =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/comment_add.png",
                  "comment_thread"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/comment.png",
                  "delete_comment"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/cancel.png",
                  "freeze_thread"    =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/lightbulb_off.png",
                  "screen_comment"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/eye_cross.png",
                  "unscreen_comment" =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/eye.png",
                  "unfreeze_thread"  =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/lightbulb.png",
                  "unwatch_thread"   =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_delete.png",
                  "watch_thread"     =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_add.png",
                  "watching_parent"  =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_magnify.png",
                 };

  # if there aren't any links defined in the array, let's add 'em
  $add_links = (size($link_keyseq) &amp;lt; 1);

  # define permalink data
  $link_key                  = "permalink";
  $link_captions{$link_key}  = $*text_permalink;
  $link_urls{$link_key}      = $.permalink_url;

  # if we're viewing an entry
  if($interentry) {
    # get previous entry link data
    $link_key                        = "nav_prev";
    $link                            = $this-&amp;gt;get_link($link_key);
    $link_captions{$link_key}        = $link_captions{$link_key} != "" ? $link_captions{$link_key} : $link.caption;
    $link_images{$link_key}          = $link_images{$link_key}   != "" ? $link_images{$link_key}   : $link.icon.url;
    $link_urls{$link_key}            = $link_urls{$link_key}     != "" ? $link_urls{$link_key}     : $link.url;

    # if we're adding links
    if($add_links) {
      # add it to the array
      $link_keyseq[size($link_keyseq)] = $link_key;
    }
  }

  # cycle thru links and gather data
  foreach $link_key ($.link_keyseq) {
    $link                            = $this-&amp;gt;get_link($link_key);
    $link_captions{$link_key}        = $link_captions{$link_key} != "" ? $link_captions{$link_key} : $link.caption;
    $link_images{$link_key}          = $link_images{$link_key}   != "" ? $link_images{$link_key}   : $link.icon.url;
    $link_urls{$link_key}            = $link_urls{$link_key}     != "" ? $link_urls{$link_key}     : $link.url;

    # if we're adding links
    if($add_links) {
      # add it to the array
      $link_keyseq[size($link_keyseq)] = $link_key;
    }
  }

  # if we're viewing an entry
  if($interentry) {
    # get next entry link data
    $link_key                        = "nav_next";
    $link                            = $this-&amp;gt;get_link($link_key);
    $link_captions{$link_key}        = $link_captions{$link_key} != "" ? $link_captions{$link_key} : $link.caption;
    $link_images{$link_key}          = $link_images{$link_key}   != "" ? $link_images{$link_key}   : $link.icon.url;
    $link_urls{$link_key}            = $link_urls{$link_key}     != "" ? $link_urls{$link_key}     : $link.url;

    # if we're adding links
    if($add_links) {
      # add it to the array
      $link_keyseq[size($link_keyseq)] = $link_key;
    }
  }

  # give linkbar a css class
  $print = $print + """&amp;lt;span class="entry-linkbar"&amp;gt;""";

  # if we've got links to process
  if(size($link_keyseq) &amp;gt; 0) {
    # if we're adding a first sep
    if($first_sep) {
      # add it
      $print = $print + $link_sep;
    }

    # cycle thru links
    foreach $link_key ($link_keyseq) {
      var bool have_img = $link_images{$link_key} != ""; # do we have an image?
      var bool have_url = $link_urls{$link_key}   != ""; # do we have a url?

      # if we have a url
      if($have_url) {
        # set the link text
        $link_link = $link_captions{$link_key};

        # if we have an image
        if($have_img) {
          # add the image
          $link_link = """&amp;lt;img src="$link_images{$link_key}" alt="$link_link" title="$link_link" border="0" /&amp;gt;""";
        }
        
        # if we have a url, apply it
        $link_link = """&amp;lt;a href="$link_urls{$link_key}"&amp;gt;$link_link&amp;lt;/a&amp;gt;""";

        # add a link sep
        $print     = $print + $link_link + $link_sep;
      }
    }

    # if we don't have a sep on the end
    if(not $last_sep) {
      # hack it off
      $print = $print-&amp;gt;substr(0, $print-&amp;gt;length() - $link_sep-&amp;gt;length());
    }
  }

  # close span
  $print = $print + "&amp;lt;/span&amp;gt;";

  # print linkbar
  print $print;
}

function Entry::print_metadata() {
  var string[] metadata    = [];
  var string{} meta_images = {};
  var string{} meta_labels = {};

  # define the meta order
  #   location : current location
  #   mood     : current mood
  #   music    : current music
  #   tags     : current tags
  $metadata    = [ # location, mood, music, tags
                  "location",
                  "mood",
                  "music",
                  "tags"
                 ];

  # define the meta labels
  $meta_labels = {
                  "location"        =&amp;gt; lang_metadata_title("location"),
                  "mood"            =&amp;gt; lang_metadata_title("mood"),
                  "music"           =&amp;gt; lang_metadata_title("music"),
                  "picture_keyword" =&amp;gt; "Picture Keyword:",
                  "tags"            =&amp;gt; "Current Tags:",
                 };

  # define the meta images
  $meta_images = {
                  "location"        =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/map_magnify.png",
                  "mood"            =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/user.png",
                  "music"           =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/music.png",
                  "picture_keyword" =&amp;gt; "",
                  "tags"            =&amp;gt; "http://mike.mm1swebcreations.com/lj/silk/tag_blue.png",
                 };

  var string   currents_open    = """&amp;lt;div class="entry-metadata"&amp;gt;"""; # html to open  metadata container
  var string   meta_label_open  = """&amp;lt;div&amp;gt;&amp;lt;b&amp;gt;""";                     # html to open  metadata label
  var string   meta_label_close = """&amp;lt;/b&amp;gt;""";                         # html to close metadata label
  var string   meta_val_open    = " ";                                # html to open  metadata value
  var string   meta_val_close   = """&amp;lt;/div&amp;gt;""";                       # html to close metadata value
  var string   currents_close   = """&amp;lt;/div&amp;gt;""";                       # html to close metadata container
  var bool     vanilla_loc      = false;                              # strip current location value?

  var bool     have_meta        = (size($.metadata) &amp;gt; 0);                # do we have meta?
  var bool     have_tags        = ((size($.tags) &amp;gt; 0) and $*tags_aware); # do we have tags?
  var int      tcount           = 0;
  var string   currents         = "";
  var string   image            = "";
  var string   k                = "";
  var string   label            = "";
  var string   meta             = "";
  var string   tag              = "";
  var string   val              = "";
  var Tag      t                = new Tag;

  # if we have meta or we have tags
  if($have_meta or $have_tags) {
    # add opening of metadata container
    $currents = $currents + $currents_open;


    # cycle thru meta
    foreach $k ($metadata) {
      $label = $meta_labels{$k} != "" ? $meta_labels{$k} : lang_metadata_title($k); # get label
      $image = $meta_images{$k} != "" ? $meta_images{$k} : "";                      # get image
      $val   = $.metadata{$k};                                                      # get value

      # if we have an image
      if($image != "") {
        # add it
        $label = """&amp;lt;img src="$image" alt="$label" title="$label" /&amp;gt;""";
      }

      # if we're doing the location and we're stripping t
      if(($k == "location") and $vanilla_loc) {
        # do it
        $val = striphtml($val);
      }

      # this piece of meta has a specific class
      $meta_label_open = """&amp;lt;div class="current$k"&amp;gt;&amp;lt;b&amp;gt;""";

      # if we're doing tags
      if($k == "tags") {
        # clear val
        $val = "";

        # if we have tags
        if($have_tags) {
          # cycle thru tags
          foreach $t ($.tags) {
            $tag = """&amp;lt;a href="$t.url"&amp;gt;$t.name&amp;lt;/a&amp;gt;"""; # build tag
            $val = $val + $tag;                        # add tag to val
            $tcount++;                                 # increment tag counter

            # if current count is less than the size of the tags
            if($tcount &amp;lt; size($.tags)) {
              # add a sep
              $val = $val + ", ";
            }
          }
        }
      }

      # if we have a val
      if($val != "") {
        # build meta row
        $meta   = $meta_label_open + $label + $meta_label_close + $meta_val_open + $val + $meta_val_close;
      }

      # add meta
      $currents = $currents + $meta;
    }

    # add closing of metadata container
    $currents = $currents + $currents_close;
  }

  # print metadata
  print $currents;
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:68607</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/68607.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=68607"/>
    <title>[theme] - [lickable] - [multi-level tags]</title>
    <published>2006-12-03T22:50:55Z</published>
    <updated>2006-12-03T22:51:43Z</updated>
    <category term="class page"/>
    <category term="layout lickable"/>
    <category term="function lay_print_custom_paraphernalia"/>
    <category term="function print_custom_head"/>
    <lj:music>freezepop - get ready 2 rokk</lj:music>
    <content type="html">in response to &lt;span  class="ljuser  i-ljuser  i-ljuser-type-P     "  data-ljuser="sreya" lj:user="sreya" &gt;&lt;a href="https://sreya.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://sreya.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;sreya&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="s2lickable" lj:user="s2lickable" &gt;&lt;a href="https://s2lickable.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2lickable.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2lickable&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; &lt;a href="http://community.livejournal.com/s2lickable/18152.html" target="_blank"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;function Page::lay_print_custom_paraphernalia() {
    var string id      = "";
    var string header  = "";
    var string content = "";
    
    # tagslist

    #####   Config   #####

    # Specify your delimiter!  One char only -- extra chars get truncated.
    # Making the delimiter an empty string will result in an un-tiered list, 
    # which may be what you prefer, but this code is serious overkill for 
    # that purpose.
    var string delimiter = ":";

    # Specify the title of your tag box!
    var string tag_title = "Tags";

    ##### End Config #####

    var Page p = get_page();
    var string list = "";
    
    # mt:20050627
    # Replaced erroneous return code with if statement (otherwise
    # entire sidebar not printed at all if no visible tags!).
    if (size $this-&amp;gt;visible_tag_list() &amp;gt; 0) { 
        # mt:20050624
        # Can't use delimiter longer than one char, so truncate if necessary.
        if ($delimiter-&amp;gt;length() &amp;gt; 1) {
            $delimiter = $delimiter-&amp;gt;substr(0, 1);
        }

        var bool list_started = false;
        var string list_item = "";
        var string[] prev_tags = ["", ""];

        # mt:20050624: Start the list.
        $list = """&amp;lt;ul class="tagList"&amp;gt;"""; 
        
        foreach var TagDetail t ($this-&amp;gt;visible_tag_list()) {        
            var string[] tags;
             
            if ($t.name) {  
                # mt:20050624
                # Split tags into a 1- or 2-element array on delimiter. Oh god, my
                # kingdom for a function.  Adapted from lj-user rane500's explode 
                # function to only care about first instance of the delimiter.
                var int array_counter = 0;
                var string buffer = "";
                var bool found_delimiter = false;
                foreach var string char ($t.name) {
                    if (($found_delimiter == false) and ($char == $delimiter)) {
                        $found_delimiter = true;
                        $tags[$array_counter] = $buffer;
                        $array_counter = $array_counter + 1;
                        $buffer = "";
                    } else {
                        $buffer = $buffer + $char;
                    } 
                }  
                $tags[$array_counter] = $buffer;
                
                # mt:20050624: Now examine the tags array to determine how to display the tag.
                if (size $tags == 1) {
                    # mt:20050624: This tag has no subtag.
        
                    if ($list_started) {
                        # mt:20050624: Previous tag had a subtag, so must close its outstanding list. 
                        $list = $list + """&amp;lt;/ul&amp;gt;""";
                        $list_started = false;
                    }
                    if ($prev_tags[0] != "") {
                        # mt:20050624: This is not the very first tag in the list, so close off previous tag.
                        $list = $list + """&amp;lt;/li&amp;gt;""";
                    }
                    # mt:20050624: Now add the new tag.
                    $list = $list + """&amp;lt;li class="tagItem"&amp;gt;&amp;lt;a href="$t.url"&amp;gt;$tags[0]&amp;lt;/a&amp;gt;""";
                } else {   
                    # mt:20050624: This tag has a subtag.
        
                    $list_item = """&amp;lt;li class="tagItem"&amp;gt;&amp;lt;a href="$t.url"&amp;gt;$tags[1]&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;""";
                   
                    if (($tags[0] == $prev_tags[0]) and ($list_started)) {
                        # mt:20050624
                        # This tag fits under the previous tag's tier, and it is not the first item in that tier.
                        $list = $list + $list_item;
                    } elseif (($tags[0] == $prev_tags[0]) and ($list_started == false)) {
                        # mt:20050624
                        # This tag fits under the previous tag's tier, and it is the very first item in that tier.
                        $list = $list + """&amp;lt;ul class="tagList"&amp;gt;""" + $list_item;
                        $list_started = true;
                    } elseif (($tags[0] != $prev_tags[0]) and ($list_started)) {
                        # mt:20050624: This tag initializes a new tier and must also close off the previous tag's list.
                        # $list_started retains its true state.
                        $list = $list + """&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;li class="tagItem"&amp;gt;$tags[0]&amp;lt;ul class="tagList"&amp;gt;""" + $list_item;
                    } elseif (($tags[0] != $prev_tags[0]) and ($list_started == false)) {
                        # mt:20050624: This tag initializes a new tier but does not have to close off a list.
                        
                        if ($prev_tags[0] != "") {
                            # mt:20050624: This is not the very first tag in the list, so close off previous tag.
                            $list = $list + """&amp;lt;/li&amp;gt;""";
                        }
                        
                        # mt:20050624: Now add the new tag.
                        $list = $list + """&amp;lt;li class="tagItem"&amp;gt;$tags[0]&amp;lt;ul class="tagList"&amp;gt;""" + $list_item;
                        $list_started = true;
                    }
                }       
                $prev_tags = $tags;           
            }        
            # mt:20050623: Next tag in the list!
        } 
    
        # mt:20050624: Close any outstanding lists.
        if ($list_started) {
            $list = $list + """&amp;lt;/ul&amp;gt;""";
        }	   
    	$list = $list + """&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;""";
	   
        $list = """&amp;lt;div class="tagBox"&amp;gt;""" + $list + """&amp;lt;/div&amp;gt;""";
    }

    $header  = $tag_title;
    $id      = "tagslist";
    $content = $list;

    paraphernalia_box_open ($id, $header);
    print $content;
    paraphernalia_box_close($id, $header);
}

function Page::print_custom_head() {
  """
  &amp;lt;style type="text/css"&amp;gt;

  /* List Alignment */
  /* Styles to ensure that the tag list is correctly aligned beneath the sidebox title */
  li.tagBox {
    padding-left: 0;
    margin-left:  0;
    list-style:   none;
  }
  ul.tagList {
    padding-left: 0;
    margin-left:  0;
    list-style:   none;
  }
  li.tagItem {
    padding-left: 15px;
    list-style:   none;
  }
    
  /* Vertical Scroll */
  /* Need to shrink the list width to prevent horizontal scrollbar in Firefox. */
  /* Note this won't prevent it if your tags are super long, it will only */
  /* prevent it from displaying unnecessarily. For the pleasure of IE users */
  /* you can also colour any resulting scrollbars as you desire. */ 
  ul.tagList {
    width: 90%;
  }
  .tagBox {
    height:                     200px;
    overflow:                   auto;
    scrollbar-arrow-color:      #dae3b2;
    scrollbar-base-color:       #ffffcc;
    scrollbar-face-color:       #ffffcc;
    scrollbar-highlight-color:  #dae3b2;
    scrollbar-darkshadow-color: #dae3b2;
    scrollbar-shadow-color:     #dae3b2;
  }
  &amp;lt;/style&amp;gt;
  """;
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:67889</id>
    <author>
      <name>Aimee</name>
    </author>
    <lj:poster user="girlboheme" userid="7862713"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/67889.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=67889"/>
    <title>[theme - quitelickable - mood icon to left of metadata]</title>
    <published>2006-09-01T17:28:32Z</published>
    <updated>2006-09-01T17:41:35Z</updated>
    <category term="function print_metadata"/>
    <category term="class entry"/>
    <content type="html">This code is &lt;span class=""&gt;&lt;img style="VERTICAL-ALIGN: bottom" height="17" alt="" width="17" src="https://www.livejournal.com/stc/fck/editor/plugins/livejournal/userinfo.gif" /&gt;kunzite1&lt;/span&gt;'s code for Boxer, just tweaked a teensy bit by me to work with Quite Lickable. So just credit him with it. I was just saving him the trouble. Thanks. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;function Entry::lay_print_metadata() {&lt;br /&gt;var string tags_header&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "Tags"; # text for tags header,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Current Tags"&lt;br /&gt;var string tags_joiner&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# text for tags joiner,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;":"&lt;br /&gt;var string tags_sep&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= ", ";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # text for tags separator, ", "&lt;br /&gt;var bool&amp;nbsp;&amp;nbsp; show_edit_tags_link = false;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# set to true if you want edit tags link as tags header&lt;br /&gt;var string currents_open&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = """&amp;lt;div class="metadata"&amp;gt;"""; # html for opening of currents container&lt;br /&gt;var string currents_close&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= """&amp;lt;/div&amp;gt;"""; # html for closing of currents container&lt;br /&gt;var bool&amp;nbsp;&amp;nbsp; loc_after_mood&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= false;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # set to true to print location after mood&lt;br /&gt;var bool&amp;nbsp;&amp;nbsp; vanilla_loc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = false;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # set to true to delinkify location&lt;br /&gt;# if you need data specific to the meta to be in these strings you'll have to set those individually down further&lt;br /&gt;# one example is provided with meta_label_open&lt;br /&gt;var string meta_label_open&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = """&amp;lt;strong&amp;gt;""";&amp;nbsp;&amp;nbsp; # html for opening of metadata label&lt;br /&gt;var string meta_label_close&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= """&amp;lt;/strong&amp;gt;: """; # html for closing of metadata label&lt;br /&gt;var string meta_val_open&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # html for opening of metadata value&lt;br /&gt;var string meta_val_close&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= """&amp;lt;br /&amp;gt;""";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # html for closing of metadata value&lt;br /&gt;var Link&amp;nbsp;&amp;nbsp; edit_tags&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = $this-&amp;gt;get_link("edit_tags"); # helper var to see if remote user can edit tags&lt;br /&gt;if ((size $.metadata &amp;gt; 0) or ((size $.tags &amp;gt; 0) and ($*tags_aware))){&lt;br /&gt;if($.metadata{"mood"} == "" and $loc_after_mood) {&lt;br /&gt;# if we're printing loc after mood but we have no mood, set loc_after_mood to false&lt;br /&gt;$loc_after_mood = false;&lt;br /&gt;}&lt;br /&gt;var string currents = "";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # make var for printing&lt;br /&gt;$currents&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = $currents_open; # add opening of currents container&lt;br /&gt;if(defined $.mood_icon) {&lt;br /&gt;var Image i = $.mood_icon;&lt;br /&gt;$currents = $currents + """&amp;lt;table border="0"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;img src="$i.url" _fcksavedurl="$i.url" width="$i.width" height="$i.height" alt="$.metadata{"mood"}" title="$.metadata{"mood"}" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;""";&lt;br /&gt;}&lt;br /&gt;foreach var string k ($.metadata){&amp;nbsp;&amp;nbsp;# step thru metadata&lt;br /&gt;var string text = $k;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # set text to key&lt;br /&gt;var string val&amp;nbsp;&amp;nbsp;= $.metadata{$k}; # get val&lt;br /&gt;if ($k == "mood"){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# if mood, set text to mood property&lt;br /&gt;$text = $*text_meta_mood;&lt;br /&gt;}&lt;br /&gt;elseif ($k == "music") {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# if music, set text to music property&lt;br /&gt;$text = $*text_meta_music;&lt;br /&gt;} elseif ($k == "location") {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # if location, set text to loc variable&lt;br /&gt;$text = $*text_meta_location;&lt;br /&gt;if($vanilla_loc) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# if vanilla loc, striphtml() it&lt;br /&gt;$val = striphtml($val);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if(not ($k == "location" and $loc_after_mood)) {&lt;br /&gt;# if we're doing loc right now and printing loc after mood, skip it&lt;br /&gt;# if we're doing loc right now and we're not printing loc after mood, print it now&lt;br /&gt;# if we're not doing loc right now, print this piece of meta&lt;br /&gt;# add the meta&lt;br /&gt;$currents = $currents + """$meta_label_open$text$meta_label_close$meta_val_open$val$meta_val_close""";&lt;br /&gt;}&lt;br /&gt;if($k == "mood" and $loc_after_mood) {&lt;br /&gt;# if we just now did the mood and we're printing loc after mood, print the loc&lt;br /&gt;$k&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= "location";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # set meta key to "location"&lt;br /&gt;$text = $*text_meta_location; # set text to loc variable&lt;br /&gt;$val&amp;nbsp;&amp;nbsp;= $.metadata{$k};&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # get val&lt;br /&gt;# if we have a loc, do stuff&lt;br /&gt;if($val != "") {&lt;br /&gt;# if vanilla loc, striphtml() it&lt;br /&gt;if($vanilla_loc) {&lt;br /&gt;$val = striphtml($val);&lt;br /&gt;}&lt;br /&gt;# add the meta&lt;br /&gt;$currents&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = $currents + """$meta_label_open$text$meta_label_close$meta_val_open$val$meta_val_close""";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if ((size $.tags &amp;gt; 0) and $*tags_aware) {&lt;br /&gt;var string k&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= "tags"; # set key to "tags"&lt;br /&gt;var int tcount = 0; # set counter for tags&lt;br /&gt;if($edit_tags.url != "" and $show_edit_tags_link) { # if remote user can edit tags, let's give them a link&lt;br /&gt;$tags_header = """&amp;lt;a href="$edit_tags.url" _fcksavedurl="$edit_tags.url"&amp;gt;$tags_header&amp;lt;/a&amp;gt;""";&lt;br /&gt;}&lt;br /&gt;# add text, open val container&lt;br /&gt;$currents = $currents + """$meta_label_open$tags_header$tags_joiner$meta_label_close$meta_val_open""";&lt;br /&gt;# build tag list&lt;br /&gt;foreach var Tag t ($.tags) {&lt;br /&gt;$currents = $currents + """&amp;lt;a rel="tag" href="$t.url" _fcksavedurl="$t.url"&amp;gt;$t.name&amp;lt;/a&amp;gt;""";&lt;br /&gt;$tcount++;&lt;br /&gt;# if we haven't hit the last tag, add a separator&lt;br /&gt;if ($tcount != size $.tags) { $currents = $currents + $tags_sep; }&lt;br /&gt;}&lt;br /&gt;# close val container&lt;br /&gt;$currents = $currents + $meta_val_close;&lt;br /&gt;}&lt;br /&gt;if(defined $.mood_icon) {&lt;br /&gt;$currents = $currents + """&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;""";&lt;br /&gt;}&lt;br /&gt;# close currents container&lt;br /&gt;$currents = $currents + $currents_close;&lt;br /&gt;# print currents&lt;br /&gt;println "$currents";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;strong&gt;TO CUSTOMIZE CSS:&lt;/strong&gt; &lt;br /&gt;&lt;code&gt;.metadata{ &lt;br /&gt;list-style: none; &lt;br /&gt;display: block; &lt;br /&gt;} &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;note to&amp;nbsp;&lt;span class=""&gt;&lt;img style="VERTICAL-ALIGN: bottom" height="17" alt="" width="17" src="/stc/fck/editor/plugins/livejournal/userinfo.gif" /&gt;kunzite1&lt;/span&gt; :&lt;/strong&gt; &lt;br /&gt;I hope that this was okay :) and if it looks horrible, feel free to delete and repost it.&amp;nbsp; I just wanted to share it.&amp;nbsp; thanks.&amp;lt;/div&amp;gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:67468</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/67468.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=67468"/>
    <title>[theme] - [smoothsailing] - [mood icon to left of metadata]</title>
    <published>2006-08-20T02:01:06Z</published>
    <updated>2006-08-20T02:01:06Z</updated>
    <category term="function print_metadata"/>
    <category term="class entry"/>
    <category term="layout smoothsailing"/>
    <content type="html">&lt;pre&gt;&lt;code&gt;# add colons because hard-coding it is silly
set text_meta_location          = "Location:";
set text_meta_mood              = "Mood:";
set text_meta_music             = "Music:";
set layout_arrangement_metadata = "block";

function Entry::print_metadata() {
  var string tags_header         = "Tags"; # text for tags header,    "Current Tags"
  var string tags_joiner         = ":";            # text for tags joiner,    ":"
  var string tags_sep            = ", ";           # text for tags separator, ", "
  var bool   show_edit_tags_link = false;          # set to true if you want edit tags link as tags header

  var string currents_open       = """&amp;lt;div class="entryMetadata"&amp;gt;&amp;lt;ul&amp;gt;"""; # html for opening of currents container
  var string currents_close      = """&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;"""; # html for closing of currents container

  var bool   loc_after_mood      = false;               # set to true to print location after mood
  var bool   vanilla_loc         = false;               # set to true to delinkify location

  # if you need data specific to the meta to be in these strings you'll have to set those individually down further
  # one example is provided with meta_label_open
  var string meta_label_open     = """&amp;lt;li&amp;gt;&amp;lt;span class="entryMetadata-label"&amp;gt;""";   # html for opening of metadata label
  var string meta_label_close    = """&amp;lt;/span&amp;gt;"""; # html for closing of metadata label
  var string meta_val_open       = """&amp;lt;span class="entryMetadata-content"&amp;gt;""";               # html for opening of metadata value
  var string meta_val_close      = """&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;""";     # html for closing of metadata value

  var Link   edit_tags           = $this-&amp;gt;get_link("edit_tags"); # helper var to see if remote user can edit tags

  if (((size $.metadata &amp;gt; 0) or ((size $.tags &amp;gt; 0) and ($*tags_aware))) and ($.itemid != int($*layout_guestbook_entryid))) {
    if($.metadata{"mood"} == "" and $loc_after_mood) {
      # if we're printing loc after mood but we have no mood, set loc_after_mood to false
      $loc_after_mood = false;
    }
    var string currents = "";             # make var for printing

    if(defined $.mood_icon) {
      var Image i = $.mood_icon;
      $currents = $currents + """&amp;lt;table border="0"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;img src="$i.url" width="$i.width" height="$i.height" alt="$.metadata{"mood"}" title="$.metadata{"mood"}" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;""";
    }

    $currents           = $currents + $currents_open; # add opening of currents container

    foreach var string k ($.metadata){  # step thru metadata
      var string text = $k;             # set text to key
      var string val  = $.metadata{$k}; # get val
      if ($k == "mood"){                # if mood, set text to mood property
        $text = $*text_meta_mood;
      } 
      elseif ($k == "music") {          # if music, set text to music property
        $text = $*text_meta_music;
      } elseif ($k == "location") {     # if location, set text to loc variable
        $text = $*text_meta_location;
        if($vanilla_loc) {              # if vanilla loc, striphtml() it
          $val = striphtml($val);
        }
      }
      if(not ($k == "location" and $loc_after_mood)) {
        # if we're doing loc right now and printing loc after mood, skip it
        # if we're doing loc right now and we're not printing loc after mood, print it now
        # if we're not doing loc right now, print this piece of meta

        # add the meta
        $currents = $currents + """$meta_label_open$text$meta_label_close$meta_val_open$val$meta_val_close""";
      }

      if($k == "mood" and $loc_after_mood) {
        # if we just now did the mood and we're printing loc after mood, print the loc
        $k    = "location";           # set meta key to "location"
        $text = $*text_meta_location; # set text to loc variable
        $val  = $.metadata{$k};       # get val

        # if we have a loc, do stuff
        if($val != "") {

          # if vanilla loc, striphtml() it
          if($vanilla_loc) {
            $val = striphtml($val);
          }

          # in this layout, each piece of meta gets its own class
          $meta_label_open  = """&amp;lt;div class="current$k"&amp;gt;&amp;lt;strong&amp;gt;""";

          # add the meta
          $currents         = $currents + """$meta_label_open$text$meta_label_close$meta_val_open$val$meta_val_close""";
        }
      }
    }
    if ((size $.tags &amp;gt; 0) and ($*tags_aware) and ($*layout_position_entrytags == "metadata")) {
      var string k      = "tags"; # set key to "tags"

      var int tcount = 0; # set counter for tags
      if($edit_tags.url != "" and $show_edit_tags_link) { # if remote user can edit tags, let's give them a link
        $tags_header = """&amp;lt;a href="$edit_tags.url"&amp;gt;$tags_header&amp;lt;/a&amp;gt;""";
      }

      # add text, open val container
      $currents = $currents + """$meta_label_open$tags_header$tags_joiner$meta_label_close$meta_val_open""";

      # build tag list
      foreach var Tag t ($.tags) {
        $currents = $currents + """&amp;lt;a rel="tag" href="$t.url"&amp;gt;$t.name&amp;lt;/a&amp;gt;""";
        $tcount++;

        # if we haven't hit the last tag, add a separator
        if ($tcount != size $.tags) { $currents = $currents + $tags_sep; }
      }

      # close val container
      $currents = $currents + $meta_val_close;
    }

    # close currents container
    $currents = $currents + $currents_close;

    if(defined $.mood_icon) {
      $currents = $currents + """&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;""";
    }

    # print currents
    println "$currents";
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:66931</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/66931.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=66931"/>
    <title>[theme - generator - mood icon to left of metadata]</title>
    <published>2006-08-15T07:02:10Z</published>
    <updated>2006-08-15T07:02:10Z</updated>
    <category term="function print_metadata"/>
    <category term="class entry"/>
    <category term="layout generator"/>
    <content type="html">&lt;pre&gt;&lt;code&gt;function Entry::print_metadata() {
  var string tags_header         = "Current Tags"; # text for tags header,    "Current Tags"
  var string tags_joiner         = ":";            # text for tags joiner,    ""
  var string tags_sep            = ", ";           # text for tags separator, ", "
  var bool   show_edit_tags_link = false;          # set to true if you want edit tags link as tags header

  var string currents_open       = """&amp;lt;table cellspacing="0" cellpadding="0" border="0" summary=""&amp;gt;"""; # html for opening of currents container
  var string currents_close      = """&amp;lt;/table&amp;gt;&amp;lt;br /&amp;gt;"""; # html for closing of currents container

  var bool   loc_after_mood      = false;               # set to true to print location after mood
  var bool   vanilla_loc         = false;               # set to true to delinkify location

  # if you need data specific to the meta to be in these strings you'll have to set those individually down further
  # one example is provided with meta_label_open
  var string meta_label_open     = """&amp;lt;tr&amp;gt;&amp;lt;td class="meta"&amp;gt;[&amp;lt;/td&amp;gt;&amp;lt;td class="meta" align="right"&amp;gt;&amp;lt;b&amp;gt;"""; # html for opening of metadata label
  var string meta_label_close    = """&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td class="meta" align="center"&amp;gt;|&amp;lt;/td&amp;gt;"""; # html for closing of metadata label
  var string meta_val_open       = """&amp;lt;td class="meta"&amp;gt;"""; # html for opening of metadata value
  var string meta_val_close      = """&amp;lt;/td&amp;gt;&amp;lt;td class="meta"&amp;gt;]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;"""; # html for closing of metadata value

  var Link   edit_tags           = $this-&amp;gt;get_link("edit_tags"); # helper var to see if remote user can edit tags

  var string currents = "";             # make var for printing

  if ((size $.metadata &amp;gt; 0) or ((size $.tags &amp;gt; 0) and ($*tags_aware))){
    if(defined $.mood_icon) {
      var Image i = $.mood_icon;
      $currents = $currents + """&amp;lt;table border="0"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;img src="$i.url" width="$i.width" height="$i.height" alt="$.metadata{"mood"}" title="$.metadata{"mood"}" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;""";
    }
    if($.metadata{"mood"} == "" and $loc_after_mood) {
      # if we're printing loc after mood but we have no mood, set loc_after_mood to false
      $loc_after_mood = false;
    }
    $currents           = $currents + $currents_open; # add opening of currents container

    foreach var string k ($.metadata){  # step thru metadata
      var string text = $k;             # set text to key
      var string val  = $.metadata{$k}; # get val
      if ($k == "mood"){                # if mood, set text to mood property
        $text = $*text_meta_mood;
      } 
      elseif ($k == "music") {          # if music, set text to music property
        $text = $*text_meta_music;
      } elseif ($k == "location") {     # if location, set text to loc variable
        $text = $*text_meta_location;
        if($vanilla_loc) {              # if vanilla loc, striphtml() it
          $val = striphtml($val);
        }
      }
      if(not ($k == "location" and $loc_after_mood)) {
        # if we're doing loc right now and printing loc after mood, skip it
        # if we're doing loc right now and we're not printing loc after mood, print it now
        # if we're not doing loc right now, print this piece of meta

        # add the meta
        $currents = $currents + """$meta_label_open$text$meta_label_close$meta_val_open$val$meta_val_close""";
      }

      if($k == "mood" and $loc_after_mood) {
        # if we just now did the mood and we're printing loc after mood, print the loc
        $k    = "location";           # set meta key to "location"
        $text = $*text_meta_location; # set text to loc variable
        $val  = $.metadata{$k};       # get val

        # if we have a loc, do stuff
        if($val != "") {

          # if vanilla loc, striphtml() it
          if($vanilla_loc) {
            $val = striphtml($val);
          }

          # add the meta
          $currents         = $currents + """$meta_label_open$text$meta_label_close$meta_val_open$val$meta_val_close""";
        }
      }
    }
    if ((size $.tags &amp;gt; 0) and $*tags_aware) {
      var string k      = "tags"; # set key to "tags"

      var int tcount = 0; # set counter for tags
      if($edit_tags.url != "" and $show_edit_tags_link) { # if remote user can edit tags, let's give them a link
        $tags_header = """&amp;lt;a href="$edit_tags.url"&amp;gt;$tags_header&amp;lt;/a&amp;gt;""";
      }

      # add text, open val container
      $currents = $currents + """$meta_label_open$tags_header$tags_joiner$meta_label_close$meta_val_open""";

      # build tag list
      foreach var Tag t ($.tags) {
        $currents = $currents + """&amp;lt;a rel="tag" href="$t.url"&amp;gt;$t.name&amp;lt;/a&amp;gt;""";
        $tcount++;

        # if we haven't hit the last tag, add a separator
        if ($tcount != size $.tags) { $currents = $currents + $tags_sep; }
      }

      # close val container
      $currents = $currents + $meta_val_close;
    }

    if(defined $.mood_icon) {
      $currents = $currents + """&amp;lt;/table&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;""";
    }

    # close currents container
    $currents = $currents + $currents_close;

    # print currents
    println "$currents";
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:66728</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/66728.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=66728"/>
    <title>K1's LJ Tools</title>
    <published>2006-07-26T19:58:58Z</published>
    <updated>2006-07-26T20:06:03Z</updated>
    <content type="html">i'm moving my domain hosting.  it shall take a few days to propogate.&lt;br /&gt;&lt;br /&gt;this means that the neat toys i have will be intermittently available for a bit.&lt;br /&gt;&lt;br /&gt;they can also be found &lt;a href="http://72.29.78.36/~mm1sweb/mike/lj/" target="_blank"&gt;here&lt;/a&gt;.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:66353</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/66353.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=66353"/>
    <title>[theme] - [smooth sailing] - [use TagsPage to print special content]</title>
    <published>2006-06-09T05:15:04Z</published>
    <updated>2006-06-09T05:17:04Z</updated>
    <category term="function print_body"/>
    <category term="class tagspage"/>
    <category term="layout smoothsailing"/>
    <category term="function view_title"/>
    <content type="html">in response to &lt;span  class="ljuser  i-ljuser  i-ljuser-type-P     "  data-ljuser="geisha_doll" lj:user="geisha_doll" &gt;&lt;a href="https://geisha-doll.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://geisha-doll.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;geisha_doll&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="s2smoothsailing" lj:user="s2smoothsailing" &gt;&lt;a href="https://s2smoothsailing.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2smoothsailing.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2smoothsailing&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; &lt;a href="http://community.livejournal.com/s2smoothsailing/55011.html" target="_blank"&gt;post&lt;/a&gt;.  uses TagCloud as example for "special page."&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;function TagsPage::view_title : string {
&lt;span style="color:green;font-weight:bold;"&gt;  # get special page type&lt;/span&gt;
  var string page = $.args{"page"};

&lt;span style="color:green;font-weight:bold;"&gt;  # set special page titles&lt;/span&gt;
  var string{} pages = {
                        "one"      =&amp;gt; "One",      &lt;span style="color:green;font-weight:bold;"&gt;# "one"      page title&lt;/span&gt;
                        "two"      =&amp;gt; "Two",      &lt;span style="color:green;font-weight:bold;"&gt;# "two"      page title&lt;/span&gt;
                        "tagcloud" =&amp;gt; "TagCloud", &lt;span style="color:green;font-weight:bold;"&gt;# "tagcloud" page title&lt;/span&gt;
                       };

&lt;span style="color:green;font-weight:bold;"&gt;  # if we are doing a special page, get special page title
  #  else, return normal page title
  #  change this to "Tags Page" if not using Smooth Sailing&lt;/span&gt;
  return $pages{$page} != "" ? $pages{$page} : $*text_tags_pagetitle;
}

function TagsPage::print_body() {
&lt;span style="color:green;font-weight:bold;"&gt;  # get special page type&lt;/span&gt;
  var string page = $.args{"page"};

&lt;span style="color:green;font-weight:bold;"&gt;  # "one" page content&lt;/span&gt;
  if($page == "one") {
&lt;span style="color:green;font-weight:bold;"&gt;    # &amp;lt;one&amp;gt;&lt;/span&gt;

    "one";

&lt;span style="color:green;font-weight:bold;"&gt;    # &amp;lt;/one&amp;gt;&lt;/span&gt;

&lt;span style="color:green;font-weight:bold;"&gt;  # "two" page content&lt;/span&gt;
  } elseif ($page == "two") {
&lt;span style="color:green;font-weight:bold;"&gt;    # &amp;lt;two&amp;gt;&lt;/span&gt;

    "two";

&lt;span style="color:green;font-weight:bold;"&gt;    # &amp;lt;/two&amp;gt;&lt;/span&gt;

&lt;span style="color:green;font-weight:bold;"&gt;  # "tagcloud" page content&lt;/span&gt;
  } elseif ($page == "tagcloud") {
&lt;span style="color:green;font-weight:bold;"&gt;    # &amp;lt;tagcloud&amp;gt;&lt;/span&gt;

    var string      header      = $this-&amp;gt;view_title();
    var string      datetime    = $.time-&amp;gt;date_format($*text_format_entry_date_and_time);
    var string      content     = "";

    var int         int_groups  =   5; # number of groups
    var int         int_percent =  20; # perecentage difference for each interval

    var int         adjust      = 0; # font size adjustment
    var int         factor      = 0; # factor of font size adjustment
    var int         interval    = 0; # tag use count interval per group
    var int         max         = 1; # max number of tag uses
    var TagDetail[] my_tags     = $this-&amp;gt;visible_tag_list(); # list of visible tags

    # implement cloudstyle ala delicious, etc
    if ($my_tags) {
      $content = $content + """
      &amp;lt;table name="taglist" width="100%" cellpadding="3"&amp;gt;
        &amp;lt;tr&amp;gt;
          &amp;lt;td&amp;gt;
      """;

      # get max
      foreach var TagDetail t ($my_tags) {
        if($t.use_count &amp;gt; $max) {
          $max = $t.use_count;
        }
      }

      # now we get tag use count interval per group
      $interval = $max / $int_groups;

      # now print each item, and adjust its
      # fontsize as a function of where in the
      # continuum of $int_groups intervals it is
      foreach var TagDetail t ($my_tags) {
        # if we're not going to divide by 0
        if($interval &amp;gt; 0) {
          # get the proportion based on use_count and interval
          $factor = $t.use_count / $interval;
        } else {
          # if we're dividing by 0, set factor to 0
          $factor = 0;
        }
        $adjust  = ($factor * $int_percent) + 100;
        $content = $content + """&amp;lt;span style="font-size: ${adjust}%"&amp;gt;&amp;lt;a rel="tag" href="$t.url"&amp;gt;$t.name&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt; """;
      }
      $content = $content + """
          &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
      &amp;lt;/table&amp;gt;
      """;
    } else {
      $content = $content + """&amp;lt;p&amp;gt;There are currently no tags or categories for this journal.&amp;lt;/p&amp;gt;""";
    }
    """
    &amp;lt;div class="entryHolder"&amp;gt;
      &amp;lt;div class='entryHeader'&amp;gt;
        &amp;lt;span class="entryHeaderDate"&amp;gt;$datetime&amp;lt;/span&amp;gt;&amp;lt;span class="entryHeaderSubject"&amp;gt; - $header&amp;lt;/span&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;table width="100%" cellpadding="0" cellspacing="0" border="0"&amp;gt;
        &amp;lt;tr valign="top"&amp;gt;
          &amp;lt;td&amp;gt;""";

    if ($*layout_position_userinfo_entry == "left" or $*layout_wrapping_userinfo_entry) {
      if(defined $.journal.default_pic) {
        """
            &amp;lt;table border="0" cellspacing="0" cellpadding="0" align="left" class="entryUserinfo"&amp;gt;
              &amp;lt;tr&amp;gt;
                &amp;lt;td&amp;gt;
                  &amp;lt;div class="entryUserinfo-usericon"&amp;gt;&amp;lt;a href="$.journal.userpic_listing_url"&amp;gt;&amp;lt;img src="$.journal.default_pic.url" alt="$.journal.name" title="$.journal.name" height="$.journal.default_pic.height" width="$.journal.default_pic.width" /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;
                &amp;lt;/td&amp;gt;
              &amp;lt;/tr&amp;gt;
            &amp;lt;/table&amp;gt;""";
        if (not $*layout_wrapping_userinfo_entry) {
          """
          &amp;lt;/td&amp;gt;
          &amp;lt;td width="100%"&amp;gt;""";
        }
      }
    }

    """
            &amp;lt;div class="entryText"&amp;gt;
              $content
            &amp;lt;/div&amp;gt;""";

    if ($*layout_position_userinfo_entry == "right" and not $*layout_wrapping_userinfo_entry) {
      if(defined $.journal.default_pic) {
        """
            &amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
              &amp;lt;table border="0" cellspacing="0" cellpadding="0" align="left" class="entryUserinfo"&amp;gt;
                &amp;lt;tr&amp;gt;
                  &amp;lt;td&amp;gt;
                    &amp;lt;div class="entryUserinfo-usericon"&amp;gt;&amp;lt;a href="$.journal.userpic_listing_url"&amp;gt;&amp;lt;img src="$.journal.default_pic.url" alt="$.journal.name" title="$.journal.name" height="$.journal.default_pic.height" width="$.journal.default_pic.width" /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;
                  &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
              &amp;lt;/table&amp;gt;""";
      }
    }

    """
          &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/div&amp;gt;""";

&lt;span style="color:green;font-weight:bold;"&gt;    # &amp;lt;/tagcloud&amp;gt;&lt;/span&gt;

&lt;span style="color:green;font-weight:bold;"&gt;  # no special page
  #  print as normal
  #  existing TagsPage::print_body() goes here&lt;/span&gt;
  } else {
&lt;span style="color:green;font-weight:bold;"&gt;    # &amp;lt;normal&amp;gt;&lt;/span&gt;

    if(size $.tags &amp;gt; 0) {
      if ($*layout_tagspage == "table") {
        $this-&amp;gt;lay_print_tagstable();
      } elseif($*layout_tagspage == "list") {
        $this-&amp;gt;lay_print_tagslist();
      }
    } else {
      """&amp;lt;center&amp;gt;$*text_tags_none&amp;lt;/center&amp;gt;""";
    }

&lt;span style="color:green;font-weight:bold;"&gt;    # &amp;lt;/normal&amp;gt;&lt;/span&gt;
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:66055</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/66055.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=66055"/>
    <title>[theme] - [flexisquares] - [ajax/qr/timezone support]</title>
    <published>2006-06-06T23:51:16Z</published>
    <updated>2006-06-06T23:52:04Z</updated>
    <category term="layout flexisquares"/>
    <content type="html">in response to &lt;span  class="ljuser  i-ljuser  i-ljuser-type-P     "  data-ljuser="didaio" lj:user="didaio" &gt;&lt;a href="https://didaio.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://didaio.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;didaio&lt;/b&gt;&lt;/a&gt;&lt;a class="i-ljuser-badge i-ljuser-badge--pro" data-badge-type="pro" data-placement="bottom" data-pro-badge data-pro-badge-type="1" data-is-raw hidden href="#"&gt;&lt;span class="i-ljuser-badge__icon"&gt;&lt;svg class="svgicon" width="25" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 24"&gt;&lt;path fill-rule="evenodd" d="M19.326 11.95c0 2.01 1.47 3.45 3.48 3.45 2.02 0 3.49-1.44 3.49-3.45 0-2.01-1.47-3.45-3.49-3.45-2.01 0-3.48 1.44-3.48 3.45Zm5.51 0c0 1.24-.8 2.19-2.03 2.19-1.23 0-2.02-.95-2.02-2.19 0-1.25.79-2.19 2.02-2.19s2.03.94 2.03 2.19ZM7.92 15.28H6.5V8.61h3.12c1.45 0 2.24.98 2.24 2.15 0 1.16-.8 2.15-2.24 2.15h-1.7v2.37Zm1.51-3.62c.56 0 .98-.35.98-.9 0-.56-.42-.9-.98-.9H7.92v1.8h1.51ZM18.3802 15.28h-1.63l-1.31-2.37h-1.04v2.37h-1.42V8.61h3.12c1.39 0 2.24.91 2.24 2.15 0 1.18-.74 1.81-1.46 1.98l1.5 2.54Zm-2.49-3.62c.57 0 1-.34 1-.9s-.43-.9-1-.9h-1.49v1.8h1.49Z" clip-rule="evenodd"/&gt;&lt;path fill-rule="evenodd" d="M2 8c0-2.20914 1.79086-4 4-4h20.5c2.2091 0 4 1.79086 4 4v7.9c0 2.2091-1.7909 4-4 4H6c-2.20914 0-4-1.7909-4-4V8Zm4-2.5h20.5C27.8807 5.5 29 6.61929 29 8v7.9c0 1.3807-1.1193 2.5-2.5 2.5H6c-1.38071 0-2.5-1.1193-2.5-2.5V8c0-1.38071 1.11929-2.5 2.5-2.5Z" clip-rule="evenodd"/&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="s2flexisquares" lj:user="s2flexisquares" &gt;&lt;a href="https://s2flexisquares.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2flexisquares.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2flexisquares&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; &lt;a href="http://community.livejournal.com/s2flexisquares/331285.html" target="_blank"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;function Comment::print_linkbar() {
  var string   link_seperator = "";

&lt;span style="color:green;font-weight:bold;"&gt;  # initialize array/hashes&lt;/span&gt;
  var string[] link_keyseq  = [""];
  var string{} link_url     = {"" =&amp;gt; ""};
  var string{} link_caption = {"" =&amp;gt; ""};
  var string{} link_image   = {"" =&amp;gt; ""};

  var string print          = "";

&lt;span style="color:green;font-weight:bold;"&gt;  # gather current linkbar&lt;/span&gt;
  foreach var string link_key ($.link_keyseq) {
    var Link  link                   = $this-&amp;gt;get_link($link_key);
    $link_url{$link_key}             = $link.url;
    $link_caption{$link_key}         = $link.caption;
    $link_image{$link_key}           = $link.icon.url;
    $link_keyseq[size($link_keyseq)] = $link_key; # add this to new link_keyseq array
  }

&lt;span style="color:green;font-weight:bold;"&gt;  # set new linkbar images&lt;/span&gt;
  var Color delete_comment   = $*entry_bgcolor;
  var Color screen_comment   = $*entry_bgcolor;
  var Color unscreen_comment = "#ffaaaa";
  var Color freeze_thread    = $*entry_bgcolor;
  var Color unfreeze_thread  = "#aaaaff";
  $link_image = {
                 "delete_comment"   =&amp;gt; palimg_tint("boxer/delete.gif",   $delete_comment),
                 "&lt;span style="color:red;"&gt;screen_comment&lt;/span&gt;"   =&amp;gt; palimg_tint("boxer/screen.gif",   $screen_comment),
                 "&lt;span style="color:red;"&gt;unscreen_comment&lt;/span&gt;" =&amp;gt; palimg_tint("boxer/unscreen.gif", $unscreen_comment),
                 "&lt;span style="color:blue;"&gt;freeze_thread&lt;/span&gt;"    =&amp;gt; palimg_tint("boxer/freeze.gif",   $freeze_thread),
                 "&lt;span style="color:blue;"&gt;unfreeze_thread&lt;/span&gt;"  =&amp;gt; palimg_tint("boxer/unfreeze.gif", $unfreeze_thread),
                };

&lt;span style="color:green;font-weight:bold;"&gt;  # loop thru linkbar and add links to print var&lt;/span&gt;
  foreach var string link_key ($link_keyseq) {

&lt;span style="color:green;font-weight:bold;"&gt;    # if we can do performed action, url will be present&lt;/span&gt;
    if($link_url{$link_key} != "") {
      $print = $print + """&amp;lt;a href="$link_url{$link_key}"&amp;gt;""";

&lt;span style="color:green;font-weight:bold;"&gt;      # if image url available, use it&lt;/span&gt;
      if($link_image{$link_key} != "") {

&lt;span style="color:green;font-weight:bold;"&gt;        # build an id for the image&lt;/span&gt;
        var string id = "";

&lt;span style="color:green;font-weight:bold;"&gt;        # if we're screening, add screen handle ("sus_#", where '#' is the comment talkid) to image&lt;/span&gt;
        if($link_key-&amp;gt;contains("screen")) {
          $id = "&lt;span style="color:red;"&gt;sus_&lt;/span&gt;";
        }

&lt;span style="color:green;font-weight:bold;"&gt;        # if we're freezing, add freeze handle ("fuf_#", where '#' is the comment talkid) to image&lt;/span&gt;
        if($link_key-&amp;gt;contains("freeze")) {
          $id = "&lt;span style="color:blue;"&gt;fuf_&lt;/span&gt;";
        }

        $id = "$id$.talkid";
        $print = $print + """&amp;lt;img id="$id" src="$link_image{$link_key}" alt="$link_caption{$link_key}" title="$link_caption{$link_key}" border="0" /&amp;gt;""";

      } else {
&lt;span style="color:green;font-weight:bold;"&gt;        # else, just use text&lt;/span&gt;
        $print = $print + "$link_caption{$link_key}";

      }

&lt;span style="color:green;font-weight:bold;"&gt;      # add a seperator&lt;/span&gt;
      $print = $print + "&amp;lt;/a&amp;gt;$link_seperator";
    }
  }

&lt;span style="color:green;font-weight:bold;"&gt;  # hack off last seperator&lt;/span&gt;
  $print = $print-&amp;gt;substr(0, $print-&amp;gt;length() - $link_seperator-&amp;gt;length());

&lt;span style="color:green;font-weight:bold;"&gt;  # we're done! let's print it!&lt;/span&gt;
  print $print;
}

function EntryPage::print_comment (Comment comment) {
&lt;span style="color:green;font-weight:bold;"&gt;  # set colors for comments&lt;/span&gt;
  var Color color_comment_bar_screened         = "#ffaaaa";
  var Color color_comment_bar_screened_fgcolor = "#000000";
  var Color color_comment_bar_frozen           = "#aaaaff";
  var Color color_comment_bar_frozen_fgcolor   = "#000000";
  var Color bgcolor                            = $*entrytitle_bgcolor;
  var Color fgcolor                            = $*entry_fgcolor;

  if($comment.screened) {
    $bgcolor = $color_comment_bar_screened;
    $fgcolor = $color_comment_bar_screened_fgcolor;
  }
  if($comment.frozen) {
    $bgcolor = $color_comment_bar_frozen;
    $fgcolor = $color_comment_bar_frozen_fgcolor;
  }

  var string  subject   = $comment.subject ? $comment.subject : """&amp;lt;i class="nosubject"&amp;gt;$*text_nosubject&amp;lt;/i&amp;gt;""";
  var string  poster    = isnull $comment.poster ? $*text_poster_anonymous : $comment.poster-&amp;gt;as_string();
  var string  reply     = "";
  var string  parent    = "";
  var string  thread    = "";

  $subject = """&amp;lt;span class="commentsubject"&amp;gt;$subject&amp;lt;/span&amp;gt;""";

  if($comment.subject_icon.url != "") {
    $subject = "$comment.subject_icon $subject";
  }
	
&lt;span style="color:green;font-weight:bold;"&gt;  #Comment Userpic&lt;/span&gt;
  """
  &amp;lt;div class="datesubjectcomment" id="&lt;span style="color:#ffaf00;"&gt;cmtbar$comment.talkid&lt;/span&gt;" style="background-color: $bgcolor; color: $fgcolor;"&amp;gt;""";
  if (defined $comment.userpic and $*show_entry_userpic) {
    var int    w   = $comment.userpic.width;
    var int    h   = $comment.userpic.height; 
    var string alt = $comment.metadata{"picture_keyword"};
    if ($*comment_userpic_style == "small") {
      $w = $w / 2;
      $h = $h / 2;
    }  
    if ($alt != "") {
      $alt = ": " + $alt;
    }
    """
    &amp;lt;img class="userpiccomment" src="$comment.userpic.url" width="$w" height="$h" alt="$comment.poster.name$alt" title="$comment.poster.name$alt" /&amp;gt;""";
  }

  print $poster;

&lt;span style="color:green;font-weight:bold;"&gt;  # use Comment::time_display()&lt;/span&gt;
  print " on " + $comment-&amp;gt;time_display();

  """&amp;lt;br /&amp;gt;
    $subject&amp;lt;br /&amp;gt;""";

  if ($comment.metadata{"poster_ip"}) {
    var string ip = $comment.metadata{"poster_ip"};
    """&amp;lt;br /&amp;gt;
    $*text_comment_ipaddr($ip)&amp;lt;br /&amp;gt;""";
  }

&lt;span style="color:green;font-weight:bold;"&gt;  # use Comment::print_text()&lt;/span&gt;
  """
  &amp;lt;/div&amp;gt;
  &amp;lt;div class="commentreply"&amp;gt;"""; $comment-&amp;gt;print_text(); """&amp;lt;/div&amp;gt;""";

  var string alignlinks = "";
  if ($*userpic_position == "left") {
    $alignlinks = "right";
  } else {
    $alignlinks = "left";
  }

  """
    &amp;lt;div style="margin-top: 3px; font-size: smaller; text-align: $alignlinks;"&amp;gt;""";

  $reply = $*text_comment_reply;
    
  if ($comment.frozen) {
    $reply = $*text_comment_frozen;
  }
  if ($.entry.comments.maxcomments) {
    $reply = $*text_max_comments;
  }
    
  if ($comment.parent_url != "") {
    $parent = """(&amp;lt;a href="$comment.parent_url"&amp;gt;$*text_comment_parent&amp;lt;/a&amp;gt;) """;
  }
    
  if ($comment.thread_url != "") { 
    $thread = """(&amp;lt;a href="$comment.thread_url"&amp;gt;$*text_comment_thread&amp;lt;/a&amp;gt;) """;
  }

&lt;span style="color:green;font-weight:bold;"&gt;  # print reply link&lt;/span&gt;
  print "(";
  if($reply == $*text_comment_reply) {
    $comment-&amp;gt;print_reply_link({"linktext" =&amp;gt; $reply});
  } else {
    print $reply;
  }
  print ") ";

  """$parent$thread(&amp;lt;a href="$comment.permalink_url"&amp;gt;$*text_permalink&amp;lt;/a&amp;gt;)""";

  """&amp;lt;div style="padding: 10px; text-align: $alignlinks;"&amp;gt;""";
  if ($this.multiform_on) {
    """&amp;lt;label for="ljcomsel_$comment.talkid"&amp;gt;$*text_multiform_check&amp;lt;/label&amp;gt;""";
    $comment-&amp;gt;print_multiform_check();
  }

  $comment-&amp;gt;print_linkbar();

  """
    &amp;lt;/div&amp;gt;""";

&lt;span style="color:green;font-weight:bold;"&gt;  # print reply container&lt;/span&gt;
  $comment-&amp;gt;print_reply_container();

  """
  &amp;lt;/div&amp;gt;""";
}

function EntryPage::print_body() {
&lt;span style="color:green;font-weight:bold;"&gt;  # set colors for comments&lt;/span&gt;
  var Color color_comment_bar_screened         = "#ffaaaa";
  var Color color_comment_bar_screened_fgcolor = "#000000";
  var Color color_comment_bar_frozen           = "#aaaaff";
  var Color color_comment_bar_frozen_fgcolor   = "#000000";

&lt;span style="color:green;font-weight:bold;"&gt;  # set new linkbar images&lt;/span&gt;
  var Color delete_comment   = $*entry_bgcolor;
  var Color screen_comment   = $*entry_bgcolor;
  var Color unscreen_comment = "#ffaaaa";
  var Color freeze_thread    = $*entry_bgcolor;
  var Color unfreeze_thread  = "#aaaaff";
  var string{} link_image = {
                             "delete_comment"   =&amp;gt; palimg_tint("boxer/delete.gif",   $delete_comment),
                             "&lt;span style="color:red;"&gt;screen_comment&lt;/span&gt;"   =&amp;gt; palimg_tint("boxer/screen.gif",   $screen_comment),
                             "&lt;span style="color:red;"&gt;unscreen_comment&lt;/span&gt;" =&amp;gt; palimg_tint("boxer/unscreen.gif", $unscreen_comment),
                             "&lt;span style="color:blue;"&gt;freeze_thread&lt;/span&gt;"    =&amp;gt; palimg_tint("boxer/freeze.gif",   $freeze_thread),
                             "&lt;span style="color:blue;"&gt;unfreeze_thread&lt;/span&gt;"  =&amp;gt; palimg_tint("boxer/unfreeze.gif", $unfreeze_thread),
                            };

&lt;span style="color:green;font-weight:bold;"&gt;  # change bgcolor/fgcolor and images of screened comments&lt;/span&gt;
  set_handler("screen_comment_#",   [
                                     [ "set_image",     "&lt;span style="color:red;"&gt;sus_#&lt;/span&gt;",   $link_image{"unscreen_comment"},       ],
                                     [ "style_bgcolor", "&lt;span style="color:#ffaf00;"&gt;cmtbar#&lt;/span&gt;", "$color_comment_bar_screened",         ],
                                     [ "style_color",   "&lt;span style="color:#ffaf00;"&gt;cmtbar#&lt;/span&gt;", "$color_comment_bar_screened_fgcolor", ],
                                    ]);
  set_handler("unscreen_comment_#", [
                                     [ "set_image",     "&lt;span style="color:red;"&gt;sus_#&lt;/span&gt;",   $link_image{"screen_comment"},   ],
                                     [ "style_bgcolor", "&lt;span style="color:#ffaf00;"&gt;cmtbar#&lt;/span&gt;", "$*entrytitle_bgcolor",          ],
                                     [ "style_color",   "&lt;span style="color:#ffaf00;"&gt;cmtbar#&lt;/span&gt;", "$*entry_fgcolor",               ],
                                    ]);

&lt;span style="color:green;font-weight:bold;"&gt;  # change bgcolor/fgcolor and images of frozen comments&lt;/span&gt;
  set_handler("freeze_comment_#",   [
                                     [ "set_image",     "&lt;span style="color:blue;"&gt;fuf_#&lt;/span&gt;",   $link_image{"unfreeze_thread"},      ],
                                     [ "style_bgcolor", "&lt;span style="color:#ffaf00;"&gt;cmtbar#&lt;/span&gt;", "$color_comment_bar_frozen",         ],
                                     [ "style_color",   "&lt;span style="color:#ffaf00;"&gt;cmtbar#&lt;/span&gt;", "$color_comment_bar_frozen_fgcolor", ],
                                    ]);
  set_handler("unfreeze_comment_#", [
                                     [ "set_image",     "&lt;span style="color:blue;"&gt;fuf_#&lt;/span&gt;",   $link_image{"freeze_thread"}, ],
                                     [ "style_bgcolor", "&lt;span style="color:#ffaf00;"&gt;cmtbar#&lt;/span&gt;", "$*entrytitle_bgcolor",       ],
                                     [ "style_color",   "&lt;span style="color:#ffaf00;"&gt;cmtbar#&lt;/span&gt;", "$*entry_fgcolor",            ],
                                    ]);

  $this-&amp;gt;print_entry($.entry);

  if ($.multiform_on and $.entry.comments.enabled and $.comment_pages.total_subitems &amp;gt; 0) {
    $this-&amp;gt;print_multiform_start();
  }

  if ($.entry.comments.enabled) {
    """
    &amp;lt;div class="box"&amp;gt;
      &amp;lt;center&amp;gt;""";

    $.comment_pages-&amp;gt;print();

&lt;span style="color:green;font-weight:bold;"&gt;    # print reply link&lt;/span&gt;
    """
        &amp;lt;b&amp;gt;( """; $this-&amp;gt;print_reply_link({"linktext" =&amp;gt; $*text_post_comment, "target" =&amp;gt; "topcomment"}); """ )&amp;lt;/b&amp;gt;""";

&lt;span style="color:green;font-weight:bold;"&gt;    # print reply container&lt;/span&gt;
    $this-&amp;gt;print_reply_container({"target" =&amp;gt; "topcomment"});

    """
      &amp;lt;/center&amp;gt;""";

    $this-&amp;gt;print_comments($.comments);

    if(size($.comments) &amp;gt; 0) {
      """
      &amp;lt;center&amp;gt;""";

      $.comment_pages-&amp;gt;print();

&lt;span style="color:green;font-weight:bold;"&gt;      # print reply link&lt;/span&gt;
      """
        &amp;lt;b&amp;gt;( """; $this-&amp;gt;print_reply_link({"linktext" =&amp;gt; $*text_post_comment, "target" =&amp;gt; "bottomcomment"}); """ )&amp;lt;/b&amp;gt;""";

&lt;span style="color:green;font-weight:bold;"&gt;      # print reply container&lt;/span&gt;
      $this-&amp;gt;print_reply_container({"target" =&amp;gt; "bottomcomment"});

      """
      &amp;lt;/center&amp;gt;""";
    }

    """
    &amp;lt;/div&amp;gt;""";
  }
    
  if ($this.multiform_on and $.entry.comments.enabled and ($.entry.comments.count &amp;gt; 0 or $.entry.comments.screened)) {
    """
    &amp;lt;div class="box"&amp;gt;""";

    $this-&amp;gt;print_multiform_actionline();
    $this-&amp;gt;print_multiform_end(); 

    """
      &amp;lt;center&amp;gt;""";

    $.comment_pages-&amp;gt;print();

    """
        &amp;lt;br /&amp;gt;
      &amp;lt;/center&amp;gt;
    &amp;lt;/div&amp;gt;""";
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:65995</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/65995.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=65995"/>
    <title>[theme] - [flexisquares] - [page summary]</title>
    <published>2006-05-12T22:54:12Z</published>
    <updated>2006-05-12T22:54:12Z</updated>
    <category term="function print_month"/>
    <category term="function print_body"/>
    <category term="class yearpage"/>
    <category term="layout flexisquares"/>
    <category term="class monthpage"/>
    <category term="function print_sidebar"/>
    <content type="html">in response to &lt;span  class="ljuser  i-ljuser  i-ljuser-deleted  i-ljuser-type-P     "  data-ljuser="epigram" lj:user="epigram" &gt;&lt;a href="https://epigram.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://epigram.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;epigram&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="s2flexisquares" lj:user="s2flexisquares" &gt;&lt;a href="https://s2flexisquares.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2flexisquares.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2flexisquares&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; &lt;a href="http://community.livejournal.com/s2flexisquares/308578.html" target="_blank"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;in addition to using this code, you'll have to override &lt;code&gt;print_entry()&lt;/code&gt; and include the following near the top of the function:&lt;pre&gt;&lt;code&gt;"""&amp;lt;a name="$e.journal.username$e.itemid" id="$e.journal.username$e.itemid"&amp;gt;&amp;lt;/a&amp;gt;""";&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;pre&gt;&lt;code&gt;class MyUtils {
  function num_comments_in_thread(Comment[] comments) : int;
}

function MyUtils::num_comments_in_thread (Comment[] comments)  : int {
  var int total = 0;
  foreach var Comment c ($comments) {
    $total = $total + 1;
    if (size $c.replies &amp;gt; 0) {
      $total = $total + $this-&amp;gt;num_comments_in_thread($c.replies);
    }
  }
  return $total;
}

function YearPage::print_month(YearMonth m) {
  if (not $m.has_entries) {
    return; 
  }

  var string month = $m-&amp;gt;month_format();
  """
  &amp;lt;a name="month$m.month" id="month$m.month"&amp;gt;&amp;lt;/a&amp;gt;
  &amp;lt;table class="yeartable" align="center"&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td colspan="4" class="yearmonth" align="left"&amp;gt;$month&amp;lt;/td&amp;gt;
      &amp;lt;td colspan="3" class="yearmonth" align="right"&amp;gt;&amp;lt;a href="$m.url"&amp;gt;$*text_view_month&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;""";
    foreach var int d (weekdays()) {
        """
      &amp;lt;td width="50px" class="yearday"&amp;gt;"""+$*lang_dayname_short[$d]+"&amp;lt;/td&amp;gt;\n";
    }
    """
    &amp;lt;/tr&amp;gt;""";
    foreach var YearWeek w ($m.weeks) {
      $w-&amp;gt;print();
    }
    """
  &amp;lt;/table&amp;gt;
  &amp;lt;br /&amp;gt;
  &amp;lt;br /&amp;gt;
  &amp;lt;br /&amp;gt;""";
}

function MonthPage::print_body {
  """
  &amp;lt;form method='post' action='$.redir.url'&amp;gt;
    &amp;lt;center&amp;gt;&amp;lt;br /&amp;gt;""";
  $.redir-&amp;gt;print_hiddens();
  if ($.prev_url != "") { 
    "[&amp;lt;a href='$.prev_url'&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/a&amp;gt;]\n"; 
  }
  if (size $.months &amp;gt; 1) {
    "&amp;lt;select name='redir_key'&amp;gt;\n";
    foreach var MonthEntryInfo mei ($.months) {
      var string sel;
      if ($mei.date.year == $.date.year and $mei.date.month == $.date.month) {
        $sel = " selected='selected'";
      }
      "&amp;lt;option value='$mei.redir_key'$sel&amp;gt;" + $mei.date-&amp;gt;date_format($*lang_fmt_month_long) + "&amp;lt;/option&amp;gt;";
    }
    "&amp;lt;/select&amp;gt;\n&amp;lt;input type='submit' value='View' /&amp;gt;";
  }
  if ($.next_url != "") { 
    "\n[&amp;lt;a href='$.next_url'&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;lt;/a&amp;gt;]\n"; 
  }
  """
    &amp;lt;/center&amp;gt;
  &amp;lt;/form&amp;gt;&amp;lt;br /&amp;gt;
  &amp;lt;br /&amp;gt;
  &amp;lt;div class="subcontent"&amp;gt;
    &amp;lt;div class="entry"&amp;gt;
      &amp;lt;dl&amp;gt;""";
  foreach var MonthDay d ($.days) {
    if ($d.has_entries) {
      var string day = lang_ordinal($d.day);
      """
        &amp;lt;dt&amp;gt;
          &amp;lt;a name="day$d.day" id="day$d.day" href="$d.url"&amp;gt;
            &amp;lt;b&amp;gt;$day&amp;lt;/b&amp;gt;
          &amp;lt;/a&amp;gt;
        &amp;lt;/dt&amp;gt;
        &amp;lt;dd&amp;gt;""";
      $d-&amp;gt;print_subjectlist();
      """
        &amp;lt;/dd&amp;gt;""";
    }
  }
  """
      &amp;lt;/dl&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;""";
}

function print_sidebar() {
  # create helper vars for sidebar boxes
  var string k1Sheader      = "";
  var string k1Sheader_one  = """&amp;lt;li class="sbartitle"&amp;gt;""";
  var string k1Sheader_two  = "&amp;lt;/li&amp;gt;";
  var string k1Scontent     = "";
  var string k1Scontent_one = """&amp;lt;li class="sbaritem"&amp;gt;""";
  var string k1Scontent_two = "&amp;lt;/li&amp;gt;";

  # create var for header of summary box
  var string    summary_header = "Page Summary";

  # create helper vars for summary sidebar box
  var Page      p        = get_page();
  var Comment[] comments = [];
  var Entry[]   entries  = [];
  var int       items    = 0;
  var string    summary  = "";

  # if we're on a RecentPage or FriendsPage
  if($p isa RecentPage) {
    var RecentPage rp = $p as RecentPage;

    # grab the entries and number of them
    if(size($rp.entries) &amp;gt; 0) {
      $entries = $rp.entries;
      $items   = size($entries);
    }
  }

  # if we're on a YearPage
  if($p isa YearPage) {
    var YearPage yp    = $p as YearPage;
    var string   month = "";
    foreach var YearMonth m ($yp.months) {
      if($m.has_entries) {
        $month   = """&amp;lt;a href="#month$m.month"&amp;gt;""" + $m-&amp;gt;month_format() + """&amp;lt;/a&amp;gt;""";
        $month   = "$k1Scontent_one$month$k1Scontent_two";
        $summary = $summary + $month + "\n";
      }
    }
  }

  # if we're on a MonthPage
  if($p isa MonthPage) {
    var MonthPage mp  = $p as MonthPage;
    var string    day = "";
    foreach var MonthDay d ($mp.days) {
      if($d.num_entries &amp;gt; 0) {
        $day     = """&amp;lt;a href="#day$d.day"&amp;gt;""" + $d.date-&amp;gt;date_format("long") + """&amp;lt;/a&amp;gt;""";
        $day     = "$k1Scontent_one$day$k1Scontent_two";
        $summary = $summary + $day + "\n";
      }
    }
  }

  # if we're on a DayPage
  if($p isa DayPage) {
    var DayPage dp = $p as DayPage;
    if(size($dp.entries) &amp;gt; 0) {
      $entries = $dp.entries;
      $items   = size($entries);
    }
  }

  # if we're on an EntryPage
  if($p isa EntryPage) {
    var EntryPage ep = $p as EntryPage;
    if(size($ep.comments) &amp;gt; 0) {

      # grab the comments and number of them
      $comments = $ep.comments;
      $items    = size($comments);
    }
  }

  # if we got entries from Recent/Friends/DayPage
  if(size($entries) &amp;gt; 0) {
    var string security = "";
    var string subject  = "";
    var string poster   = "";
    var string journal  = "";
    var string count   = "";
    var string item     = "";

    # cycle thru entries
    foreach var Entry e ($entries) {
      $security = "";
      $subject  = "";
      $poster   = "";
      $journal  = "";
      $count    = "";
      $item     = "";

      # get security icon
      if($e.security_icon.url != "") {
        $security = $e.security_icon + " ";
      }

      # get subject
      if($e.subject != "") {
        $subject = striphtml($e.subject);
      } else {
        $subject = """&amp;lt;i class="nosubject"&amp;gt;$*text_nosubject&amp;lt;/i&amp;gt;""";
      }

      # get journal
      if($p.view == "friends" and (not ($e.poster-&amp;gt;equals($e.journal)))) {
        $journal = "$e.journal ::&amp;lt;br /&amp;gt;";
      }

      # get poster
      if($p.view == "friends" or  (not ($e.poster-&amp;gt;equals($e.journal)))) {
        $poster = "$e.poster :&amp;lt;br /&amp;gt;";
      }

      # get comment count
      $count   = """ [&amp;lt;a href="$e.permalink_url"&amp;gt;+$e.comments.count&amp;lt;/a&amp;gt;]""";

      # put it all together
      $item    = """$security$journal$poster&amp;lt;a href="#$e.journal.username$e.itemid"&amp;gt;$subject&amp;lt;/a&amp;gt;$count""";

      # format it for a sidebar box line item
      $item    = "$k1Scontent_one$item$k1Scontent_two";

      # add it to the summary var
      $summary = $summary + $item + "\n";
    }
  }

  # if we got comments from EntryPage
  if(size($comments) &amp;gt; 0) {
    var MyUtils mu      = new MyUtils;
    var string  subject = "";
    var string  icon    = "";
    var string  poster  = "";
    var string  count   = "";
    var string  item    = "";

    # cycle thru comments
    foreach var Comment c ($comments) {
      $subject = "";
      $icon    = "";
      $poster  = "";
      $count   = "";
      $item    = "";

      # get subject icon
      $icon    = $c.subject_icon.url != "" ? $c.subject_icon + " " : "";

      # get subject
      $subject = $c.subject != "" ? $c.subject : """&amp;lt;i class="nosubject"&amp;gt;$*text_nosubject&amp;lt;/i&amp;gt;""";
      $subject = "$subject";

      # get poster
      $poster  = $c.poster.username  != "" ? $c.poster + "" : """&amp;lt;i class="noposter"&amp;gt;$*text_poster_anonymous&amp;lt;/i&amp;gt;""";
      $poster  = $poster + " :&amp;lt;br /&amp;gt;";

      # get reply count
      $count   = """ [&amp;lt;a href="$c.permalink_url"&amp;gt;+""" + $mu-&amp;gt;num_comments_in_thread($c.replies) + """&amp;lt;/a&amp;gt;]""";

      # put it all together
      $item    = """$icon$poster&amp;lt;a href="#t$c.talkid"&amp;gt;$subject&amp;lt;/a&amp;gt;$count""";

      # format it for a sidebar box line item
      $item    = "$k1Scontent_one$item$k1Scontent_two";

      # add it to the summary var
      $summary = $summary + $item + "\n";
    }
  }

  # if we've got a summary
  if($summary != "") {
    # set header
    $k1Sheader  = $summary_header;

    # set content
    $k1Scontent = $summary;

    # print sidebar box
    print_sidebar_box("$k1Sheader_one$k1Sheader$k1Sheader_two", "$k1Scontent_one$k1Scontent$k1Scontent_two");
  }

  sidebar_order($*sidebar_order_1);
  sidebar_order($*sidebar_order_2);
  sidebar_order($*sidebar_order_3);
  sidebar_order($*sidebar_order_4);
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:65321</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/65321.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=65321"/>
    <title>[theme] - [change info icons via css]</title>
    <published>2006-05-02T21:54:35Z</published>
    <updated>2008-04-25T10:38:41Z</updated>
    <category term="class page"/>
    <category term="function print_custom_head"/>
    <content type="html">in response to &lt;span  class="ljuser  i-ljuser  i-ljuser-type-P     "  data-ljuser="troublesrollby" lj:user="troublesrollby" &gt;&lt;a href="https://troublesrollby.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://troublesrollby.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;troublesrollby&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="s2flexisquares" lj:user="s2flexisquares" &gt;&lt;a href="https://s2flexisquares.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2flexisquares.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2flexisquares&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; &lt;a href="http://community.livejournal.com/s2flexisquares/297077.html" target="_blank"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;this works in browsers that support attribute selectors.&lt;br /&gt;browsers that don't support attribute selectors will use the new image that you set for personal journals.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;function Page::print_custom_head() {

# create an order of account types
var string[] types_order = ["personal", "community", "syndicated", "news", "identity", "sponcomm"];

# original URLs used by livejournal
var string{} old_urls = {
                         "personal"      =&amp;gt; "http://p-stat.livejournal.com/img/userinfo.gif",
                         "community"     =&amp;gt; "http://p-stat.livejournal.com/img/community.gif",
                         "syndicated"    =&amp;gt; "http://stat.livejournal.com/img/syndicated.gif",
                         "news"          =&amp;gt; "http://p-stat.livejournal.com/img/newsinfo.gif",
                         "identity"      =&amp;gt; "http://p-stat.livejournal.com/img/openid-profile.gif",
                         "sponcomm"      =&amp;gt; "http://p-stat.livejournal.com/img/sponcomm.gif",
                        };

# original widths used by livejournal
var string{} old_widths = {
                           "personal"    =&amp;gt; "17",
                           "community"   =&amp;gt; "16",
                           "syndicated"  =&amp;gt; "16",
                           "news"        =&amp;gt; "16",
                           "identity"    =&amp;gt; "16",
                           "sponcomm"    =&amp;gt; "16",
                          };

# original heights used by livejournal
var string{} old_heights = {
                            "personal"   =&amp;gt; "17",
                            "community"  =&amp;gt; "16",
                            "syndicated" =&amp;gt; "16",
                            "news"       =&amp;gt; "16",
                            "identity"   =&amp;gt; "16",
                            "sponcomm"   =&amp;gt; "16",
                           };

# new URLs to your images
# if you don't have an image for a specific type, leave it blank to use the original
var string{} new_urls = {
                         "personal"      =&amp;gt; "http://pics.livejournal.com/kunzite1/pic/000x8y5d.gif",
                         "community"     =&amp;gt; "http://pics.livejournal.com/kunzite1/pic/000x7th0.gif",
                         "syndicated"    =&amp;gt; "http://pics.livejournal.com/kunzite1/pic/000x6cww.gif",
                         "news"          =&amp;gt; "http://pics.livejournal.com/kunzite1/pic/000x5pdc.gif",
                         "identity"      =&amp;gt; "http://pics.livejournal.com/kunzite1/pic/0026r895.gif",
                         "sponcomm"      =&amp;gt; "http://pics.livejournal.com/kunzite1/pic/002asx0e.gif",
                        };

# new widths for your images
# if you don't have an image for a specific type, leave it blank to use the original
var string{} new_widths = {
                           "personal"    =&amp;gt; "17",
                           "community"   =&amp;gt; "16",
                           "syndicated"  =&amp;gt; "15",
                           "news"        =&amp;gt; "17",
                           "identity"    =&amp;gt; "16",
                           "sponcomm"    =&amp;gt; "16",
                          };

# new heights for your images
# if you don't have an image for a specific type, leave it blank to use the original
var string{} new_heights = {
                            "personal"   =&amp;gt; "17",
                            "community"  =&amp;gt; "16",
                            "syndicated" =&amp;gt; "18",
                            "news"       =&amp;gt; "16",
                            "identity"   =&amp;gt; "16",
                            "sponcomm"   =&amp;gt; "16",
                           };

var string ie_url    = $new_urls{"personal"};
var string ie_width  = $new_widths{"personal"};
var string ie_height = $new_heights{"personal"};
"""
&amp;lt;style type="text/css"&amp;gt;
.ljuser img { 
  width:             0;
  height:            0;
  background-repeat: no-repeat;

  /* so that IE users will still see an image */
  background-image: url($ie_url); 
  padding:          ${ie_height}px ${ie_width}px 0 0;
}
""";

foreach var string type ($types_order) {
  var string old_url    = $old_urls{$type};
  var string new_url    = $new_urls{$type}    != "" ? $new_urls{$type}    : $old_url;
  var string new_width  = $new_widths{$type}  != "" ? $new_widths{$type}  : $old_widths{$type};
  var string new_height = $new_heights{$type} != "" ? $new_heights{$type} : $old_heights{$type};
  """
.ljuser img[src="$old_url"] {
  background-image: url($new_url);
  padding:          ${new_height}px ${new_width}px 0 0;
}
  """;
}
"""
&amp;lt;/style&amp;gt;
""";

}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:65193</id>
    <author>
      <name>“Nightwatch”</name>
    </author>
    <lj:poster user="night_watch" userid="1482266"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/65193.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=65193"/>
    <title>Base64</title>
    <published>2006-05-01T05:30:22Z</published>
    <updated>2006-05-01T05:30:22Z</updated>
    <category term="string functions"/>
    <content type="html">Simple one this time: Generation of Base64 and &lt;a href="http://en.wikipedia.org/wiki/Data:_URL" target="_blank"&gt;data: URLs&lt;/a&gt;. With a little hacking, you can embed little (dynamically-generated? hmmmm) images and stuff directly into your layout using this, no hosting needed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
# -----------------------------------------------------------------------------
#   S2 Base64 routines                                     v0.01 - 04/30/2006
#   Copyright (c) 2006 Patrick Walton but freely redistributable
# -----------------------------------------------------------------------------

function BSFEncodeBase64(int[] data) : string
{
    var string mapString =
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    var string[] map;
    var int i = 0;
    foreach var string ch ($mapString) {
        $map[$i] = $ch;
        $i++;
    }

    var string result = "";
    var int val = 0;

    $i = 0;
    foreach var int octet ($data) {
        if ($i == 0) {          # 000000 00
            $val = $octet / 4;
            $result = $result + $map[$val];
            $val = $octet % 4;
            $i++;
        } elseif ($i == 1) {    # 001111 1111
            $val = $val * 16 + $octet / 16;
            $result = $result + $map[$val];
            $val = $octet % 16;
            $i++;
        } else {                # 111122 222222
            $val = $val * 4 + $octet / 64;
            $result = $result + $map[$val];
            $val = $octet % 64;
            $result = $result + $map[$val];
            $i = 0;
        }
    }

    if ($i == 1) {              # one input byte remaining
        $val = $val * 16;
        $result = $result + $map[$val] + "==";
    } elseif ($i == 2) {        # two input bytes remaining
        $val = $val * 4;
        $result = $result + $map[$val] + "=";
    }

    return $result;
}

function BSFGenerateDataURL(int[] data, string mimeType) : string
{
    return "data:" + $mimeType + ";base64," + BSFEncodeBase64($data);
}

# -- End of Base64 package ----------------------------------------------------

&lt;/pre&gt;&lt;br /&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:65012</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/65012.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=65012"/>
    <title>EntryPage is hosed after Timezone Support Update</title>
    <published>2006-04-29T20:11:09Z</published>
    <updated>2006-04-29T20:20:53Z</updated>
    <category term="function print_entry"/>
    <category term="class page"/>
    <category term="function print_comment"/>
    <category term="class entrypage"/>
    <category term="layout bloggish"/>
    <content type="html">those of you using the code in &lt;a href="http://community.livejournal.com/s2layers/41265.html" target="_blank"&gt;this entry&lt;/a&gt; or those of you who have overridden &lt;code&gt;Page::print_entry(Entry e)&lt;/code&gt; or &lt;code&gt;EntryPage::print_comment(Comment e)&lt;/code&gt; are prolly getting errors when you view entries or reply to comments.  the following edits should fix that.&lt;br /&gt;&lt;br /&gt;in &lt;code&gt;EntryPage::print_comment(Comment e)&lt;/code&gt;:&lt;pre&gt;&lt;code&gt;    if (not $e.full) {
        # Collapsed mode

        "&amp;lt;div class='comment collapsed-comment'"+($e.dom_id ? " id='$e.dom_id'" : "")+"&amp;gt;\n";
        "&amp;lt;div class='comment-footer'&amp;gt;";
        var string subject = $e.subject;
        if ($subject == "") { $subject = $*text_nosubject; }
        "&amp;lt;a href='$e.permalink_url' class='collapsed-comment-link'&amp;gt;$subject&amp;lt;/a&amp;gt; &amp;lt;span class='separator'&amp;gt;-&amp;lt;/span&amp;gt; ";
&lt;span style="color:red;text-decoration:line-through;"&gt;#       print lang_posted_by_date_and_time($e.poster, $e.time, true, true, true);&lt;/span&gt;
&lt;span style="color:green;font-weight:bold;"&gt;        print lang_posted_by_date_and_time($e, $e.poster, $e.time, true, true, true);&lt;/span&gt;
        "&amp;lt;/div&amp;gt;";
        "&amp;lt;/div&amp;gt;";

        return;
    }&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;also in &lt;code&gt;EntryPage::print_comment(Comment e)&lt;/code&gt;:&lt;pre&gt;&lt;code&gt;    var string sep = "&amp;lt;span class='separator'&amp;gt;|&amp;lt;/span&amp;gt;";
 
&lt;span style="color:red;text-decoration:line-through;"&gt;#   print lang_posted_by_date_and_time($e.poster, $e.time, true, true, true)+" $sep ";&lt;/span&gt;
&lt;span style="color:green;font-weight:bold;"&gt;    print lang_posted_by_date_and_time($e, $e.poster, $e.time, true, true, true)+" $sep ";&lt;/span&gt;
 
    "&amp;lt;a class='permalink' href='$e.permalink_url'&amp;gt;$*text_permalink&amp;lt;/a&amp;gt;";&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;in &lt;code&gt;Page::print_entry(Entry e)&lt;/code&gt;:&lt;pre&gt;&lt;code&gt;         if ($showdate or $showtime or $showposter) {
&lt;span style="color:red;text-decoration:line-through;"&gt;#            print lang_posted_by_date_and_time($e.poster, $e.journal, $e.time, $showposter, $showdate, $showtime)+" $sep ";&lt;/span&gt;
&lt;span style="color:green;font-weight:bold;"&gt;             print lang_posted_by_date_and_time($e, $e.poster, $e.journal, $e.time, $showposter, $showdate, $showtime)+" $sep ";&lt;/span&gt;
         }
         "&amp;lt;a class='permalink' href='$e.permalink_url'&amp;gt;$*text_permalink&amp;lt;/a&amp;gt;";&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:64664</id>
    <author>
      <name>“Nightwatch”</name>
    </author>
    <lj:poster user="night_watch" userid="1482266"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/64664.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=64664"/>
    <title>Unicode character functions (chr/fromCharCode and ord/charCodeAt)</title>
    <published>2006-04-18T01:31:58Z</published>
    <updated>2006-04-19T02:52:21Z</updated>
    <category term="string functions"/>
    <content type="html">As some of you may have noticed, S2's Unicode support is rather buggy. I've written a little package to convert S2 strings to and from their Unicode character numbers. If you've programmed Perl, this is the equivalent of chr() and ord(). If you've programmed Java or JavaScript, this is the same as fromCharCode() and charCodeAt(). I've tested it on input from a variety of sources, and it seems to work in all cases.&lt;br /&gt;&lt;br /&gt;Hopefully this'll add a little sanity to S2's handling of Unicode.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Be sure your browser's encoding is set correctly before copying this into your layer. There are some funky characters here, and if they don't copy correctly things will break badly!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;# -----------------------------------------------------------------------------
#   UC - S2 Unicode package                                v0.02 - 04/18/2006
#   Copyright (c) 2006 Patrick Walton but freely redistributable
# -----------------------------------------------------------------------------

# Converts the given 32-bit integer to a binary string.
function UCIntToBinaryString(int n) : string
{
    var string str = &amp;#x22;&amp;#x22;;

    var int power = 32768;
    foreach var int i (0..31) {
        if ($n &amp;#x3E;= $power) {
            $n = $n - $power;
            $str = $str + &amp;#x22;1&amp;#x22;;
        } else {
            $str = $str + &amp;#x22;0&amp;#x22;;
        }

        $power = $power / 2; 
    }

    foreach var int i (0..2) {
        if ($str-&amp;#x3E;starts_with(&amp;#x22;00000000&amp;#x22;)) {
            $str = $str-&amp;#x3E;substr(8, $str-&amp;#x3E;length() - 8);
        }
    }

    return $str;
}

# Converts the given binary string to an integer.
function UCBinaryStringToInt(string str) : int
{
    var int n = 0;
    var int power = 1;

    var string reversedStr = reverse $str;
    foreach var string bit ($reversedStr) {
        if ($bit == &amp;#x22;1&amp;#x22;) {
            $n = $n + $power;
        }

        $power = $power * 2;
    }

    return $n;
}

# Like Java String.toCharArray(), turns a string into an array of Unicode code
# points.
function UCConvertStringToCodePoints(string str) : int[]
{
    var int{} baseCharPoints = {
        &amp;#x22; &amp;#x22; =&amp;#x3E; 32, &amp;#x22;,&amp;#x22; =&amp;#x3E; 44, &amp;#x22;-&amp;#x22; =&amp;#x3E; 45, &amp;#x22;.&amp;#x22; =&amp;#x3E; 46, &amp;#x22;/&amp;#x22; =&amp;#x3E; 47, &amp;#x22;0&amp;#x22; =&amp;#x3E; 48, 
        &amp;#x22;1&amp;#x22; =&amp;#x3E; 49, &amp;#x22;2&amp;#x22; =&amp;#x3E; 50, &amp;#x22;3&amp;#x22; =&amp;#x3E; 51, &amp;#x22;4&amp;#x22; =&amp;#x3E; 52, &amp;#x22;5&amp;#x22; =&amp;#x3E; 53, &amp;#x22;6&amp;#x22; =&amp;#x3E; 54, 
        &amp;#x22;7&amp;#x22; =&amp;#x3E; 55, &amp;#x22;8&amp;#x22; =&amp;#x3E; 56, &amp;#x22;9&amp;#x22; =&amp;#x3E; 57, &amp;#x22;:&amp;#x22; =&amp;#x3E; 58, &amp;#x22;A&amp;#x22; =&amp;#x3E; 65, &amp;#x22;B&amp;#x22; =&amp;#x3E; 66, 
        &amp;#x22;C&amp;#x22; =&amp;#x3E; 67, &amp;#x22;D&amp;#x22; =&amp;#x3E; 68, &amp;#x22;E&amp;#x22; =&amp;#x3E; 69, &amp;#x22;F&amp;#x22; =&amp;#x3E; 70, &amp;#x22;G&amp;#x22; =&amp;#x3E; 71, &amp;#x22;H&amp;#x22; =&amp;#x3E; 72, 
        &amp;#x22;I&amp;#x22; =&amp;#x3E; 73, &amp;#x22;J&amp;#x22; =&amp;#x3E; 74, &amp;#x22;K&amp;#x22; =&amp;#x3E; 75, &amp;#x22;L&amp;#x22; =&amp;#x3E; 76, &amp;#x22;M&amp;#x22; =&amp;#x3E; 77, &amp;#x22;N&amp;#x22; =&amp;#x3E; 78, 
        &amp;#x22;O&amp;#x22; =&amp;#x3E; 79, &amp;#x22;P&amp;#x22; =&amp;#x3E; 80, &amp;#x22;Q&amp;#x22; =&amp;#x3E; 81, &amp;#x22;R&amp;#x22; =&amp;#x3E; 82, &amp;#x22;S&amp;#x22; =&amp;#x3E; 83, &amp;#x22;T&amp;#x22; =&amp;#x3E; 84, 
        &amp;#x22;U&amp;#x22; =&amp;#x3E; 85, &amp;#x22;V&amp;#x22; =&amp;#x3E; 86, &amp;#x22;W&amp;#x22; =&amp;#x3E; 87, &amp;#x22;X&amp;#x22; =&amp;#x3E; 88, &amp;#x22;Y&amp;#x22; =&amp;#x3E; 89, &amp;#x22;Z&amp;#x22; =&amp;#x3E; 90, 
        &amp;#x22;\\&amp;#x22; =&amp;#x3E; 92, &amp;#x22;_&amp;#x22; =&amp;#x3E; 95, &amp;#x22;a&amp;#x22; =&amp;#x3E; 97, &amp;#x22;b&amp;#x22; =&amp;#x3E; 98, &amp;#x22;c&amp;#x22; =&amp;#x3E; 99, &amp;#x22;d&amp;#x22; =&amp;#x3E; 100, 
        &amp;#x22;e&amp;#x22; =&amp;#x3E; 101, &amp;#x22;f&amp;#x22; =&amp;#x3E; 102, &amp;#x22;g&amp;#x22; =&amp;#x3E; 103, &amp;#x22;h&amp;#x22; =&amp;#x3E; 104, &amp;#x22;i&amp;#x22; =&amp;#x3E; 105, &amp;#x22;j&amp;#x22; =&amp;#x3E; 106, 
        &amp;#x22;k&amp;#x22; =&amp;#x3E; 107, &amp;#x22;l&amp;#x22; =&amp;#x3E; 108, &amp;#x22;m&amp;#x22; =&amp;#x3E; 109, &amp;#x22;n&amp;#x22; =&amp;#x3E; 110, &amp;#x22;o&amp;#x22; =&amp;#x3E; 111, &amp;#x22;p&amp;#x22; =&amp;#x3E; 112, 
        &amp;#x22;q&amp;#x22; =&amp;#x3E; 113, &amp;#x22;r&amp;#x22; =&amp;#x3E; 114, &amp;#x22;s&amp;#x22; =&amp;#x3E; 115, &amp;#x22;t&amp;#x22; =&amp;#x3E; 116, &amp;#x22;u&amp;#x22; =&amp;#x3E; 117, &amp;#x22;v&amp;#x22; =&amp;#x3E; 118, 
        &amp;#x22;w&amp;#x22; =&amp;#x3E; 119, &amp;#x22;x&amp;#x22; =&amp;#x3E; 120, &amp;#x22;y&amp;#x22; =&amp;#x3E; 121, &amp;#x22;z&amp;#x22; =&amp;#x3E; 122
    };

    var string{} hexNibbles = {
        &amp;#x22;0&amp;#x22; =&amp;#x3E;  &amp;#x22;0000&amp;#x22;, &amp;#x22;1&amp;#x22; =&amp;#x3E;  &amp;#x22;0001&amp;#x22;, &amp;#x22;2&amp;#x22; =&amp;#x3E;  &amp;#x22;0010&amp;#x22;, &amp;#x22;3&amp;#x22; =&amp;#x3E;  &amp;#x22;0011&amp;#x22;,
        &amp;#x22;4&amp;#x22; =&amp;#x3E;  &amp;#x22;0100&amp;#x22;, &amp;#x22;5&amp;#x22; =&amp;#x3E;  &amp;#x22;0101&amp;#x22;, &amp;#x22;6&amp;#x22; =&amp;#x3E;  &amp;#x22;0110&amp;#x22;, &amp;#x22;7&amp;#x22; =&amp;#x3E;  &amp;#x22;0111&amp;#x22;,
        &amp;#x22;8&amp;#x22; =&amp;#x3E;  &amp;#x22;1000&amp;#x22;, &amp;#x22;9&amp;#x22; =&amp;#x3E;  &amp;#x22;1001&amp;#x22;, &amp;#x22;A&amp;#x22; =&amp;#x3E;  &amp;#x22;1010&amp;#x22;, &amp;#x22;B&amp;#x22; =&amp;#x3E;  &amp;#x22;1011&amp;#x22;,
        &amp;#x22;C&amp;#x22; =&amp;#x3E;  &amp;#x22;1100&amp;#x22;, &amp;#x22;D&amp;#x22; =&amp;#x3E;  &amp;#x22;1101&amp;#x22;, &amp;#x22;E&amp;#x22; =&amp;#x3E;  &amp;#x22;1110&amp;#x22;, &amp;#x22;F&amp;#x22; =&amp;#x3E;  &amp;#x22;1111&amp;#x22;
    };

    var int[] translatedString = [];
    var string bitString = &amp;#x22;&amp;#x22;;

    foreach var string ch ($str) {
        var int codePoint;

        var bool wasBase = false;
        if ($baseCharPoints{$ch}) {
            if ($bitString == &amp;#x22;&amp;#x22;) { # ugly but S2 has no exists on hashes, sigh
                $codePoint = $baseCharPoints{$ch};
                $translatedString[size $translatedString] = $codePoint;
                $wasBase = true;
            }
        }

        if (not $wasBase) {
            var string hexString = eurl($ch);   # and magic happens!

            var string thisBitString = &amp;#x22;&amp;#x22;;
            foreach var string nibble ($hexString) {
                if (($nibble &amp;#x3E;= &amp;#x22;0&amp;#x22; and $nibble &amp;#x3C;= &amp;#x22;9&amp;#x22;) or
                    ($nibble &amp;#x3E;= &amp;#x22;A&amp;#x22; and $nibble &amp;#x3C;= &amp;#x22;F&amp;#x22;)) {
                    $thisBitString = $thisBitString + $hexNibbles{$nibble};
                }
            }

            # Add a null high nibble if needed
            if ($thisBitString-&amp;#x3E;length() % 8 == 4) {
                $thisBitString = &amp;#x22;0000&amp;#x22; + $bitString;
            }

            $bitString = $bitString + $thisBitString;

            var bool finished = false;
            if ($bitString-&amp;#x3E;starts_with(&amp;#x22;0&amp;#x22;)) {         # 0xxxxxxx
                $finished = true;
            } elseif ($bitString-&amp;#x3E;starts_with(&amp;#x22;110&amp;#x22;) and $bitString-&amp;#x3E;length()
                == 16) {                                # 110zzzzx 10xxxxxx
                $finished = true;
                $bitString =    $bitString-&amp;#x3E;substr(3, 5) +
                                $bitString-&amp;#x3E;substr(10, 6);
            } elseif ($bitString-&amp;#x3E;starts_with(&amp;#x22;1110&amp;#x22;) and $bitString-&amp;#x3E;length()
                == 24) {                                # 1110zzzz ...
                $finished = true;
                $bitString =    $bitString-&amp;#x3E;substr(4, 4) +
                                $bitString-&amp;#x3E;substr(10, 6) +
                                $bitString-&amp;#x3E;substr(18, 6);
            } elseif ($bitString-&amp;#x3E;starts_with(&amp;#x22;11110&amp;#x22;) and $bitString-&amp;#x3E;length()
                == 32) {
                $finished = true;
                $bitString =    $bitString-&amp;#x3E;substr(5, 3) +
                                $bitString-&amp;#x3E;substr(10, 6) +
                                $bitString-&amp;#x3E;substr(18, 6) +
                                $bitString-&amp;#x3E;substr(26, 6);
            }

            if ($finished) {
                $codePoint = UCBinaryStringToInt($bitString);
                $translatedString[size $translatedString] = $codePoint;
                $bitString = &amp;#x22;&amp;#x22;;
            } 
        }
    }

    return $translatedString;
}

# Like &amp;#x22;ord&amp;#x22; in Perl and &amp;#x22;String.charCodeAt()&amp;#x22; in Java and JavaScript, returns
# the Unicode code point that represents character pos in string str.
function UCGetCodePointAt(string str, int pos) : int
{
    var int[] translatedString = UCConvertStringToCodePoints($str);
    return $translatedString[$pos]; 
}

# Like String.fromCharArray() in Java, takes an array of code points and
# returns an S2 string.
function UCConvertCodePointsToString(int[] codePoints) : string
{
    # To say that this function is hacky is an understatement. The theory is
    # that this string contains every single legal UTF-8 byte. We then cut up
    # this string, Frankenstein-style, to piece together the result string.

    var string fundamentalString = 
	&amp;#x22;&amp;#x1;&amp;#x2;&amp;#x3;&amp;#x4;&amp;#x5;&amp;#x6;&amp;#x7;&amp;#x8; \n&amp;#xB;&amp;#xC; &amp;#xE;&amp;#xF;&amp;#x10;&amp;#x11;&amp;#x12;&amp;#x13;&amp;#x14;&amp;#x15;&amp;#x16;&amp;#x17;&amp;#x18;&amp;#x19;&amp;#x1A;&amp;#x1B;&amp;#x1C;&amp;#x1D;&amp;#x1E;&amp;#x1F; !\&amp;#x22;#\$%&amp;#x22; +
	&amp;#x22;&amp;#x26;'()*+,-./0123456789:;&amp;#x3C;=&amp;#x3E;?@ABCDEFGHIJKLM&amp;#x22; +
	&amp;#x22;NOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrst&amp;#x22; +
	&amp;#x22;uvwxyz{|}~ &amp;#x100;&amp;#x101;&amp;#x102;&amp;#x103;&amp;#x104;&amp;#x105;&amp;#x106;&amp;#x107;&amp;#x108;&amp;#x109;&amp;#x10A;&amp;#x10B;&amp;#x10C;&amp;#x10D;&amp;#x10E;&amp;#x10F;&amp;#x110;&amp;#x111;&amp;#x112;&amp;#x113;&amp;#x114;&amp;#x115;&amp;#x116;&amp;#x117;&amp;#x118;&amp;#x119;&amp;#x11A;&amp;#x11B;&amp;#x11C;&amp;#x22; +
	&amp;#x22;&amp;#x11D;&amp;#x11E;&amp;#x11F;&amp;#x120;&amp;#x121;&amp;#x122;&amp;#x123;&amp;#x124;&amp;#x125;&amp;#x126;&amp;#x127;&amp;#x128;&amp;#x129;&amp;#x12A;&amp;#x12B;&amp;#x12C;&amp;#x12D;&amp;#x12E;&amp;#x12F;&amp;#x130;&amp;#x131;&amp;#x132;&amp;#x133;&amp;#x134;&amp;#x135;&amp;#x136;&amp;#x137;&amp;#x138;&amp;#x139;&amp;#x13A;&amp;#x13B;&amp;#x13C;&amp;#x13D;&amp;#x13E;&amp;#x13F;&amp;#xC9;&amp;#x109;&amp;#x149;&amp;#x189;&amp;#x22; +
	&amp;#x22;&amp;#x1C9;&amp;#x209;&amp;#x249;&amp;#x289;&amp;#x2C9;&amp;#x309;&amp;#x349;&amp;#x389;&amp;#x3C9;&amp;#x409;&amp;#x449;&amp;#x489;&amp;#x4C9;&amp;#x509;&amp;#x549;&amp;#x589;&amp;#x5C9;&amp;#x609;&amp;#x649;&amp;#x689;&amp;#x6C9;&amp;#x709;&amp;#x749;&amp;#x789;&amp;#x7C9;&amp;#x1001;&amp;#x2001;&amp;#x3001;&amp;#x4001;&amp;#x5001;&amp;#x6001;&amp;#x7001;&amp;#x8001;&amp;#x9001;&amp;#xA001;&amp;#xB001;&amp;#xC001;&amp;#xD001;&amp;#xE001;&amp;#xF001;&amp;#x22; +
	&amp;#x22;       &amp;#x22;;

    # Change the code points into an array of UTF-8 bytes.
    var int[] utf8Bytes = [];
    foreach var int codePoint ($codePoints) {
        if ($codePoint &amp;#x3C;= 127) {
            $utf8Bytes[size $utf8Bytes] = $codePoint;
        } else {
            var string binaryString = UCIntToBinaryString($codePoint);
            if ($binaryString-&amp;#x3E;starts_with(&amp;#x22;00000&amp;#x22;)) {
                $utf8Bytes[size $utf8Bytes] = UCBinaryStringToInt(&amp;#x22;110&amp;#x22; +
                    $binaryString-&amp;#x3E;substr(5, 5));
                $utf8Bytes[size $utf8Bytes] = UCBinaryStringToInt(&amp;#x22;10&amp;#x22; +
                    $binaryString-&amp;#x3E;substr(10, 6));
            } else {
                $utf8Bytes[size $utf8Bytes] = UCBinaryStringToInt(&amp;#x22;1110&amp;#x22; +
                    $binaryString-&amp;#x3E;substr(0, 4));
                $utf8Bytes[size $utf8Bytes] = UCBinaryStringToInt(&amp;#x22;10&amp;#x22; +
                    $binaryString-&amp;#x3E;substr(4, 6));
                $utf8Bytes[size $utf8Bytes] = UCBinaryStringToInt(&amp;#x22;10&amp;#x22; +
                    $binaryString-&amp;#x3E;substr(10, 6));
            }
        }
    }

    var string convertedString = &amp;#x22;&amp;#x22;;
    foreach var int utf8Byte ($utf8Bytes) {
        # Find the position we want in the fundamental string.
        var int fsIndex;
        if ($utf8Byte == 0) {
            $fsIndex = 0;
        } elseif ($utf8Byte &amp;#x3C;= 127) {
            $fsIndex = $utf8Byte - 1;
        } elseif ($utf8Byte &amp;#x3C;= 191) {
            $fsIndex = 127 + ($utf8Byte - 128)*2 + 1;
        } elseif ($utf8Byte &amp;#x3C;= 193) {
            $fsIndex = 0;
        } elseif ($utf8Byte &amp;#x3C;= 223) {
            $fsIndex = 127 + ($utf8Byte - 130)*2;
        } elseif ($utf8Byte &amp;#x3C;= 224) {
            $fsIndex = 0;
        } elseif ($utf8Byte &amp;#x3C;= 239) {
            $fsIndex = 309 + ($utf8Byte - 223)*3;
        } elseif ($utf8Byte &amp;#x3C;= 240) {
            $fsIndex = 0;
        } else {
            $fsIndex = 0;
        }

        # Navigate to that position and insert the character.
        var int i = 0;
        foreach var string ch ($fundamentalString) {
            if ($i == $fsIndex) {
                $convertedString = $convertedString + $ch;
            }

            $i++;
        }
    }

    return $convertedString;
}

# Like Java and JavaScript String.fromCharCode and Perl chr, converts the given
# Unicode code point to a string.
function UCConvertCodePointToString(int codePoint) : string
{
    var int[] cps = [ $codePoint ];
    return UCConvertCodePointsToString($cps);
}

# -- End of S2 Unicode routines -----------------------------------------------

&lt;/pre&gt;&lt;br /&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:64439</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/64439.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=64439"/>
    <title>[theme] - [opal] - [tags redirect]</title>
    <published>2006-04-14T17:52:08Z</published>
    <updated>2006-04-14T17:54:58Z</updated>
    <category term="function lay_print_sidebar"/>
    <category term="class page"/>
    <category term="layout opal"/>
    <content type="html">&lt;pre&gt;&lt;code&gt;&lt;span style="color:green;font-weight:bold;"&gt;
############################################
# LiveJournal Tags List and Redirector     #
# by lj:kunzite1, posted by lj:xtomxfallsx #
# Component: component-help/873563         #
# Opal:      s2layers/64439                #
############################################&lt;/span&gt; 

  var string      k1TRheader    = "&lt;span class=""&gt;Tags In This Journal&lt;/span&gt;"; &lt;span style="color:green;font-weight:bold;"&gt;# set the boxheader text, you can change this to whatever you want&lt;/span&gt;
  var string      k1TRbutton    = "&lt;span class=""&gt;Go&lt;/span&gt;";                   &lt;span style="color:green;font-weight:bold;"&gt;# button text, change it to whatever you want&lt;/span&gt;
  var bool        k1TRblank     = &lt;span class=""&gt;true&lt;/span&gt;;                   &lt;span style="color:green;font-weight:bold;"&gt;# set to true to create a blank option at top the list, or false not to&lt;/span&gt;

  &lt;span style="color:green;font-weight:bold;"&gt;# No need to change anything below this line (unless you know what you are doing!)&lt;/span&gt;
 
  var string      k1TRbase_url  = $.journal-&amp;gt;base_url(); 
  var string      k1TRcontent   = "";
  var TagDetail[] k1TRtags      = $this-&amp;gt;visible_tag_list();

  foreach var TagDetail k1TRtag ($k1TRtags) {
    $k1TRcontent = $k1TRcontent + """&amp;lt;option value="$k1TRtag.name"&amp;gt;$k1TRtag.name&amp;lt;/option&amp;gt;\n""";
  }

  $k1TRcontent = """
  &amp;lt;form action="$k1TRbase_url/" method="get"&amp;gt;
    &amp;lt;select id="tags_select" name="tag"&amp;gt;""" + $k1TRcontent;
    if($k1TRblank) {
      $k1TRcontent = $k1TRcontent + """      &amp;lt;option value="" selected="selected"&amp;gt;&amp;lt;/option&amp;gt;\n""";
    }
    $k1TRcontent = $k1TRcontent + """
    &amp;lt;/select&amp;gt;&amp;lt;br /&amp;gt;
    &amp;lt;input type="submit" value="$k1TRbutton" /&amp;gt;
  &amp;lt;/form&amp;gt;""";

  print_box($k1TRheader, $k1TRcontent);&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:64164</id>
    <author>
      <name>Constance - Make tea, not war</name>
    </author>
    <lj:poster user="camomiletea" userid="1321849"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/64164.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=64164"/>
    <title>Adding linklist support to Gradient Strip</title>
    <published>2006-04-10T22:13:44Z</published>
    <updated>2006-04-10T22:21:37Z</updated>
    <category term="function print"/>
    <category term="class page"/>
    <category term="layout gradient strip"/>
    <category term="function print_linklist"/>
    <content type="html">This lack has been bugging me since I switched to Gradient Strip on my other journals. An example may be seen at: &lt;a target='_blank' href='http://camomiletea.livejournal.com/?s2id=10802076'&gt;http://camomiletea.livejournal.com/?s2id=10802076&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First adding the function:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;function Page::print_linklist() {
	if (size $.linklist &amp;lt;= 0) {
		return;
	}

	var bool slash = false;
	var string links;

	lay_nav_box_top();
	
	foreach var UserLink l ($.linklist) {
		if ($l.title) {
			if ($l.is_heading) {
				"""&amp;lt;strong&amp;gt;$l.title&amp;lt;/strong&amp;gt;""";
				$slash = false;
			} else {
				if($slash) {
					""" $*link_divider """;
				}
				""" &amp;lt;a href="$l.url"&amp;gt;$l.title&amp;lt;/a&amp;gt; """;
				$slash = true;
			}
		} else {
			"&amp;lt;br /&amp;gt;";
		}
	}

	lay_nav_box_bottom();
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then we need to add &lt;span style="color:blue"&gt;$this-&amp;gt;print_linklist();&lt;/span&gt; to the function Page::print, as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;function Page::print()  {
   var string title = $.global_title;
   var string subtitle = $.global_subtitle; 
   var string view_title = $this-&amp;gt;view_title() != "" ? $this-&amp;gt;view_title() : "Unknown View";

   """&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&amp;gt;
   &amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;
   &amp;lt;head&amp;gt;
   """;
         $this-&amp;gt;print_head();
         println """&amp;lt;title&amp;gt;$title :: $view_title&amp;lt;/title&amp;gt;""";
         if ($*external_stylesheet) {
            print safe """&amp;lt;link rel="stylesheet" href="$.stylesheet_url" type="text/css" /&amp;gt;""";
         } 
         else {
            """&amp;lt;style type="text/css"&amp;gt;"""; 
            start_css();
            print_stylesheet(); 
            end_css();
            "&amp;lt;/style&amp;gt;";
         }
   """&amp;lt;/head&amp;gt;
   &amp;lt;body&amp;gt;""";
   $this-&amp;gt;print_control_strip();
   $this-&amp;gt;lay_print_header();
   if (viewer_sees_ads()) {
      """&amp;lt;table width="100%" height="100%"&amp;gt;""";
      """&amp;lt;tr&amp;gt;&amp;lt;td valign="top"&amp;gt;""";
   }
   &lt;span style="color:blue"&gt;$this-&amp;gt;print_linklist();&lt;/span&gt;
   $this-&amp;gt;print_body();
   if (viewer_sees_ads()) {
      "&amp;lt;/td&amp;gt;";
      """&amp;lt;td valign="top" align="right" width="20%"&amp;gt;""";
      """&amp;lt;div style="margin-right: 10px;"&amp;gt;""";
      $this-&amp;gt;print_ad("Journal-Skyscraper");
      "&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;";
   }
   """&amp;lt;/body&amp;gt;
   &amp;lt;/html&amp;gt;""";
}&lt;/pre&gt;&lt;br /&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:63971</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/63971.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=63971"/>
    <title>navigation strip</title>
    <published>2006-04-10T07:01:12Z</published>
    <updated>2006-04-10T07:01:12Z</updated>
    <content type="html">i just now added &lt;code&gt;$this-&amp;gt;print_control_strip();&lt;/code&gt; to all the entries tagged with &lt;a href="http://community.livejournal.com/s2layers/tag/function+print" target="_blank"&gt;function print&lt;/a&gt;.  if y'all who have time could check 'em for me and make sure i didn't break anything, that'd be awesome.&lt;br /&gt;&lt;br /&gt;disabling comments on this entry.  please leave bug reports on the corresponding entries.&lt;br /&gt;&lt;br /&gt;many thankies. :)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:63264</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/63264.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=63264"/>
    <title>yay for capital letters!!!</title>
    <published>2006-04-08T05:52:11Z</published>
    <updated>2006-04-08T05:52:23Z</updated>
    <content type="html">BIG ANNOYING BOLD TYPE WARNING THAT ALL SHOULD READ ABOUT THE NAVIGATION STRIP CODE THAT I POSTED: DO NOT ATTEMPT THIS UNLESS YOU HAVE AMPLE PAID TIME LEFT OR A PERMANENT ACCOUNT. THE NAVIGATION STRIP MAY CHANGE IN THE FUTURE AND THIS CODE MAY BECOME OBSOLETE VERY FAST. PLZ 2 HEED THIS WARNING KTHX.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:63161</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/63161.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=63161"/>
    <title>[theme] - [haven] - [k1ified print_entry]</title>
    <published>2006-04-07T20:51:47Z</published>
    <updated>2006-05-13T03:08:28Z</updated>
    <category term="function print_entry"/>
    <category term="class entry"/>
    <category term="function print_linkbar"/>
    <category term="function print"/>
    <category term="class commentinfo"/>
    <category term="function print_postlink"/>
    <category term="function print_metadata"/>
    <category term="function print_readlink"/>
    <category term="layout haven"/>
    <content type="html">in response to &lt;span  class="ljuser  i-ljuser  i-ljuser-type-P     "  data-ljuser="dancingyel" lj:user="dancingyel" &gt;&lt;a href="https://dancingyel.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://dancingyel.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;dancingyel&lt;/b&gt;&lt;/a&gt;&lt;a class="i-ljuser-badge i-ljuser-badge--pro" data-badge-type="pro" data-placement="bottom" data-pro-badge data-pro-badge-type="1" data-is-raw hidden href="#"&gt;&lt;span class="i-ljuser-badge__icon"&gt;&lt;svg class="svgicon" width="25" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 24"&gt;&lt;path fill-rule="evenodd" d="M19.326 11.95c0 2.01 1.47 3.45 3.48 3.45 2.02 0 3.49-1.44 3.49-3.45 0-2.01-1.47-3.45-3.49-3.45-2.01 0-3.48 1.44-3.48 3.45Zm5.51 0c0 1.24-.8 2.19-2.03 2.19-1.23 0-2.02-.95-2.02-2.19 0-1.25.79-2.19 2.02-2.19s2.03.94 2.03 2.19ZM7.92 15.28H6.5V8.61h3.12c1.45 0 2.24.98 2.24 2.15 0 1.16-.8 2.15-2.24 2.15h-1.7v2.37Zm1.51-3.62c.56 0 .98-.35.98-.9 0-.56-.42-.9-.98-.9H7.92v1.8h1.51ZM18.3802 15.28h-1.63l-1.31-2.37h-1.04v2.37h-1.42V8.61h3.12c1.39 0 2.24.91 2.24 2.15 0 1.18-.74 1.81-1.46 1.98l1.5 2.54Zm-2.49-3.62c.57 0 1-.34 1-.9s-.43-.9-1-.9h-1.49v1.8h1.49Z" clip-rule="evenodd"/&gt;&lt;path fill-rule="evenodd" d="M2 8c0-2.20914 1.79086-4 4-4h20.5c2.2091 0 4 1.79086 4 4v7.9c0 2.2091-1.7909 4-4 4H6c-2.20914 0-4-1.7909-4-4V8Zm4-2.5h20.5C27.8807 5.5 29 6.61929 29 8v7.9c0 1.3807-1.1193 2.5-2.5 2.5H6c-1.38071 0-2.5-1.1193-2.5-2.5V8c0-1.38071 1.11929-2.5 2.5-2.5Z" clip-rule="evenodd"/&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;span  class="ljuser  i-ljuser  i-ljuser-deleted  i-ljuser-type-C     "  data-ljuser="s2haven" lj:user="s2haven" &gt;&lt;a href="https://s2haven.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2haven.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2haven&lt;/b&gt;&lt;/a&gt;&lt;a class="i-ljuser-badge i-ljuser-badge--pro" data-badge-type="pro" data-placement="bottom" data-pro-badge data-pro-badge-type="1" data-is-raw hidden href="#"&gt;&lt;span class="i-ljuser-badge__icon"&gt;&lt;svg class="svgicon" width="25" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 24"&gt;&lt;path fill-rule="evenodd" d="M19.326 11.95c0 2.01 1.47 3.45 3.48 3.45 2.02 0 3.49-1.44 3.49-3.45 0-2.01-1.47-3.45-3.49-3.45-2.01 0-3.48 1.44-3.48 3.45Zm5.51 0c0 1.24-.8 2.19-2.03 2.19-1.23 0-2.02-.95-2.02-2.19 0-1.25.79-2.19 2.02-2.19s2.03.94 2.03 2.19ZM7.92 15.28H6.5V8.61h3.12c1.45 0 2.24.98 2.24 2.15 0 1.16-.8 2.15-2.24 2.15h-1.7v2.37Zm1.51-3.62c.56 0 .98-.35.98-.9 0-.56-.42-.9-.98-.9H7.92v1.8h1.51ZM18.3802 15.28h-1.63l-1.31-2.37h-1.04v2.37h-1.42V8.61h3.12c1.39 0 2.24.91 2.24 2.15 0 1.18-.74 1.81-1.46 1.98l1.5 2.54Zm-2.49-3.62c.57 0 1-.34 1-.9s-.43-.9-1-.9h-1.49v1.8h1.49Z" clip-rule="evenodd"/&gt;&lt;path fill-rule="evenodd" d="M2 8c0-2.20914 1.79086-4 4-4h20.5c2.2091 0 4 1.79086 4 4v7.9c0 2.2091-1.7909 4-4 4H6c-2.20914 0-4-1.7909-4-4V8Zm4-2.5h20.5C27.8807 5.5 29 6.61929 29 8v7.9c0 1.3807-1.1193 2.5-2.5 2.5H6c-1.38071 0-2.5-1.1193-2.5-2.5V8c0-1.38071 1.11929-2.5 2.5-2.5Z" clip-rule="evenodd"/&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; &lt;a href="http://community.livejournal.com/s2haven/17680.html" target="_blank"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;set tags_aware         = true;
set text_meta_location = "Current Location:";
set text_meta_mood     = "Current Mood:";
set text_meta_music    = "Current Music:";

function CommentInfo::print_readlink() {
  var string img_url    = "";
  var int    img_width  = 0;
  var int    img_height = 0;
  var bool   img_count  = false;

  if($.show_readlink) {
    var Page p      = get_page();
    var string url  = $.read_url;
    var string text = get_plural_phrase($.count, "text_read_comments" + ($p.view == "friends" ? "_friends" : ""));
    if($.screened) {
      $text = $text + " " + $*text_month_screened_comments;
    }

    if($url != "") {
      """&amp;lt;a href="$url"&amp;gt;""";
    }
    if($img_url != "") {
      if($img_count) {
        print $.count;
      }
      """&amp;lt;img src="$img_url" width="$img_width" height="$img_height" alt="$text" title="$text" border="0" /&amp;gt;""";
    } else {
      print $text;
    }
    if($url != "") {
      """&amp;lt;/a&amp;gt;""";
    }
  }
}

function CommentInfo::print_postlink() {
  var string img_url    = "";
  var int    img_width  = 0;
  var int    img_height = 0;

  if($.show_postlink) {
    var Page p      = get_page();
    var string url  = $.post_url;
    var string text = get_plural_phrase(0, "text_post_comment" + ($p.view == "friends" ? "_friends" : ""));
    if($.maxcomments) {
      $url  = "";
      $text = $*text_max_comments;
    }

    if($url != "") {
      """&amp;lt;a href="$url"&amp;gt;""";
    }
    if($img_url != "") {
      """&amp;lt;img src="$img_url" width="$img_width" height="$img_height" alt="$text" title="$text" border="0" /&amp;gt;""";
    } else {
      print $text;
    }
    if($url != "") {
      """&amp;lt;/a&amp;gt;""";
    }
  }
}

function CommentInfo::print() {
  var string text_comment_divider = " | ";

  if($.show_readlink) {
    $this-&amp;gt;print_readlink();
    if($.show_postlink) {
      print $text_comment_divider;
    }
  }
  if($.show_postlink) {
    $this-&amp;gt;print_postlink();
    print $text_comment_divider;
  }
}

function Entry::print_metadata() {
  var string tags_header         = "&lt;span style="color: maroon; font-style: italic;"&gt;Current Tags&lt;/span&gt;"; &lt;span style="color: green; font-weight: bold;"&gt;# text for tags header,    "Current Tags"&lt;/span&gt;
  var string tags_joiner         = "&lt;span style="color: maroon; font-style: italic;"&gt;:&lt;/span&gt;";            &lt;span style="color: green; font-weight: bold;"&gt;# text for tags joiner,    ":"&lt;/span&gt;
  var string tags_sep            = "&lt;span style="color: maroon; font-style: italic;"&gt;, &lt;/span&gt;";           &lt;span style="color: green; font-weight: bold;"&gt;# text for tags separator, ", "&lt;/span&gt;

  var bool   show_edit_tags_link = &lt;span style="color: maroon; font-style: italic;"&gt;false&lt;/span&gt;;          &lt;span style="color: green; font-weight: bold;"&gt;# set to true if you want edit tags link as tags header&lt;/span&gt;

  var string currents_open       = """&lt;span style="color: maroon; font-style: italic;"&gt;&amp;lt;div class="currents"&amp;gt;&lt;/span&gt;"""; &lt;span style="color: green; font-weight: bold;"&gt;# html for opening of currents container&lt;/span&gt;
  var string currents_close      = """&lt;span style="color: maroon; font-style: italic;"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;"""; &lt;span style="color: green; font-weight: bold;"&gt;# html for closing of currents container&lt;/span&gt;

  var bool   loc_after_mood      = &lt;span style="color: maroon; font-style: italic;"&gt;false&lt;/span&gt;;               &lt;span style="color: green; font-weight: bold;"&gt;# set to true to print location after mood&lt;/span&gt;
  var bool   vanilla_loc         = &lt;span style="color: maroon; font-style: italic;"&gt;false&lt;/span&gt;;               &lt;span style="color: green; font-weight: bold;"&gt;# set to true to delinkify location&lt;/span&gt;

  # if you need data specific to the meta to be in these strings you'll have to set those individually down further
  # one example is provided with meta_label_open
  var string meta_label_open     = "";               &lt;span style="color: green; font-weight: bold;"&gt;# html for opening of metadata label&lt;/span&gt;

  var string meta_label_close    = """&lt;span style="color: maroon; font-style: italic;"&gt;&amp;lt;/strong&amp;gt; &lt;/span&gt;"""; &lt;span style="color: green; font-weight: bold;"&gt;# html for closing of metadata label&lt;/span&gt;
  var string meta_val_open       = "";               &lt;span style="color: green; font-weight: bold;"&gt;# html for opening of metadata value&lt;/span&gt;
  var string meta_val_close      = """&lt;span style="color: maroon; font-style: italic;"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;""";     &lt;span style="color: green; font-weight: bold;"&gt;# html for closing of metadata value&lt;/span&gt;

  var Link   edit_tags           = $this-&amp;gt;get_link("edit_tags"); &lt;span style="color: green; font-weight: bold;"&gt;# helper var to see if remote user can edit tags&lt;/span&gt;

  if ((size $.metadata &amp;gt; 0) or ((size $.tags &amp;gt; 0) and ($*tags_aware))){
    if($.metadata{"mood"} == "" and $loc_after_mood) {
      &lt;span style="color: green; font-weight: bold;"&gt;# if we're printing loc after mood but we have no mood, set loc_after_mood to false&lt;/span&gt;
      $loc_after_mood = false;
    }
    var string currents = "";             &lt;span style="color: green; font-weight: bold;"&gt;# make var for printing&lt;/span&gt;

    $currents           = $currents_open; &lt;span style="color: green; font-weight: bold;"&gt;# add opening of currents container&lt;/span&gt;

    foreach var string k ($.metadata){  &lt;span style="color: green; font-weight: bold;"&gt;# step thru metadata&lt;/span&gt;
      var string text = $k;             &lt;span style="color: green; font-weight: bold;"&gt;# set text to key&lt;/span&gt;
      var string val  = $.metadata{$k}; &lt;span style="color: green; font-weight: bold;"&gt;# get val&lt;/span&gt;

      if ($k == "mood"){                &lt;span style="color: green; font-weight: bold;"&gt;# if mood, set text to mood property&lt;/span&gt;
        $text = $*text_meta_mood;
        if (defined $.mood_icon){       &lt;span style="color: green; font-weight: bold;"&gt;# if we have a mood icon, add it&lt;/span&gt;
          var Image i = $.mood_icon;
          $val        = """&amp;lt;img src="$i.url" width="$i.width" height="$i.height" align="middle" alt="$val" title="$val" /&amp;gt; $val""";
        }
      } 
      elseif ($k == "music") {          &lt;span style="color: green; font-weight: bold;"&gt;# if music, set text to music property&lt;/span&gt;
        $text = $*text_meta_music;
      } elseif ($k == "location") {     &lt;span style="color: green; font-weight: bold;"&gt;# if location, set text to loc variable&lt;/span&gt;

        $text = $*text_meta_location;
        if($vanilla_loc) {              &lt;span style="color: green; font-weight: bold;"&gt;# if vanilla loc, striphtml() it&lt;/span&gt;
          $val = striphtml($val);
        }
      }
      if(not ($k == "location" and $loc_after_mood)) {
        &lt;span style="color: green; font-weight: bold;"&gt;# if we're doing loc right now and printing loc after mood, skip it
        # if we're doing loc right now and we're not printing loc after mood, print it now
        # if we're not doing loc right now, print this piece of meta

        # in this layout, each piece of meta gets its own class&lt;/span&gt;
        $meta_label_open  = """&lt;span style="color: maroon; font-style: italic;"&gt;&amp;lt;div class="current$k"&amp;gt;&amp;lt;strong&amp;gt;&lt;/span&gt;""";

        &lt;span style="color: green; font-weight: bold;"&gt;# add the meta&lt;/span&gt;
        $currents = $currents + """$meta_label_open$text$meta_label_close$meta_val_open$val$meta_val_close""";
      }

      if($k == "mood" and $loc_after_mood) {
        &lt;span style="color: green; font-weight: bold;"&gt;# if we just now did the mood and we're printing loc after mood, print the loc&lt;/span&gt;

        $k    = "location";           &lt;span style="color:green;font-weight:bold;"&gt;# set meta key to "location"&lt;/span&gt;
        $text = $*text_meta_location; &lt;span style="color:green;font-weight:bold;"&gt;# set text to loc variable&lt;/span&gt;
        $val  = $.metadata{$k};       &lt;span style="color:green;font-weight:bold;"&gt;# get val

        # if we have a loc, do stuff&lt;/span&gt;
        if($val != "") {

          &lt;span style="color: green; font-weight: bold;"&gt;# if vanilla loc, striphtml() it&lt;/span&gt;
          if($vanilla_loc) {
            $val = striphtml($val);
          }

          &lt;span style="color: green; font-weight: bold;"&gt;# in this layout, each piece of meta gets its own class&lt;/span&gt;

          $meta_label_open  = """&lt;span style="color: maroon; font-style: italic;"&gt;&amp;lt;div class="current$k"&amp;gt;&amp;lt;strong&amp;gt;&lt;/span&gt;""";

          &lt;span style="color: green; font-weight: bold;"&gt;# add the meta&lt;/span&gt;
          $currents         = $currents + """$meta_label_open$text$meta_label_close$meta_val_open$val$meta_val_close""";
        }
      }
    }
    if ((size $.tags &amp;gt; 0) and $*tags_aware) {
      var string k      = "tags"; &lt;span style="color: green; font-weight: bold;"&gt;# set key to "tags"&lt;/span&gt;

      &lt;span style="color: green; font-weight: bold;"&gt;# in this layout, each piece of meta gets its own class&lt;/span&gt;

      $meta_label_open  = """&lt;span style="color: maroon; font-style: italic;"&gt;&amp;lt;div class="current$k"&amp;gt;&amp;lt;strong&amp;gt;&lt;/span&gt;""";

      var int tcount = 0; &lt;span style="color: green; font-weight: bold;"&gt;# set counter for tags&lt;/span&gt;
      if($edit_tags.url != "" and $show_edit_tags_link) { &lt;span style="color: green; font-weight: bold;"&gt;# if remote user can edit tags, let's give them a link&lt;/span&gt;
        $tags_header = """&amp;lt;a href="$edit_tags.url"&amp;gt;$tags_header&amp;lt;/a&amp;gt;""";
      }

      &lt;span style="color: green; font-weight: bold;"&gt;# add text, open val container&lt;/span&gt;

      $currents = $currents + """$meta_label_open$tags_header$tags_joiner$meta_label_close$meta_val_open""";

      &lt;span style="color: green; font-weight: bold;"&gt;# build tag list&lt;/span&gt;
      foreach var Tag t ($.tags) {
        $currents = $currents + """&amp;lt;a rel="tag" href="$t.url"&amp;gt;$t.name&amp;lt;/a&amp;gt;""";
        $tcount++;

        &lt;span style="color: green; font-weight: bold;"&gt;# if we haven't hit the last tag, add a separator&lt;/span&gt;
        if ($tcount != size $.tags) { $currents = $currents + $tags_sep; }
      }

      &lt;span style="color: green; font-weight: bold;"&gt;# close val container&lt;/span&gt;
      $currents = $currents + $meta_val_close;
    }

    &lt;span style="color: green; font-weight: bold;"&gt;# close currents container&lt;/span&gt;

    $currents = $currents + $currents_close;

    &lt;span style="color: green; font-weight: bold;"&gt;# print currents&lt;/span&gt;
    println "$currents";
  }
}

function Entry::print_linkbar() {
  var string   link_seperator = " | "; &lt;span style="color: green; font-weight: bold;"&gt;# seperator for links&lt;/span&gt;

  &lt;span style="color: green; font-weight: bold;"&gt;# initialize array/hashes&lt;/span&gt;
  var string[] link_keyseq    = [""];
  var string{} link_url       = {"" =&amp;gt; ""};
  var string{} link_caption   = {"" =&amp;gt; ""};
  var string{} link_image     = {"" =&amp;gt; ""};

  var string print           = "";                                         &lt;span style="color: green; font-weight: bold;"&gt;# var for printing&lt;/span&gt;
  var Page   p               = get_page();                                 &lt;span style="color: green; font-weight: bold;"&gt;# page handle to determine interentry&lt;/span&gt;
  var bool   show_interentry = ($p.view == "entry" or $p.view == "reply"); &lt;span style="color: green; font-weight: bold;"&gt;# if entry/reply view, show interentry&lt;/span&gt;
  var int    keyseq_index    = 0;                                          &lt;span style="color: green; font-weight: bold;"&gt;# set index point for new link_keyseq array&lt;/span&gt;

  if($show_interentry) {
    &lt;span style="color: green; font-weight: bold;"&gt;# if show interentry, put previous entry link first&lt;/span&gt;
    $link_keyseq[$keyseq_index++] = "nav_prev";

    &lt;span style="color: green; font-weight: bold;"&gt;# get previous entry link information&lt;/span&gt;
    var Link prev             = $this-&amp;gt;get_link("nav_prev");
    $link_url{"nav_prev"}     = $prev.url;
    $link_caption{"nav_prev"} = $prev.caption;
    $link_image{"nav_prev"}   = $prev.icon.url;

    &lt;span style="color: green; font-weight: bold;"&gt;# get next entry link information&lt;/span&gt;
    var Link next             = $this-&amp;gt;get_link("nav_next");
    $link_url{"nav_next"}     = $next.url;
    $link_caption{"nav_next"} = $next.caption;
    $link_image{"nav_next"}   = $next.icon.url;
  }

  &lt;span style="color: green; font-weight: bold;"&gt;# gather current linkbar&lt;/span&gt;
  foreach var string link_key ($.link_keyseq) {
    var Link  link            = $this-&amp;gt;get_link($link_key);
    $link_url{$link_key}      = $link.url;
    $link_caption{$link_key}  = $link.caption;
    $link_image{$link_key}    = $link.icon.url;
    $link_keyseq[$keyseq_index++] = $link_key; &lt;span style="color: green; font-weight: bold;"&gt;# add this to new link_keyseq array&lt;/span&gt;
  }
  if($show_interentry) {
    &lt;span style="color: green; font-weight: bold;"&gt;# if show interentry, put next entry link last&lt;/span&gt;
    $link_keyseq[$keyseq_index++] = "nav_next";
  }

&lt;span style="color: green; font-weight: bold;"&gt;  #################################################################################################################
  # by now, the above hashes should look something like:                                                          #
  #                                                                                                               #
  # If interentry:                                                                                                #
  #   Previous Entry:                                                                                             # 
  #    $link_url{"nav_prev"}     = http://www.livejournal.com/go.bml?journal=exampleusername&amp;amp;itemid=256&amp;amp;dir=prev  #
  #    $link_caption{"nav_prev"} = Previous Entry                                                                 #
  #    $link_image{"nav_prev"}   = http://stat.livejournal.com/img/btn_prev.gif                                   #
  #                                                                                                               #
  # Edit Entry:                                                                                                   # 
  #  $link_url{"edit_entry"}     = http://www.livejournal.com/editjournal.bml?journal=exampleusername&amp;amp;itemid=256  #
  #  $link_caption{"edit_entry"} = Edit Entry                                                                     #
  #  $link_image{"edit_entry"}   = http://stat.livejournal.com/img/btn_edit.gif                                   #
  #                                                                                                               #
  # Edit Tags:                                                                                                    # 
  #  $link_url{"edit_tags"}      = http://www.livejournal.com/edittags.bml?journal=exampleusername&amp;amp;itemid=256     #
  #  $link_caption{"edit_tags"}  = Edit Tags                                                                      #
  #  $link_image{"edit_tags"}    = http://stat.livejournal.com/img/btn_edittags.gif                               #
  #                                                                                                               #
  # Add to Memories:                                                                                              # 
  #  $link_url{"mem_add"}        = http://www.livejournal.com/tools/memadd.bml?journal=exampleusername&amp;amp;itemid=256 #
  #  $link_caption{"mem_add"}    = Add to Memories                                                                #
  #  $link_image{"mem_add"}      = http://stat.livejournal.com/img/btn_memories.gif                               #
  #                                                                                                               #
  # If interentry:                                                                                                #
  #   Next Entry:                                                                                                 #
  #    $link_url{"nav_next"}     = http://www.livejournal.com/go.bml?journal=exampleusername&amp;amp;itemid=256&amp;amp;dir=next  #
  #    $link_caption{"nav_next"} = Next Entry                                                                     #
  #    $link_image{"nav_next"}   = http://stat.livejournal.com/img/btn_next.gif                                   #
  #################################################################################################################&lt;/span&gt;

&lt;span style="color: green; font-weight: bold;"&gt;  # disable images&lt;/span&gt;
  $link_image{"nav_prev"   } = "";
  $link_image{"mem_add"    } = "";
  $link_image{"edit_entry" } = "";
  $link_image{"edit_tags"  } = "";
  $link_image{"tell_friend"} = "";
  $link_image{"nav_next"   } = "";

&lt;span style="color: green; font-weight: bold;"&gt;  # loop thru linkbar and add links to print var&lt;/span&gt;
  foreach var string link_key ($link_keyseq) {
&lt;span style="color: green; font-weight: bold;"&gt;    # if we can do performed action, url will be present&lt;/span&gt;
    if($link_url{$link_key} != "") {
      $print = $print + """&amp;lt;a href="$link_url{$link_key}"&amp;gt;""";
&lt;span style="color: green; font-weight: bold;"&gt;      # if image url available, use it&lt;/span&gt;
      if($link_image{$link_key} != "") {
        $print = $print + """&amp;lt;img src="$link_image{$link_key}" alt="$link_caption{$link_key}" title="$link_caption{$link_key}" border="0" /&amp;gt;""";
      } else {
&lt;span style="color: green; font-weight: bold;"&gt;        # else, just use text&lt;/span&gt;
        $print = $print + "$link_caption{$link_key}";
      }
&lt;span style="color: green; font-weight: bold;"&gt;      # add a seperator&lt;/span&gt;
      $print = $print + "&amp;lt;/a&amp;gt;$link_seperator";
    }
  }

&lt;span style="color: green; font-weight: bold;"&gt;  # hack off last seperator&lt;/span&gt;
  $print = $print-&amp;gt;substr(0, $print-&amp;gt;length() - $link_seperator-&amp;gt;length());

&lt;span style="color: green; font-weight: bold;"&gt;  # we're done! let's print it!&lt;/span&gt;
  print $print;
}

function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor, bool viewing_thread) {
  var string entry = "";

  var bool   have_meta = (size ($e.metadata) &amp;gt; 0);
  var bool   have_tags = ($*tags_aware and (size ($e.tags) &amp;gt; 0));

&lt;span style="color:green;font-weight:bold;"&gt;  # Named anchor to link from page summary&lt;/span&gt;
  $entry = $entry + """&amp;lt;a name="entry_$e.itemid"&amp;gt;&amp;lt;/a&amp;gt;""";
  $entry = $entry + """&amp;lt;div class="entry"&amp;gt;""";
  var string subject = $e.subject != "" ? $e.subject : $*text_nosubject;
  var string time    = $e.time-&amp;gt;time_format();
  $entry = $entry + """&amp;lt;h4 class="subject"&amp;gt;$e.security_icon $subject @ $time&amp;lt;/h4&amp;gt;""";
  $entry = $entry + """&amp;lt;div class="text"&amp;gt;""";

&lt;span style="color:green;font-weight:bold;"&gt;  # build poster info&lt;/span&gt;
  if(
     (
      $p.view == "friends" or
      (not $e.poster-&amp;gt;equals($e.journal)) or
      ($*show_entry_userpic and defined $e.userpic)
     )
    ) {
    if ($p.view == "friends") {
      if (defined $e.userpic) {
        $entry = $entry + """&amp;lt;img src="$e.userpic.url" width="$e.userpic.width" style="color: $fgcolor; background: $bgcolor; border: 5px solid $bgcolor;" height="$e.userpic.height" alt="" class="userpic" /&amp;gt;""";
      }
      if (not $e.poster-&amp;gt;equals($e.journal)) {
        $entry = $entry + $e.poster-&amp;gt;as_string() + ", posting in ";
      }
      $entry = $entry + $e.journal-&amp;gt;as_string() + ":&amp;lt;br /&amp;gt;";
    } elseif (not $e.poster-&amp;gt;equals($e.journal)) {
      if (defined $e.userpic) {
        $entry = $entry + """&amp;lt;img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="" class="userpic" /&amp;gt;""";
      }
      $entry = $entry + $e.poster-&amp;gt;as_string() + ":&amp;lt;br /&amp;gt;";
    } elseif (defined $e.userpic) {
      $entry = $entry + """&amp;lt;p&amp;gt;&amp;lt;img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="" class="userpic" /&amp;gt;""";
    }
  }

&lt;span style="color:green;font-weight:bold;"&gt;  # print what we've got and clear it&lt;/span&gt;
  print $entry;
  $entry = "";

&lt;span style="color:green;font-weight:bold;"&gt;  # print metadata&lt;/span&gt;
  $e-&amp;gt;print_metadata();

&lt;span style="color:green;font-weight:bold;"&gt;  # if we have meta or tags, add a line break&lt;/span&gt;
  if ($have_meta or $have_tags) {
    $entry = "$entry&amp;lt;br /&amp;gt;";
  }

&lt;span style="color:green;font-weight:bold;"&gt;  # print what we've got and clear it&lt;/span&gt;
  print $entry;
  $entry = "";

&lt;span style="color:green;font-weight:bold;"&gt;  # if we're not viewing a thread, print entry text&lt;/span&gt;
  if (not $viewing_thread) {
    $e-&amp;gt;print_text();
  }

&lt;span style="color:green;font-weight:bold;"&gt;  # add some more blank lines&lt;/span&gt;
  $entry = $entry + """&amp;lt;div class="clearer"&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;""";
  $entry = $entry + "&amp;lt;/div&amp;gt;";

&lt;span style="color:green;font-weight:bold;"&gt;  # Comments&lt;/span&gt;
  $entry = $entry + """&amp;lt;div class="comments"&amp;gt;""";

&lt;span style="color:green;font-weight:bold;"&gt;  # print what we've got and clear it&lt;/span&gt;
  print $entry;
  $entry = "";

  $e.comments-&amp;gt;print();
  $e-&amp;gt;print_linkbar();

&lt;span style="color:green;font-weight:bold;"&gt;  # close entry div&lt;/span&gt;
  $entry = $entry + "&amp;lt;/div&amp;gt;";
  $entry = $entry + "&amp;lt;/div&amp;gt;";

&lt;span style="color:green;font-weight:bold;"&gt;  # print what we've got and clear it&lt;/span&gt;
  print $entry;
  $entry = "";
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:s2layers:62881</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://s2layers.livejournal.com/62881.html"/>
    <link rel="self" type="text/xml" href="https://s2layers.livejournal.com/data/atom/?itemid=62881"/>
    <title>[theme] - [generator] - [move navigation strip to bottom]</title>
    <published>2006-04-07T19:45:29Z</published>
    <updated>2006-04-08T05:47:54Z</updated>
    <category term="function print"/>
    <category term="entry navigation strip"/>
    <category term="class page"/>
    <category term="function print_custom_head"/>
    <category term="layout generator"/>
    <content type="html">in response to &lt;span  class="ljuser  i-ljuser  i-ljuser-deleted  i-ljuser-type-P     "  data-ljuser="panda_cookie" lj:user="panda_cookie" &gt;&lt;a href="https://panda-cookie.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/userinfo_v8.png?v=17080&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://panda-cookie.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;panda_cookie&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;'s &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="s2styles" lj:user="s2styles" &gt;&lt;a href="https://s2styles.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2styles.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2styles&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; &lt;a href="http://community.livejournal.com/s2styles/325086.html" target="_blank"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;b&gt;BIG ANNOYING WARNING: DO NOT ATTEMPT THIS UNLESS YOU HAVE AMPLE PAID TIME LEFT OR A PERMANENT ACCOUNT.  THE NAVIGATION STRIP MAY CHANGE IN THE FUTURE AND THIS CODE MAY BECOME OBSOLETE VERY FAST.  PLZ 2 HEED THIS WARNING KTHX.&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;function Page::print_custom_head() {
var int    nav_strip_border_width = 2;         &lt;span style="color:green;font-weight:bold;"&gt;# navigation strip border width          (2 for generator)&lt;/span&gt;
var string nav_strip_font_family  = "Verdana"; &lt;span style="color:green;font-weight:bold;"&gt;# navigation strip font family           ("$*font_base, $*font_fallback" for generator)&lt;/span&gt;
var Color  nav_strip_link_fgcolor = "#0000ff"; &lt;span style="color:green;font-weight:bold;"&gt;# navigation strip link color            ($*page_link for generator)&lt;/span&gt;
var Color  nav_strip_main_bgcolor = "#ffffff"; &lt;span style="color:green;font-weight:bold;"&gt;# navigation strip main background color ($*entry_back for generator)&lt;/span&gt;
var Color  nav_strip_main_fgcolor = "#000000"; &lt;span style="color:green;font-weight:bold;"&gt;# navigation strip main foreground color ($*entry_text for generator)&lt;/span&gt;
"""
&amp;lt;style type="text/css"&amp;gt;
&lt;span style="color:green;font-weight:bold;"&gt;/* set body padding to 0 */&lt;/span&gt;
html body {
  padding: 0 0 0 0;
}

&lt;span style="color:green;font-weight:bold;"&gt;/* un-stick navigation strip */&lt;/span&gt;
#lj_controlstrip {
  position: relative;
}

&lt;span style="color:green;font-weight:bold;"&gt;/* set navigation strip bgcolor/fgcolor/font */&lt;/span&gt;
#lj_controlstrip td, #lj_controlstrip a,  #lj_controlstrip input, #lj_controlstrip_statustext {
  background-color: $nav_strip_main_bgcolor;
  color:            $nav_strip_main_fgcolor;
  font-family:      $nav_strip_font_family;
}

&lt;span style="color:green;font-weight:bold;"&gt;/* set navigation strip link color */&lt;/span&gt;
#lj_controlstrip a {
  color: $nav_strip_link_fgcolor;
}

&lt;span style="color:green;font-weight:bold;"&gt;/* add border to whole navigation strip */&lt;/span&gt;
#lj_controlstrip {
  border: ${nav_strip_border_width}px solid $nav_strip_main_fgcolor;
}

&lt;span style="color:green;font-weight:bold;"&gt;/* alter navigation strip table cell borders */&lt;/span&gt;
#lj_controlstrip_user, #lj_controlstrip_userlinks, #lj_controlstrip_login {
  border-color: $nav_strip_main_fgcolor;
  border-width: ${nav_strip_border_width}px;
}

&lt;span style="color:green;font-weight:bold;"&gt;/* hide the server signature since it doesn't seem to play nice with moving the navigation strip */&lt;/span&gt;
#lj_controlstrip_poweredby {
  display: none;
}
&amp;lt;/style&amp;gt;
""";
}

function Page::print() {
  var string title = $this-&amp;gt;title();

  var string website_name = $.journal.website_name ? $.journal.website_name : $*text_website_default_name;
  var string website;
  if ($.journal.website_url != "") {
    $website = """&amp;lt;tr&amp;gt;&amp;lt;td class="meta"&amp;gt;[&amp;lt;/td&amp;gt;
    &amp;lt;td class="meta" align="right"&amp;gt;&amp;lt;b&amp;gt;$*text_website&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;td class="meta" align="center"&amp;gt;|&amp;lt;/td&amp;gt;
    &amp;lt;td class="meta" align="left"&amp;gt;&amp;lt;a href="$.journal.website_url"&amp;gt;$website_name&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;td class="meta"&amp;gt;]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;""";
  }

  var string links = "";
  var bool firstlink = true;
  foreach var string v ($.views_order) {
    var string url  = $.view_url{$v};
    var string text = lang_viewname($v);
    if ($firstlink == false) {
      $links = "$links|";
    } else {
      $firstlink = false;
    }
    if($.view == $v) {
      $links = $links + """&amp;lt;b&amp;gt;$text&amp;lt;/b&amp;gt;""";
    } else {
      $links = $links + """&amp;lt;a class="index" href="$url"&amp;gt;$text&amp;lt;/a&amp;gt;""";
    }
  }

  """&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&amp;gt;\n&amp;lt;html&amp;gt;\n&amp;lt;head&amp;gt;\n""";

  $this-&amp;gt;print_head();

  if ($*external_stylesheet) {
    println safe """&amp;lt;link rel="stylesheet" href="$.stylesheet_url" type="text/css" /&amp;gt;""";
  } else {
    println """&amp;lt;style type="text/css"&amp;gt;"""; start_css(); print_stylesheet(); end_css(); "&amp;lt;/style&amp;gt;";
  }

  """&amp;lt;title&amp;gt;$title&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body bgcolor="$*page_back" text="$*entry_text" link="$*page_link" vlink="$*page_vlink" alink="$*page_alink"&amp;gt;""";

&lt;span style="color:green;font-weight:bold;"&gt;  # remove navigation strip from top&lt;/span&gt;
&lt;span style="color:red;font-weight:bold;text-decoration:line-through;"&gt;  # $this-&amp;gt;print_control_strip();&lt;/span&gt;

  if (viewer_sees_ads()) {
    """
  &amp;lt;table width="100%" height="100%"&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td valign="top"&amp;gt;""";
  }

  """
        &amp;lt;div align="center"&amp;gt;
          &amp;lt;table width="$*box_width" cellpadding="2" cellspacing="0" border="0" summary=""&amp;gt;
            &amp;lt;tr&amp;gt;
              &amp;lt;td bgcolor="$*stronger_back" align="center"&amp;gt;
                &amp;lt;table width="100%" cellpadding="3" cellspacing="0" border="0" summary=""&amp;gt;
                  &amp;lt;tr class="caption"&amp;gt;
                    &amp;lt;td class="caption" align="left"&amp;gt;&amp;lt;b&amp;gt;$title&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td class="index" align="right"&amp;gt;[$links]&amp;lt;/td&amp;gt;
                  &amp;lt;/tr&amp;gt;
                &amp;lt;/table&amp;gt;
                &amp;lt;table width="100%" cellpadding="3" cellspacing="0" border="0" summary=""&amp;gt;
                  &amp;lt;tr&amp;gt;
                    &amp;lt;td class="shadowed" align="center"&amp;gt;
                      &amp;lt;table cellspacing="5" cellpadding="0" border="0" summary="" style="margin-left: auto; margin-right: auto;"&amp;gt;
                        &amp;lt;tr&amp;gt;""";
  $this-&amp;gt;lay_top_userpic();

  var string sitename_lc = $*SITENAMESHORT-&amp;gt;lower();

  """
                          &amp;lt;td&amp;gt;
                            &amp;lt;div align="center"&amp;gt;&amp;lt;b&amp;gt;$.journal.name&amp;lt;/b&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;p&amp;gt;
                            &amp;lt;table cellspacing="0" cellpadding="0" border="0" summary=""&amp;gt;
                              $website
                              &amp;lt;tr&amp;gt;
                                &amp;lt;td class="meta"&amp;gt;[&amp;lt;/td&amp;gt;
                                &amp;lt;td class="meta" align="right"&amp;gt;&amp;lt;b&amp;gt;"""+lang_viewname("userinfo")+"""&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                                &amp;lt;td class="meta" align="center"&amp;gt;|&amp;lt;/td&amp;gt;
                                &amp;lt;td class="meta" align="left"&amp;gt;&amp;lt;a href="$.view_url{"userinfo"}"&amp;gt;$sitename_lc userinfo&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;
                                &amp;lt;td class="meta"&amp;gt;]&amp;lt;/td&amp;gt;
                              &amp;lt;/tr&amp;gt;
                              &amp;lt;tr&amp;gt;
                                &amp;lt;td class="meta"&amp;gt;[&amp;lt;/td&amp;gt;
                                &amp;lt;td class="meta" align="right"&amp;gt;&amp;lt;b&amp;gt;"""+lang_viewname("archive")+"""&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                                &amp;lt;td class="meta" align="center"&amp;gt;|&amp;lt;/td&amp;gt;
                                &amp;lt;td class="meta" align="left"&amp;gt;&amp;lt;a href="$.view_url{"archive"}"&amp;gt;journal archive&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;
                                &amp;lt;td class="meta"&amp;gt;]&amp;lt;/td&amp;gt;
                              &amp;lt;/tr&amp;gt;
                            &amp;lt;/table&amp;gt;
                          &amp;lt;/td&amp;gt;
                        &amp;lt;/tr&amp;gt;
                      &amp;lt;/table&amp;gt;
                    &amp;lt;/td&amp;gt;
                  &amp;lt;/tr&amp;gt;
                &amp;lt;/table&amp;gt;
              &amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
          &amp;lt;/table&amp;gt;
  """;

  if (size $.linklist &amp;gt; 0 and $*linklist_support) {
    $this-&amp;gt;print_linklist();
  }

  """
          &amp;lt;p&amp;gt;""";

  $this-&amp;gt;print_body();

  """
        &amp;lt;/div&amp;gt;""";

  if (viewer_sees_ads()) {
    """
      &amp;lt;/td&amp;gt;
      &amp;lt;td valign="top" align="right" width="20%"&amp;gt;
        &amp;lt;table cellpadding="2" cellspacing="0" border="0" summary=""&amp;gt;
          &amp;lt;tr&amp;gt;
            &amp;lt;td bgcolor="$*stronger_back" align="center"&amp;gt;
              &amp;lt;table width="100%" cellpadding="3" cellspacing="0" border="0" summary=""&amp;gt;
                &amp;lt;tr&amp;gt;
                  &amp;lt;td class="shadowed" align="center"&amp;gt;
                    &amp;lt;table cellspacing="5" cellpadding="0" border="0" summary="" style="margin-left: auto; margin-right: auto;"&amp;gt;
                      &amp;lt;tr&amp;gt;
                        &amp;lt;td&amp;gt;
                          &amp;lt;div align="center"&amp;gt;
  """;
  $this-&amp;gt;print_ad("Journal-Skyscraper");
  """
                          &amp;lt;/div&amp;gt;
                        &amp;lt;/td&amp;gt;
                      &amp;lt;/tr&amp;gt;
                    &amp;lt;/table&amp;gt;
                  &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
              &amp;lt;/table&amp;gt;
            &amp;lt;/td&amp;gt;
          &amp;lt;/tr&amp;gt;
        &amp;lt;/table&amp;gt;
      &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
  &amp;lt;/table&amp;gt;
    """;
  }
  """
  &amp;lt;p&amp;gt;""";

&lt;span style="color:green;font-weight:bold;"&gt;  # put navigation strip at bottom&lt;/span&gt;
  $this-&amp;gt;print_control_strip();

  """
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;""";
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
</feed>
