Quick Reply
From No LJ Ads Wiki
[edit] Overview
The Quick Reply (QR) comment form can be found in BML pages and some customized S2 EntryPages.
To use QR, you must make sure that QR is enabled for your account.
[edit] Anatomy
The QR comment form has several parts:
- From
- The account leaving the comment.
- Picture to use
- Select a userpic.
- This will have a "Browse" button if you are a Paid or Permanent user and will allow you to browse for a userpic.
- Subject
- Subject of comment.
- Message
- Text of comment.
- Post Comment
- Submits the comment to the entry.
- More Options
- Takes you to the normal reply form which has more options, such as the ability to choose a subject icon.
- Check spelling and preview
- Runs the comment through the spell-checker and shows a preview of it.
[edit] S2
In EntryPage::print_comment(Comment c):
function EntryPage::print_comment(Comment c) {
# [...]
var string reply_text = $*text_comment_reply; # var for reply text/link
var bool print_reply = true; # var for seeing if we're going to print a reply link
# [...]
if($c.frozen) { # if comment is frozen
$reply_text = $*text_comment_frozen; # change reply text
$print_reply = false; # we're not printing a reply link
}
if($.entry.comments.maxcomments) { # if the entry has maximum comments allowed
$reply_text = $*text_max_comments; # change reply text
$print_reply = false; # we're not printing a reply link
}
# [...]
if ($print_reply) { # if we're printing a reply link, do it
# print_reply_link(string{} opts)
# html attributes for link/image
# reply_url | explicit reply link url
# linktext | reply link text (required if not using image)
# target | only needed for EntryPage.post_url link, must be same as print_reply_container() target
# class | css class
# img_url | image source url (required if not using text)
# img_width | image width
# img_height | image height
# img_border | image border
# alt | image alt
# title | image title
"("; $c->print_reply_link({"linktext" => $reply_text}); ")";
} else {
"$reply_text "; # else, just print text
}
# [...]
if ($print_reply) { # if we're printing a reply link, print the reply container too
# print_reply_container(string{} opts)
# html attributes for postform container
# target | only needed for EntryPage.post_url, must be same as print_reply_link() target
# | when doing so:
# | this must be the same as the print_reply_link() target,
# | otherwise:
# | uses talkid of comment
# | ends up being "ljqrt$target" in the end
# class | css class
$c->print_reply_container({"class" => "quickreply"});
}
# [...]
}


