Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Re: [anup123] Message Preview In Search Results

Quote Reply
Re: [anup123] Message Preview In Search Results In reply to
There's a few things that you need to do to make it work:
- Update the templates
- Add the following code to admin/GMail/Messages/Search.pm, ~line 71:

Code:
# Add in the message preview
if (@list) {
my @mids;
for (0 .. $#list) {
push @mids, $list[$_]->{msgs_mid};
}
my $msth = $DB->table('msgsearch')->select('msgsearch_mid', 'msgsearch_body', { 'msgsearch_mid' => \@mids });
my %mid2body;
while (my ($msg_id, $msg_body) = $msth->fetchrow_array) {
$mid2body{$msg_id} = substr($msg_body, 0, $USER->{opts}->{display}->{preview} || 100);
}
for (0 .. $#list) {
$list[$_]->{msgs_preview} = $mid2body{$list[$_]->{msgs_mid}};
}
}

I'd just like to note that these changes were already added to Gossamer Mail 2.1.1.

Adrian
Subject Author Views Date
Thread Message Preview In Search Results anup123 2480 Jun 13, 2003, 4:51 PM
Post Re: [anup123] Message Preview In Search Results
brewt 2400 Jun 13, 2003, 5:46 PM