layerinfo "type" = "layout"; layerinfo "name" = "s1short"; layerinfo "des" = "S2 emulation of talkread and talkpost etc..."; layerinfo "author_name" = "Mischa Spiegelmock"; layerinfo "redist_uniq" = "s1shortcomings/layout"; # S1 Shortcomings Layer by revmischa BEEEYATCH property string comment_bar_1 { des = "Comment bar color"; } property string comment_bar_screened { des = "Screened comment bar color"; } property string comment_bar_2 { des = "Alternate comment bar color"; } property string bar_color { des = "Color for various seperator bars"; } property string container_color { des = "Standout background color"; } property string container_border_color { des = "Standout border color"; } property Color background_color { des = "Page background color"; } property string text_color { des = "Text color"; } property string title_text_color { des = "Title text color"; } property string month_view_title_text { des = "The text 'Month View'"; } property string text_tags { des = "Tags title"; } property string deleted_comment_text { des = "Text to display if a comment has been deleted."; } property string month_posts_by_text { des = "Describe who wrote the posts for a month view."; } property Color grad_color { des = "Foreground color to make the background gradient at the top."; } set grad_color = "#6699CC"; set month_posts_by_text = "Here are all the posts for this month by"; set deleted_comment_text = "(Deleted comment)"; set text_tags = "Tags:"; set comment_bar_1 = "#BBDDFF"; set comment_bar_screened = "#AAAAAA"; set comment_bar_2 = "#AACCEE"; set bar_color = "#336699"; set container_color = "#c5dff9"; set container_border_color = "#8fc3f7"; set background_color = "#FFFFFF"; set text_color = "#000000"; set title_text_color = "#003366"; set month_view_title_text = "Month View"; property use tags_aware; set tags_aware = true; function Page::print { """ """; $this->print_head(); set_handler("unscreen_comment_#", [ [ "set_class", "cmtbar#", "comment_bar_1", ], ]); set_handler("screen_comment_#", [ [ "set_class", "cmtbar#", "comment_bar_screened", ], ]); # make our palimg background gradient: var Color fg_color = $*grad_color; var Color bg_color = $*background_color; var string grad_url = palimg_tint("s1gradient.gif", $bg_color, $fg_color); print "" + $this->title() + ""; """ """; $this->print_body(); print ""; } function print_clickable_date(Entry entry) { var DateTime time = $entry.time; var string baseurl = $entry.journal->base_url(); var string dayurl = $baseurl + $time->date_format("/%%yyyy%%/%%mm%%/%%dd%%/"); var string monthurl = $baseurl + $time->date_format("/%%yyyy%%/%%mm%%/"); var string yearurl = $baseurl + $time->date_format("/%%yyyy%%/"); var string daypad = zeropad($time.day, 2); var string monthpad = zeropad($time.month, 2); var string yearpad = zeropad($time.year, 4); print """$yearpad-$monthpad-$daypad """; print $time->time_format($*lang_fmt_time_short); } function EntryPage::print_comment_partial(Comment comment) { var int leftpadding = $comment.depth; """
"""; if ($comment.deleted) { # first thing check to see if this comment has been deleted # (deleted comments will still be present if they are the parent of a thread) print "
$*deleted_comment_text
"; } else { """ """; print $comment.subject ? $comment.subject : $*text_nosubject; print " - "; if ($comment.poster) { print $comment.poster; } else { print $*text_poster_anonymous; } print ", " + $comment.time->date_format($*lang_fmt_date_med) + " " + $comment.time->time_format($*lang_fmt_time_short); print ""; } "
"; } function EntryPage::print_comment(Comment comment) { var string picheight; if ($comment.userpic.height > 0) { $picheight = string( $comment.userpic.height + 6 ) + "px"; } else { $picheight = "auto"; } var int leftpadding = $comment.depth; var string poster; if ($comment.poster) { $poster = "$comment.poster"; } else { #anonymous comment $poster = """$*text_poster_anonymous"""; } var string ip = $comment.metadata{"poster_ip"}; var string time = $comment.time->date_format() + " " + $comment.time->time_format(); var string barclass = ($comment.depth % 2)-1 ? "comment_bar_2" : "comment_bar_1"; if ($comment.screened) { $barclass = "comment_bar_screened"; } """
"""; if ($comment.userpic.url) { """
$comment.userpic
"""; } print "
"; if ($comment.subject) { print "
$comment.subject " + $comment.subject_icon + "
"; } else { print "
"; } """ $poster
$time (link) """; if ($ip) { print " ($*text_comment_ipaddr $ip) "; } $comment->print_linkbar(); if ($.multiform_on) { print $*text_multiform_check + " "; $comment->print_multiform_check(); } if ($comment.frozen) { print " ($*text_comment_frozen)"; } if ($comment.comment_posted) { print "
$*text_comment_posted"; } """
$comment.text
("""; $comment->print_reply_link({"linktext" => $*text_comment_reply}); print ") "; if ($comment.thread_url) { print "($*text_comment_thread) "; } if ($comment.parent_url) { print "($*text_comment_parent) "; } $comment->print_reply_container({"class" => "topmargin normalfont"}); """
"""; } #prints out the entry tags function get_tags_text(Entry e) { var string tagslist; foreach var Tag tag ($e.tags) { $tagslist = $tagslist + "$tag.name, "; } $tagslist = $tagslist->substr(0, $tagslist->length()-2); print "
$*text_tags $tagslist
"; } #print out the quickreply link & container with the page post comment link function s1_print_reply_link (string targetname, EntryPage page) { var string qrclass = "topmargin quickreplystandalone normalfont"; """
("""; $page->print_reply_link({"target" => $targetname, "linktext" => "$*text_post_comment"}); ")
"; $page->print_reply_container({"target" => "$targetname", "class" => "$qrclass"}); } function print_comment_page_toolbar(ItemRange comment_pages) { #display comment pages box if not all the comments are displayed on this page if(not $comment_pages.all_subitems_displayed) { """
"""; $comment_pages->print(); """
"""; } } #print out userpic, poster and entry date info function print_user_top_crap(Entry entry, User journal) { """
$entry.userpic $journal.name - """ + lang_user_wrote($journal) + """
@ """; print_clickable_date($entry); """
"""; $entry->print_linkbar(); """
"""; } function s1_print_entry(Entry entry) { "
"; var string mood = $entry.metadata{"mood"}; var string music = $entry.metadata{"music"}; var Image moodicon = $entry.mood_icon; if ($mood) { print "$*text_meta_mood: "; if ($moodicon) { print $moodicon + " "; } print "$mood
"; } if ($music) { print "$*text_meta_music: $music
"; } if ($entry.tags) { get_tags_text($entry); print "
"; } var Image securityicon = $entry.security_icon; if ($entry.subject) { """
$securityicon $entry.subject
"""; } else { print $securityicon; } print $entry.text + """


"""; } function EntryPage::print_body { print_user_top_crap($.entry, $.journal); s1_print_entry($.entry); print_comment_page_toolbar($.comment_pages); if ($.multiform_on) { $this->print_multiform_start(); } s1_print_reply_link("top", $this); $this->print_comments($.comments); if ($.entry.comments.count > 0) { #multiple comment pages nav box "
\n"; print "
\n"; s1_print_reply_link("bottom", $this); if ($.multiform_on) { print "
"; $this->print_multiform_actionline(); $this->print_multiform_end(); } print "
"; print_comment_page_toolbar($.comment_pages); } } function MonthPage::print_body { # month select JS """"""; # print the title and shit print "\n"; "
"; print "
" + $this->view_title() +" - " + $.journal.username + "
"; """
$*month_view_title_text

"""; lang_viewname($this.view); "
"; "

$*month_posts_by_text "; $.journal->print(); ":

"; if (size $.months > 0) { # print a box with links to different months """
"""; if ($.prev_url) { """ """; } else { " "; } """ """; if ($.next_url) { """ """; } else { " "; } """
"""; } var int numPosts = 0; "
"; foreach var MonthDay day ($.days) { if ($day.has_entries) { """\n"; """
\n"""; $day->print_subjectlist(); "
\n
\n"; $numPosts++; } } if ($numPosts == 0) { """
$*text_noentries_recent
"""; } "
"; } function ReplyPage::print_body() { print "\n"; print_user_top_crap($.entry, $.journal); s1_print_entry($.entry); print """
($*text_reply_back)
\n"""; """
$*text_post_comment:
"""; $.form->print(); }