Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*-s2-*-
- layerinfo type = "layout";
- layerinfo name = "yyClassicHyper";
- layerinfo redist_uniq = "classic/layout";
- layerinfo previews = "classic/classic.jpg";
- propgroup colors {
- property Color body_bgcolor {
- des = "Background color of page";
- s1color = "stronger_back";
- }
- property Color main_bgcolor {
- des = "Background color of main text area";
- s1color = "page_back";
- }
- property Color main_fgcolor {
- des = "Color of text on main text areas";
- s1color = "page_text";
- }
- property Color headerbar_bgcolor {
- des = "Background color of header bars";
- s1color = "strong_back";
- }
- property Color headerbar_fgcolor {
- des = "Color of text on header bars";
- s1color = "strong_text";
- }
- property Color metabar_bgcolor {
- des = "Background color of side bar";
- s1color = "weak_back";
- }
- property Color metabar_fgcolor {
- des = "Color of text on side bar";
- s1color = "weak_text";
- }
- property Color page_title_color {
- des = "Text color of the page's main title";
- s1color = "page_text_title";
- }
- property Color page_subtitle_color {
- des = "Text color of the page's subtitles";
- s1color = "page_text_em";
- }
- property Color link_color {
- des = "Text color of links";
- s1color = "page_link";
- }
- property Color vlink_color {
- des = "Text color of visited links";
- s1color = "page_vlink";
- }
- property Color alink_color {
- des = "Text color of active links";
- s1color = "page_alink";
- }
- property Color comment_bar_one_bgcolor {
- des = "Alternating background color for comment bars (one)";
- }
- property Color comment_bar_two_fgcolor {
- des = "Text color on alternating comment bars (one)";
- }
- property Color comment_bar_two_bgcolor {
- des = "Alternating background color for comment bars (two)";
- }
- property Color comment_bar_one_fgcolor {
- des = "Text color on alternating comment bars (two)";
- }
- property Color comment_bar_screened_bgcolor {
- des = "Background bar color for screened comments";
- }
- property Color comment_bar_screened_fgcolor {
- des = "Text color on background bar for screened comments";
- }
- }
- set body_bgcolor = "#6666cc";
- set main_bgcolor = "#ffffff";
- set main_fgcolor = "#000000";
- set headerbar_bgcolor = "#c0c0ff";
- set headerbar_fgcolor = "#000000";
- set metabar_bgcolor = "#eeeeff";
- set metabar_fgcolor = "#000000";
- set page_title_color = "#8b1a1a";
- set page_subtitle_color = "#c00000";
- set link_color = "#000050";
- set vlink_color = "#500050";
- set alink_color = "#ff00c0";
- set comment_bar_one_bgcolor = "#c0c0ff";
- set comment_bar_one_fgcolor = "#000000";
- set comment_bar_two_bgcolor = "#eeeeff";
- set comment_bar_two_fgcolor = "#000000";
- set comment_bar_screened_bgcolor = "#dddddd";
- set comment_bar_screened_fgcolor = "#000000";
- set tags_aware = true;
- ### My code (Y. Y.)
- set lang_fmt_time_short = "%%HH%%:%%min%%";
- set lang_fmt_date_long = "%%yyyy%%-%%mm%%-%%dd%%";
- set text_comment_from = "";
- set text_comment_date = "";
- set text_comment_ipaddr = "";
- propgroup ExtraProperties {
- property string main_left_margin {
- des = "Main left margin";
- }
- property int minimal_comment_width {
- des = "Minimal comment width (integer, %)";
- }
- property int comment_half_depth {
- des = "Глубина комментария, на которой его отступ равен половине максимального (integer)";
- }
- property int userpic_scaling_factor_numerator {
- des = "Userpic scaling factor numerator (integer)";
- }
- property int userpic_scaling_factor_denominator {
- des = "Userpic scaling factor denominator (integer)";
- }
- property string image_max_width {
- des = "Maximal image width";
- }
- property string image_max_height {
- des = "Maximal image height";
- }
- property string entry_text_indent {
- des = "Indentation for entry text";
- }
- property string comment_text_indent {
- des = "Indentation for comment text";
- }
- property string global_comments_indent {
- des = "Additional indentation for all comments";
- }
- property string main_area_maximal_width {
- des = "Main area maximal width (e.g. 100%, 800px)";
- }
- property string main_border_css_style {
- des = "Main border css style";
- }
- property string top_margin_Powered_by {
- des = "Top margin of ''Powered by...''";
- }
- property string header_date_format {
- des = "Date format for header";
- }
- }
- set main_left_margin = "30px";
- set minimal_comment_width = 25;
- set comment_half_depth = 35;
- set userpic_scaling_factor_numerator = 1;
- set userpic_scaling_factor_denominator = 1;
- set image_max_width = "100%";
- set image_max_height = "5000px";
- set entry_text_indent = "2px";
- set comment_text_indent = "0px";
- set global_comments_indent = "2px";
- set main_area_maximal_width = "100%";
- set main_border_css_style = "0px solid #c0c0ff";
- set top_margin_Powered_by = "0px";
- set header_date_format = "%%day%%, %%month%% %%dayord%%, %%yyyy%%";
- ## Переопределяем EntryPage::print_comments,
- ## чтобы изменить отступы в дереве комментариев
- function EntryPage::print_comments (Comment[] cs) {
- if (size $cs == 0) { return; }
- foreach var Comment c ($cs) {
- var int indent = (1000000 * (100 - $*minimal_comment_width) * (100 * ($c.depth - 1))) / (100 * ($*comment_half_depth + ($c.depth - 1)));
- var int indent_q = $indent / 1000000;
- var int indent_r = $indent % 1000000;
- if (($indent_r < 1000000) and ($indent_r >= 100000)) {
- "<div id='$c.dom_id' style='margin-left: ${indent_q}.${indent_r}%; margin-top: 5px'>\n";
- }
- if (($indent_r < 100000) and ($indent_r >= 10000)) {
- "<div id='$c.dom_id' style='margin-left: ${indent_q}.0${indent_r}%; margin-top: 5px'>\n";
- }
- if (($indent_r < 10000) and ($indent_r >= 1000)) {
- "<div id='$c.dom_id' style='margin-left: ${indent_q}.00${indent_r}%; margin-top: 5px'>\n";
- }
- if (($indent_r < 1000) and ($indent_r >= 100)) {
- "<div id='$c.dom_id' style='margin-left: ${indent_q}.000${indent_r}%; margin-top: 5px'>\n";
- }
- if (($indent_r < 100) and ($indent_r >= 10)) {
- "<div id='$c.dom_id' style='margin-left: ${indent_q}.0000${indent_r}%; margin-top: 5px'>\n";
- }
- if ($indent_r < 10) {
- "<div id='$c.dom_id' style='margin-left: ${indent_q}.00000${indent_r}%; margin-top: 5px'>\n";
- }
- if ($c.full) {
- $this->print_comment($c);
- } else {
- $this->print_comment_partial($c);
- }
- "</div>";
- $this->print_comments($c.replies);
- }
- }
- propgroup presentation {
- property bool show_entry_userpic {
- des = "Show your userpic with your journal's entries?";
- }
- property use font_base;
- property use font_fallback;
- property use page_recent_items;
- property use page_friends_items;
- property use view_entry_disabled;
- property use use_shared_pic;
- property bool show_entrynav_icons {
- des = "Toggle to show the next, memory, edit, etc icons on the entry view page";
- }
- property string page_background_image {
- des = "URL to an image to be used for the page background";
- }
- property use external_stylesheet;
- }
- set show_entry_userpic = false;
- set font_base = "Arial, Helvetica";
- set font_fallback = "serif";
- set page_recent_items = 20;
- set page_friends_items = 25;
- set view_entry_disabled = false;
- set show_entrynav_icons = true;
- set page_background_image = "";
- propgroup text {
- 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;
- }
- function print_stylesheet ()
- {
- print clean_url($*page_background_image) != "" ? "body { background-image: url($*page_background_image); }" : "";
- var string font;
- if ($*font_base) {
- $font = "\"$*font_base\"";
- if ($*font_fallback != "none") {
- $font = "$font, ";
- }
- }
- if ($*font_fallback != "none") {
- $font = "$font $*font_fallback";
- }
- if ($font != "") {
- """
- body, table, td, th, .page_title, #yearheader {
- font-family: $font;
- }
- """;
- }
- """
- body,.body {
- background-color: $*body_bgcolor;
- color: $*main_fgcolor;
- padding: 0pt;
- cellpadding: 5pt;
- }
- a, a:link {
- color: $*link_color;
- }
- a:vlink {
- color: $*vlink_color;
- }
- a:alink {
- color: $*alink_color;
- }
- a:visited {
- color: $*vlink_color;
- }
- a:active {
- color: $*alink_color;
- }
- table.main {
- background-color: $*main_bgcolor;
- color: $*main_fgcolor;
- max-width: $*main_area_maximal_width;
- border: $*main_border_css_style;
- padding: 2px;
- width: 100%;
- }
- .borderless {
- overflow: hidden;
- ### border: 0!important;
- ### padding: 0!important;
- border: 0;
- padding: 0;
- }
- table.bigtable {
- width: 100%;
- ### border: 0!important;
- border: 0;
- margin-top: 5px;
- margin-bottom: 5px;
- }
- table.bigtablesmall {
- width: 100%;
- ### border: 0!important;
- border: 0;
- }
- .CommentText {
- margin-left: $*comment_text_indent;
- }
- .CommentText img {
- max-width: $*image_max_width;
- max-height: $*image_max_height;
- }
- .entry_content {
- margin-left: $*entry_text_indent;
- }
- .entry_content img {
- max-width: $*image_max_width;
- max-height: $*image_max_height;
- }
- .top_margin_row_Powered_by {
- height: $*top_margin_Powered_by;
- }
- .page_title {
- color: $*page_title_color;
- font-size: x-large;
- font-family: sans-serif;
- }
- .view_links {
- font-family: monospace;
- white-space: nowrap;
- font-size: medium;
- }
- .view_links2 {
- font-family: monospace;
- font-size: medium;
- }
- th.headerbar {
- background-color: $*headerbar_bgcolor;
- color: $*headerbar_fgcolor;
- font-weight: bold;
- font-size: large;
- text-align: left;
- font-family: sans-serif;
- width: 100%;
- }
- th.smallheaderbar {
- background-color: $*headerbar_bgcolor;
- color: $*headerbar_fgcolor;
- font-weight: bold;
- font-size: large;
- text-align: left;
- font-family: sans-serif;
- }
- td.metabar {
- text-align: center;
- white-space: nowrap;
- width: 1%;
- background-color: $*metabar_bgcolor;
- color: $*metabar_fgcolor;
- }
- .subject {
- color: $*page_subtitle_color;
- font-weight: bold;
- font-family: sans-serif;
- font-style: italic;
- }
- .comments {
- text-align: right;
- font-size: small;
- }
- #yearheader {
- color: $*page_subtitle_color;
- font-weight: bold;
- font-style: italic;
- font-size: large;
- }
- th.monthheader {
- background-color: $*headerbar_bgcolor;
- font-size: large;
- }
- th.daysheader {
- background-color: $*metabar_bgcolor;
- font-weight: normal;
- }
- td.weekday_empty {
- background-color: $*metabar_bgcolor;
- }
- .day_id {
- font-weight: bold;
- font-size: small;
- }
- #archiveyearpage_nav {
- font-size: large;
- font-weight: bold;
- }
- """;
- }
- function Page::lay_nav_blurb() { }
- function Page::lay_primary_userpic() : Image {
- return $.journal.default_pic;
- }
- function EntryPage::lay_primary_userpic() : Image {
- return $.entry.userpic;
- }
- function Page::print_linklist() {
- if (size $.linklist <= 0) {
- return;
- }
- var bool section_open = false;
- println "<span class='view_links2'>";
- foreach var UserLink l ($.linklist) {
- if ($l.title) {
- if ($l.is_heading) {
- if ($section_open) {
- println "<br />";
- }
- println """<span style="font-weight: bold;">$l.title</span> """;
- $section_open = true;
- } else {
- println """[<a href="$l.url">$l.title</a>]""";
- }
- }
- }
- if ($section_open) {
- println "</span><br /><br />";
- }
- println "";
- }
- function Page::print ()
- {
- var string title = $this->title();
- var string userpic;
- var Image default_userpic = $this->lay_primary_userpic();
- if (defined $default_userpic)
- {
- var int w = $default_userpic.width;
- var int h = $default_userpic.height;
- $w = $w * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
- $h = $h * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
- $userpic = "<img class='ljr_userpic' align='right' style='padding: 0;' src='$default_userpic.url' "+
- "width='$w' height='$h' alt='' />";
- }
- var string website_name = $.journal.website_name ? $.journal.website_name : $*text_website_default_name;
- var string website = $.journal.website_url ?
- """<td><a href="$.journal.website_url">$website_name</a></td><td class="body"> </td>""" :
- "";
- var string links;
- foreach var string v ($.views_order) {
- $links = $links + ($.view == $v ?
- "["+lang_viewname($v)+"]" :
- "[<a href='$.view_url{$v}'>"+lang_viewname($v)+"</a>]");
- }
- """
- <html>
- <head>
- """;
- if ($*external_stylesheet) {
- println """<link rel="stylesheet" href="$.stylesheet_url" type="text/css" />""";
- } else {
- println """<style type="text/css">"""; print_stylesheet(); "</style>";
- }
- $this->print_head();
- """
- <title>$title</title>
- </head>
- <body>
- <div align="center">
- <table class="main">
- <tr>
- <td class='borderless' colspan='3'>
- </td>
- </tr>
- <tr>
- <td class='borderless' colspan='3'>
- <table class='bigtablesmall'>
- <tr>
- <td class='borderless' style='width: 0; font-size: 0;'>
- </td>
- <td class='borderless'>
- $userpic
- <span class="page_title">$title</span>
- <font size="1"><br /><br /></font>
- <span class="view_links">$links</span>
- """;
- if (size $.linklist > 0 and $*linklist_support) {
- "<br />";
- $this->print_linklist();
- }
- $this->lay_nav_blurb();
- ### "<td class='borderless' style='width: 0!important; font-size: 0!important;'>";
- "<td class='borderless' style='width: 0; font-size: 0;'>";
- "</td>";
- "</td>";
- "</tr>";
- "</table>";
- "</td>";
- "</tr>";
- "<tr>";
- "<td class='borderless' colspan='3'>";
- "</td>";
- "</tr>";
- "<tr>";
- ### "<td class='borderless' style='width: $*main_left_margin; font-size: 0!important;'>";
- "<td class='borderless' style='width: $*main_left_margin; font-size: 0;'>";
- "</td>";
- "<td class='borderless'>";
- $this->print_body();
- "</td>";
- ### "<td class='borderless' style='width: 0!important; font-size: 0!important;'>";
- "<td class='borderless' style='width: 0; font-size: 0;'>";
- "</td>";
- "</tr>";
- "<tr>";
- "<td class='borderless' colspan='3'>";
- "</td>";
- "</tr>";
- "</table>\n";
- ### Affliations
- "<table cellspacing='0' style='max-width: $*main_area_maximal_width; background-color: $*body_bgcolor; white-space: nowrap;'>";
- "<tr class='top_margin_row_Powered_by'>";
- "</tr>";
- "<tr>";
- "<td width='100%'>";
- "</td>";
- print $website;
- "<td style='background-color: $*main_bgcolor; border: $*main_border_css_style;'>";
- server_sig();
- "</td>";
- "</tr>";
- "</table>\n";
- "</div>\n</body>\n</html>";
- }
- function print_entry (Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text)
- {
- var string time = $e.time->time_format();
- var string userpic = "";
- if (defined $e.userpic)
- {
- var int w = $e.userpic.width;
- var int h = $e.userpic.height;
- $w = $w * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
- $h = $h * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
- $userpic = "<img class='ljr_userpic' src='$e.userpic.url' alt='[User Picture]' height='$h' width='$w' />";
- }
- if ($e.new_day or $p.view == "entry")
- {
- "<tr><th colspan='2' align='left' class='headerbar'>";
- ### print $e.time->date_format("%%day%%, %%month%% %%dayord%%, %%yyyy%%");
- print $e.time->date_format($*header_date_format);
- "</th></tr>\n";
- } elseif ($p.view == "day") {
- "<tr><th class='smallheaderbar'>Time</td><td class='headerbar' style='width: 100%'>Event</th></tr>";
- }
- "<tr valign='top'>";
- # Metabar
- "<td rowspan='2' style='background-color: $bgcolor' class='metabar'>";
- # Time
- "<em style='font-family: sans-serif; font-size: small'>$time</em><br />";
- # Altposter crap
- if ($p.view == "friends")
- {
- "<strong><a style='color: $fgcolor' href='" + $e.journal->base_url() + "/'>";
- print $e.journal.username;
- "</a></strong><br />";
- }
- if ($e.journal.username != $e.poster.username)
- {
- "[<a href='" + $e.poster->base_url() + "/'>";
- print $e.poster.username;
- "</a>]<br />";
- }
- if ($userpic != "" and ($p.view == "friends" or $*show_entry_userpic == true))
- {
- print $userpic;
- }
- # Security icon
- if ($e.security) { print "<br />" + $e.security_icon; }
- # Permalink
- "<p style='font-size: small'>[<a href='$e.permalink_url'>$*text_permalink</a>]</p>";
- "</td>";
- # Entry
- "<td style='text-align:left; width:100%;'>";
- "<div class='entry_content'>";
- if ($p.view == "entry" and $*show_entrynav_icons)
- {
- print "<div style='text-align: center'>";
- $e->print_linkbar();
- print "</div>";
- }
- if ($e.subject) { "\n\n<span class='subject'>$e.subject</span><br />"; }
- if (not $hide_text) {
- print $e.text; "\n\n";
- if (size $e.metadata or size $e.tags)
- {
- "<p>";
- foreach var string k ($e.metadata)
- {
- var string key = $k;
- var string val = $e.metadata{$k};
- if ($k == "mood") { $key = $*text_meta_mood; }
- if ($k == "music") { $key = $*text_meta_music; }
- if ($k == "mood" and defined $e.mood_icon)
- {
- var Image i = $e.mood_icon;
- $val = "<img src='$i.url' width='$i.width' height='$i.height' alt='' /> $val";
- }
- "<strong>$key:</strong> $val<br />";
- }
- if ($e.tags) {
- var int tcount = 0;
- "<strong>Tags:</strong> ";
- foreach var Tag t ($e.tags) {
- """<a rel="tag" href="$t.url">$t.name</a>""";
- $tcount++;
- if ($tcount != size $e.tags) { ", "; }
- }
- "<br />";
- }
- "</p>";
- }
- }
- if ($hide_text) {
- print "<div style='font-family: monospace;'>";
- print "[Текст записи пропущен. Вы находитесь в режиме детального просмотра дерева комментариев.]";
- print "</div>";
- }
- "</div>";
- "</td>";
- "</tr>";
- "<tr valign='bottom'>";
- "<td>";
- ### $e.comments->print();
- ### if (not $e.comments.enabled) { return; }
- "<p class='comments'>(";
- if ($e.comments.count > 0 or $e.comments.screened) {
- $e.comments->print_readlink();
- " | ";
- }
- $e.comments->print_postlink();
- print " | <a href=" + $e.permalink_url +"?uncollapse&style>Uncollapse</a>";
- ")</p>";
- "</td>";
- "</tr>\n";
- }
- function Page::print_entry (Entry e)
- {
- print_entry($this, $e, $*metabar_bgcolor, $*metabar_fgcolor, false);
- }
- function FriendsPage::print_entry (Entry e)
- {
- var Friend f = $.friends{$e.journal.username};
- print_entry($this, $e, $f.bgcolor, $f.fgcolor, false);
- }
- function RecentPage::lay_nav_blurb ()
- {
- var string user = "<a href='$.base_url/info'>$.journal.name</a>";
- if ($.nav.skip > 0)
- {
- "<p>Below are $.nav.count entries, after skipping $.nav.skip most recent ones in the \"$user\" journal:</p>";
- } else {
- "<p>Below are the $.nav.count most recent journal entries recorded in the \"$user\" journal:</p>";
- }
- }
- function RecentPage::print_body ()
- {
- var string nav = "";
- if ($.nav.forward_url != "" or $.nav.backward_url != "")
- {
- if ($.nav.backward_url != "")
- {
- $nav = "<a href='$.nav.backward_url'><< Previous $.nav.backward_count entries</a>";
- }
- if ($.nav.backward_url != "" and $.nav.forward_url != "")
- {
- $nav = "$nav --";
- }
- if ($.nav.forward_url != "")
- {
- $nav = "$nav <a href='$.nav.forward_url'>Next $.nav.forward_count entries >></a>";
- }
- $nav = "<p align='center'>[$nav]</p>";
- }
- if ($nav != "") { print $nav; }
- "<table class='bigtable'>\n";
- foreach var Entry e ($.entries) { $this->print_entry($e); }
- "</table>\n";
- if ($nav != "") { print $nav; }
- }
- function FriendsPage::lay_nav_blurb ()
- {
- var int total = size $.entries;
- if ($.nav.skip > 0)
- {
- "<p>Below are $total friends entries, after skipping $.nav.skip most recent ones:</p>";
- } else {
- "<p>Below are the $total most recent friends journal entries:</p>";
- }
- }
- function CommentInfo::print ()
- {
- if (not $.enabled) { return; }
- "<p class='comments'>(";
- if ($.count > 0 or $.screened) {
- $this->print_readlink();
- " | ";
- }
- $this->print_postlink();
- ")</p>";
- }
- function YearPage::lay_nav_blurb()
- {
- "<p id='yearpage_nav'>";
- $this->print_year_links();
- "</p>";
- }
- function YearPage::print_body
- {
- "<p id='yearheader'>$.year…</p>\n";
- foreach var YearMonth m ($.months) {
- $this->print_month($m);
- }
- }
- function YearPage::print_year_links ()
- {
- foreach var YearYear y ($.years) {
- if ($y.displayed) {
- "[ $y.year ]";
- } else {
- "[ <a href=\"$y.url\">$y.year</a> ]";
- }
- }
- }
- function YearPage::print_month(YearMonth m)
- {
- if (not $m.has_entries) { return; }
- # Table Wrapper
- "<center><p><table border='1' cellpadding='4' width='80%'>\n";
- # Month Header
- "<tr align='center'><th colspan='7' class='monthheader'>\n";
- print $m->month_format();
- "</th></tr>\n";
- # Weekdays Header
- "<tr align='center'>\n";
- foreach var int d (weekdays()) {
- "<th class='daysheader'>"+$*lang_dayname_short[$d]+"</th>\n";
- }
- "</tr>\n";
- # Weeks
- foreach var YearWeek w ($m.weeks) {
- $w->print();
- }
- # Footer
- "<tr><td colspan='7'><div style='text-align: center'><a href='$m.url'>$*text_view_month</a></div></td></tr>\n";
- # End Table
- "</table></p></center>\n";
- }
- function YearWeek::print ()
- {
- "<tr>";
- if ($.pre_empty) { "<td colspan='$.pre_empty' class='weekday_empty'> </td>"; }
- foreach var YearDay d ($.days) {
- "<td valign='top'><span class='day_id'>$d.day</span><div style='text-align: center'>";
- if ($d.num_entries) {
- "<a href='$d.url'>$d.num_entries</a>";
- } else {
- " ";
- }
- "</div></td>\n";
- }
- if ($.post_empty) { "<td colspan='$.post_empty' class='weekday_empty'> </td>"; }
- "</tr>";
- }
- function DayPage::print_body ()
- {
- "<h2 class='daypage_header'>"; print $.date->date_format("%%month%% %%dayord%%, %%yyyy%%"); "</h2>";
- if (not $.has_entries)
- {
- "<blockquote><em>"; print ehtml($*text_noentries_day); "</em></blockquote>";
- } else {
- "<table class='bigtable'>";
- foreach var Entry e ($.entries) { $this->print_entry($e); }
- "</table>";
- }
- var string tprev = ehtml($*text_day_prev);
- var string tnext = ehtml($*text_day_next);
- "<table align='center'><tr align='middle'>\n";
- "<td width='33%' align='left'><a href='$.prev_url'>$tprev</a></td>\n";
- "<td align='center' width='33%'>";
- "<strong>"; print $.date->date_format("%%yyyy%%/%%mm%%/%%dd%%"); "</strong><br />";
- "[<a href='"; print $this.journal->base_url(); "/calendar'>$*text_view_archive</a>]</td>\n";
- "<td width='33%' align='right'><a href='$.next_url'>$tnext</a></td>\n";
- "</tr></table>";
- }
- 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", ],
- ]);
- "<table class='bigtable'>\n";
- print_entry($this, $.entry, $*metabar_bgcolor, $*metabar_fgcolor, $.viewing_thread);
- if ($.entry.comments.enabled and $.comment_pages.total_subitems > 0)
- {
- $this->print_multiform_start();
- "<tr valign='top'><th class='headerbar' colspan='2'>Comments</th></tr>";
- "<tr valign='top'>";
- "<td style='background-color: $*metabar_bgcolor' class='metabar'> </td>";
- "<td style='width: 100%'>";
- "<div style='margin-left: $*global_comments_indent;'>";
- if ($.comment_pages.total_subitems > 0) {
- $.comment_pages->print();
- $this->print_comments($.comments);
- $.comment_pages->print();
- }
- "</div>";
- "</td></tr>";
- if ($this.multiform_on) {
- "<tr valign='top'><th class='headerbar' colspan='2'>Mass Action</th></tr>";
- "<tr valign='top'>";
- "<td style='background-color: $*metabar_bgcolor' class='metabar'> </td>";
- "<td style='width: 100%' colspan='2'>";
- $this->print_multiform_actionline();
- $this->print_multiform_end();
- "</td></tr>";
- }
- }
- "</table>\n";
- }
- 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() : "<i>(Anonymous)</i>";
- var string sub_icon;
- if (defined $c.subject_icon) {
- $sub_icon = $c.subject_icon->as_string();
- }
- "<a name='$c.anchor'></a><div id='cmtbar$c.talkid' style='background-color: $background; color: $color; margin-top: 10px; width: 100%'>";
- "<table cellpadding='2' cellspacing='0' summary='0' style='width: 100%'><tr valign='top'>";
- if (defined $c.userpic and $*comment_userpic_style != "off") {
- var int w = $c.userpic.width;
- var int h = $c.userpic.height;
- # WARNING: this will later be done by the system (it'll be a
- # constructional property), so don't copy this hack into your
- # layout layers or you'll be messed up later.
- $w = $w * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
- $h = $h * $*userpic_scaling_factor_numerator / $*userpic_scaling_factor_denominator;
- print "<td style='width: 102px'><img class='ljr_userpic' src='$c.userpic.url' width='$w' height='$h' alt='[User Picture]' /></td>";
- }
- "<td style='width: 100%'><table style='width: 100%'><tr>";
- ### From, date, etc
- "<td align='left' style='width: 70%'>";
- print "<table cellpadding='2' cellspacing='0'>";
- print "<tr><td>$poster</td></tr>\n";
- ### print "<tr><td style='white-space: nowrap; font-size: small'>";
- print "<tr><td style='font-size: small'>";
- print $c.time->date_format("long") + " " + $c.time->time_format() + " " + "(<a href='$c.permalink_url'>Link</a>)" + "</td></tr>";
- if ($c.metadata{"poster_ip"}) { print "<tr><td>(" + $c.metadata{"poster_ip"} + ")</td></tr>"; }
- "</table></td>";
- ### Gadgets
- "<td align='right' style='width: 50%'>";
- if ($this.multiform_on) {
- " <label for='ljcomsel_$c.talkid'>$*text_multiform_check</label>";
- $c->print_multiform_check();
- }
- $c->print_linkbar();
- "</td></tr>";
- # ### Subject / icon
- # print "<tr valign='top'><td style='width: 50%'>";
- # print (defined $c.subject_icon or $c.subject != "") ? "<div style='font-size: smaller; font-weight: bold'>$c.subject_icon $c.subject</div>" : "";
- # print "</td>";
- print "</table></td></tr></table></div>";
- print "<div class='CommentText'>";
- print (defined $c.subject_icon or $c.subject != "") ? "<div class='subject'>$c.subject_icon $c.subject</div>" : "";
- print "$c.text";
- print "</div>";
- print "<div style='margin-top: 3px; font-size: small'>";
- if ($c.frozen) {
- print "(Replies frozen) ";
- } else {
- print "(<a href='$c.reply_url'>Reply to this</a>) ";
- }
- if ($c.parent_url != "") { "(<a href='$c.parent_url'>Parent</a>) "; }
- if ($c.thread_url != "") { "(<a href='$c.thread_url'>Thread</a>) "; }
- "</div>";
- }
- function ReplyPage::print_body()
- {
- "<table class='bigtable'>\n";
- if (not $.entry.comments.enabled) {
- print "<tr><th class='headerbar'>$*text_reply_nocomments_header</th></tr><tr><td>$*text_reply_nocomments</td></tr></table>";
- return;
- }
- var string time = $.replyto.time->time_format();
- var string userpic = "";
- if (defined $.replyto.userpic)
- {
- $userpic = "<img class='ljr_userpic' src='$.replyto.userpic.url' />";
- }
- ### "<tr><th class='headerbar'>Time</td><th class='headerbar' style='width: 100%'>Text</th></tr>";
- "<tr><th class='smallheaderbar'>Time</th><th class='headerbar' style='width: 100%'>Text</th></tr>";
- ### "<tr><th class='headerbar' colspan='2'>Comment</th></tr>";
- "<tr valign='top'>";
- # Metabar
- "<td style='background-color: $*metabar_bgcolor;' class='metabar'>";
- # Time
- ### "<em>$time</em><br />";
- "<em style='font-family: sans-serif; font-size: small;'>$time</em><br />";
- if ($userpic)
- {
- print $userpic + "<br />\n";
- }
- print defined $.replyto.poster ? $.replyto.poster->as_string() : "<i>(Anonymous)</i>";
- # Permalink
- "<p style='font-size: small'>[<a href='$.replyto.permalink_url'>$*text_permalink</a>]</p>";
- "</td>";
- # Text
- "<td style='text-align:left; width:100%;'>";
- "<div class='entry_content'>";
- if ($.replyto.subject != "") { "\n\n<span class='subject'>$.replyto.subject</span><br />"; }
- print $.replyto.text; "\n\n";
- "</div>";
- "</td></tr>\n";
- "<div align='center'><a href='$.entry.comments.read_url'>( Read Comments )</a></div>";
- "<tr valign='top'><th class='headerbar' colspan='2'>Reply:</th></tr>";
- "<tr valing='top'>";
- "<td style='background-color: $*metabar_bgcolor'>";
- " ";
- "</td>";
- "<td>";
- $.form->print();
- "</td>";
- "</tr></table>";
- }
- function print_theme_preview ()
- {
- """
- <style type="text/css">
- a.previewlink, a.previewlink:link {
- color: #000050;
- }
- a.previewlink:vlink {
- color: #500050;
- }
- a.previewlink:alink {
- color: #ff00c0;
- }
- a.previewlink:visited {
- color: #500050;
- }
- a.previewlink:active {
- color: #ff00c0;
- }
- table.bigtable {
- width: 100%;
- border: 0;
- margin-top: 5px;
- margin-bottom: 5px;
- }
- table.bigtablesmall {
- width: 100%;
- border: 0;
- }
- .entry_content {
- margin-left: 2px;
- }
- .entry_content img {
- max-width: 100%;
- max-height: 5000px;
- }
- .page_title {
- color: #8b1a1a;
- font-size: x-large;
- font-family: sans-serif;
- }
- .view_links {
- font-family: monospace;
- white-space: nowrap;
- font-size: medium;
- }
- .view_links2 {
- font-family: monospace;
- font-size: medium;
- }
- th.headerbar {
- background-color: #c0c0ff;
- color: #000000;
- font-weight: bold;
- font-size: large;
- text-align: left;
- font-family: sans-serif;
- width: 100%;
- }
- th.smallheaderbar {
- background-color: #c0c0ff;
- color: #000000;
- font-weight: bold;
- font-size: large;
- text-align: left;
- font-family: sans-serif;
- }
- td.metabar {
- text-align: center;
- white-space: nowrap;
- width: 1%;
- background-color: #eeeeff;
- color: #000000;
- }
- .subject {
- color: #c00000;
- font-weight: bold;
- font-family: sans-serif;
- font-style: italic;
- }
- #yearheader {
- color: #c00000;
- font-weight: bold;
- font-style: italic;
- font-size: large;
- }
- th.monthheader {
- background-color: #c0c0ff;
- font-size: large;
- }
- th.daysheader {
- background-color: #eeeeff;
- font-weight: normal;
- }
- td.weekday_empty {
- background-color: #eeeeff;
- }
- .day_id {
- font-weight: bold;
- font-size: small;
- }
- </style>
- <table style="background-color: #6666cc" width="100%"><tbody><tr><td>
- <table style="background-color: #ffffff; color: #000000; max-width: 100%; border: 0px solid #c0c0ff; padding: 2px; width: 100%;">
- <tr>
- <td class="borderless" colspan="3">
- </td>
- </tr>
- <tr>
- <td class="borderless" colspan="3">
- <table class="bigtablesmall">
- <tr>
- <td class="borderless" style="width: 0; font-size: 0;">
- </td>
- <td class="borderless">
- <img class="ljr_userpic" align="right" style="padding: 0;" src="" width="100" height="100" alt="" />
- <span class="page_title">John Doe</span>
- <font size="1"><br /><br /></font>
- <span class="view_links">[Recent Entries][<a class="previewlink" href="">Archive</a>][<a class="previewlink" href="">Friends</a>][<a class="previewlink" href="">User Info</a>]</span>
- <br /><span class="view_links2">
- [<a class="previewlink" href="">Link 1</a>]
- [<a class="previewlink" href="">Link 2</a>]
- [<a class="previewlink" href="">Link 3</a>]
- [<a class="previewlink" href="">Link 4</a>]
- [<a class="previewlink" href="">Link 5</a>]
- [<a class="previewlink" href="">Link 6</a>]
- [<a class="previewlink" href="">Link 7</a>]
- [<a class="previewlink" href="">Link 8</a>]
- <p>Below are the 20 most recent journal entries recorded in the "<a class="previewlink" href="">John Doe</a>" journal:</p>
- <td class="borderless" style="width: 0; font-size: 0;">
- </td>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td class="borderless" colspan="3">
- </td>
- </tr>
- <tr>
- <td class="borderless" style="width: 30px; font-size: 0;">
- </td>
- <td class="borderless">
- <p align="center">[<a class="previewlink" href=""><< Previous 20 entries</a>]</p>
- <table class="bigtable">
- <tr>
- <th colspan="2" align="left" class="headerbar">Friday, November 15th, 2002</th>
- </tr>
- <tr valign="top">
- <td rowspan="2" style="background-color: #e5e4e2" class="metabar">
- <em style="font-family: sans-serif; font-size: small">22:21</em>
- <br />
- <p style="font-size: small">[<a class="previewlink" href="">Link</a>]</p>
- </td>
- <td style="text-align:left; width:100%;">
- <div class="entry_content">
- <span class="subject">Neque porro quisquam est…</span>
- <br />
- 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 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
- </div>
- </td>
- </tr>
- <tr valign="bottom">
- <td>
- <p style="text-align: right; font-size: small;">(<a class="previewlink" href="">10 comments</a> | <a class="previewlink" href="">Leave a comment</a>)</p>
- </td>
- </tr>
- </table>
- </td>
- <td class="borderless" style="width: 0px; font-size: 0;">
- </td>
- </tr>
- </table>
- </td></tr></tbody></table>
- """;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement