Add links back to reply, thread, parent, thread from start.
Patch by yvi.
diffs (50 lines):
diff -r 1537a89bbc5c -r ad465478da5a cgi-bin/LJ/Comment.pm
--- a/cgi-bin/LJ/Comment.pm Thu Apr 29 01:26:27 2010 -0700
+++ b/cgi-bin/LJ/Comment.pm Thu Apr 29 01:31:55 2010 -0700
@@ -263,12 +263,12 @@ sub reply_url {
}
sub parent_url {
- my $self = shift;
+ my ( $self, $url_args ) = @_;
my $parent = $self->parent;
return undef unless $parent;
- return $parent->url;
+ return $parent->url( $url_args );
}
sub unscreen_url {
diff -r 1537a89bbc5c -r ad465478da5a htdocs/talkpost.bml
--- a/htdocs/talkpost.bml Thu Apr 29 01:26:27 2010 -0700
+++ b/htdocs/talkpost.bml Thu Apr 29 01:31:55 2010 -0700
@@ -369,6 +369,28 @@ body<=
$ret .= $event;
$ret .= "</div>";
+ # links to reply, thread from start, parent comment, and thread
+ if ( $parentcomment ) {
+ $ret .= "<br /><div id='comment-interaction-links'>";
+
+ my $reply_url = LJ::Talk::talkargs( $parentcomment->reply_url,
LJ::viewing_style_args( %GET ) );
+ $ret .= "(<a href=". $reply_url . ">" . $ML{'talk.replytothis'} .
"</a>)";
+
+ # only link to thread from start / parent comment if this isn't a
top-level comment
+ if ( $parentcomment->parent ) {
+ my $threadstart_url = $parentcomment->threadroot_url(
LJ::viewing_style_args( %GET ) );
+ $ret .= " (<a href=". $threadstart_url . ">" .
$ML{'talk.threadrootlink'} . "</a>)";
+
+ my $parent_url = $parentcomment->parent_url(
LJ::viewing_style_args( %GET ) );
+ $ret .= " (<a href=". $parent_url . ">" . $ML{'talk.parentlink'} .
"</a>)";
+ }
+
+ my $thread_url = $parentcomment->url( LJ::viewing_style_args( %GET ) );
+ $ret .= " (<a href=". $thread_url . ">" . $ML{'talk.threadlink'} .
"</a>)";
+ }
+
+ $ret .= "</div>";
+
$ret .= "<br clear='both' /><hr size='2' align='center' />";
my $qotd = 0;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog