layerinfo "type" = "layout"; layerinfo "name" = "Medlir S2 v1.0"; layerinfo redist_uniq = "medlir/layout"; layerinfo author_name = "Medlir"; layerinfo author_email = "medlir@livejournal.com"; set page_recent_items = 4; set page_friends_items = 16; set text_multiform_des = ""; set text_multiform_btn = "Execute"; function Page::print () { """ .: medlir.com :.

"""; $this->print_body(); """


"""; $this->print_linklist(); """
"""; } function RecentPage::print_body () { if (($.nav.backward_count > 0) or ($.nav.forward_count > 0)) { """"; } """
"""; foreach var Entry e ($.entries) { $this->print_entry($e); } if (($.nav.backward_count > 0) or ($.nav.forward_count > 0)) { """"; } } function print_entry (Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text) { var string date = $e.time->date_format("%%yyyy%%.%%mm%%.%%dd%%"); var string time = $e.time->time_format("%%HH%%.%%min%%.%%sec%%"); """

.: timestamp( ${date}.${time} )
"""; if (($p.view == "friends") or ($p.view == "entry")) { " :: owner( "; if ($e.poster.username != $e.journal.username) { ""+${e.poster.username}+""; "(?) posted in "; } ""+${e.journal.username}+""; "(?) )
\n"; } if (($e.subject) or ($e.security)) { " :: subject( "; if ($e.security) { $e.security_icon->print();" "; } if ($e.subject) { "${e.subject}"; } " )
\n"; } " :: comments( \"add "; "\"read )
"; """
"""; if (not $hide_text) { print $e.text; if (size $e.metadata) { """

.: currents
"""; foreach var string k ($e.metadata) { var string text = $k; var string val = $e.metadata{$k}; """:: ${text}( ${val} )
\n"""; } "
\n"; } } """


"""; } function Page::print_entry (Entry e) { print_entry($this, $e, null Color, null Color, false); } function FriendsPage::print_entry (Entry e) { var Friend f = $.friends{$e.journal.username}; print_entry($this, $e, $f.bgcolor, $f.fgcolor, false); } function ReplyPage::print_body () { var string date = $.replyto.time->date_format("%%yyyy%%.%%mm%%.%%dd%%"); var string time = $.replyto.time->time_format("%%HH%%.%%min%%.%%sec%%"); """

.: timestamp( ${date}.${time} )
"""; " :: owner( "; if (defined $.replyto.poster) { if ($.replyto.poster.username != $.replyto.journal.username) { ""+${.replyto.poster.username}+""; "(?) posted in "; } ""+${.replyto.journal.username}+""; "(?)"; } else { "Anonymous"; } " )
\n"; if (($.replyto.subject) or ($.entry.security)) { " :: subject( "; if ($.entry.security) { $.entry.security_icon->print();" "; } if ($.replyto.subject) { "${.replyto.subject}"; } " )
\n"; } " :: comments( \"add "; "\"read )
"; """
"""; print $.replyto.text; if (size $.entry.metadata) { """

.: currents
"""; foreach var string k ($.entry.metadata) { var string text = $k; var string val = $.entry.metadata{$k}; """:: ${text}( ${val} )
\n"""; } "
\n"; } """


"""; """

"""; if (not $.entry.comments.enabled) { "Note: Comments are disabled on this post."; } else { $.form->print(); } """


"""; } function Page::print_linklist() { if (size $.linklist <= 0) { return; } elseif (not $*linklist_support) { return; } foreach var UserLink l ($.linklist) { if ($l.title) { println """ ${l.title} 
"""; } } } function EntryPage::print_body () { print_entry($this, $.entry, null Color, null Color, $.viewing_thread); if ($.entry.comments.enabled and $.comment_pages.total_subitems > 0) { # $this->print_multiform_start(); if ($.comment_pages.total_subitems > 0) { $.comment_pages->print(); $this->print_comments($.comments); } #if ($this.multiform_on) { # "
\n"; # $this->print_multiform_actionline(); # $this->print_multiform_end(); # "\n
\n"; # "
\n"; # """
\n"""; #} } } function EntryPage::print_comment (Comment c) { var string date = $c.time->date_format("%%yyyy%%.%%mm%%.%%dd%%"); var string time = $c.time->time_format("%%HH%%.%%min%%.%%sec%%"); """

.: timestamp( ${date}.${time} )
"""; " :: owner( "; if (defined $c.poster) { """${c.poster.username}(?)"""; } else { "Anonymous"; } if ($c.metadata{"poster_ip"}) { """ :: ${c.metadata{"poster_ip"}}"""; } " )
\n"; if ($c.subject) { " :: subject( ${c.subject} )
\n"; } " :: comment( "; """permalink """; """reply to this comment """; """delete this comment """; if ($c.parent_url != "") { """parent """; } if ($c.thread_url != "") { """thread	 """; } # if ($this.multiform_on) { $c->print_multiform_check(); } # var Link lnk; # $lnk = $c->get_link("screen_comment"); "$lnk"; # $lnk = $c->get_link("unscreen_comment"); "$lnk"; ")
"; " :: depth( ${c.depth} )
"; """
"""; print $c.text; """


"""; } ################################################################## function CommentInfo::print () { if (not $.enabled) { return; } """"; } function YearPage::print_year_links () { """"; } function YearPage::print_month (YearMonth m) { if (not $m.has_entries) { return; } """
"""; """"""; """"""; foreach var int d (weekdays()) { """\n"; } ""; foreach var YearWeek w ($m.weeks) { $w->print(); } "
"""; ""; print $m->month_format(); """ (...)
"""; print $*lang_dayname_short[$d]; "
"; } function YearPage::lay_viewspec_nav() { $this->print_year_links(); } function YearPage::print_body() { "

$.year

"; foreach var YearMonth m ($.months) { $this->print_month($m); } } function YearWeek::print () { ""; if ($.pre_empty) { " "; } foreach var YearDay d ($.days) { """$d.day"""; if ($d.num_entries) { """
$d.num_entries
"""; } else { "
 
"; } ""; } if ($.post_empty) { " "; } ""; } function DayPage::lay_viewspec_nav() { """ """; } function DayPage::print_body() { """

""" + $.date->date_format("long") + "

"; if (not $.has_entries) { println $*text_noentries_day; } foreach var Entry e ($.entries) { $this->print_entry($e); } println "
"; }