Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- layerinfo "type" = "layout";
- layerinfo "name" = "";
- # -*-s2-*-
- layerinfo type = "layout";
- layerinfo name = "Generator";
- layerinfo redist_uniq = "generator/layout";
- layerinfo previews = "generator/generator.jpg";
- layerinfo des = "Centered boxes, perfectly aligned.";
- propgroup presentation {
- property int box_width {
- des = "Content area width in pixels";
- }
- property string box_alignment {
- des = "Alignment of the content area";
- values = "left|Left|center|Center|right|Right";
- }
- property string box_margin {
- des = "Margin size on either the left or right side of the content area";
- note = "A left alignment means this value will change the left margin. A right alignment means this value will change the right margin. A center alignment means this value will have no effect. Don't forget to include units; e.g. px, %";
- }
- property string box_top_margin {
- des = "Margin size on the top of the content area";
- note = "You can use this to shift your journal contents down in order to display a background image at the top of your journal. Don't forget to include units; e.g. px, %";
- }
- property string entryborder_size {
- des = "Size of borders around all boxes";
- note = "Don't forget to include the units, e.g. px";
- }
- property string entryborder_style {
- des = "Style of borders around all boxes";
- values = "solid|Solid|dashed|Dashed|dotted|Dotted|double|Double|hidden|Invisible";
- }
- property bool show_header {
- des = "Show the top box's header bar";
- }
- property bool show_header_title {
- des = "Show the title in the top box's header bar";
- note = "The header bar must be enabled in order for this to have an effect.";
- }
- property bool show_header_links {
- des = "Show the navigation links in the top box's header bar";
- note = "The header bar must be enabled in order for this to have an effect.";
- }
- property bool transparent {
- des = "Make journal content transparent instead of using given background colors";
- }
- property use page_recent_items;
- property use page_friends_items;
- property use view_entry_disabled;
- property use use_shared_pic;
- property use comment_userpic_style;
- property bool show_entrynav_icons {
- des = "Toggle to show the next, memory, edit, etc icons on the entry view page";
- }
- property use external_stylesheet;
- property use linklist_support;
- property string counter_code {
- des = "If you have an external web counter, you can enter the HTML for it here";
- note = "Your counter will appear in between the title and navigation links in the box at the top of your journal.";
- maxlength = 2000;
- string_mode = "html-oneline";
- }
- property use custom_control_strip_colors;
- }
- propgroup colors {
- property Color entry_back {
- des = "Entry background";
- s1color = "page_back";
- }
- property Color entry_text {
- des = "Entry text color";
- s1color = "page_text";
- }
- property Color border_color {
- des = "Color of borders around all boxes";
- note = "If you don't set a border size and style in the \"Presentation\" section, this won't have any effect.";
- }
- property Color page_link {
- des = "Link color";
- s1color = "page_link";
- }
- property Color page_vlink {
- des = "Visited link color";
- s1color = "page_vlink";
- }
- property Color page_alink {
- des = "Active link color";
- s1color = "page_alink";
- }
- property Color page_back {
- des = "Page background color (and around userpics)";
- s1color = "strong_back";
- }
- property Color stronger_back {
- des = "Background color for the bar above entries";
- s1color = "strong_back";
- }
- property Color stronger_text {
- des = "Text color for the bar above entries";
- s1color = "stronger_text";
- }
- property Color weak_back {
- des = "Background color for the bar below entries";
- s1color = "weak_back";
- }
- property Color weak_text {
- des = "Text color for the bar below entries";
- s1color = "weak_text";
- }
- 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";
- }
- property use control_strip_bgcolor;
- property use control_strip_fgcolor;
- property use control_strip_bordercolor;
- property use control_strip_linkcolor;
- }
- propgroup fonts {
- property use font_base;
- property use font_fallback;
- }
- propgroup images {
- property string page_background_image {
- des = "Background image URL";
- }
- 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";
- }
- property string page_background_position {
- des = "Background image position";
- note = "Does not apply if Background Image Repeat is set to 'Repeat'.";
- values = "top|Top|top left|Top-left|top right|Top-right|center|Center|center left|Center-left|center right|Center-right|bottom|Bottom|bottom left|Bottom-left|bottom right|Bottom-right|left|Left|right|Right";
- }
- 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";
- }
- property string img_btwn_comments {
- des = "URL to an image to be used between your comment links";
- note = "If you specify an image to use, it will replace any text between the comment links.";
- }
- }
- propgroup text {
- property string text_journal_title {
- des = "The title of your journal, which appears in the box at the top of your journal above the navigation links";
- note = "If set to '[[name]]', the title will be replaced with the name you specified at the Edit Profile page.";
- }
- property string text_website {
- des = "The label for the 'website' link under the title in the box at the top of your journal";
- note = "Make this box empty if you don't want to show this link.";
- }
- property string text_userinfo_label {
- des = "The label for the 'userinfo' link under the title in the box at the top of your journal";
- note = "Make this box empty if you don't want to show this link.";
- }
- property string text_userinfo_value {
- des = "The value of the 'userinfo' link";
- }
- property string text_archive_label {
- des = "The label for the 'archive' link under the title in the box at the top of your journal";
- note = "Make this box empty if you don't want to show this link.";
- }
- property string text_archive_value {
- des = "The value of the 'archive' link";
- }
- property string text_other1_label {
- des = "The label for a custom link in the box at the top of your journal";
- note = "Make this box empty if you don't want to show this link.";
- }
- property string text_other1_value {
- des = "The value of the custom link";
- }
- property string text_other1_url {
- des = "The URL of the custom link";
- }
- property string text_other2_label {
- des = "The label for a second custom link in the box at the top of your journal";
- note = "Make this box empty if you don't want to show this link.";
- }
- property string text_other2_value {
- des = "The value of the second custom link";
- }
- property string text_other2_url {
- des = "The URL of the custom link";
- }
- property string text_other3_label {
- des = "The label for a third custom link in the box at the top of your journal";
- note = "Make this box empty if you don't want to show this link.";
- }
- property string text_other3_value {
- des = "The value of the third custom link";
- }
- property string text_other3_url {
- des = "The URL of the custom link";
- }
- property string text_navlinks_left {
- des = "Text to go in front of each navigation link in the box at the top of your journal";
- }
- property string text_navlinks_btwn {
- des = "Text to go in between the label and value of each navigation link in the box at the top of your journal";
- }
- property string text_navlinks_right {
- des = "Text to go at the end of each navigation link in the box at the top of your journal";
- }
- 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_meta_music;
- property use text_meta_mood;
- property use text_meta_location;
- property use text_meta_groups;
- property string text_left_comments {
- des = "Text to be used in front of your comment links";
- }
- property string text_btwn_comments {
- des = "Text to be used between your comment links";
- note = "If you specified an image to be used between your comments links in the \"Images\" section, then this option will not have any effect.";
- }
- property string text_right_comments {
- des = "Text to be used at the end of your comment links";
- }
- property string date_format {
- des = "Date format for entries";
- }
- property string time_format {
- des = "Time format for entries";
- }
- property string btwn_datetime {
- des = "Text to be used between the date and time for entries";
- }
- property string datetime_comments_format {
- des = "Date and time format for comments";
- }
- property string date_daypage_format {
- des = "Date format for the day page";
- }
- }
- propgroup customcss {
- property use include_default_stylesheet;
- property use linked_stylesheet;
- property use custom_css;
- }
- # Set default colors
- set entry_back = "#ffffff";
- set entry_text = "#000000";
- set border_color = "#000000";
- set page_link = "#0000ff";
- set page_vlink = "#0000ff";
- set page_alink = "#00ffff";
- set page_back = "#2d4f89";
- set stronger_back = "#000000";
- set stronger_text = "#ffffff";
- set weak_back = "#aaaaaa";
- set weak_text = "#000000";
- set comment_bar_one_bgcolor = "#aaaaaa";
- set comment_bar_one_fgcolor = "#000000";
- set comment_bar_two_bgcolor = "#dddddd";
- set comment_bar_two_fgcolor = "#000000";
- set comment_bar_screened_bgcolor = "#5f6f99";
- set comment_bar_screened_fgcolor = "#000000";
- set box_width = 600;
- set box_alignment = "center";
- set box_margin = "0";
- set box_top_margin = "0";
- set entryborder_size = "";
- set entryborder_style = "hidden";
- set show_header = true;
- set show_header_title = true;
- set show_header_links = true;
- set transparent = false;
- set counter_code = "";
- set show_entrynav_icons = true;
- set page_background_image = "";
- set img_btwn_comments = "";
- set font_base = "Verdana";
- set font_fallback = "sans-serif";
- set text_journal_title = "[[name]]";
- set text_website = "website";
- set text_userinfo_label = "userinfo";
- set text_userinfo_value = "livejournal userinfo";
- set text_archive_label = "archive";
- set text_archive_value = "journal archive";
- set text_other1_label = "";
- set text_other1_value = "";
- set text_other1_url = "";
- set text_other2_label = "";
- set text_other2_value = "";
- set text_other2_url = "";
- set text_other3_label = "";
- set text_other3_value = "";
- set text_other3_url = "";
- set text_navlinks_left = "[";
- set text_navlinks_btwn = "|";
- set text_navlinks_right = "]";
- # Customize the view names to be short and lowercase
- # (Sorry translators, you will have to do these again - keep them short!)
- set text_view_recent = "entries";
- set text_view_friends = "friends";
- set text_view_archive = "archive";
- set text_view_userinfo = "userinfo";
- set text_left_comments = "";
- set text_btwn_comments = "|";
- set text_right_comments = "";
- set date_format = "%%mon%%. %%dayord%%, %%yyyy%%";
- set time_format = "%%hh%%:%%min%% %%a%%m";
- set btwn_datetime = "|";
- set datetime_comments_format = "%%yyyy%%-%%mm%%-%%dd%% %%hh%%:%%min%% %%a%%m";
- set date_daypage_format = "%%month%% %%dayord%%, %%yyyy%%";
- set tags_aware = true;
- function prop_init () {
- if ($*control_strip_bgcolor.as_string == "") {
- $*control_strip_bgcolor = $*entry_back;
- }
- if ($*control_strip_fgcolor.as_string == "") {
- $*control_strip_fgcolor = $*entry_text;
- }
- if ($*control_strip_bordercolor.as_string == "") {
- $*control_strip_bordercolor = $*border_color;
- }
- if ($*control_strip_linkcolor.as_string == "") {
- $*control_strip_linkcolor = $*page_link;
- }
- $*theme_bgcolor = $*entry_back;
- $*theme_fgcolor = $*entry_text;
- $*theme_bordercolor = $*stronger_back;
- $*theme_linkcolor = $*page_link;
- }
- function print_stylesheet () {
- if(clean_url($*page_background_image) != "" and viewer_sees_control_strip() and $*page_background_scrolling=="scroll") {
- var string page_background_position_display = $*page_background_position;
- if ($*page_background_position == "top") {
- $page_background_position_display = "center 45px";
- }
- elseif ($*page_background_position == "top left") {
- $page_background_position_display = "0 45px";
- }
- elseif ($*page_background_position == "top right") {
- $page_background_position_display = "100% 45px";
- }
- """body {
- background-image: url("$*page_background_image");
- background-position: $page_background_position_display;
- background-repeat: $*page_background_repeat;
- background-attachment: $*page_background_scrolling;
- }""";
- }
- elseif(clean_url($*page_background_image) != "" ) {
- """body {
- background-image: url("$*page_background_image");
- background-position: $*page_background_position;
- background-repeat: $*page_background_repeat;
- background-attachment: $*page_background_scrolling;
- }""";
- }
- """body, td {
- """;
- if ($*font_base != "" or $*font_fallback != "none") {
- "font-family: ";
- if ($*font_base != "") {
- "\"$*font_base\"";
- if ($*font_fallback != "none") {
- ", ";
- }
- }
- if ($*font_fallback != "none") {
- print $*font_fallback;
- }
- ";\n";
- }
- """font-size: 10pt;
- }
- a {
- text-decoration: none;
- }
- a:hover {
- text-decoration: underline;
- }
- .shadowed {
- font-size: 8pt;
- background: $*weak_back;
- }
- .meta {
- font-size: 8pt;
- }
- .index {
- font-size: 8pt;
- }
- .caption, .index {
- color: $*stronger_text;
- }
- .caption A, .caption A:hover, .caption A:visited {
- color: $*stronger_text;
- text-decoration: none;
- }
- .comments {
- font-size: 8pt;
- }
- .quickreply {
- margin-top: 1em;
- width:100%;
- }
- .box, .entrybox {
- border: $*entryborder_size $*entryborder_style $*border_color;
- }""";
- if (not $*show_header) {
- """
- #topbox tr.caption {
- display: none;
- }""";
- } else {
- if (not $*show_header_title) {
- """
- #topbox table tr.caption td.caption {
- visibility: hidden;
- }""";
- }
- if (not $*show_header_links) {
- """
- #topbox table tr.caption td.index {
- visibility: hidden;
- }""";
- }
- }
- if ($*transparent) {
- """
- tr, td, .shadowed {
- background: transparent;
- }
- """;
- }
- print_custom_control_strip_css();
- }
- function Page::lay_top_userpic () {
- var Image up_img = $.journal.default_pic;
- if (defined $up_img) {
- """<td><table cellpadding="2" bgcolor="$*entry_back" cellspacing="0" border="0" summary="">
- <tr><td bgcolor="$*stronger_back" align="center"><img border="0" src="$up_img.url" height="$up_img.height" width="$up_img.width" alt=""></td></tr>
- </table></td>
- """;
- }
- }
- function FriendsPage::lay_top_userpic () { }
- function Page::print_linklist() {
- if (size $.linklist <= 0) {
- return;
- }
- println """
- <p>
- <table width='$*box_width' cellpadding='2' cellspacing='0'
- border='0'
- summary='' class='box'>
- <tr><td bgcolor='$*stronger_back' align='center'>
- <table width='100%' cellpadding='3' cellspacing='0'
- border='0'
- summary=''>
- <tr class='caption'>
- <td class='caption' align='left'><b>Links</b></td>
- </tr></table>
- <table width='100%' cellpadding='3' cellspacing='0'
- border='0'
- summary=''>
- <tr class='shadowed'>
- <td align='center'>
- <table cellspacing='5'
- cellpadding='0'
- border='0'
- summary=''>
- """;
- var bool section_open = false;
- if (not $.linklist[0].is_heading) {
- println """<tr><td class="meta">[</td><td class="meta" align="right"><b>Links:</b></td><td class="meta" align="center">|</td><td class="meta">""";
- $section_open = true;
- }
- foreach var UserLink l ($.linklist) {
- if ($l.title) {
- if ($l.is_heading) {
- if ($section_open) {
- println """</td><td class="meta">]</td></tr>""";
- }
- println """<tr><td class="meta">[</td><td class="meta" align="right"><b>$l.title</b></td><td class="meta" align="center">|</td><td class="meta">""";
- $section_open = true;
- } else {
- println """<a href="$l.url">$l.title</a> """;
- }
- }
- }
- println """</td><td class="meta">]</td></tr>""";
- "</table>
- </td>
- </tr>
- </table>
- </td>
- </tr></table>
- </p>
- ";
- }
- function Page::print ()
- {
- var string title = $this->title();
- var string margin = "";
- var string margin_top = ""; # Only used if vbox is on
- if ($*box_alignment == "left" and $*box_margin != "0") {
- $margin = "margin-left: $*box_margin;";
- } elseif ($*box_alignment == "right" and $*box_margin != "0") {
- $margin = "margin-right: $*box_margin;";
- }
- if ($*box_top_margin != "0") {
- if (viewer_sees_vbox()) {
- $margin_top = """<table width="100%" height="100%" style="margin-top: $*box_top_margin;">""";
- } else {
- $margin = $margin + "margin-top: $*box_top_margin;";
- }
- }
- if ($margin != "") {
- $margin = "<div align=\"$*box_alignment\" style=\"" + $margin + "\">";
- }
- var string links;
- var bool firstlink = true;
- foreach var string v ($.views_order) {
- if ($firstlink == false) {
- $links = "$links|";
- }
- else {
- $firstlink = false;
- }
- $links = $links + ($.view == $v ?
- "<b>"+lang_viewname($v)+"</b>" :
- "<a class='index' href='$.view_url{$v}'>"+lang_viewname($v)+"</a>");
- }
- """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>\n
- <head>\n<meta http-equiv="X-UA-Compatible" content="IE=7"/>\n""";
- $this->print_head();
- $this->print_stylesheets();
- print safe """<title>$title</title>
- </head>
- <body bgcolor="$*page_back" text="$*entry_text" link="$*page_link" vlink="$*page_vlink" alink="$*page_alink">
- """;
- $this->print_control_strip();
- if (viewer_sees_vbox()) {
- if ($margin_top == "") {
- """<table width="100%" height="100%">""";
- } else {
- print safe $margin_top;
- }
- """<tr><td valign="top">""";
- }
- if ($margin == "") {
- """<div align="$*box_alignment">""";
- } else {
- print safe $margin;
- }
- if (viewer_sees_hbox_top()) {
- """
- <table cellpadding="2" cellspacing="0" border="0" summary="" style="margin-bottom: 10px;" class="box">
- <tr><td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="3" cellspacing="0"
- border="0"
- summary="">
- <tr>
- <td class="shadowed" align="center">
- <table cellspacing="5"
- cellpadding="0"
- border="0"
- summary="" style="margin-left: auto; margin-right: auto;">
- <tr><td><div align="center">
- """;
- $this->print_hbox_top();
- """
- </div></td></tr></table>
- </td></tr></table>
- </td></tr></table>
- """;
- }
- """
- <table width="$*box_width" cellpadding="2" cellspacing="0"
- border="0"
- summary="" class="box" id="topbox">
- <tr><td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="3" cellspacing="0"
- border="0"
- summary="">
- <tr class="caption">""";
- print safe """<td class="caption" align="left"><b>$title</b></td>""";
- """
- <td class="index" align="right">[$links]</td>
- </tr></table>
- <table width="100%" cellpadding="3" cellspacing="0"
- border="0"
- summary="">
- <tr>
- <td class="shadowed" align="center">
- <table cellspacing="5"
- cellpadding="0"
- border="0"
- summary="" style="margin-left: auto; margin-right: auto;">
- <tr>""";
- $this->lay_top_userpic();
- var string sitename_lc = $*SITENAMESHORT->lower();
- """<td>
- <div align="center"><b>""";
- if ($*text_journal_title == "[[name]]") {
- print safe "$.journal.name";
- } else {
- print safe "$*text_journal_title";
- }
- """</b>""";
- if ($*counter_code != "") {
- """<p>$*counter_code</p>""";
- }
- """</div><p>
- <table cellspacing="0"
- cellpadding="0"
- border="0"
- summary="">""";
- # Print navigation links
- var string label = "";
- var string url = "";
- var string value = "";
- var string website_value = $.journal.website_name ? $.journal.website_name : $*text_website_default_name;
- var string userinfo_value = ($*text_userinfo_value == "livejournal userinfo") ? "$sitename_lc userinfo" : "$*text_userinfo_value";
- var string[] labels = [$*text_website, $*text_userinfo_label, $*text_archive_label, $*text_other1_label, $*text_other2_label, $*text_other3_label];
- var string[] urls = [$.journal.website_url, $.view_url{"userinfo"}, $.view_url{"archive"}, $*text_other1_url, $*text_other2_url, $*text_other3_url];
- var string[] values = [$website_value, $userinfo_value, $*text_archive_value, $*text_other1_value, $*text_other2_value, $*text_other3_value];
- foreach var int i (0 .. ((size $labels) - 1)) {
- $label = $labels[$i];
- $url = $urls[$i];
- $value = $values[$i];
- if ($label != "" and $url != "") {
- print safe """
- <tr>
- <td class="meta">$*text_navlinks_left</td>
- <td class="meta" align="right"><b>$label</b></td>
- <td class="meta" align="center">$*text_navlinks_btwn</td>
- <td class="meta" align="left"><a href="$url">$value</a></td>
- <td class="meta">$*text_navlinks_right</td>
- </tr>
- """;
- }
- }
- """
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr></table>
- </td></tr>
- </table>
- """;
- if (size $.linklist > 0 and $*linklist_support) {
- $this->print_linklist();
- }
- """
- <p>
- """;
- $this->print_body();
- if (viewer_sees_hbox_bottom()) {
- """
- <table cellpadding="2" cellspacing="0" border="0" summary="" style="margin-top: 10px;" class="box">
- <tr><td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="3" cellspacing="0"
- border="0"
- summary="">
- <tr>
- <td class="shadowed" align="center">
- <table cellspacing="5"
- cellpadding="0"
- border="0"
- summary="" style="margin-left: auto; margin-right: auto;">
- <tr><td><div align="center">
- """;
- $this->print_hbox_bottom();
- """
- </div></td></tr></table>
- </td></tr></table>
- </td></tr></table>
- """;
- }
- """
- </div>
- """;
- if (viewer_sees_vbox()) {
- """
- </td>
- <td valign="top" align="right" width="20%">
- <table cellpadding="2" cellspacing="0" border="0" summary="" class="box">
- <tr><td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="3" cellspacing="0"
- border="0"
- summary="">
- <tr>
- <td class="shadowed" align="center">
- <table cellspacing="5"
- cellpadding="0"
- border="0"
- summary="" style="margin-left: auto; margin-right: auto;">
- <tr><td><div align="center">
- """;
- $this->print_vbox();
- """
- </div></td></tr></table>
- </td></tr></table>
- </td></tr></table>
- </td></tr></table>
- """;
- }
- """
- <p>
- </body>
- </html>
- """;
- }
- function print_entry (Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text)
- {
- var string datetime;
- $datetime = $e.time->date_format($*date_format)+"$*btwn_datetime<b>"
- + $e.time->time_format($*time_format) + "</b>";
- """
- <table width="$*box_width" cellpadding="2" cellspacing="0" border="0" summary="" class="entrybox">
- <tr align='left'>
- <td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="5" cellspacing="0" border="0" summary="">
- <tr align='left'>
- <td class="caption">""";
- if ($e.security != "") {
- $e.security_icon->print();
- }
- if ($p.view != "entry") {
- print $e->formatted_subject({"class"=>"subj-link"});
- } else { print safe "$e.subject"; }
- """</td>
- <td align="right" class="index">[$datetime]</td>
- </tr>
- <tr align='left'>
- <td colspan="2" bgcolor="$*entry_back">
- """;
- if ($p.view == "entry" and $*show_entrynav_icons)
- {
- print "<div style='text-align: center'>";
- $e->print_linkbar();
- print "</div>";
- }
- if ($p.view == "friends" or
- $p.journal_type == "C" or
- $e.poster.username != $e.journal.username)
- {
- var UserLite linkto;
- var bool showposter;
- if ($p.view == "recent" and $p.journal_type == "C") {
- $linkto = $e.poster;
- $showposter = false;
- } else {
- $linkto = $e.journal;
- $showposter = true;
- }
- """<table cellpadding="1" align="right" cellspacing="0" border="0" summary=""><tr align='left'><td bgcolor="$*stronger_back">""";
- """<table cellpadding="2" align="center" cellspacing="0" border="0" summary="">""";
- """<tr align='left'><td bgcolor="$bgcolor" align="center"><a class="index" href=\"""" + $linkto->base_url() + "/\">";
- if (defined $e.userpic) {
- """<img border="0" src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt=""><br>""";
- }
- "<font color=\"$fgcolor\">$linkto.username</font></a>";
- if ($e.poster.username != $e.journal.username and $showposter) {
- "<br>[<a class=\"index\" href=\"" +
- $e.poster->base_url() + "/\"><font color=\"$fgcolor\">$e.poster.username</font></a>]";
- }
- "</td></tr></table></td></tr></table>";
- }
- var string metadata;
- if ($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;
- } elseif ($k == "location") {
- $text = $*text_meta_location;
- } elseif ($k == "groups") {
- $text = $*text_meta_groups;
- }
- 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' align='absmiddle'> $val";
- }
- $metadata = """$metadata\n<tr><td class="meta">[</td><td class="meta" align="right"><b>$text</b></td>
- <td class="meta" align="center">|</td><td class="meta">$val</td><td class="meta">]</td></tr>""";
- }
- }
- var string tags;
- if ($e.tags) {
- var int tcount = 0;
- $tags = """<tr><td class="meta">[</td><td class="meta" align="right"><b>Tags</b></td>""";
- $tags = """$tags<td class="meta" align="center">|</td><td class="meta">""";
- foreach var Tag t ($e.tags) {
- $tags = """$tags<a rel="tag" href="$t.url">$t.name</a>""";
- $tcount++;
- if ($tcount != size $e.tags) { $tags = """$tags, """; }
- }
- $tags = """$tags</td><td class="meta">]</td></tr>""";
- }
- if (not $hide_text) {
- if ($tags or $metadata) {
- print """<table cellspacing="0" cellpadding="0" border="0" summary="">""";
- print $tags;
- print safe $metadata;
- print "</table>";
- print "<br />";
- }
- $e->print_text();
- }
- $p->print_reply_container({"target" => "topcomment", "class" => "quickreply"});
- """</td></tr>
- <tr bgcolor="$*weak_back"><td align='left' class='comments' valign='top'>
- <a href="$e.permalink_url">$*text_permalink</a></td>""";
- if ($p.view != "entry" and $p.view != "reply") {
- "<td align='right' class='comments'>"; $e.comments->print();
- } elseif ($e.comments.enabled) {
- "<td align='right' class='comments'>"; $p->print_reply_link({"linktext" => $*text_comment_reply, "target" => "topcomment"});
- } else {
- "<td>";
- }
- "<br/>";
- """</td></tr></table></td></tr></table><p>""";
- } # print_entry(Page,Entry,Color,Color,bool)
- function Page::print_entry (Entry e) {
- print_entry($this, $e, null Color, null Color, false);
- }
- function FriendsPage::print_entry (Entry e) {
- var Friend f = $.friends{$e.journal.username};
- print_entry($this, $e, $f.bgcolor, $f.fgcolor, false);
- }
- function print_ebox (Entry e)
- {
- if ($e->viewer_sees_ebox()) {
- """
- <table cellpadding="2" cellspacing="0" border="0" summary="" class="box" width=$*box_width>
- <tr><td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="3" cellspacing="0"
- border="0"
- summary="">
- <tr>
- <td class="shadowed" align="center">
- <table cellspacing="5"
- cellpadding="0"
- border="0"
- summary="" style="margin-left: auto; margin-right: auto;">
- <tr><td><div align="center">
- """;
- $e->print_ebox();
- """
- </div></td></tr></table>
- </td></tr></table>
- </td></tr></table><p>
- """;
- }
- }
- function RecentPage::print_body ()
- {
- foreach var Entry e ($.entries) {
- $this->print_entry($e);
- print_ebox($e);
- }
- var string range = "most recent entries";
- if ($.nav.skip > 0) {
- $range = "$.nav.skip entries back";
- }
- """
- <table cellpadding="2" cellspacing="0"
- border="0"
- summary="" class="box">
- <tr><td bgcolor="$*stronger_back">
- <table cellpadding="3" cellspacing="0"
- border="0"
- summary="">
- <tr>
- <td align="center" class="index">navigation</td>
- </tr>
- <tr>
- <td bgcolor="$*entry_back" align="center">
- <table cellspacing="0"
- cellpadding="0"
- border="0"
- summary="">
- <tr>
- <td class="meta">[</td>
- <td class="meta" align="right"><b>viewing</b></td>
- <td class="meta" align="center">|</td>
- <td class="meta">$range</td>
- <td class="meta">]</td>
- </tr>
- """;
- # go forward/backward if possible
- if ($.nav.forward_url != "" or $.nav.backward_url != "") {
- var string sep;
- var string back;
- var string forward;
- if ($.nav.backward_url != "") {
- $back = """<a href="$.nav.backward_url">earlier</a>""";
- }
- if ($.nav.forward_url != "") {
- $forward = """<a href="$.nav.forward_url">later</a>""";
- }
- if ($back != "" and $forward != "") { $sep = "/"; }
- """<tr>
- <td class="meta">[</td>
- <td class="meta" align="right"><b>go</b></td>
- <td class="meta" align="center">|</td>
- <td class="meta">$back$sep$forward</td>
- <td class="meta">]</td>
- </tr>""";
- }
- "</table></td></tr></table></table>";
- }
- function CommentInfo::print() {
- if ($.show_readlink or $.show_postlink) {
- print safe "$*text_left_comments";
- if ($.show_readlink) {
- "<b>"; $this->print_readlink(); "</b>";
- }
- if ($.show_postlink and $.show_readlink) {
- if (clean_url($*img_btwn_comments) != "") {
- """ <img src="$*img_btwn_comments" alt="" /> """;
- } else {
- print safe "$*text_btwn_comments";
- }
- }
- if ($.show_postlink) {
- $this->print_postlink();
- }
- print safe "$*text_right_comments";
- }
- }
- function YearPage::print_year_links ()
- {
- """<table cellpadding="2" cellspacing="0" border="0" summary="" class="box">
- <tr><td bgcolor="$*stronger_back" align="center">
- <table cellpadding="5" cellspacing="0" border="0" summary="">
- <tr><td class="caption">Years</td></tr><tr>
- <td colspan="2" bgcolor="$*entry_back">""";
- foreach var YearYear y ($.years) {
- if ($y.displayed) {
- "<b>$y.year</b> ";
- } else {
- "<a href=\"$y.url\">$y.year</a> ";
- }
- }
- """</td></tr></table></td></tr></table><p>""";
- }
- function YearPage::print_month (YearMonth m)
- {
- if (not $m.has_entries) { return; }
- """<table cellpadding="2" cellspacing="0" border="0" summary="" class="box">
- <tr><td bgcolor="$*stronger_back" align="center">
- <table cellpadding="5" cellspacing="0" border="0" summary="">
- <tr>
- <td class="caption">""";
- print $m->month_format();
- """</td>
- <td class="caption" align="right">[<a href="$m.url" class="index">subjects</a>]</td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="$*entry_back">
- <!-- now the headings for the week -->
- <table width="100%" cellpadding="5" cellspacing="0" border="0" summary="">
- <tr align="center">
- """;
- foreach var int d (weekdays()) {
- "<td>"+$*lang_dayname_short[$d]+"</td>\n";
- }
- "</tr>";
- foreach var YearWeek w ($m.weeks) {
- $w->print();
- }
- """</table></td></tr></table></td></tr></table><p>""";
- }
- function YearWeek::print () {
- "<tr valign='top'>";
- if ($.pre_empty) { "<td colspan='$.pre_empty'></td>"; }
- foreach var YearDay d ($.days) {
- """<td><div class="meta">$d.day</div>""";
- if ($d.num_entries) {
- """<div align="center"><a href="$d.url">$d.num_entries</a></div>""";
- } else {
- " ";
- }
- "</td>";
- }
- if ($.post_empty) { "<td colspan='$.post_empty'></td>"; }
- "</tr>";
- }
- function DayPage::print_body() {
- """<table cellpadding="2" cellspacing="0" border="0" summary="" class="box">
- <tr><td bgcolor="$*stronger_back" align="center">
- <table cellpadding="5" cellspacing="0" border="0" summary="">
- <tr><td bgcolor="$*entry_back">""";
- if ($.has_entries) {
- print $.date->date_format($*date_daypage_format);
- } else {
- print ehtml($*text_noentries_day);
- }
- """</td></tr></table></td></tr></table><p>""";
- foreach var Entry e ($.entries) {
- $this->print_entry($e);
- if ($e->viewer_sees_ebox()) {
- """
- <table cellpadding="2" cellspacing="0" border="0" summary="" class="box" width=$*box_width>
- <tr><td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="3" cellspacing="0"
- border="0"
- summary="">
- <tr>
- <td class="shadowed" align="center">
- <table cellspacing="5"
- cellpadding="0"
- border="0"
- summary="" style="margin-left: auto; margin-right: auto;">
- <tr><td><div align="center">
- """;
- $e->print_ebox();
- """
- </div></td></tr></table>
- </td></tr></table>
- </td></tr></table><p>
- """;
- }
- }
- var string tprev = ehtml($*text_day_prev);
- var string tnext = ehtml($*text_day_next);
- var string daylong = $.date->date_format($*date_daypage_format);
- """<table cellpadding="2" cellspacing="0" border="0" summary="" class="box">
- <tr><td bgcolor="$*stronger_back">
- <table cellpadding="3" cellspacing="0" border="0" summary="">
- <tr>
- <td align="center" class="index">navigation</td>
- </tr>
- <tr>
- <td bgcolor="$*entry_back" align="center">
- <table cellspacing="0" cellpadding="0" border="0" summary="">
- <tr>
- <td class="meta">[</td>
- <td class="meta" align="right"><b>viewing</b></td>
- <td class="meta" align="center">|</td>
- <td class="meta">$daylong</td>
- <td class="meta">]</td>
- </tr>
- <tr>
- <td class="meta">[</td>
- <td class="meta" align="right"><b>go</b></td>
- <td class="meta" align="center">|</td>
- <td class="meta">""";
- if ($.prev_url != "") {
- """<a href="$.prev_url">$tprev</a>""";
- }
- if ($.prev_url != "" and $.next_url != "") {
- """|""";
- }
- if ($.next_url != "") {
- """<a href="$.next_url">$tnext</a>""";
- }
- """</td>
- <td class="meta">]</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </table>""";
- }
- function TagsPage::print_body () {
- """<table width="$*box_width" cellpadding="2" cellspacing="0" border="0" summary="" class="entrybox">
- <tr align='left'>
- <td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="5" cellspacing="0" border="0" summary="">
- <tr align='left'><td class="caption" colspan='2'>Visible Tags</td></tr>
- <tr align='left'>
- <td colspan="2" bgcolor="$*entry_back">
- <ul class='ljtaglist'>""";
- foreach var TagDetail td ($.tags) {
- var string uses = get_plural_phrase($td.use_count, "text_tag_uses");
- print """<li><a href="$td.url">$td.name</a> - $uses</li>""";
- }
- """<ul></td></tr></table>
- </td></tr></table><p>""";
- }
- function MonthPage::print_body () {
- """<table width="$*box_width" cellpadding="2" cellspacing="0" border="0" summary="" class="entrybox">
- <tr align='left'>
- <td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="5" cellspacing="0" border="0" summary="">
- <tr align='left'>
- <td class="caption" colspan='2'>""";
- print $.date->date_format($*lang_fmt_month_long);
- """</td></tr>
- <tr align='left'>
- <td colspan="2" bgcolor="$*entry_back">""";
- #Lifted from core, looks decent:
- "<form method='post' action='$.redir.url'><center>";
- $.redir->print_hiddens();
- if ($.prev_url != "") { "[<a href='$.prev_url'><<<</a>]\n"; }
- if (size $.months > 1) {
- "<select name='redir_key'>\n";
- foreach var MonthEntryInfo mei ($.months) {
- var string sel;
- if ($mei.date.year == $.date.year and $mei.date.month == $.date.month) {
- $sel = " selected='selected'";
- }
- "<option value='$mei.redir_key'$sel>" + $mei.date->date_format($*lang_fmt_month_long) + "</option>";
- }
- "</select>\n<input type='submit' value='View' />";
- }
- if ($.next_url != "") { "\n[<a href='$.next_url'>>>></a>]\n"; }
- "</center></form>\n<dl>";
- foreach var MonthDay d ($.days) {
- if ($d.has_entries) {
- "<dt><a href=\"$d.url\"><b>";
- print lang_ordinal($d.day);
- "</b></a></dt>\n<dd>";
- $d->print_subjectlist();
- "</dd>\n";
- }
- }
- "</dl>\n";
- """</td></tr></table>
- </td></tr></table><p>""";
- }
- function EntryPage::print_body () {
- print_entry($this, $.entry, null Color, null Color, $.viewing_thread);
- print_ebox($.entry);
- if ($.entry.comments.enabled and $.comment_pages.total_subitems > 0)
- {
- $this->print_multiform_start();
- """<table width="$*box_width" cellpadding="2" cellspacing="0" border="0" summary="" class="entrybox">
- <tr align='left'>
- <td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="5" cellspacing="0" border="0" summary="">
- <tr align='left'>
- <td class="caption" colspan='2'>Comments:</td></tr>""";
- """<tr align='left'><td colspan="2" bgcolor="$*entry_back"><a name='comments'></a>""";
- $.comment_pages->print();
- 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", ],
- ]);
- $this->print_comments($.comments);
- $.comment_pages->print();
- """</td></tr></table></td></tr></table><p>""";
- if ($this.multiform_on) {
- """<table width="$*box_width" cellpadding="2" cellspacing="0" border="0" summary="" class="entrybox">
- <tr align='left'>
- <td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="5" cellspacing="0" border="0" summary="">
- <tr align='left'>
- <td class="caption" colspan='2'>Mass Action:</td></tr>""";
- """<tr align='left'><td colspan="2" bgcolor="$*entry_back">""";
- $this->print_multiform_actionline();
- """</td></tr></table></td></tr></table><p>""";
- $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;
- }
- if ($*transparent) {
- $background = "transparent";
- }
- 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 border='0' 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.
- if ($*comment_userpic_style == "small") {
- $w = $w / 2;
- $h = $h / 2;
- }
- print "<td style='width: 102px'><img src='$c.userpic.url' width='$w' height='$h' alt='[User Picture]' /></td>";
- }
- "<td style='width: 50%'>";
- ### From, date, etc
- print "<strong>From:</strong> $poster<br /><small>";
- print $c->time_display($*datetime_comments_format, "none");
- if ($c.metadata{"poster_ip"}) { print "<br />IP: [" + $c.metadata{"poster_ip"} + "]"; }
- "</small><br />";
- print (defined $c.subject_icon or $c.subject != "") ? "<h3>$c.subject_icon $c.subject</h3>" : "";
- "</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();
- ### Permalink
- print "<p><strong>(<a href='$c.permalink_url'>Link</a>)</strong></p>\n";
- "</td>";
- print "</tr></table></div>";
- print "<div style='margin-left: 5px'>"; $c->print_text(); "</div>";
- print "<div style='margin-top: 3px; font-size: smaller'>";
- "<span class='commentlinks'>";
- if ($c.frozen) {
- "(Replies frozen) ";
- } else {
- "(";
- ###$c->print_reply_link({"linktext" => "Reply to this"});
- if($c.screened == true) {
- ### if comment screened - show link for unscreen
- var Link link;
- $link = $c->get_link("unscreen_to_reply");
- """<a href="$link.url" title="$link.caption">$link.caption</a>""";
- } else {
- ### showing reply link if comment not screened
- $c->print_reply_link({ "linktext" => $*text_comment_reply });
- }
- ") ";
- }
- "</span>";
- if ($c.parent_url != "") { "(<a href='$c.parent_url'>Parent</a>) "; }
- if ($c.thread_url != "") {
- "(<a href='$c.thread_url'>Thread</a>) ";
- var Link expand_link = $c->get_link("expand_comments");
- if (defined $expand_link) {
- "(" + $c->expand_link() + ") ";
- }
- }
- if (not $c.frozen) {
- $c->print_reply_container({"class" => "quickreply"});
- }
- "</div>";
- }
- function ReplyPage::print_body () {
- if (not $.entry.comments.enabled) {
- """<table width="$*box_width" cellpadding="2" cellspacing="0" border="0" summary="" class="entrybox">
- <tr align='left'>
- <td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="5" cellspacing="0" border="0" summary="">
- <tr align='left'>
- <td class="caption" colspan='2'>$*text_reply_nocomments_header</td></tr>
- <tr align='left'>
- <td colspan="2" bgcolor="$*entry_back">""";
- print "<p>$*text_reply_nocomments</p>";
- """</td></tr></table></td></tr></table><p>""";
- return;
- }
- if ($.replyto isa Entry) {
- var Entry en = $.replyto as Entry;
- print_entry($this, $en, null Color, null Color, false);
- } else {
- var string datetime;
- $datetime = $.replyto.time->date_format($*date_format)+"$*btwn_datetime<b>" + $.replyto.time->time_format($*time_format) + "</b>";
- """<table width="$*box_width" cellpadding="2" cellspacing="0" border="0" summary="" class="entrybox">
- <tr align='left'>
- <td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="5" cellspacing="0" border="0" summary="">
- <tr align='left'>
- <td class="caption">$.replyto.subject</td>""";
- print safe """<td class="index" align="right">[$datetime]</td></tr>""";
- """<tr align='left'>
- <td colspan="2" bgcolor="$*entry_back">
- <table cellpadding="1" align="right" cellspacing="0" border="0" summary="">
- <tr align='left'><td bgcolor="$*stronger_back">
- <table cellpadding="2" align="center" cellspacing="0" border="0" summary="">
- <tr align='left'><td align="center" style="color: $*stronger_text">""";
- if (defined $.replyto.poster) {
- "<a href='" + $.replyto.poster->base_url() + "/'>";
- if (defined $.replyto.userpic) {
- """<img border="0" src="$.replyto.userpic.url" width="$.replyto.userpic.width" """;
- """height="$.replyto.userpic.height" alt=""><br />""";
- }
- "$.replyto.poster.username</a>";
- } else {
- print "<i>Anonymous</i>";
- }
- """</td></tr></table></td></tr></table>"""; $.replyto->print_text(); """</td></tr>
- <tr bgcolor="$*weak_back"><td align='left' class='comments'>
- <a href="$.replyto.permalink_url">$*text_permalink</a></td>
- <td align='right' class='comments'><a href='$.entry.comments.read_url'>Read Comments</a></td>
- </tr></table></td></tr></table><p>""";
- }
- print_ebox($.entry);
- """<table width="$*box_width" cellpadding="2" cellspacing="0" border="0" summary="" class="entrybox">
- <tr align='left'>
- <td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="5" cellspacing="0" border="0" summary="">
- <tr align='left'>
- <td class="caption" colspan='2'>Reply:</td></tr>
- <tr align='left'>
- <td colspan="2" bgcolor="$*entry_back">""";
- $.form->print();
- """</td></tr></table></td></tr></table><p>""";
- }
- function print_theme_preview () {
- """<table width='100%' bgcolor='$*page_back' cellpadding=10><tr><td align='center'>
- <table width='400' cellpadding='2' cellspacing='2'>
- <tr align='left'><td bgcolor="$*stronger_back" align="center">
- <table width="100%" cellpadding="5" cellspacing="0" border="0" summary="">
- <tr align='left'><td style="color: $*stronger_text">Preview Subject</td><td align="right" style="font-size: 8pt; color: $*stronger_text">[Feb. 5th, 2002|<b>8:46 pm</b>]</td></tr>
- <tr align='left'>
- <td colspan="2" bgcolor="$*entry_back" style='color: $*entry_text'>
- Preview text, preview text, etc, etc..... words, words and more words.
- </td></tr>
- <tr bgcolor="$*weak_back"><td align='left' class='style: font-size: 8pt'>
- <a style='text-decoration:none;color: $*page_link' href="#">$*text_permalink</a>
- </td><td align='right' style='font-size: 8pt'>
- <a href='#' style='text-decoration:none;color:$*page_vlink'><b>1 comment</b></a>|<a href='#' style='text-decoration:none;color:$*page_link'>post comment</a>
- </td></tr></table>
- </td></tr></table>
- </td></tr></table>
- """;
- }
Advertisement
Add Comment
Please, Sign In to add comment