[mrtg] Customize indexmaker script

Jose Luis Rojano Piernagorda jluis.rojano at senado.es
Thu Oct 3 18:39:40 MEST 2002


Hello:

I am "fixing" the indexmaker code perl script so that I can include date and time in the index.html generated page.

I'd like to show date and time information translated to my language. To do so, i am inserting this code into the indexmaker script:

.... (code here)

use locales_mrtg "0.07"; <<<---- THIS IS NEW CODE

..... (code here)

########################### MY MODIFICATION <<<---- THIS IS NEW CODE

    # set the locale
    my $LOC;
    $LOC=$lang2tran::LOCALE{'spanish'};

    my $Dia_Hoy;
    $Dia_Hoy = &$LOC(datestr(time));
    $index .= "<hr><center>Estadisticas actualizadas a: <b>$Dia_Hoy</b></center><hr>";

###############

This is the error (in fact is a warning) that i get:


Scalar value @dollar[$j] better written as $dollar[$j] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1186.
Scalar value @quux[0] better written as $quux[0] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1190.
Scalar value @dollar[$j] better written as $dollar[$j] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1190.
Scalar value @quux[1] better written as $quux[1] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1190.
Scalar value @foo[0] better written as $foo[0] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1221.
Scalar value @foo[2] better written as $foo[2] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1221.
Scalar value @foo[3] better written as $foo[3] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1223.
Scalar value @foo[3] better written as $foo[3] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1225.
Scalar value @foo[3] better written as $foo[3] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1226.
Scalar value @quux[0] better written as $quux[0] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1226.
Scalar value @quux[1] better written as $quux[1] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1226.
Scalar value @foo[0] better written as $foo[0] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1228.
Scalar value @foo[1] better written as $foo[1] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1228.
Scalar value @foo[2] better written as $foo[2] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1228.
Scalar value @foo[3] better written as $foo[3] at /usr/local/mrtg-2/bin/../lib/mrtg2/locales_mrtg.pm line 1228.


*******************************************************


Any ideas???

Best regards,
JOse

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list