Skip to main content.
home | support | download

Back to List Archive

Re: about the format of swishlastmodified

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Fri May 09 2003 - 18:15:13 GMT
On Fri, May 09, 2003 at 10:37:48AM -0700, Jean Mao wrote:
> Hi,=20
> the output of my swish-e has a line like:=20
>       Last Modified Date: 2002-06-03 14:15:00 EDT=20
> 
> 
> how can I make the font format of '2002-06-03 14:15:00 EDT' part the =
> same as 'Last Modified Date' part which is not bolded and/or smaller? I =
> have trouble find which file and where to modify. Thanks.

perldoc swish.cgi

   Frequently Asked Questions
       Here's some common questions and answers.

       How do I change the way the output looks?


That will require looking through the Perl code.  All those extra Properties are displayed 
using the same format.

Here's the code that does that in the TemplateDefault.pm module:

    my $display_props = $results->config('display_props');
    if ( $display_props ) {


        $props = join "\n",
            '<br><table cellpadding="0" cellspacing="0">',
            map ( {
                '<tr><td><small>'
                . ( $name_labels->{$_} || $_ )
                . ':</small></td><td><small> '
                . '<b>'
                . ( defined $this_result->{$_} ?  $this_result->{$_} : '' )
                . '</b>'
                . '</small></td></tr>'
                 }   @$display_props
            ),
            '</table>';
    }

So you would just want to remove the <b> and </b>.

I would encourage the use of a templating system in most cases -- that HTML inside the Perl 
code leads to ugly programming...


BTW -- here's a nice trick for your .swishcgi.conf file:

   $ENV{TZ} = 'UTC';

display the dates in GMT instead.



-- 
Bill Moseley
moseley@hank.org
Received on Fri May 9 18:19:31 2003