[dw-free] Site-styled entry pages: turn subject into clean link
[commit: http://hg.dwscoalition.org/dw-free/rev/ef593378e31e]
http://bugs.dwscoalition.org/show_bug.cgi?id=3856
Add "no subject" so we have linkable text when there's no subject, and also
make sure that the nsfw/security icons are always on the same line as the
subject
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3856
Add "no subject" so we have linkable text when there's no subject, and also
make sure that the nsfw/security icons are always on the same line as the
subject
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/LJ/Entry.pm
- htdocs/talkread.bml
-------------------------------------------------------------------------------- diff -r 514569a885c0 -r ef593378e31e cgi-bin/LJ/Entry.pm --- a/cgi-bin/LJ/Entry.pm Fri Sep 23 00:44:33 2011 -0500 +++ b/cgi-bin/LJ/Entry.pm Fri Sep 23 15:46:42 2011 +0800 @@ -2305,7 +2305,7 @@ $ret .= "<tr><td align='right'>$curname</td>"; $ret .= "<td>$current{$_}</td></tr>\n"; } - $ret .= "</table><p>\n"; + $ret .= "</table>\n"; return $ret; } diff -r 514569a885c0 -r ef593378e31e htdocs/talkread.bml --- a/htdocs/talkread.bml Fri Sep 23 00:44:33 2011 -0500 +++ b/htdocs/talkread.bml Fri Sep 23 15:46:42 2011 +0800 @@ -324,17 +324,18 @@ $age_restriction = LJ::img( "adult-nsfw" ); } - $ret .= $sec . $age_restriction; - $ret .= "<br />\n" unless ( $sec eq "" && $age_restriction eq "" ) or $item->{subject}; ### - if ($item->{'subject'}) { - my $subject = LJ::CleanHTML::quote_html( $item->{subject}, $GET{nohtml} ); + my $subject; + if ( $item->{subject} ) { + $subject = LJ::CleanHTML::quote_html( $item->{subject}, $GET{nohtml} ); LJ::CleanHTML::clean_subject(\$subject); BML::ebml(\$subject); - $ret .= qq{<div id='entrysubj'><a href="$talkurl">$subject</a></div><br />\n}; + } else { + $subject = $T{nosubject}; } - + my $flags = ( $sec or $age_restriction ) ? "$sec$age_restriction " : ""; + $ret .= qq{<div id='entrysubj'>$flags<a href="$talkurl">$subject</a></div><br />\n}; $event = LJ::CleanHTML::quote_html( $event, $GET{nohtml} ); $ret .= $event; --------------------------------------------------------------------------------