Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software:awstats [2011/01/25 13:44] cyril [Integration] |
software:awstats [2013/09/19 16:40] (current) |
||
---|---|---|---|
Line 70: | Line 70: | ||
Here is how to restore and independent scale for pages: | Here is how to restore and independent scale for pages: | ||
+ | |||
+ | TODO: not complete | ||
<code diff> | <code diff> | ||
--- awstats_orig.pl | --- awstats_orig.pl | ||
+++ awstats.pl | +++ awstats.pl | ||
- | @@ -16584,7 +16584,7 @@ | + | @@ -14226,6 +14226,10 @@ |
+ | print "< | ||
+ | print "</ | ||
+ | $total_u = $total_v = $total_p = $total_h = $total_k = 0; | ||
+ | + | ||
+ | + | ||
+ | + if ( $_ > $max_p ) { $max_p = $_; } | ||
+ | + } | ||
+ | $max_h = 1; | ||
+ | foreach ( values %_domener_h ) { | ||
+ | if ( $_ > $max_h ) { $max_h = $_; } | ||
+ | @@ -14242,9 +14246,9 @@ | ||
+ | my $bredde_p = 0; | ||
+ | my $bredde_h = 0; | ||
+ | my $bredde_k = 0; | ||
+ | - if ( $max_h > 0 ) { | ||
+ | + if ( $max_p > 0 ) { | ||
+ | $bredde_p = | ||
+ | - int( $BarWidth * $_domener_p{$key} / $max_h ) + 1; | ||
+ | + int( $BarWidth * $_domener_p{$key} / $max_p ) + 1; | ||
+ | } # use max_h to enable to compare pages with hits | ||
+ | if ( $_domener_p{$key} && $bredde_p == 1 ) { $bredde_p = 2; } | ||
+ | if ( $max_h > 0 ) { | ||
+ | @@ -16224,6 +16228,10 @@ | ||
+ | } | ||
+ | |||
+ | #if (($MonthPages{$YearRequired.$monthix}||0) > $max_p) | ||
+ | + if ( ( $MonthPages{ $YearRequired . $monthix } || 0 ) > $max_p ) | ||
+ | + { | ||
+ | + | ||
+ | + } | ||
+ | if ( ( $MonthHits{ $YearRequired . $monthix } || 0 ) > $max_h ) | ||
+ | { | ||
+ | $max_h = $MonthHits{ $YearRequired . $monthix }; | ||
+ | @@ -16253,7 +16261,7 @@ | ||
+ | my @valcolor = | ||
+ | ( " | ||
+ | " | ||
+ | - my @valmax = ( $max_v, $max_v, $max_h, $max_h, $max_k ); | ||
+ | + my @valmax = ( $max_v, $max_v, $max_p, $max_h, $max_k ); | ||
+ | my @valtotal = | ||
+ | ( $total_u, $total_v, $total_p, $total_h, $total_k ); | ||
+ | my @valaverage = (); | ||
+ | @@ -16305,11 +16313,11 @@ | ||
+ | ( $MonthVisits{ $YearRequired . $monthix } || 0 ) / | ||
+ | $max_v * $BarHeight ) + 1; | ||
+ | } | ||
+ | - if ( $max_h > 0 ) { | ||
+ | + if ( $max_p > 0 ) { | ||
+ | $bredde_p = | ||
+ | int( | ||
+ | ( $MonthPages{ $YearRequired . $monthix } || 0 ) / | ||
+ | - | ||
+ | + | ||
+ | } | ||
+ | if ( $max_h > 0 ) { | ||
+ | $bredde_h = | ||
+ | @@ -16565,7 +16573,7 @@ | ||
+ | $total_u | ||
+ | |||
+ | # Define total and max | ||
+ | - | ||
+ | + | ||
+ | 0; # Start from 0 because can be lower than 1 | ||
+ | foreach my $daycursor ( $firstdaytoshowtime .. $lastdaytoshowtime ) | ||
+ | { | ||
+ | @@ -16584,7 +16592,7 @@ | ||
$max_v = $DayVisits{ $year . $month . $day }; | $max_v = $DayVisits{ $year . $month . $day }; | ||
} | } | ||
Line 83: | Line 151: | ||
$max_h = $DayHits{ $year . $month . $day }; | $max_h = $DayHits{ $year . $month . $day }; | ||
} | } | ||
- | @@ -16617,7 +16617,7 @@ | + | @@ -16617,7 +16625,7 @@ |
$average_k = $average_k / $average_nb; | $average_k = $average_k / $average_nb; | ||
if ( $average_v > $max_v ) { $max_v = $average_v; } | if ( $average_v > $max_v ) { $max_v = $average_v; } | ||
Line 92: | Line 160: | ||
if ( $average_k > $max_k ) { $max_k = $average_k; } | if ( $average_k > $max_k ) { $max_k = $average_k; } | ||
} | } | ||
- | @@ -16656,7 +16656,7 @@ | + | @@ -16656,7 +16664,7 @@ |
); | ); | ||
my @valcolor = | my @valcolor = | ||
Line 101: | Line 169: | ||
$average_v = sprintf( " | $average_v = sprintf( " | ||
$average_p = sprintf( " | $average_p = sprintf( " | ||
- | @@ -16717,10 +16717,10 @@ | + | @@ -16717,10 +16725,10 @@ |
int( ( $DayVisits{ $year . $month . $day } || 0 ) / | int( ( $DayVisits{ $year . $month . $day } || 0 ) / | ||
$max_v * $BarHeight ) + 1; | $max_v * $BarHeight ) + 1; | ||
Line 114: | Line 182: | ||
if ( $max_h > 0 ) { | if ( $max_h > 0 ) { | ||
$bredde_h = | $bredde_h = | ||
- | @@ -16779,8 +16779,8 @@ | + | @@ -16779,8 +16787,8 @@ |
if ( $max_v > 0 ) { | if ( $max_v > 0 ) { | ||
$bredde_v = int( $average_v / $max_v * $BarHeight ) + 1; | $bredde_v = int( $average_v / $max_v * $BarHeight ) + 1; | ||
Line 125: | Line 193: | ||
if ( $max_h > 0 ) { | if ( $max_h > 0 ) { | ||
$bredde_h = int( $average_h / $max_h * $BarHeight ) + 1; | $bredde_h = int( $average_h / $max_h * $BarHeight ) + 1; | ||
- | @@ -17066,7 +17066,7 @@ | + | @@ -17066,7 +17074,7 @@ |
my @vallabel = | my @vallabel = | ||
( " | ( " | ||
Line 134: | Line 202: | ||
$average_p = sprintf( " | $average_p = sprintf( " | ||
$average_h = sprintf( " | $average_h = sprintf( " | ||
- | @@ -17115,13 +17115,13 @@ | + | @@ -17115,13 +17123,13 @@ |
my $bredde_p = 0; | my $bredde_p = 0; | ||
my $bredde_h = 0; | my $bredde_h = 0; | ||
Line 150: | Line 218: | ||
} | } | ||
if ( $max_h > 0 ) { | if ( $max_h > 0 ) { | ||
- | @@ -17298,7 +17298,7 @@ | + | @@ -17298,7 +17306,7 @@ |
$max_h = $max_k = 1; | $max_h = $max_k = 1; | ||
for ( my $ix = 0 ; $ix <= 23 ; $ix++ ) { | for ( my $ix = 0 ; $ix <= 23 ; $ix++ ) { | ||
Line 159: | Line 227: | ||
if ( $_time_k[$ix] > $max_k ) { $max_k = $_time_k[$ix]; | if ( $_time_k[$ix] > $max_k ) { $max_k = $_time_k[$ix]; | ||
} | } | ||
- | @@ -17309,7 +17309,7 @@ | + | @@ -17309,7 +17317,7 @@ |
my @vallabel | my @vallabel | ||
( " | ( " | ||
Line 168: | Line 236: | ||
my @valaverage = ( $average_p, $average_h, $average_k ); | my @valaverage = ( $average_p, $average_h, $average_k ); | ||
my @valdata | my @valdata | ||
- | @@ -17334,9 +17334,9 @@ | + | @@ -17334,9 +17342,9 @@ |
my $bredde_p = 0; | my $bredde_p = 0; | ||
my $bredde_h = 0; | my $bredde_h = 0; |