Home : Products : Gossamer Forum : Discussion :

Products: Gossamer Forum: Discussion: Re: [Wil] Truncate message subject: Edit Log

Here is the list of edits for this post
Re: [Wil] Truncate message subject
This is just an easy template change. If you add a global, say short_post_subject, which has the following code:
Code:
sub {
my $vars = shift;
(my $subject = $vars->{post_subject}) =~ s/^(.{25}).+$/$1 .../;
$subject;
};
Where 25 is the maximum length of the subject. Of course, you could always make that regex a little more intelligent (eg. don't truncate words).

In forum_view.html, around line 170, replace
<%post_subject%>
with
<%short_post_subject%>
and you'll acheive that.

Adrian

Last edited by:

brewt: Jan 14, 2002, 2:06 AM

Edit Log: