Display number of comments on reply pages that use site schemes.
Codemerge from LJ; prepared for Dreamwidth by <user name=denise>.
diffs (69 lines):
diff -r b510e43dbfcd -r a99bebf23fe2 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat Wed Nov 11 11:59:30 2009 +0000
+++ b/bin/upgrading/en.dat Thu Nov 12 11:04:06 2009 -0600
@@ -3491,6 +3491,12 @@ talk.commentpost=Post a new comment
talk.commentsread=Read comments
+talk.commentsread.counted=Read [[replycount]] [[?replycount|comment|comments]]
+
+talk.comments.counted=[[replycount]] [[?replycount|comment|comments]]
+
+talk.commentsread.nocomments=No comments
+
talk.curname_groups=<b>Custom friends groups:</b>
talk.curname_location=<b>Current location:</b>
diff -r b510e43dbfcd -r a99bebf23fe2 htdocs/talkpost.bml
--- a/htdocs/talkpost.bml Wed Nov 11 11:59:30 2009 +0000
+++ b/htdocs/talkpost.bml Thu Nov 12 11:04:06 2009 -0600
@@ -361,7 +361,13 @@ body<=
my $jarg = "journal=$u->{'user'}&";
my $readurl = LJ::Talk::talkargs($talkurl, $stylemine, $formatlight);
- $ret .= "<p align='center' class='lesstop'><b>(<a
href=\"$readurl#comments\">$ML{'talk.commentsread'}</a>)</b></p>";
+ my $replycount = $entry->prop( "replycount" );
+ my $readlink_text = BML::ml( "talk.commentsread.counted",
+ { replycount => $replycount } );
+ $readlink_text = BML::ml( "talk.commentsread.nocomments" )
+ if $replycount == 0;
+
+ $ret .= "<p align='center' class='lesstop'><b>(<a
href=\"$readurl#comments\">$readlink_text</a>)</b></p>";
# can a comment even be made?
if ($props->{'opt_nocomments'}) {
diff -r b510e43dbfcd -r a99bebf23fe2 htdocs/talkread.bml
--- a/htdocs/talkread.bml Wed Nov 11 11:59:30 2009 +0000
+++ b/htdocs/talkread.bml Thu Nov 12 11:04:06 2009 -0600
@@ -765,10 +765,19 @@ body<=
$ret .= "<div id='Comments'>";
$ret .= "<a name='comments'></a>";
$ret .= "<p>$navcrap</p>" if $navcrap;
+
my $readlink;
- if ($dthread && $pages == 1) {
- my $readurl = LJ::Talk::talkargs($talkurl, $stylemine,
$formatlight);
- $readlink = "(<a href='$readurl#comments'>$T{'readcomments'}</a>)
- ";
+ my $replycount = $entry->prop("replycount");
+ my $readlink_text = BML::ml( "talk.commentsread.counted",
+ { replycount => $replycount } );
+ my $comments_count = BML::ml( "talk.comments.counted",
+ { replycount => $replycount } );
+
+ if ( $dthread && $pages == 1 ) {
+ my $readurl = LJ::Talk::talkargs( $talkurl, $stylemine,
$formatlight );
+ $readlink = "(<a href='$readurl#comments'>$readlink_text</a>) - ";
+ } else {
+ $readlink = "($comments_count) - " if $replycount > 0;
}
#
@@ -785,7 +794,7 @@ body<=
# See if we want to force them to change their password
my $bp = LJ::bad_password_redirect({ 'returl' => 1 });
if ($bp) {
- $ret .= "(<a href='$bp'>$T{'replythis'}</a>)";
+ $ret .= "(<a href='$bp'>$T{'replythis'} </a>)";
} else {
$ret .= "(" . LJ::make_qr_link('top', '', $T{'postcomments'},
$posturl) . ")";
}
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog