wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r17795: LJSUP-7457. Add trim the comm_title

Committer: gprochaev
LJSUP-7457. Add trim the comm_title

U   trunk/cgi-bin/LJ/Widget/Browse.pm
Modified: trunk/cgi-bin/LJ/Widget/Browse.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Browse.pm	2010-11-26 05:20:22 UTC (rev 17794)
+++ trunk/cgi-bin/LJ/Widget/Browse.pm	2010-11-26 05:28:16 UTC (rev 17795)
@@ -209,6 +209,8 @@
 
             my $secondsold = $comm->timeupdate ? time() - $comm->timeupdate : undef;
             my $userpic = $comm->userpic ? $comm->userpic->imgtag_percentagesize(1) : '';
+            my $descr = $comm->prop('comm_theme') || '';
+            my $descr_trimmed = LJ::html_trim($descr, 50);
 
             push @tmpl_communities,
                 {
@@ -218,7 +220,8 @@
                     journal_user        => $comm->{user},
                     journal_base        => $comm->journal_base(),
                     journal_title       => $comm->{'name'} || '',
-                    journal_subtitle    => $comm->prop('comm_theme') || '',
+                    journal_subtitle    => $descr_trimmed,
+                    is_subtitle_trimmed => $descr ne $descr_trimmed ? 1 : 0,
                     updated_ago         => LJ::TimeUtil->ago_text($secondsold),
                 };
         }

Tags: livejournal, pm, wisest-owl
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments