layerinfo type = "layout"; layerinfo "name" = "Minimalism"; layerinfo redist_uniq = "sup/layout"; layerinfo des = "…"; propgroup presentation { #start NOUI props property string active_theme { noui = 1; } set active_theme = "x0"; property string theme_css { noui = 1; } set theme_css = ""; property MonthPage _MonthPage { noui = 1; } property RecentPage _RecentPage { noui = 1; } property FriendsPage _FriendsPage { noui = 1; } property DayPage _DayPage { noui = 1; } property TagsPage _TagsPage { noui = 1; } property YearPage _YearPage { noui = 1; } property string theme_designer { des = "Theme Designer"; noui = 1; } set theme_designer = ""; property string theme_designer_url { des = "Theme Designer URL"; noui = 1; } set theme_designer_url = ""; property string base_url { noui = 1; } set base_url = ""; property string exact_view { noui = 1; } set exact_view = ""; property string body_classes { noui = 1; } set body_classes = ""; property string text_user_posts_in { noui = 1; } set text_user_posts_in = "wrote� in"; #end NOUI props property string layout_type { des = "Sidebar position"; values = "2CR|Sidebar on the right|2CL|Sidebar on the left"; } set layout_type = "2CR"; property bool recent_show_date { des = "Show dates on Recent Entries page"; } set recent_show_date = true; property bool friends_show_date { des = "Show dates on Friends page"; } set friends_show_date = false; property bool recent_show_upic { des = "Show userpics on Recent Entries page"; } set recent_show_upic = false; property bool friends_show_upic { des = "Show userpics on Friends page"; } set friends_show_upic = true; property bool recent_show_meta { des = "Show meta (mood, music, location etc.) on Recent Entries page"; } set recent_show_meta = true; property bool friends_show_meta { des = "Show meta (mood, music, location etc.) on Friends page"; } set friends_show_meta = true; property use page_recent_items; property use page_friends_items; property use page_day_sortorder; property use page_year_sortorder; property use use_shared_pic; property use view_entry_disabled; } propgroup colors { property use control_strip_bgcolor; property use control_strip_fgcolor; property use control_strip_bordercolor; property use control_strip_linkcolor; } propgroup text { property use text_post_comment; property use text_post_comment_friends; property use text_view_recent; property use text_view_archive; property use text_view_friends; property use text_view_userinfo; property use text_meta_location; property use text_meta_mood; property use text_meta_music; property use text_nosubject; property use text_page_summary; property use text_skiplinks_back; property use text_skiplinks_forward; property use text_edit_entry; property use text_edit_tags; property use text_mem_add; property use text_tell_friend; property use text_watch_comments; property use text_unwatch_comments; property string text_friend_add { des="Text for “Add to friends” link"; } set text_friend_add = "Add to friends"; property string sticky_subject { des = "Sticky post's subject"; } set sticky_subject = "Sticky Post"; property string sticky_post { des = "Sticky post"; note = "If you'd like to have text display at the top of each page, enter it here."; cols = 40; rows = 10; string_mode = "html"; } set sticky_post = ""; } propgroup sidebars = "Sidebars"; propgroup sidebars { property bool layout_show_calendar { des = "Show calendar in sidebar"; } set layout_show_calendar = true; property bool layout_show_summary { des = "Show page summary in sidebar"; } set layout_show_summary = true; property bool layout_show_links { des = "Show links in sidebar"; } set layout_show_links = true; property bool layout_show_tags { des = "Show list of tags in sidebar"; } set layout_show_tags = true; property bool layout_show_custom { des = "Show custom block in sidebar"; } set layout_show_custom = true; property string layout_customHTML { des = "Content of custom block (HTML is available)"; cols = 40; rows = 10; string_mode = "html"; } set layout_customHTML = ""; property string tag_display { des = "Display of tags in sidebar"; values = "list|list|cloud|cloud"; } set tag_display = "cloud"; property bool tag_limit { des = "Limit number of tags displayed"; } set tag_limit = true; property int tag_cloud_max { des = "Number of tags to display in Tags sidebar (if limited)"; min = 1; note = "Minimum 1 tag"; } set tag_cloud_max = 50; } propgroup customcss { property bool use_stylesheets { des = "Use layout's stylesheets"; note = "Disable this only if you want to re-style this layout completely from scratch using a custom stylesheet."; } set use_stylesheets = true; property bool use_theme_stylesheet { des = "Use layout's theme's stylesheet"; note = "Disable this if you want to re-style this layout, but want to use base stylesheets."; } set use_theme_stylesheet = true; property string linked_stylesheet { des = "Custom external stylesheet URL"; } set linked_stylesheet = ""; property string custom_css { des = "Custom stylesheet"; cols = 50; rows = 20; string_mode = "css"; } set custom_css = ""; } function bool(string input) : bool { return $input?true:false; } function _global_init_ { var Page p = get_page(); $*base_url = $p.journal->base_url(); $*body_classes = "view-$p.view type-$p.journal.journal_type"; # if (viewer_sees_control_strip()) { # $*body_classes = $*body_classes + " ljcs"; # } if (((($p.view=="recent")or($p.view=="day")) and not $*recent_show_upic)or($p.view=="friends" and not $*friends_show_upic)) { $*body_classes = $*body_classes + " hide_upic"; } if (((($p.view=="recent")or($p.view=="day")) and not $*recent_show_date)or($p.view=="friends" and not $*friends_show_date)) { $*body_classes = $*body_classes + " hide_date"; } if (((($p.view=="recent")or($p.view=="day")) and not $*recent_show_meta)or($p.view=="friends" and not $*friends_show_meta)) { $*body_classes = $*body_classes + " hide_meta"; } if ($*layout_type == "2CR") { $*body_classes = $*body_classes + " column-right"; } else { $*body_classes = $*body_classes + " column-left"; } if ($*tag_display == "list") { $*body_classes = $*body_classes + " tags-list"; } else { $*body_classes = $*body_classes + " tags-cloud"; } $*body_classes = $*body_classes + " theme-$*active_theme"; $*exact_view = $p.view; if ($*_RecentPage) { if(not bool($*_RecentPage.nav.forward_url) and not ($p.data_link{"rss"}.url->contains("/rss?tag"))) { $*exact_view = "recent_first"; }} elseif ($*_FriendsPage) { if(not bool($*_FriendsPage.nav.forward_url) and $*_FriendsPage.friends_mode!="friendsfriends") { $*exact_view = "friends_first"; }} elseif ($*_YearPage) { var YearMonth YearMonth = $*_YearPage->get_latest_month(); if ($*_YearPage.year == $YearMonth.year) { $*exact_view = "archive_first"; } } if ($*lang_current == "ru") { $*text_user_posts_in = "пишет� в"; if ($*text_friend_add == "Add to friends") { $*text_friend_add = "Добавить в друзья"; } } } function _month_case_ru(int month) : string { #backwards compatibility var string result = ""; if ($*lang_current == "ru") { var string[] months = ["","января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]; $result = $months[$month]; } else { $result = $*lang_monthname_long[$month]; } return $result; } function _dateTime (DateTime time) : string { var string result = ""; var DateTime currentDate = journal_current_datetime(); var int month = int($time->date_format("%%m%%")); if ($*lang_current == "ru") { var string[] months = ["","января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]; if (string($currentDate.year) != $time->date_format("%%yyyy%%")) { $result = $time->date_format("%%d%% ${months[$month]}, %%yyyy%%"); } else { $result = $time->date_format("%%d%% ${months[$month]}, %%H%%:%%min%%"); } } else { if (string($currentDate.year) != $time->date_format("%%yyyy%%")) { $result = $time->date_format("long"); } else { $result = $time->date_format("%%month%% %%dayord%%, %%H%%:%%min%%"); } } return $result; } function _print_CSS { if ($*use_stylesheets) { """\n """; """\n """; if ($*use_theme_stylesheet) { if ($*active_theme == "x0") { """\n """; } elseif ($*active_theme == "x1") { """\n """; } elseif ($*active_theme == "x2") { """\n """; } elseif ($*active_theme == "x3") { """\n """; } elseif ($*active_theme == "x4") { """\n """; } elseif ($*active_theme == "x5") { """\n """; } if ($*theme_css) { """\n """; } """\n """; } } if ($*linked_stylesheet) { print safe """\n """; } if ($*custom_css) { print safe """\n \n"""; } } function _user_print(UserLite user, string mode) : string { # var string result = ""; # var string link = $user->base_url(); # var string profile = get_url($user,"userinfo"); # var Image icon = userinfoicon($user); # if ($mode == "microformatted") { # $result = """[info]$user.username"""; # } elseif($mode == "inside") { # $result = """[info]$user.username"""; # } elseif($mode == "simple") { # $result = """[info]$user.username"""; # } # return $result; return $user->ljuser(); } function _designer() : string { var string result = ""; if ($*theme_designer_url == "") { var UserLite u = UserLite($*theme_designer); var string name = $u.name ? _user_print($u,"simple") : $*theme_designer; $result = """
Designed by $name
"""; } else { $result = """
Designed by $*theme_designer
"""; } return $result; } function _print_entry(Entry e) { var Page p = get_page(); var string entrydate = _dateTime($e.time); var string isodate = $e.time->date_format("%%yyyy%%-%%mm%%-%%dd%%T%%HH%%:%%min%%:%%sec%%+03:00"); var string extraclasses = ""; #cornerz things need refactoring, cause now it's so messed up var string corners1 = ""; var string corners1_2 = ""; var string corners1_3 = ""; var string corners2 = ""; if ($*active_theme == "x4") { $corners1 = """"""; $corners2 = """"""; } elseif ($*active_theme == "x5") { $corners1_2 = """"""; $corners2 = """"""; } if ($*active_theme == "x5" and ($p.view=="entry" or $p.view=="reply")) { $corners1_2 = ""; $corners1_3 = """"""; } var string _entry_title = "$e.security_icon" + ($p.view=="entry" or $p.view=="reply" ? ($e.subject == "" ? $*text_nosubject : $e.subject) + """""" : ($e.subject == "" ? ("""$*text_nosubject""") : $e -> formatted_subject({"class"=>"subj-link","rel"=>"bookmark"})) + "$corners1_2"); if (not $e.comments.enabled) { $extraclasses = $extraclasses + " disabledcomments"; } """
$corners1
"""; if ($p.view=="entry" or $p.view=="reply") { """
"""; $e->print_linkbar(); """$corners1_2
"""; } """
$_entry_title$corners1_3
"""; if ($e.userpic) { $e.userpic->print(); } """
"""; print _user_print($e.poster,"inside"); if ($e.poster.username!=$e.journal.username and not ($p.journal.journal_type == "C" and $p.view == "recent" )){ " $*text_user_posts_in "; print _user_print($e.journal,"simple");} """
"""; $e->print_metadata(); """
""";$e->print_text();"""
"""; """
"""; if ($p.view!="entry" and $p.view!="reply") { """
    """; $e.comments->print(); if ($*active_theme == "x3") { """
    """; } var Link link; var string url = ""; var string text = ""; var string{} link_caption = { "edit_entry" => $*text_edit_entry, "edit_tags" => $*text_edit_tags, "mem_add" => $*text_mem_add, "watch_comments" => $*text_watch_comments, "unwatch_comments" => $*text_unwatch_comments }; foreach var string link_key ($e.link_keyseq) { $link = $e->get_link($link_key); if (defined $link) { $url = $link.url; $text = $link_caption{$link_key} != "" ? $link_caption{$link_key} : $link.caption; print safe """"""; } } """
"""; } """
$corners2

"""; } function _calendar(YearMonth mon) { var string month = $mon->month_format("%%month%%"); var string year = $mon->month_format("%%yyyy%%"); var int[] weekdays = weekdays(); var int pre_empty = $mon.weeks[0].pre_empty; var int post_empty = $mon.weeks[size $mon.weeks-1].post_empty; var YearDay[] Days; var YearDay noday; $noday.day = 0; $noday.num_entries = 0; if ($*reg_firstdayofweek == "monday") { $weekdays = [2,3,4,5,6,7,1]; $pre_empty = $pre_empty==0?6:$pre_empty-1; $post_empty = $post_empty==6?0:$post_empty+1; } if ($pre_empty != 0) { foreach var int i (1..$pre_empty) { $Days[size $Days] = $noday; } } foreach var YearWeek week ($mon.weeks) { foreach var YearDay day ($week.days) { $Days[size $Days] = $day; } } if ($post_empty != 0) { foreach var int i (1..$post_empty) { $Days[size $Days] = $noday; } } if($*active_theme == "x3") { """ """; } else { """
"""; } """ """; var int i = 1; foreach var int d ($weekdays) { """"""; $i++; } """ """; var int counter = 1; foreach var YearDay day ($Days) { if ($counter%7 == 1) { """ """; } """"""; if ($counter%7 == 0) { """ """; } $counter++; } "
$month $year
${*lang_dayname_shorter[$d]}
"""; if ($day.num_entries > 0) { """"""; } print $day.day == 0?"� ":string($day.day); if ($day.num_entries > 0) { """"""; } """
"; } function _taglist(int max, int multiplier) { var Page p = get_page(); var TagDetail[] total_tags = $p->visible_tag_list(); var int most_count = 1; var TagDetail[] tags; var int tcount = 0; var string[] links = []; var int[][] graph; var int skipped = 0; if (size $total_tags > $max) { var int toskip = size $total_tags - $max; foreach var TagDetail tag ($total_tags) { $graph[$tag.use_count][size $graph[$tag.use_count]] = $tcount; $tcount++; } var int T1c = 0; foreach var int[] T1 ($graph) { if ($T1) { var int[] newT1; if (size $T1 <= $toskip) { $toskip = $toskip - size $T1; $graph[$T1c] = $newT1; $skipped++; } elseif (size $T1 > $toskip and $toskip > 0) { foreach var int T2 (reverse $T1) { if ($toskip > 0) { $toskip = $toskip - 1; } else { $newT1[size $newT1] = $T2; } } $graph[$T1c] = reverse $newT1; } } $T1c++; } $tcount = 0; foreach var TagDetail tag ($total_tags) { var bool ok = false; foreach var int tc ($graph[$tag.use_count]) { if ($tc == $tcount) { $ok = true; } } if ($ok) { $tags[size $tags] = $tag; } $tcount++; } } else { foreach var TagDetail tag ($total_tags) { $tags[$tcount] = $tag; $tcount++; } } foreach var TagDetail tag ($tags) { if ($tag.use_count > $most_count) { $most_count = $tag.use_count; } } $most_count = $most_count - $skipped; foreach var TagDetail tag ($tags) { var string text = "1"; var string text2 = "1"; var int use_count = $tag.use_count - $skipped; var string count_text = get_plural_phrase($tag.use_count, "text_tag_uses"); if ($use_count > 1) { var int whole = ($use_count*$multiplier/$most_count) + 100; var string mod = string($whole%100); $text = string($whole/100) + "." + (($mod->length()==1)?"0$mod":$mod); } if ($*tag_display == "list") { $links[size $links] = """� — $count_text"""; } else { $links[size $links] = """"""; } } var string delimiter = ""; var int scount = 0; if ($*tag_display == "list") { """"""; } else { foreach var string s ($links) { if ($scount != (size $links - 1)) { $delimiter = """, """; } else { $delimiter = ""; } $scount++; print safe """$s$delimiter"""; } if (size $total_tags > $max) { """, """; } } } function _taglist(int multiplier) { _taglist(1201,$multiplier); } function _summary(Entry[] entries) { var Page p=get_page(); """ """; } function _linklist { var Page p=get_page(); var UserLink[] links = $p.linklist; var bool Open=false; foreach var UserLink link ($links) { if ($link.is_heading) { if ($Open) { $Open=false; } if ($link.title->starts_with("http://") and ($link.title->ends_with(".jpg") or $link.title->ends_with(".png") or $link.title->ends_with(".gif"))) { """
"""; } else { """
$link.title
"""; } $Open=true; } elseif ($link.title=="") { """
 
"""; } else { if (not $Open) { $Open=true; """
$*text_links
"""; } if ($link.title->starts_with("http://") and ($link.title->ends_with(".jpg") or $link.title->ends_with(".png") or $link.title->ends_with(".gif"))) { """
"""; } else { """
$link.title
"""; } } } if ($Open) { $Open=false; } } function _Header { var Page p = get_page(); """\n\n\n\n \n """ + $p->title() + """\n"""; $p->print_head(); var string prev = ""; var string next = ""; if ($p.view=="recent") { $prev = $*_RecentPage.nav.forward_url; $next = $*_RecentPage.nav.backward_url; } elseif ($p.view=="friends") { $prev = $*_FriendsPage.nav.forward_url; $next = $*_FriendsPage.nav.backward_url; } elseif ($p.view=="month") { $prev = $*_MonthPage.next_url; $next = $*_MonthPage.prev_url; } elseif ($p.view=="day") { $prev = $*_DayPage.next_url; $next = $*_DayPage.prev_url; } if ($next) { """"""; } if ($prev) { """"""; } _print_CSS(); """\n\n"""; } function _Footer { var Page p = get_page(); $p->print_control_strip(); """\n"""; } function _Sidebar { var Page p=get_page(); """ """; if (viewer_sees_ad_box("s2.bottom") or viewer_sees_ad_box("s2.box.bottom")) { """ """; } } function Entry::print_metadata() { if (size $.metadata) { """
"""; foreach var string data ($.metadata) { var string key = $data; if ($key -> starts_with("© ")) { $key = "copyright"; } var string label = lang_metadata_title($data); var string value = $.metadata{$data}; if ($data == "mood") { if($.mood_icon) { $value = "$.mood_icon " + $value; }} """
$label:
$value
"""; } "
"; } } function CommentInfo::print() { var Page p = get_page(); var string text_count = ($*active_theme == "x3")?get_plural_phrase($.count,"text_read_comments"):string($.count); if ($.show_readlink) { """
  • $text_count
  • """; } if ($.show_postlink) { """
  • """; if ($.maxcomments) { print safe """$*text_max_comments"""; } else { """"""+($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment)+""; } "
  • "; } } function EntryPage::print_body { var Entry e = $.entry; var string corners1 = ""; var string corners1_2 = ""; var string corners1_3 = ""; var string corners2 = ""; if ($*active_theme == "x4") { $corners1 = """"""; $corners2 = """"""; } elseif ($*active_theme == "x5") { $corners1_2 = """"""; $corners2 = """"""; } if ($*active_theme == "x5" and ($.view=="entry" or $.view=="reply")) { $corners1_2 = ""; $corners1_3 = """"""; } var string comments_count = string($e.comments.count); if ($.viewing_thread) { var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#comments"; $comments_count = """"""+ get_plural_phrase($e.comments.count, "text_read_all_comments") +""""""; } else { $comments_count = get_plural_phrase($e.comments.count, "text_read_comments"); } if ($e.comments.count > 0) { $comments_count = """$comments_count — """; } else { $comments_count = ""; } _print_entry($e); if ($.entry.comments.enabled) { """
    $corners1
    $corners1_3
    """; ""; """"""; $this->print_reply_container({ "target" => "topcomment" }); if ($.comment_pages.total_subitems > 0) { $.comment_pages->print(); $this->print_multiform_start(); $this->print_comments($.comments); """"""; $this->print_reply_container({"target" => "bottomcomment"}); if ($.comment_pages.all_subitems_displayed) { """

    """; } $this->print_multiform_actionline(); $this->print_multiform_end(); $.comment_pages->print(); } """
    $corners2
    """; } } function ReplyPage::print_body { var Entry e = $.entry; var string corners1 = ""; var string corners1_2 = ""; var string corners2 = ""; if ($*active_theme == "x4") { $corners1 = """"""; $corners2 = """"""; } elseif ($*active_theme == "x5") { $corners1_2 = """"""; $corners2 = """"""; } _print_entry($e); """
    $corners1
    """; print $e.comments.count > 0 ? """""" : ""; if (not $.entry.comments.enabled) { print safe "

    $*text_reply_nocomments_header

    $*text_reply_nocomments

    "; } else { if ($.replyto isa Entry) { } else { """
    """; var EntryLite c = $.replyto; var string poster = defined $c.poster ? _user_print($c.poster, "microformatted") : "$*text_poster_anonymous"; if (defined $c.userpic and $*comment_userpic_style != "off") { var int w = $c.userpic.width; var int h = $c.userpic.height; """
    $c.userpic.alttext
    """; } else { """
    """; } """
    """; if ($c.subject != "") { """

    $c.subject

    """; } "

    $poster

    "; """

    """ + $c->time_display() + ""; $c->print_linkbar(); "

    "; if ($c.metadata{"poster_ip"}) { "

    (" + $c.metadata{"poster_ip"} + ")

    "; } "
    "; """
    """; $c->print_text(); """

    """; } """
    """; $.form->print(); """
    """; } """
    $corners2
    """; } function YearPage::print_body { """
    $*text_view_archive
    """; $this->print_year_links(); """ """; foreach var YearMonth m ($.months) { if ($m.has_entries) { """
    """; _calendar($m); """
    """; }} """
    """; } function MonthDay::print_subjectlist() { foreach var Entry e ($.entries) { "
    "; print $e.time->time_format("short") + ": "; if ($e.poster.username != $e.journal.username) { $e.poster->print(); " "; } "$e.security_icon"; if ($e.subject != "") { " $e.subject"; } else { print safe " $*text_nosubject"; } if ($e.comments.count > 0) { print safe "� — " + get_plural_phrase($e.comments.count, "text_read_comments"); } if ($e.comments.screened) { print safe " $*text_month_screened_comments"; } "
    "; } } function MonthPage::print_body { var string corners1 = ""; var string corners1_2 = ""; var string corners2 = ""; if ($*active_theme == "x4") { $corners1 = """"""; $corners2 = """"""; } elseif ($*active_theme == "x5") { $corners1_2 = """"""; $corners2 = """"""; } """
    $corners1
    """; $.redir->print_hiddens(); if ($.prev_url != "") { " "; } if (size $.months > 1) { """ """; } if ($.next_url != "") { " "; } """
    $corners1_2
    """; """
    """; foreach var MonthDay d ($.days) { if ($d.has_entries) { "
    "; print lang_ordinal($d.day); "
    "; $d->print_subjectlist(); } } """
    $corners2
    """; } function DayPage::print_body() { var string corners1 = ""; var string corners1_2 = ""; var string corners2 = ""; if ($*active_theme == "x4") { $corners1 = """"""; $corners2 = """"""; } elseif ($*active_theme == "x5") { $corners1_2 = """"""; $corners2 = """"""; } if ($.has_entries) { foreach var Entry e ($.entries) { _print_entry($e); } } else { """
    $corners1$corners1_2

    $*text_noentries_day

    $corners2
    """; } """ """; } function TagsPage::print_body { var string corners1 = ""; var string corners1_2 = ""; var string corners2 = ""; if ($*active_theme == "x4") { $corners1 = """"""; $corners2 = """"""; } elseif ($*active_theme == "x5") { $corners1_2 = """"""; $corners2 = """"""; } """
    $corners1$corners1_2
    $corners2
    """; } function RecentPage::print_body { if ($*sticky_post!="" and $*exact_view == "recent_first") { var string corners1 = ""; var string corners1_2 = ""; var string corners2 = ""; if ($*active_theme == "x4") { $corners1 = """"""; $corners2 = """"""; } elseif ($*active_theme == "x5") { $corners1_2 = """"""; $corners2 = """"""; } """
    $corners1
    """ + ($*sticky_subject!="" ? $*sticky_subject : "Sticky post") +"""$corners1_2
    $*sticky_post
    $corners2

    """; } foreach var Entry e ($.entries) { _print_entry($e); } if ($.nav.backward_url != "" or $.nav.forward_url != "") { """ """; } } function Page::print() { if ($.view == "recent") {$*_RecentPage = $this as RecentPage;} elseif ($.view == "friends") {$*_FriendsPage = $this as FriendsPage;} elseif ($.view == "day") {$*_DayPage = $this as DayPage;} elseif ($.view == "month") {$*_MonthPage = $this as MonthPage;} elseif ($.view == "archive") {$*_YearPage = $this as YearPage;} _global_init_(); var string _upic = $.journal.default_pic?"""
    ${.journal.default_pic.alttext}
    """:""; var string _h1 = "

    " + _user_print($.journal, "microformatted") + "

    "; var string _nav = """
  • $*text_view_recent
  • $*text_view_friends
  • $*text_view_archive
  • $*text_view_userinfo
  • """; var string rsslink = ($.data_link{"rss"})?($.data_link{"rss"}.url):"$*base_url/data/rss"; var Link addlink = $.journal -> get_link("add_friend"); var string addfriend = (not viewer_is_owner() and $addlink.url != "") ? $addlink.url : ""; var string _nav_sub = ($addfriend ? """
  • $*text_friend_add
  • """ : "") + """
  • RSS
  • """; if ($*active_theme == "x3") { $_nav_sub = ($addfriend ? """
  • $*text_friend_add
  • """ : "") + """
  • RSS
  • """; } var string _h2 = """

    $.global_title

    """; var string _h3 = ""; if ($.view == "friends" and $*_FriendsPage.friends_title != "") { $_h3 = "

    $*_FriendsPage.friends_title

    "; } elseif ($.global_subtitle != "") { $_h3 = "

    $.global_subtitle

    "; } var string _hfeed = ($.view=="recent" or $.view=="friends" or $.view=="day")?" hfeed":""; _Header(); """
    """; if ($*active_theme == "x2") { """
    $_upic
    $_h1
    $_h2 $_h3
    """;$this->print_body();"""
    """; } elseif ($*active_theme == "x3") { """
    $_upic $_h1
    $_h2 $_h3
    """;$this->print_body();"""
    """; } elseif($*active_theme == "x4") { """
    $_upic
    $_h1
    $_h2 $_h3
    """;$this->print_body();"""
    """; } elseif($*active_theme == "x5" or $*active_theme == "10y") { """
    $_upic $_h1

    $_h2 $_h3

    """;$this->print_body();"""
    """; } else { """
    $_upic $_h1

    $_h2 $_h3

    """;$this->print_body();"""
    """; } _Sidebar(); """
    """; _Footer(); } function EntryPage::print_comments (Comment[] cs) { if (size $cs == 0) { return; } foreach var Comment c ($cs) { var int indent = ($c.depth - 1) * 25; var string comment_classes = "comment-wrap"; if ($c.deleted) { $comment_classes = $comment_classes + " deleted"; } if ($c.screened) { $comment_classes = $comment_classes + " screened"; } if ($c.edited) { $comment_classes = $comment_classes + " edited"; } if ($c.frozen) { $comment_classes = $comment_classes + " frozen"; } if (not $c.full) { $comment_classes = $comment_classes + " partial"; } """
    """; if ($c.screened and not $c.full and not viewer_is_owner()) { """(Screened comment)"""; } elseif ($c.deleted) { """(Deleted comment)"""; } elseif ($c.full) { $this->print_comment($c); } else { $this->print_comment_partial($c); } "
    "; $c->print_reply_container(); $this->print_comments($c.replies); } } function EntryPage::print_comment (Comment c) { var string poster = defined $c.poster ? _user_print($c.poster, "microformatted") : "$*text_poster_anonymous"; var string evenodd = $c.depth % 2 ? "odd" : "even"; if (defined $c.userpic and $*comment_userpic_style != "off") { var int w = $c.userpic.width; var int h = $c.userpic.height; """
    $c.userpic.alttext
    """; } else { """
    """; } """
    """; if (defined $c.subject_icon or $c.subject != "") { """

    $c.subject_icon $c.subject

    """; } "

    $poster

    "; """

    """ + $c->time_display() + ""; if ($this.multiform_on) { print safe """ """; $c->print_multiform_check(); } $c->print_linkbar(); "

    "; if ($c.metadata{"poster_ip"}) { "

    (" + $c.metadata{"poster_ip"} + ")

    "; } "
    "; """
    """; $c->print_text(); "
    "; """
    """; if ($c.frozen) { print safe "($*text_comment_frozen) "; } elseif($c.screened) { var Link link = $c->get_link("unscreen_to_reply"); """($link.caption) """; } else { "("; $c->print_reply_link({"linktext" => $*text_comment_reply}); ") "; } if ($c.parent_url != "") { print safe """($*text_comment_parent) """; } if ($c.thread_url != "") { print safe """($*text_comment_thread) """; var Link expand_link = $c->get_link("expand_comments"); if (defined $expand_link) { "("; $c->print_expand_link(); ") "; } } """

    """; } function EntryPage::print_comment_partial (Comment c) { var string poster = defined $c.poster ? _user_print($c.poster, "simple") : "$*text_poster_anonymous"; var string subj = $c.subject != "" ? $c.subject : $*text_nosubject; if ($subj == "...") { $subj = "…"; } print safe """$subj — $poster"""; var Link expand_link = $c->get_link("expand_comments"); if ($c.thread_url != "" and defined $expand_link) { " ("; $c->print_expand_link(); ")"; } }