Emily Smemily (my_silverlining) wrote in component_help,
Emily Smemily
my_silverlining
component_help

Help With Custom Comments

I checked out the tutorial (which already helped me out a TON), but I couldn't figure out how to change the text in my custom comments drop down menu pertaining to changing your icon when posting a new comment. Any ideas?


#===============================================
# PROPERTIES PERTAINING TO COMMENTS #
#===============================================
### USERPIC PROPERTY - YES, NO OR SMALL ###
set comment_userpic_style = "small";
set text_comment_from = "From:";
set text_poster_anonymous = "(Anonymous)";
set text_permalink = "Link";
set text_comment_date = "Date:";
set text_multiform_check = "Select:";
set text_comment_ipaddr = "IP Address:";
set text_comment_reply = "Reply";
set text_comment_frozen = "Frozen";
set text_comment_parent = "Parent";
set text_comment_thread = "Thread";
set text_comment_expand = "Expand";
set text_comment_edittime = "Edited at";
set comments_bgcolor = "#F6FBF5";
set comments_screened_bgcolor = "#eeeeff";


#===============================================
# POST COMMENT LINKBAR #
#===============================================
function Comment::print_linkbar() {var string link_separator = " ";var string[] link_keyseq = [""];var string{} link_url = {"" => ""};var string{} link_caption = {"" => ""};var string{} link_image = {"" => ""}; var string print = ""; foreach var string link_key ($.link_keyseq) {var Link link = $this->get_link($link_key);$link_url{$link_key} = $link.url;$link_caption{$link_key} = $link.caption;$link_image{$link_key} = $link.icon.url;$link_keyseq[size($link_keyseq)] = $link_key; }

$link_image = {"edit_comment" => "http://i147.photobucket.com/albums/r304/snubicons/pdlyts/edit-1.gif",
"delete_comment" => "http://i147.photobucket.com/albums/r304/snubicons/pdlyts/delete.gif",
"screen_comment" => "http://i147.photobucket.com/albums/r304/snubicons/pdlyts/unscr.gif",
"unscreen_comment" => "http://i147.photobucket.com/albums/r304/snubicons/pdlyts/screen.gif",
"freeze_thread" => "http://i147.photobucket.com/albums/r304/snubicons/pdlyts/watch.gif",
"unfreeze_thread" => "http://i147.photobucket.com/albums/r304/snubicons/pdlyts/unwatch.gif",
"watch_thread" => "http://i147.photobucket.com/albums/r304/snubicons/pdlyts/track.gif",
"watching_parent" => "http://i147.photobucket.com/albums/r304/snubicons/pdlyts/track.gif",
"unwatch_thread" => "http://i147.photobucket.com/albums/r304/snubicons/pdlyts/untrack.gif",};

foreach var string link_key ($link_keyseq) {if($link_url{$link_key} != ""){$print = $print + """"""; if($link_image{$link_key} != ""){var string id = "";if($link_key->contains("screen")){ $id = "sus_";}if($link_key->contains("freeze")){ $id = "fuf_";}$id = "$id$.talkid";$print = $print + """$link_caption{$link_key}""";} else {$print = $print + "$link_caption{$link_key}";}$print = $print + "$link_separator";}}$print = $print->substr(0, $print->length() - $link_separator->length());print $print;}

#===============================================
# PRINT COLLAPSED COMMENTS #
#===============================================
function EntryPage::print_comment_partial (Comment c) {var string link_open_bracket = "("; var string link_close_bracket = ")";if($c.depth == 1) {var Comment[] replies;$replies = $c.replies;var int count = 0;foreach var Comment reply ($replies) {$count ++;}var string head;if($count > 0) {$head = "Thread started by a screened user";} else {$head = "Comment by screened user";}print_entry_header($head);print_comment_top();}var string content;if($c.screened) {$content = "Screened comment";} else {var string poster = defined $c.poster ? $c.poster->as_string() : "(Anonymous)";var string subj = $c.subject != "" ? $c.subject : $*text_nosubject;$content = "$subj - $poster";}var Link expand_link = $c->get_link("expand_comments");if ($c.thread_url != "" and defined $expand_link) {$content = "$content " + "$link_open_bracket" + $c->expand_link() + "$link_close_bracket";}print_comment_content_top($c);"$content";print_comment_content_bottom();}

#===============================================
# PRINT FULL COMMENTS #
#===============================================
function EntryPage::print_comment(Comment c) {var string comment_prefix = "Comment by "; var string thread_prefix = "Thread started by "; var string anonymous_title = "Anonymous";
var Color comments_frozen_bgcolor = "#E1CFDC"; var bool allpics_link = false; var bool show_picword = false; var string link_open_bracket = "("; var string link_close_bracket = ")"; var string ip_open_bracket = "["; var string ip_close_bracket = "]";var string link_separator = " ";var string header_bgcolor = ($c.screened ? "$*comments_screened_bgcolor" : "$*comments_bgcolor");var string reply = $*text_comment_reply;var bool print_reply_link = true;if ($c.frozen) { $header_bgcolor = $comments_frozen_bgcolor; $print_reply_link = false; $reply = $*text_comment_frozen; }if ($.entry.comments.maxcomments) { $reply = $*text_max_comments; $print_reply_link = false; }print """""";if ($c.depth == 1) {print_entry_header((size $c.replies > 0 ? $thread_prefix : $comment_prefix) + (defined $c.poster ? $c.poster.name : $anonymous_title)); print_comment_top();}var int indent = ($c.depth - 1) * 25;"""
"""; """
"""; var bool show_userpic = (defined $c.userpic) and ($*comment_userpic_style != "off"); var bool show_ip = ($c.metadata{"poster_ip"} != ""); var bool show_subject = ($c.subject != "" or defined $c.subject_icon); """"""; if ($show_userpic) {var string alttext = $c.poster.name;var string title = "";var string picword = $c.metadata{"picture_keyword"};var Image upi = $c.userpic;var int width = $upi.width;var int height = $upi.height;var string userpic = "";if ($picword != "") { $alttext = $alttext + ": " + $picword;}if ($show_picword) { $title = $alttext;}if ($*comment_userpic_style == "small") { $width = $width / 2; $height = $height / 2;}$userpic = """$alttext""";if ($allpics_link) { $userpic = """$userpic""";}""" """;}"""
$userpic """;}""""""; """"""; """"""; """"""; """"""; """"""; if ($.multiform_on) {"""""";}""""""; if ($show_ip) {""""""; """"""; """""";}if ($show_subject) {""""""; """"""; """""";}if ($show_userpic) {"""
$*text_comment_from """; if (defined $c.poster) {"""$c.poster""";} else {"""$*text_poster_anonymous""";}""""""; $c->print_linkbar(); """$link_open_bracket$*text_permalink$link_close_bracket
$*text_comment_date """; print $c->time_display("long", ""); """"""; $c->print_multiform_check(); """
$*text_comment_ipaddr $c.metadata{"poster_ip"}
"""; if (defined $c.subject_icon) {"""$c.subject_icon """;}if ($c.subject != "") {"""$c.subject""";}"""
"""; """
"""; $c->print_text(); """
"""; """
$link_open_bracket"""; if ($print_reply_link) {$c->print_reply_link({"linktext" => $reply});} else {"""$reply""";}"""$link_close_bracket"""; if ($c.parent_url != "") {"""$link_separator$link_open_bracket$*text_comment_parent$link_close_bracket""";}if ($c.thread_url != "") {"""$link_separator$link_open_bracket$*text_comment_thread$link_close_bracket"""; var Link expand_link = $c->get_link("expand_comments"); if (defined $expand_link) {"$link_separator$link_open_bracket" + $c->expand_link() + "$link_close_bracket";}}if ($print_reply_link) {$c->print_reply_container({"class" => "quickreply_comment"});}"""
"""; print_comment_content_bottom();}


Tags: /topic-tutorial: custom comments
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic
  • 0 comments