From 90a1d0e26a6fc74f65aae5727da23a2b7244ceba Mon Sep 17 00:00:00 2001 From: eldy <> Date: Sat, 15 Nov 2008 15:11:31 +0000 Subject: [PATCH] Added TabHeadHTML hook --- wwwroot/cgi-bin/awstats.pl | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 0d2219ab..1f61c3d1 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -33,6 +33,7 @@ use vars qw/ $LIMITFLUSH $NEWDAYVISITTIMEOUT $VISITTIMEOUT $NOTSORTEDRECORDTOLERANCE $WIDTHCOLICON $TOOLTIPON $lastyearbeforeupdate $lastmonthbeforeupdate $lastdaybeforeupdate $lasthourbeforeupdate $lastdatebeforeupdate + $NOHTML /; $DEBUGFORCED = 0 ; # Force debug level to log lesser level into debug.log file (Keep this value to 0) @@ -50,6 +51,7 @@ $NOTSORTEDRECORDTOLERANCE = 20000 ; # Lapse of time to accept a record if not in correct order. 20000 = 2 hour (Default = 20000) $WIDTHCOLICON = 32; $TOOLTIPON = 0; # Tooltips plugin loaded +$NOHTML = 0; # Suppress the html headers # ----- Running variables ----- use vars qw/ @@ -769,6 +771,7 @@ sub http_head { #------------------------------------------------------------------------------ sub html_head { my $dir = $PageDir ? 'right' : 'left'; + if ($NOHTML) { return; } if ( scalar keys %HTMLOutput || $PluginMode ) { my $periodtitle = " ($YearRequired"; @@ -1022,6 +1025,14 @@ sub tab_head { my $tooltipnb = shift; my $width = shift || 70; my $class = shift; + + # Call to plugins' function TabHeadHTML + my $extra_head_html=''; + foreach my $pluginname (keys %{$PluginsLoaded{'TabHeadHTML'}}) { + my $function="TabHeadHTML_$pluginname"; + $extra_head_html .=&$function($title); + } + if ( $width == 70 && $QueryString =~ /buildpdf/i ) { print "\n"; @@ -1032,12 +1043,10 @@ sub tab_head { } if ($tooltipnb) { - print ""; + print ""; } else { - print ""; + print ""; } print "\n"; print "
$title
$title ".$extra_head_html."
$title
$title ".$extra_head_html." 
\n"; -- 2.47.3