i recently edited my opal layout on dreamwidth to move my comment links to the lower right hand corner of the entry. after much fiddling, it finally worked. however, in doing so, i lost my edit entry link. if anyone could help me figure out how to get it back, i'd greatly appreciate it. here is the code i am using:
layout layer:
# -*-s2-*- layerinfo type = "layout"; layerinfo name = "Opal (Libra OSWD)"; layerinfo lang = "en";
layerinfo author_name = "Ported by Kevin Phillips"; layerinfo author_email = "xevinx@livejournal.com"; layerinfo des = "Based on the Libra and Pasilda design available from Open Source Web Designs. Originally written by whompy."; layerinfo redist_uniq = "opal/layout"; layerinfo previews = "opal/opal.jpg";
property use page_recent_items; property use page_friends_items; property use use_shared_pic; property use view_entry_disabled;
property bool show_entry_userpic { des = "Always display userpic?"; }
property int summary_items { des = "Summary Items"; note="Maximum number of items in the Page Summary list. Set to 0 to turn off the Page Summary. Set to 100 to show all available items."; }
property bool use_count { noui=1; }
property use linklist_support; property use custom_control_strip_colors;
set summary_items = 100; set show_entry_userpic = false; set font_fallback = "sans-serif"; }
propgroup colors { property Color color_bg { des = "Background Color"; }
property Color color_bg_font { des = "Background Font Color"; note = "The color of any font appearing on the background color."; }
property Color color_med { des = "Page Holder Background"; note = "This is the background of the main body, but within the outer borders."; }
property Color color_med_font { des = "Page Holder Font Color"; note="The color of the font appearing on the Page Holder Background color."; }
property Color color_fg { des = "Content Background Color"; note = "This is the background to the main content where the entries and side elements are."; }
property Color color_fg_font { des = "Content Font Color"; note = "The color of the font that appears on in the main Content area."; }
property Color color_link { des = "Link Color"; }
property Color color_visited { des = "Visited Link Color"; }
property use control_strip_bgcolor; property use control_strip_fgcolor; property use control_strip_bordercolor; property use control_strip_linkcolor;
set color_bg = "#2d3851"; set color_bg_font = "#ffffff"; set color_med = "#7C8AA4"; set color_med_font = "#e9f2fc"; set color_fg = "#BFC4CB"; set color_fg_font = "#333333"; }
propgroup fonts { property use font_base; property use font_fallback; property string static_font_size { noui = 1; } property string static_font_measurement { noui = 1; } set static_font_size = "12"; set static_font_measurement = "px"; }
propgroup text {
property string free_text_header { des = "Free Text Header"; }
property string free_text_text { des = "Free Text Text"; cols = 30; rows = 10; string_mode = "html"; }
property string links_header { des = "Links Header"; }
property string page_summary_title { des = "Page Summary Header"; }
property use text_view_userinfo; property use text_view_recent; property use text_view_friends; property use text_view_archive; property string text_forward { des = "Text to show in a link to skip forward through entries"; } property string text_back { des = "Text to show in a link to skip backward through entries"; } property use text_read_comments; property use text_read_comments_friends; property use text_post_comment; property use text_post_comment_friends; property use text_comment_reply; property use text_reply_back; property use text_nosubject; property use text_noentries_day; property use text_meta_music; property use text_meta_mood; property use text_meta_location; property use text_meta_groups;
set page_summary_title = "page summary"; set links_header = "links"; set free_text_header = "about this journal"; set free_text_text = ""; set text_back = "back"; set text_forward = "forward"; }
propgroup customcss { property use include_default_stylesheet; property use linked_stylesheet; property use custom_css; }
set external_stylesheet = true; set tags_aware = true;
var Color color_bg_lt = getAltColor($*color_bg, "light", 30); var Color color_fg_dk = getAltColor($*color_fg, "dark", 20); var Color color_fg_dk_font = getAltColor($*color_fg_font, "dark", 20); var Color color_divider = getAltColor($color_fg_dk, "dark", 30); var Color color_fg_dk_dk_font = getAltColor($color_fg_dk, "dark", 50); var Color color_border = getAltColor($*color_bg, "light", 90); var string base = ($*font_base != "") ? "$*font_base, " : "";
function box_item (string text) : string { return """
$text
\n"""; }
function num_comments_in_thread (Comment[] comments) : int { var int total = 0; foreach var Comment c ($comments) { $total = $total + 1; if (size $c.replies > 0) { $total = $total + num_comments_in_thread($c.replies); } } return $total; }
################################################################################ # # Layout specific functions #
function Page::lay_print_userpic() { if(defined $.journal.default_pic) { """
"""; } }
function Page::lay_print_username () {
var string dots = generateDots($.global_title);
print safe """
$.journal.username $dots
"""; }
function Page::lay_print_header () { var string title = $this->title(); print safe """
function YearPage::lay_print_summary () { var int count = $*summary_items; if($count == 0) { return; }
var string text; var int num_entries; foreach var YearMonth m ($.months) { if($count > 0) { var string mon = $m->month_format(); if($m.has_entries) { $num_entries = 0; foreach var YearWeek w ($m.weeks) { foreach var YearDay d ($w.days) { $num_entries = $num_entries + $d.num_entries; } } $text = $text + """
print """"""; var string time = $e.time->time_format(); var string date = $e.time->date_format(); var string security; if ($e.security != "") { $security = """ """width="$e.security_icon.width" height="$e.security_icon.height" """+ """alt="[$e.security]" />"""; }
var UserLite name; var string pname;
var bool show_name = ($.view == "friends" or $e.poster.username != $.journal.username or $.view == "entry") ? true : false; var bool show_pic = (defined $e.userpic and ($.view == "friends" or $*show_entry_userpic or $e.poster.username != $e.journal.username or $.view == "entry")) ? true : false;
if($c.screened == true) { ### if comment screened - show link for unscreen var Link link; $link = $c->get_link("unscreen_to_reply"); """$link.caption"""; } else { ### showing reply link if comment not screened $c->print_reply_link({ "linktext" => $*text_comment_reply,"class" => "reply_link" }); }
} # some links for doing stuff to this comment foreach var string k ($c.link_keyseq) { var Link link = $c->get_link($k); if (defined $link) { """ $link.caption """; } }
if ((size $c.replies) > 0 and $c.replies[0].full == true) { $this->print_comments($c.replies); }
}
function EntryPage::print_comment_partial(Comment c) { var string poster = defined $c.poster ? $c.poster->as_string() : "(anonymous)"; var string subj = $c.subject != "" ? $c.subject : """$*text_nosubject"""; var string indent = ($c.depth - 1) * 25 + "px"; print safe """
$poster - $subj """; var Link expand_link = $c->get_link("expand_comments"); if ($c.thread_url != "" and defined $expand_link) { " " + $c->expand_link(); } print """
"""; $this->print_comments($c.replies); }
function ItemRange::print() { if ($.all_subitems_displayed) { return; } """
"""; print lang_page_of_pages($.current, $.total); " - "; foreach var int i (1..$.total) { if ($i == $.current) { """[$i]""";
var EntryLite e = $.replyto; var string poster = defined $e.poster ? $e.poster->as_string() : "(anonymous)"; var string time = $e.time->time_format(); var string date = $e.time->date_format();
"""
""";
var UserLite name; if(defined $e.userpic and $*comment_userpic_style != "off") { $name = $e.poster; """
"""; if (defined $e.userpic or (defined $e.userpic and $.view == "entry" and $*show_entry_userpic)) { """"""; } """
"""; }
if ($.replyto isa Entry) { var Entry en = $.replyto as Entry;
var Color color_bg_lt = getAltColor($*color_bg, "light", 30); var Color color_fg_dk = getAltColor($*color_fg, "dark", 20); var Color color_fg_dk_font = getAltColor($*color_fg_font, "dark", 20); var Color color_divider = getAltColor($color_fg_dk, "dark", 30); var Color color_fg_dk_dk_font = getAltColor($color_fg_dk, "dark", 50); var Color color_border = getAltColor($*color_bg, "light", 90);
set page_recent_items = 10; set page_friends_items = 10; set include_default_stylesheet = false; set lang_fmt_date_short = "%%day%%, %%month%% %%dayord%%, %%yyyy%%"; set lang_fmt_time_short = "%%h%%:%%min%%%%A%%M"; set show_entry_userpic = true; set tags_aware = true; set linklist_support = true; set summary_items = 0; set links_header = "links"; set text_back = "back"; set text_forward = "forward"; set text_skiplinks_back= "previous #"; set text_skiplinks_forward= "next #"; set text_post_comment = "comment"; set text_max_comments = "maximum comments reached"; set text_read_comments = "read"; set text_post_comment_friends = "comment"; set text_read_comments_friends = "read"; set text_edit_entry = "edit"; set text_edit_tags = "tags"; set text_mem_add = "memories"; set text_permalink = ""; set text_tell_friend = ""; set text_watch_comments = ""; set text_unwatch_comments = ""; set text_month_screened_comments = "(screened)"; set text_meta_music = "music"; set text_meta_mood = "mood"; set text_meta_location = "location"; set text_meta_groups = "groups"; set text_tags_section_header = "tags";
#================================== # SIDEBAR / FREE TEXT BOXES # #================================== function Page::lay_print_sidebar {var string header; var string text;
$header = "LoVe"; $text = """
"i thought our story was epic, you know, you and me." "epic how?" "spanning years and continents. lives ruined, bloodshed. epic. but summer's almost here, and we won't see each other at all. and then you leave town...and then it's over." "logan..." "i'm sorry about last summer. you know, if i could do it over..." "come on. ruined lives? bloodshed? you really think a relationship should be that hard?" "no one writes songs about the ones that come easy."
var bool show_edit_tags_link = false; var string tags_separator = ", "; var bool vanilla_location = true; var bool vanilla_groups= true; var string meta_label_open = """"""; var string meta_label_close = """ """; var string meta_val_open= ""; var string meta_val_close = """ """; var string currents_open = """
"""; var string currents_close= """
"""; var bool have_meta = (size($.metadata) > 0); var bool have_tags = ((size($.tags) > 0) and $*tags_aware); var int tcount = 0; var string currents = ""; var string image = ""; var string k = ""; var string label = ""; var string meta = ""; var string tag = ""; var string val = ""; var Tag t = new Tag; var Link edit_tags = $this->get_link("edit_tags"); if ($have_meta or $have_tags) {$currents = $currents + $currents_open; if ($wrap_metadata and defined $.mood_icon) {var Image i = $.mood_icon; $currents = $currents + """
""";} foreach $k ($metadata) {$label = $meta_labels{$k} != "" ? $meta_labels{$k} : lang_metadata_title($k); $image = $meta_images{$k} != "" ? $meta_images{$k} : ""; $val = $.metadata{$k}; if ($image != "") {$label = """""";}if (($k=="location") and $vanilla_location) {$val = striphtml($val);} if (($k=="groups ") and $vanilla_groups ) {$val = striphtml($val);} if ($k=="mood") { if (defined $.mood_icon) {var Image i = $.mood_icon; if (not $wrap_metadata) {$val = """ $val""";}}} if (($k=="tags") and ($have_tags==true)) {if($edit_tags.url != "" and $show_edit_tags_link) {$label = """$label""";} foreach $t ($.tags) {$tag = """$t.name"""; $val = $val + $tag; $tcount++; if ($tcount < size($.tags)) {$val = $val + "$tags_separator";}}} if ($val != "") { $meta = $meta_label_open + $label + $meta_label_close + $meta_val_open + $val + $meta_val_close;} else {$meta = "";}$currents = $currents + $meta;}if ($wrap_metadata and defined $.mood_icon) {$currents = $currents + """
#================================== # FIX DOUBLE USERPIC ERROR ON REPLY PAGE # #================================== function ReplyPage::print_body() {var EntryLite e = $.replyto; var string poster = defined $e.poster ? $e.poster->as_string() : "(Anonymous)"; var string time = $e.time->time_format(); var string date = $e.time->date_format();"""
""";var UserLite name;"""
""";if ($.replyto isa Entry) {var Entry en = $.replyto as Entry;print safe """""";$this->print_entry($en);"""
""";
var Link expand_link = $c->get_link("expand_comments");
if ($c.thread_url != "" and defined $expand_link) {
" " + $c->expand_link();
}
print """