From: eldy <> Date: Mon, 27 May 2002 23:20:15 +0000 (+0000) Subject: New feature: Added keywords AND keyphrases chart. No need to choose one or other. X-Git-Tag: AWSTATS_4_1_BETA~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edba16d4cb01dcda370e6e419144696eae334ac4;p=thirdparty%2FAWStats.git New feature: Added keywords AND keyphrases chart. No need to choose one or other. --- diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf index 2c0c9075..b6d4e95f 100644 --- a/wwwroot/cgi-bin/awstats.model.conf +++ b/wwwroot/cgi-bin/awstats.model.conf @@ -361,14 +361,6 @@ WarningMessages=1 # NbOfLinesForCorruptedLog=50 -# Search engines keywords reported are full search string or separate keywords -# Possible values: -# 0 - Search keywords reported are full search string (ie: "town maps") -# 1 - Search keywords reported are separated words (ie: "town" and "maps") -# Default: 0 -# -SplitSearchString=0 - # For some particular integration needs, you may want to have CGI links to # point to another script than awstats.pl. # Use the name of this script in WrapperScript parameter. diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 64486326..f942642b 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -125,7 +125,7 @@ $NbOfLinesRead $NbOfLinesDropped $NbOfLinesCorrupted $NbOfOldLines $NbOfNewLines $NewLinePhase $NbOfLinesForCorruptedLog $PurgeLogFile $ShowAuthenticatedUsers $ShowCompressionStats $ShowFileSizesStats $ShowDropped $ShowCorrupted $ShowUnknownOrigin $ShowLinksToWhoIs -$SplitSearchString $StartSeconds $StartMicroseconds +$StartSeconds $StartMicroseconds $HTMLOutput $UpdateStats $URLWithQuery /; ($AllowAccessFromWebToAuthenticatedUsersOnly, $BarHeight, $BarWidth, $DebugResetDone, @@ -138,9 +138,9 @@ $NbOfLinesRead, $NbOfLinesDropped, $NbOfLinesCorrupted, $NbOfOldLines, $NbOfNewL $NewLinePhase, $NbOfLinesForCorruptedLog, $PurgeLogFile, $ShowAuthenticatedUsers, $ShowCompressionStats, $ShowFileSizesStats, $ShowDropped, $ShowCorrupted, $ShowUnknownOrigin, $ShowLinksToWhoIs, -$SplitSearchString, $StartSeconds, $StartMicroseconds, +$StartSeconds, $StartMicroseconds, $HTMLOutput, $UpdateStats, $URLWithQuery)= -(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); use vars qw/ $AllowToUpdateStatsFromBrowser $ArchiveLogRecords $DetailedReportsOnNewWindows $FirstDayOfWeek $SaveDatabaseFilesWithPermissionsForEveryone @@ -792,7 +792,6 @@ sub Read_Config_File { if ($param =~ /^URLWithQuery/) { $URLWithQuery=$value; next; } if ($param =~ /^WarningMessages/) { $WarningMessages=$value; next; } if ($param =~ /^NbOfLinesForCorruptedLog/) { $NbOfLinesForCorruptedLog=$value; next; } - if ($param =~ /^SplitSearchString/) { $SplitSearchString=$value; next; } if ($param =~ /^Expires/) { $Expires=$value; next; } if ($param =~ /^WrapperScript/) { $WrapperScript=$value; next; } # Read optional accuracy setup section @@ -1094,7 +1093,6 @@ sub Check_Config { if ($URLWithQuery !~ /[0-1]/) { $URLWithQuery=0; } if ($WarningMessages !~ /[0-1]/) { $WarningMessages=1; } if ($NbOfLinesForCorruptedLog !~ /^\d+/ || $NbOfLinesForCorruptedLog<1) { $NbOfLinesForCorruptedLog=50; } - if ($SplitSearchString !~ /[0-1]/) { $SplitSearchString=0; } if ($Expires !~ /^\d+/) { $Expires=0; } # Optional accuracy setup section if ($LevelForRobotsDetection !~ /^\d+/) { $LevelForRobotsDetection=2; } @@ -3701,16 +3699,8 @@ if ($UpdateStats) { $param =~ s/^cache:[^\+]*//; $param =~ s/^related:[^\+]*//; &ChangeWordSeparatorsIntoSpace($param); # Change [ aaa+bbb/ccc+ddd%20eee'fff,ggg ] into [ aaa bbb/ccc ddd eee fff ggg] - if ($SplitSearchString) { - my @wordlist=split(/ /,$param); # Split aaa bbb ccc ddd eee fff into a wordlist array - foreach my $word (@wordlist) { - if ((length $word) > 0) { $_keyphrases{$word}++; } - } - } - else { - $param =~ s/^ +//; $param =~ s/ +$//; $param =~ tr/ /\+/s; - if ((length $param) > 0) { $_keyphrases{$param}++; } - } + $param =~ s/^ +//; $param =~ s/ +$//; $param =~ tr/ /\+/s; + if ((length $param) > 0) { $_keyphrases{$param}++; } last; } } @@ -3727,16 +3717,8 @@ if ($UpdateStats) { $param =~ s/.*=//; # Cut "xxx=" $param =~ s/^cache:[^ ]*//; $param =~ s/^related:[^ ]*//; - if ($SplitSearchString) { - my @wordlist=split(/ /,$param); # Split aaa bbb ccc ddd eee fff into a wordlist array - foreach my $word (@wordlist) { - if ((length $word) > 2) { $_keyphrases{$word}++; } # Keep word only if word length is 3 or more - } - } - else { - $param =~ s/^ +//; $param =~ s/ +$//; $param =~ tr/ /\+/s; - if ((length $param) > 2) { $_keyphrases{$param}++; } - } + $param =~ s/^ +//; $param =~ s/ +$//; $param =~ tr/ /\+/s; + if ((length $param) > 2) { $_keyphrases{$param}++; } } } } # End of if refurl[1]