# -*-s2-*- layerinfo type = "layout"; layerinfo name = "Digital Multiplex (OSWD)"; layerinfo author_name = "Ported by Jesse Proulx"; layerinfo author_email = "jproulx@livejournal.com"; layerinfo redist_uniq = "digitalmultiplex/layout"; layerinfo des = "Based on the Digital Multiplex design available from Open Source Web Designs. Originally written by Jonathan Sutherland."; layerinfo previews = "digitalmultiplex/digitalmultiplex.jpg"; ################################################################################ # # Properties # propgroup colors { ### Main / Misc property Color page_background_color { des = "Page background color"; } set page_background_color = "#dedfce"; property Color main_bgcolor { des = "Color for main content"; } set main_bgcolor = "#ffffff"; property Color main_fgcolor { des = "Main text color"; } set main_fgcolor = "#000000"; property Color main_link_color { des = "Main link color"; } set main_link_color = "#0000ff"; property Color main_active_link_color { des = "Main active link color"; noui = 1; } property Color main_visited_link_color { des = "Main visited link color"; noui = 1; } property Color border_color { des = "Border color around most areas"; noui = 1; } property Color full_entry_bgcolor { des = "Background color for full entries"; noui = 1; } property Color short_entry_meta_color { des = "Text color for meta information on small display entries"; noui = 1; } ### Sidebar Colors ### property Color sidebar_bgcolor { des = "Sidebar main background color"; } set sidebar_bgcolor = "#bdbabd"; property Color sidebar_box_bgcolor { des = "Sidebar box background color"; } set sidebar_box_bgcolor = "#e2e2e2"; property Color sidebar_box_fgcolor { des = "Sidebar box text color"; } set sidebar_box_fgcolor = "#000000"; property Color sidebar_box_header_bgcolor { des = "Sidebar box header background color"; noui = 1; } property Color sidebar_box_header_fgcolor { des = "Sidebar box header text color"; noui = 1; } ### Heading colors ### property Color heading_bgcolor { des = "Background color for heading bars"; } set heading_bgcolor = "#bdbabd"; property Color heading_fgcolor { des = "Text color for heading bars"; } set heading_fgcolor = "#000000"; property Color heading_border_color { des = "Border color around heading bars"; noui = 1; } property Color heading_link_color { des = "Heading bar link color"; } set heading_link_color = "#0000ff"; property Color heading_active_link_color { des = "Heading bar active link color"; noui = 1; } property Color heading_visited_link_color { des = "Heading bar visited link color"; noui = 1; } ### Title colors ### property Color title_fgcolor { des = "Text color for main title"; } set title_fgcolor = "#c6c6c6"; property Color title_bgcolor { des = "Background color for main title"; } set title_bgcolor = "#ffffff"; property Color title_speck_color { des = "Color for the small speck next to the title"; noui = 1; } ### Subtitle colors ### property Color main_title_bgcolor { des = "Background color for the view specific title"; } set main_title_bgcolor = "#f7df84"; property Color main_title_fgcolor { des = "Text color for the view specific title"; } set main_title_fgcolor = "#000000"; property Color sidebar_title_bgcolor { des = "Background color for sidebar title"; } set sidebar_title_bgcolor = "#808080"; property Color sidebar_title_fgcolor { des = "Text color for sidebar title"; } set sidebar_title_fgcolor = "#000000"; ### Comment Bar Colors ### property Color comment_bar_one_bgcolor { des = "Background color for comment bars"; } set comment_bar_one_bgcolor = "#bebbb6"; property Color comment_bar_one_fgcolor { des = "Text color on comment bars"; } set comment_bar_one_fgcolor = "#000000"; property Color comment_bar_two_bgcolor { des = "Alternating background color for comment bars"; moui = 1; } property Color comment_bar_two_fgcolor { des = "Text color on alternating comment bars"; noui = 1; } property Color comment_bar_screened_bgcolor { des = "Background bar color for screened comments"; } set comment_bar_screened_bgcolor = "#dddddd"; property Color comment_bar_screened_fgcolor { des = "Text color on background bar for screened comments"; } set comment_bar_screened_fgcolor = "#000000"; ### Server Sig ### property Color server_sig_bgcolor { des = "Background color for bottom server signature"; } set server_sig_bgcolor = "#808080"; property Color server_sig_fgcolor { des = "Text color for bottom server signature"; } set server_sig_fgcolor = "#000000"; } propgroup fonts { property use font_base; set font_base = "Georgia"; property use font_fallback; set font_fallback = "sans-serif"; } propgroup presentation { property bool show_entry_userpic { des = "Show the userpic on the full journal entries? [Excludes friends page]"; } set show_entry_userpic = true; property use page_recent_items; property use page_friends_items; property use view_entry_disabled; set view_entry_disabled = false; property use use_shared_pic; property int leading_full_entries { des = "Number of entries on the Recent Entries page to display in full"; note = "Set to zero to display all recent entries in short form. Set to the same number of page items to display all recent entries in full form."; } set leading_full_entries = 5; property string page_content_width { des = "Total page width for sidebar and content"; values = "60%|60%|70%|70%|80%|80%|90%|90%|100%|100%"; } set page_content_width = "60%"; } propgroup background { property string page_background_image { des = "Background image"; note = "URL to an image to be used for the page background (leave blank for none)."; } set page_background_image = ""; property string page_background_repeat { des = "Background image repeat"; values = "repeat|Repeat|no-repeat|Don't repeat|repeat-x|Repeat across only|repeat-y|Repeat down only"; } set page_background_repeat = "repeat"; property string page_background_position { des = "Background image position"; note = "Does not apply if background image is repeating in both directions."; values = "center|Center|center left|Center-left|center right|Center-right|top|Top|top left|Top-left|top right|Top-right|bottom|Bottom|bottom left|Bottom-left|bottom right|Bottom-right|left|Left|right|Right"; } set page_background_position = "center"; property string page_background_scrolling { des = "Background image scrolling"; note = "Not supported in all browsers, but allows for the background image to be in a fixed position when scrolling."; values = "scroll|Scroll|fixed|Fixed"; } set page_background_scrolling = "scroll"; } propgroup sidebar { property string sidebar_width { des = "Sidebar width specification"; values = "155px|Skinny|185px|Default|215px|Wide"; } set sidebar_width = "185px"; property string sidebar_profile_text { des = "Text to be added to the 'Profile' sidebar, underneath the name and user picture icon"; } property string sidebar_blurb { des = "Free text to be added to the sidebar"; note = "Appears in the sidebar 'Blurb'"; cols = 30; rows = 10; } property bool sidebar_disable_recent_summary { des = "Disable 'Page Summary' on Recent Entries and Friends view"; note = "This is only a temporary measure, available until we find a way to enforce a specific sidebar width."; } set sidebar_disable_recent_summary = false; property string sidebar_position_one { note = "Set to 'Nothing' to hide box"; des = "First Sidebar Box"; values = "nothing|Nothing|summary|Page Summary|navigation|Navigation|links|Link List|blurb|Blurb|calendar|Calendar"; } set sidebar_position_one = "summary"; property string sidebar_position_two { note = "Set to 'Nothing' to hide box"; des = "Second Sidebar Box"; values = "nothing|Nothing|summary|Page Summary|navigation|Navigation|links|Link List|blurb|Blurb|calendar|Calendar"; } set sidebar_position_two = "navigation"; property string sidebar_position_three { note = "Set to 'Nothing' to hide box"; des = "Third Sidebar Box"; values = "nothing|Nothing|summary|Page Summary|navigation|Navigation|links|Link List|blurb|Blurb|calendar|Calendar"; } set sidebar_position_three = "links"; property string sidebar_position_four { note = "Set to 'Nothing' to hide box"; des = "Fourth Sidebar Box"; values = "nothing|Nothing|summary|Page Summary|navigation|Navigation|links|Link List|blurb|Blurb|calendar|Calendar"; } set sidebar_position_four = "blurb"; property string sidebar_position_five { note = "Set to 'Nothing' to hide box"; des = "Fifth Sidebar Box"; values = "nothing|Nothing|summary|Page Summary|navigation|Navigation|links|Link List|blurb|Blurb|calendar|Calendar"; } set sidebar_position_five = "calendar"; } propgroup text { property string text_sidebar_link_separator { des = "Leading text for links in the sidebar"; } set text_sidebar_link_separator = ""; property use text_meta_music; property use text_meta_mood; property use text_post_comment; property use text_read_comments; property use text_post_comment_friends; property use text_read_comments_friends; property use text_website_default_name; property string text_sidebar_title { des = "Title of the sidebar"; noui = 1; } property string text_sidebar_userpic { des = "Title of the userpic sidebar box"; noui = 1; } property string text_sidebar_blurb { des = "Title of the blurb sidebar box"; noui = 1; } property string text_sidebar_navigation { des = "Title of the navigation sidebar box"; noui = 1; } property string text_sidebar_summary { des = "Title of the summary sidebar box"; noui = 1; } set text_sidebar_title = "About"; set text_sidebar_userpic = "Profile"; set text_sidebar_blurb = "Blurb"; set text_sidebar_navigation = "Navigation"; set text_sidebar_summary = "Page Summary"; } set tags_aware = true; ################################################################################ # # Layout specific functions # ### Sidebar related functions ### function sidebar_html_width : string "Return an appropriate HTML tag width for the sidebar" { var int length = $*sidebar_width->length(); # Percentages are fine if ($*sidebar_width->substr($length-1, $length) == "%") { return $*sidebar_width; # px measurements are fine, minus the 'px' specification } elseif ($*sidebar_width->substr($length-2, $length) == "px") { return $*sidebar_width->substr(0, $length-2); # Otherwise, just forget it and return nothing. } else { return ""; } } function print_sidebar_box(string id, string body, string title) { println """
"""; println """
"""; } function Page::lay_sidebar_view_userpic() : string { return ""; } function print_sidebar_userpic () { var Page page = get_page(); var string return; var Image up_img = $page.journal.default_pic; if ($page->lay_sidebar_view_userpic() != "") { $return = $page->lay_sidebar_view_userpic(); } else { if (defined $up_img) { $return = """
"""; } $return = $return + $page.journal.name; } if ($*sidebar_profile_text) { $return = $return + "

" + $*sidebar_profile_text + "

"; } print_sidebar_box("userpic",$return, $*text_sidebar_userpic); } function print_sidebar_blurb () { if ($*sidebar_blurb != "") { print_sidebar_box("blurb",$*sidebar_blurb,$*text_sidebar_blurb); } } function Page::lay_sidebar_view_navigation() : string { return ""; } function print_sidebar_navigation() { var string navigation = """"""; var Page page = get_page(); var string website_name = $page.journal.website_name ? $page.journal.website_name : $*text_website_default_name; var string website; if ($page.journal.website_url != "") { $website = """"""; } foreach var string v ($page.views_order) { if ($v == $page.view) { $navigation = """$navigation"; } else { $navigation = """$navigation"; } } $navigation = $navigation + $website; if ($page->lay_sidebar_view_navigation() != "") { $navigation = $navigation + ""; $navigation = $navigation + $page->lay_sidebar_view_navigation(); } $navigation = $navigation + "
$*text_sidebar_link_separator$website_name
$*text_sidebar_link_separator""" + lang_viewname($v) + "
$*text_sidebar_link_separator""" + lang_viewname($v) + "
 
