fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-08-23 11:05 am

[dw-free] Add comment image to RSS feed

[commit: http://hg.dwscoalition.org/dw-free/rev/06936ee88b96]

http://bugs.dwscoalition.org/show_bug.cgi?id=2028

Include comment count at bottom of entry in feeds

Patch by [staff profile] denise.

Files modified:
  • cgi-bin/LJ/Entry.pm
  • cgi-bin/ljfeed.pl
--------------------------------------------------------------------------------
diff -r 1dadbb802d5a -r 06936ee88b96 cgi-bin/LJ/Entry.pm
--- a/cgi-bin/LJ/Entry.pm	Tue Aug 23 18:53:01 2011 +0800
+++ b/cgi-bin/LJ/Entry.pm	Tue Aug 23 19:05:20 2011 +0800
@@ -264,7 +264,7 @@
 sub comment_imgtag {
     my $self = $_[0];
 
-    my $alttext = LJ::Lang::ml('setting.xpost.option.footer.vars.comment_image.alttext');
+    my $alttext = LJ::Lang::ml('setting.xpost.option.footer.vars.comment_image.alt');
     
     return '<img src="' . $self->comment_image_url . '" width="30" height="12" alt="' . $alttext . '" style="vertical-align: middle;"/>';
 }
diff -r 1dadbb802d5a -r 06936ee88b96 cgi-bin/ljfeed.pl
--- a/cgi-bin/ljfeed.pl	Tue Aug 23 18:53:01 2011 +0800
+++ b/cgi-bin/ljfeed.pl	Tue Aug 23 19:05:20 2011 +0800
@@ -256,6 +256,10 @@
                 if $event =~ m!<lj-phonepost journalid=[\'\"]\d+[\'\"] dpid=[\'\"](\d+)[\'\"]( /)?>!;
         }
 
+        # include comment count image at bottom of event (for readers
+        # that don't understand the commentcount)
+        $event .= "<br /><br />" . $entry_obj->comment_imgtag . " comments";
+
         my $mood;
         if ($logprops{$itemid}->{'current_mood'}) {
             $mood = $logprops{$itemid}->{'current_mood'};
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org