[dw-free] add link back to comment & parent on ?replyto=foo in sitescheme
[commit: http://hg.dwscoalition.org/dw-free/rev/ad465478da5a]
http://bugs.dwscoalition.org/show_bug.cgi?id=2267
Add links back to reply, thread, parent, thread from start.
Patch by
yvi.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2267
Add links back to reply, thread, parent, thread from start.
Patch by
Files modified:
- cgi-bin/LJ/Comment.pm
- htdocs/talkpost.bml
--------------------------------------------------------------------------------
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;
--------------------------------------------------------------------------------

no subject
no subject