Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Truncate message subject

Quote Reply
Truncate message subject

Who's done the hack to truncate message subjects? If anyone has, do they fancy posting how to do this. This would be a welcomed addition to the default installation.


- wil
Quote Reply
Re: [Wil] Truncate message subject In reply to
This is just an easy template change. If you add a global, say short_post_subject, which has the following code:
sub {
my $vars = shift;
(my $subject = $vars->{post_subject}) =~ s/^(.{25}).+$/$1 .../;
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
and you'll acheive that.


Last edited by:

brewt: Jan 14, 2002, 2:06 AM