Add a "read more" link to entries on the latest page which have been 
cut off.

        Patch by yvi. 

diffs (13 lines):

diff -r 5698a6b28503 -r a8f5b24e71cc htdocs/latest.bml
--- a/htdocs/latest.bml Tue Jun 22 21:05:03 2010 +0800
+++ b/htdocs/latest.bml Tue Jun 22 21:24:46 2010 +0800
@@ -162,6 +162,9 @@ EOC
             my $time = LJ::ago_text( $now - $obj->logtime_unix );
             my $url = $obj->url;
             my $evt = $obj->event_html_summary( 2000, { cuturl => $url, 
preformatted => $obj->prop( 'opt_preformatted' ) } );
+            # put a "(Read more)" link at the end of the text if the entry had 
to be shortened - this will be unnecessarily printed if
+            # the text is exactly 2,000 characters long
+            $evt .= ' <a href="' . $url . '">(Read more)</a>' if length( $evt 
) >= 2000; 
             my $comments = $obj->reply_count == 1 ? "1 comment" : ( 
$obj->reply_count > 0 ? $obj->reply_count . ' comments' : 'no comments' );
             my $replyurl = $obj->reply_url;
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to