"; print_sidebar_box("navigation",$navigation,$*text_sidebar_navigation); } function print_sidebar_calendar() { var string calendar; var Page p = get_page(); var YearMonth m = $p->get_latest_month(); var string month = $m->month_format(); if($m.has_entries) { $calendar = """"""; var YearWeek[] theWeeks = $m.weeks; foreach var YearWeek w ($theWeeks) { $calendar = $calendar + ""; var YearDay[] theDays = $w.days; var int pre = $w.pre_empty; if($pre > 0) { $calendar = $calendar + """"""; } foreach var YearDay d ($theDays) { var int num = $d.num_entries; $calendar = $calendar + """"; } $calendar = $calendar + ""; } $calendar = $calendar + "
 """; if ($num > 0) { $calendar = $calendar + """$d.date.day"""; } else { $calendar = $calendar + $d.date.day; } $calendar = $calendar + "
"; } if ($calendar != "") { print_sidebar_box("calendar", $calendar, $month); } } function Page::lay_sidebar_view_summary() : string { return ""; } function print_sidebar_summary() { var Page page = get_page(); if ($page->lay_sidebar_view_summary() != "") { var string summary = """"""; $summary = $summary + $page->lay_sidebar_view_summary(); $summary = $summary + "
"; print_sidebar_box("summary",$summary,$*text_sidebar_summary); } } function print_sidebar(Page p) { print_sidebar_userpic(); if ($*sidebar_position_one != "nothing") { if ($*sidebar_position_one == "summary") { print_sidebar_summary(); } elseif ($*sidebar_position_one == "navigation") { print_sidebar_navigation(); } elseif ($*sidebar_position_one == "links") { $p->print_linklist(); } elseif ($*sidebar_position_one == "blurb") { print_sidebar_blurb(); } elseif ($*sidebar_position_one == "calendar") { print_sidebar_calendar(); } } if ($*sidebar_position_two != "nothing") { if ($*sidebar_position_two == "summary") { print_sidebar_summary(); } elseif ($*sidebar_position_two == "navigation") { print_sidebar_navigation(); } elseif ($*sidebar_position_two == "links") { $p->print_linklist(); } elseif ($*sidebar_position_two == "blurb") { print_sidebar_blurb(); } elseif ($*sidebar_position_two == "calendar") { print_sidebar_calendar(); } } if ($*sidebar_position_three != "nothing") { if ($*sidebar_position_three == "summary") { print_sidebar_summary(); } elseif ($*sidebar_position_three == "navigation") { print_sidebar_navigation(); } elseif ($*sidebar_position_three == "links") { $p->print_linklist(); } elseif ($*sidebar_position_three == "blurb") { print_sidebar_blurb(); } elseif ($*sidebar_position_three == "calendar") { print_sidebar_calendar(); } } if ($*sidebar_position_four != "nothing") { if ($*sidebar_position_four == "summary") { print_sidebar_summary(); } elseif ($*sidebar_position_four == "navigation") { print_sidebar_navigation(); } elseif ($*sidebar_position_four == "links") { $p->print_linklist(); } elseif ($*sidebar_position_four == "blurb") { print_sidebar_blurb(); } elseif ($*sidebar_position_four == "calendar") { print_sidebar_calendar(); } } if ($*sidebar_position_five != "nothing") { if ($*sidebar_position_five == "summary") { print_sidebar_summary(); } elseif ($*sidebar_position_five == "navigation") { print_sidebar_navigation(); } elseif ($*sidebar_position_five == "links") { $p->print_linklist(); } elseif ($*sidebar_position_five == "blurb") { print_sidebar_blurb(); } elseif ($*sidebar_position_five == "calendar") { print_sidebar_calendar(); } } } function print_heading_bar(string center) { println """"""; println """
$center
"""; } function print_heading_bar(string left, string right) { println """"""; println """
$left$right
"""; } function print_entry_short (Page p, Entry e, Color bgcolor, Color fgcolor) { var string subject = $e.subject ? $e.subject : "(No Subject)"; println """"""; println """"""; println """
» $subject
$e.text
"; } function print_entry_full (Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text) { println "
"; var string time = $p.view != "day" ? $e.time->date_format("med") + " @ " : ""; $time = $time + $e.time->time_format(); var string subject = $e.subject; if ($e.security) { $subject = "$e.security_icon $subject"; } if ($subject) { $subject = """$subject"""; } var Link prev; var Link next; if ($p.view == "entry") { $prev = $e->get_link("nav_prev"); $next = $e->get_link("nav_next"); } print_heading_bar("$prev $subject", "$time $next"); println """"""; if (($p.view == "friends" or $e.poster.username != $e.journal.username or ($*show_entry_userpic and defined $e.userpic)) and $p.view != "entry") { println """"; } println """
"""; if ($p.view == "friends") { if ($e.poster.username != $e.journal.username) { print $e.poster->as_string() + ", posting in "; } print $e.journal->as_string() + "
"; if (defined $e.userpic) { """"""; } } elseif ($e.poster.username != $e.journal.username) { print $e.poster->as_string() + "
"; if (defined $e.userpic) { """"""; } } elseif (defined $e.userpic and $p.view != "entry") { """"""; } println "
"""; if (not $hide_text) { print $e.text; if (size $e.metadata) { """
"""; foreach var string k ($e.metadata) { var string text = $k; var string val = $e.metadata{$k}; if ($k == "mood") { $text = $*text_meta_mood; } elseif ($k == "music") { $text = $*text_meta_music; } if ($k == "mood" and defined $e.mood_icon) { var Image i = $e.mood_icon; $val = " $val"; } """
$text: $val
"""; } "
\n"; } if ($e.tags) { var int tcount = 0; "
Tags: "; foreach var Tag t ($e.tags) { """"""; $tcount++; if ($tcount != size $e.tags) { ", "; } } "
\n"; } } if ($p.view != "entry") { $e.comments->print(); } println "
"; } ################################################################################ # # Overriden functions # function prop_init() { if ($*leading_full_entries > $*page_recent_items) { $*leading_full_entries = $*page_recent_items; } ### Main / Misc Colors if($*border_color.as_string == "") { $*border_color = $*main_bgcolor->average($*main_fgcolor); } if($*title_speck_color.as_string == "") { $*title_speck_color = $*title_bgcolor->darker(); } if($*full_entry_bgcolor.as_string == "") { $*full_entry_bgcolor = $*main_bgcolor->darker(15); } if($*short_entry_meta_color.as_string == "") { $*short_entry_meta_color = $*main_fgcolor->lighter(120); } if($*main_active_link_color.as_string == "") { $*main_active_link_color = $*main_link_color->lighter(60); } if($*main_visited_link_color.as_string == "") { $*main_visited_link_color = $*main_link_color->darker(60); } ### Heading Bar colors if($*heading_border_color.as_string == "") { $*heading_border_color = $*heading_bgcolor->average($*heading_fgcolor); } if($*heading_active_link_color.as_string == "") { $*heading_active_link_color = $*heading_link_color->lighter(60); } if($*heading_visited_link_color.as_string == "") { $*heading_visited_link_color = $*heading_link_color->darker(60); } ### Sidebar colors if($*sidebar_box_header_bgcolor.as_string == "") { $*sidebar_box_header_bgcolor = $*sidebar_box_bgcolor->darker(60); } if($*sidebar_box_header_fgcolor.as_string == "") { $*sidebar_box_header_fgcolor = $*sidebar_box_fgcolor->darker(60); } ### Comment bar colors if($*comment_bar_two_bgcolor.as_string == "") { $*comment_bar_two_bgcolor = $*comment_bar_one_bgcolor->darker(); } if($*comment_bar_two_fgcolor.as_string == "") { $*comment_bar_two_fgcolor = $*comment_bar_one_fgcolor->darker(); } } function Page::print_linklist() { if (size $.linklist <= 0) { return; } elseif (not $*linklist_support) { return; } var string list = ""; foreach var UserLink l ($.linklist) { if ($l.title) { if ($l.is_heading) { $list = $list + """"""; } else { $list = $list + """"""; } } else { $list = $list + ""; } } $list = $list + "
$l.title
$*text_sidebar_link_separator$l.title
 
"; print_sidebar_box("linklist", $list, "Links"); } function print_stylesheet() { """ body { background-color: $*page_background_color; """; if (clean_url($*page_background_image) != "") { """ background-image: url("$*page_background_image"); background-repeat: $*page_background_repeat; background-position: $*page_background_position; background-attachment: $*page_background_scrolling; """; } """ font-family: $*font_base, $*font_fallback; font-size: 100%; } h1 { font-size: 2.0em; } p, td, blockquote { font-size: 1.0em; } pre, code, kbd, tt { font-family: monospace; } a { color: $*main_link_color; } a:active { color: $*main_active_link_color; } a:hover { color: $*main_active_link_color; } a:visited { color: $*main_visited_link_color; } /* Title */ #top_title { width: $*page_content_width; margin-left: auto; margin-right: auto; margin-bottom: 10px; border: 1px solid $*border_color; } #journal_title { background-color: $*title_bgcolor; color: $*title_fgcolor; text-align: center; } #speck { background-color: $*title_speck_color; border-right: 1px solid $*border_color; height: 100%; width: 21px; } .short_entry { font-size: .8em; text-align: justify; } .short_entry_meta { color: $*short_entry_meta_color; } .full_entry { background-color: $*full_entry_bgcolor; padding: 10px; width: 100%; } .full_entry_userpic { font-size: .8em; border: 1px solid $*border_color; padding: 3px; } .heading_bar { background-color: $*heading_bgcolor; border: 1px solid $*heading_border_color; color: $*heading_fgcolor; margin-top: .2em; padding: 5px; width: 100%; } .heading_bar a { color: $*heading_link_color; } .heading_bar a:active { color: $*heading_active_link_color; } .heading_bar a:hover { color: $*heading_active_link_color; } .heading_bar a:visited { color: $*heading_visited_link_color; } /* Side bars */ #sidebar { background-color: $*sidebar_bgcolor; border-right: 1px solid $*border_color; border-top: 1px solid $*border_color; max-width: $*sidebar_width; text-align: center; width: $*sidebar_width; } .sidebar_box { font-size: 0.8em; width: 100%; } .sidebar_box_contents { background-color: $*sidebar_box_bgcolor; border-bottom: 1px solid $*border_color; border-top: 1px solid $*border_color; color: $*sidebar_box_fgcolor; padding: 5px; } .sidebar_box_header { background-color: $*sidebar_box_header_bgcolor; border-top: 1px solid $*border_color; color: $*sidebar_box_header_fgcolor; text-align: left; padding: 5px; } #sidebar_userpic { text-align: center; } #sidebar_navigation { text-align: left; } #sidebar_linklist { text-align: left; } #sidebar_blurb { text-align: justify; } #sidebar_summary { text-align: left; } #subtitles { border: 1px solid $*border_color; width: $*page_content_width; text-align: left; } #sidebar_title { background-color: $*sidebar_title_bgcolor; border-right: 1px solid $*border_color; color: $*sidebar_title_fgcolor; text-align: center; width: $*sidebar_width; } #main_title { background-color: $*main_title_bgcolor; color: $*main_title_fgcolor; text-align: center; } #main { border: 1px solid $*border_color; width: $*page_content_width; } #content { background-color: $*main_bgcolor; border-top: 1px solid $*border_color; color: $*main_fgcolor; text-align: left; width: 90%; } #top_of_page, #server_sig{ background-color: $*server_sig_bgcolor; border-top: 1px solid $*border_color; color: $*server_sig_fgcolor; padding: 5px; } #top_of_page { width: $*sidebar_width; } #server_sig { text-align: right; width: $*page_content_width; } #multiform_form { padding: 3px; } .calendar_day { border-bottom: 1px solid $*border_color; border-right: 1px solid $*border_color; width: 14%; } .calendar_day .day { font-size: .9em; } """; } ################################################################################ # # Page # function Page::print() { var string title = $this->title(); var string view_title = $this->view_title() != "" ? $this->view_title() : " "; println """"""; println ""; if ($*external_stylesheet) { println """"""; } else { println """"; } $this->print_head(); println "$title"; println ""; println """
"""; var string sidebar_html_width = sidebar_html_width(); println """
 

$title

"""; println """"""; println """"""; println """"""; println """"; ### Content ### println """"; println """
$*text_sidebar_title$view_title
"""; $this->print_body(); println "
Top of Page"""; server_sig(); println """
"""; println "
"; } function Page::print_entry (Entry e) { print_entry_full($this, $e, null Color, null Color, false); } ################################################################################ # # RecentPage # function RecentPage::print_body () { var int count = 0; foreach var Entry e ($.entries) { $count++; if ($count <= $*leading_full_entries) { print_entry_full($this, $e, null Color, null Color, false); } else { print_entry_short($this, $e, null Color, null Color); } if ($count == $*leading_full_entries and $*leading_full_entries != $*page_recent_items) { print_heading_bar("Other entries"); } } } function RecentPage::lay_sidebar_view_navigation() : string { var string return; if ($.nav.forward_url != "" or $.nav.backward_url != "") { if ($.nav.forward_url != "") { $return = $return + """$*text_sidebar_link_separatorNext Page"""; } if ($.nav.backward_url != "") { $return = $return + """$*text_sidebar_link_separatorPrevious Page"""; } } return $return; } function RecentPage::lay_sidebar_view_summary() : string { var string return; if (not $*sidebar_disable_recent_summary) { foreach var Entry e ($.entries) { if ($e.subject != "") { $return = $return + """$*text_sidebar_link_separator [#] $e.subject $e.security_icon"""; } else { $return = $return + """$*text_sidebar_link_separator [#] $*text_nosubject $e.security_icon"""; } } } return $return; } ################################################################################ # # FriendsPage # function FriendsPage::print_body () { foreach var Entry e ($.entries) { var Friend f = $.friends{$e.journal.username}; print_entry_full($this, $e, $f.bgcolor, $f.fgcolor, false); } } ################################################################################ # # EntryPage # function EntryPage::lay_sidebar_view_summary() : string { var string return; foreach var Comment c ($.comments) { if ($c.depth == 1) { if ($c.subject != "") { $return = $return + """$*text_sidebar_link_separator [#] $c.subject"""; } else { $return = $return + """$*text_sidebar_link_separator [#] $*text_nosubject"""; } } } return $return; } function EntryPage::lay_sidebar_view_navigation() : string { var string return; var Link link; foreach var string k ($.entry.link_keyseq) { $link = $.entry->get_link($k); if ($link.url != "") { $return = """$return$*text_sidebar_link_separator$link.caption"""; } } return $return; } function EntryPage::lay_sidebar_view_userpic() : string { var string return; if (defined $.entry.userpic) { $return = """
"""; } if ($.entry.poster.username != $.entry.journal.username) { $return = $return + $.entry.poster->as_string() + " posting in " ; } $return = $return + $.entry.journal->as_string(); return $return; } function EntryPage::print_body () { set_handler("unscreen_comment_#", [ [ "style_bgcolor", "cmtbar#", "$*comment_bar_one_bgcolor", ], [ "style_color", "cmtbar#", "$*comment_bar_one_fgcolor", ], ]); set_handler("screen_comment_#", [ [ "style_bgcolor", "cmtbar#", "$*comment_bar_screened_bgcolor", ], [ "style_color", "cmtbar#", "$*comment_bar_screened_fgcolor", ], ]); print_entry_full($this, $.entry, null Color, null Color, $.viewing_thread); if ($.entry.comments.enabled) { var string pages; if ($.comment_pages.all_subitems_displayed) { print_heading_bar("""($*text_post_comment)"""); } else { $pages = lang_page_of_pages($.comment_pages.current, $.comment_pages.total) + " - "; foreach var int i (1 .. $.comment_pages.total) { if ($i == $.comment_pages.current) { $pages = "$pages [$i] "; } else { var string url_of = $.comment_pages->url_of($i); $pages = """$pages [$i] """; } } print_heading_bar("""($*text_post_comment)""", $pages); } if ($.comment_pages.total_subitems > 0) { if ($this.multiform_on) { $this->print_multiform_start(); } $this->print_comments($.comments); if ($.comment_pages.all_subitems_displayed) { print_heading_bar("""($*text_post_comment)"""); } else { $pages = lang_page_of_pages($.comment_pages.current, $.comment_pages.total) + " - "; foreach var int i (1 .. $.comment_pages.total) { if ($i == $.comment_pages.current) { $pages = "$pages [$i] "; } else { var string url_of = $.comment_pages->url_of($i); $pages = """$pages [$i] """; } } print_heading_bar("""($*text_post_comment)""", $pages); } if ($this.multiform_on) { println """
"""; $this->print_multiform_actionline(); println "
"; $this->print_multiform_end(); } } } } function EntryPage::print_comment(Comment c) { var Color background; var Color color; if ($c.screened) { $background = $*comment_bar_screened_bgcolor; $color = $*comment_bar_screened_fgcolor; } elseif ($c.depth % 2) { $background = $*comment_bar_one_bgcolor; $color = $*comment_bar_one_fgcolor; } else { $background = $*comment_bar_two_bgcolor; $color = $*comment_bar_two_fgcolor; } var string poster = defined $c.poster ? $c.poster->as_string() : "(Anonymous)"; var string sub_icon; if (defined $c.subject_icon) { $sub_icon = $c.subject_icon->as_string(); } println """
"""; println """"""; if (defined $c.userpic and $*comment_userpic_style != "off") { var int w = $c.userpic.width; var int h = $c.userpic.height; if ($*comment_userpic_style == "small") { $w = $w / 2; $h = $h / 2; } println """"""; } println """
[User Picture Icon]"""; println """"; println """"; println """"; println """"""; println "
"""; println ""; println """"""; println """"; if ($c.metadata{"poster_ip"}) { println """"; } println "
From:$poster
Date:"""; println $c.time->date_format("long") + " - " + $c.time->time_format() + "
IP Address:(""" + $c.metadata{"poster_ip"} + ")
"""; if ($this.multiform_on) { println """ """; $c->print_multiform_check(); } $c->print_linkbar(); println "
"""; println (defined $c.subject_icon or $c.subject != "") ? "

$c.subject_icon $c.subject

" : ""; println "
(Link)
"; println """
$c.text
"""; println """
"""; if ($c.frozen) { println """(Replies frozen) """; } else { println """(Reply to this) """; } if ($c.parent_url != "") { println """(Parent) """; } if ($c.thread_url != "") { println """(Thread) """; } println "
"; } ################################################################################ # # ReplyPage # function ReplyPage::lay_sidebar_view_userpic() : string { var string return; if (defined $.replyto.poster) { if (defined $.replyto.userpic) { $return = $.replyto.userpic + "
"; } $return = $return + $.replyto.poster->as_string(); if ($.replyto.poster.username != $.entry.poster.username) { $return = $return + " commented on " + $.entry.poster->as_string() + "'s post"; } if ($.entry.poster.username != $.entry.journal.username) { var string preposition = $.entry.poster.username == $.replyto.poster.username ? " posted in " : " in "; $return = $return + $preposition + $.entry.journal->as_string(); } } else { $return = "Anonymous commented on " + $.entry.poster->as_string() + "'s post"; if ($.entry.poster.username != $.entry.journal.username) { $return = $return + " in " + $.entry.journal->as_string(); } } return $return; } function ReplyPage::print_body { if (not $.entry.comments.enabled) { print_heading_bar("$*text_reply_nocomments_header"); print "

$*text_reply_nocomments

"; return; } var string datetime = $.replyto.time->date_format("long") + " - " + $.replyto.time->time_format(); print_heading_bar($.replyto.subject, $datetime); print "
$.replyto.text
"; print_heading_bar("Reply to this:","""($*text_reply_back)"""); $.form->print(); } ################################################################################ # # YearPage # function YearPage::lay_sidebar_view_summary() : string { var string return; foreach var YearMonth m ($.months) { if ($m.has_entries) { $return = $return + """$*text_sidebar_link_separator [#] """ + $m->month_format() + ""; } } return $return; } function YearPage::lay_sidebar_view_navigation() : string { var string return; foreach var YearYear y (reverse $.years) { if ($y.displayed) { $return = "$return$*text_sidebar_link_separator$y.year"; } else { $return = """$return$*text_sidebar_link_separator$y.year"""; } } return $return; } function YearPage::print_body { foreach var YearMonth m ($.months) { $this->print_month($m); } } function YearPage::print_month(YearMonth m) { if (not $m.has_entries) { return; } print_heading_bar("""""" + $m->month_format() + ""); println """"""; foreach var int d (weekdays()) { println """"; } println "\n"; foreach var YearWeek w ($m.weeks) { $w->print(); } println """
""" + $*lang_dayname_short[$d] + "
$*text_view_month
"""; } function YearWeek::print () { ""; if ($.pre_empty) { " "; } foreach var YearDay d ($.days) { """$d.day
"""; if ($d.num_entries) { """$d.num_entries"""; } else { " "; } "
\n"; } if ($.post_empty) { " "; } ""; } ################################################################################ # # MonthPage # function MonthPage::lay_sidebar_view_navigation() : string { var string return; if ($.prev_url != "") { $return = """$*text_sidebar_link_separatorPrevious Month"""; } if ($.next_url != "") { $return = """$return$*text_sidebar_link_separatorNext Month"""; } return $return; } function MonthPage::print_body { "
"; $.redir->print_hiddens(); var string selector; if (size $.months > 1) { $selector = "\n"; print_heading_bar("Switch to: $selector"); } "
\n
"; foreach var MonthDay d ($.days) { if ($d.has_entries) { "
"; print lang_ordinal($d.day); "
\n
"; $d->print_subjectlist(); "
\n"; } } "
\n"; } ################################################################################ # # DayPage # function DayPage::lay_sidebar_view_summary() : string { var string return; if ($.has_entries) { foreach var Entry e ($.entries) { if ($e.subject != "") { $return = $return + """$*text_sidebar_link_separator [#] $e.subject $e.security_icon"""; } else { $return = $return + """$*text_sidebar_link_separator [#] $*text_nosubject $e.security_icon """; } } } return $return; } function DayPage::lay_sidebar_view_navigation() : string { var string return; $return = """$return$*text_sidebar_link_separator$*text_day_prev"""; $return = """$return$*text_sidebar_link_separator$*text_day_next"""; return $return; } function DayPage::print_body() { if ($.has_entries) { foreach var Entry e ($.entries) { $this->print_entry($e); } } else { "

$*text_noentries_day

"; } } ################################################################################ # # Preview # function print_theme_preview () { println """
"""; """
AboutRecent Entries

Profile
John Doe


Page Summary
  »  foo
  »  foo
  »  foo
  »  hhfdhgfd
  »  (no subject)


Full EntryNov. 29th, 2003 @ 01:10 am
Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit
Other entries
» Short Entry
Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit
Nov. 29th, 2003 @ 12:50 am
"""; server_sig(); "
"; }