mirror of
https://github.com/darold/squidanalyzer.git
synced 2025-07-03 12:14:28 +02:00
Add CustomHeader to allow custom definition of the logo and title. See squidanalyzer.conf or documentation for more explanation and example. Thanks to Raktim Chatterjee.
This commit is contained in:
parent
7739e35840
commit
b3ff727a55
14
README
14
README
@ -199,6 +199,20 @@ CONFIGURATION
|
|||||||
The URL of the SquidAnalyzer javascript, HTML and images files.
|
The URL of the SquidAnalyzer javascript, HTML and images files.
|
||||||
Default: /squidreport
|
Default: /squidreport
|
||||||
|
|
||||||
|
CustomHeader
|
||||||
|
This directive allow you to replace the SquidAnalyze logo by your
|
||||||
|
custom logo. The default value is defined as follow:
|
||||||
|
|
||||||
|
<a href="$self->{WebUrl}">
|
||||||
|
<img src="$self->{WebUrl}images/logo-squidanalyzer.png" title="SquidAnalyzer $VERSION" border="0">
|
||||||
|
</a> SquidAnalyzer
|
||||||
|
|
||||||
|
Feel free to define your own header but take care to not break
|
||||||
|
current design. For example:
|
||||||
|
|
||||||
|
CustomHeader <a href="http://my.isp.dom/"><img src="http://my.isp.dom/logo.png" title="My ISP link" border="0" width="100" height="110"></a> My ISP Company
|
||||||
|
126,1 Bas
|
||||||
|
|
||||||
LogFile squid_access_log_file
|
LogFile squid_access_log_file
|
||||||
Set the path to the Squid log file.
|
Set the path to the Squid log file.
|
||||||
|
|
||||||
|
@ -734,6 +734,8 @@ sub _init
|
|||||||
$self->{DNSLookupTimeout} = $options{DNSLookupTimeout} || 0.0001;
|
$self->{DNSLookupTimeout} = $options{DNSLookupTimeout} || 0.0001;
|
||||||
$self->{DNSLookupTimeout} = int($self->{DNSLookupTimeout} * 1000000);
|
$self->{DNSLookupTimeout} = int($self->{DNSLookupTimeout} * 1000000);
|
||||||
$self->{pidfile} = $pidfile || '/tmp/squid-analyzer.pid';
|
$self->{pidfile} = $pidfile || '/tmp/squid-analyzer.pid';
|
||||||
|
$self->{CustomHeader} = $options{CustomHeader} || qq{<a href="$self->{WebUrl}"><img src="$self->{WebUrl}images/logo-squidanalyzer.png" title="SquidAnalyzer $VERSION" border="0"></a> SquidAnalyzer};
|
||||||
|
|
||||||
|
|
||||||
if ($self->{Lang}) {
|
if ($self->{Lang}) {
|
||||||
open(IN, "$self->{Lang}") or die "ERROR: can't open translation file $self->{Lang}, $!\n";
|
open(IN, "$self->{Lang}") or die "ERROR: can't open translation file $self->{Lang}, $!\n";
|
||||||
@ -1536,8 +1538,7 @@ sub _print_header
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="alignLeft">
|
<div id="alignLeft">
|
||||||
<h1>
|
<h1>
|
||||||
<a href="$self->{WebUrl}"><img src="$self->{WebUrl}images/logo-squidanalyzer.png" title="SquidAnalyzer $VERSION" border="0"></a>
|
$self->{CustomHeader}
|
||||||
SquidAnalyzer
|
|
||||||
</h1>
|
</h1>
|
||||||
<p class="sous-titre">
|
<p class="sous-titre">
|
||||||
$Translate{'Generation'} $now.
|
$Translate{'Generation'} $now.
|
||||||
|
@ -206,6 +206,21 @@ You should give a path that can be read by a Web browser.
|
|||||||
The URL of the SquidAnalyzer javascript, HTML and images files.
|
The URL of the SquidAnalyzer javascript, HTML and images files.
|
||||||
Default: /squidreport
|
Default: /squidreport
|
||||||
|
|
||||||
|
=item CustomHeader
|
||||||
|
|
||||||
|
This directive allow you to replace the SquidAnalyze logo by your custom
|
||||||
|
logo. The default value is defined as follow:
|
||||||
|
|
||||||
|
<a href="$self->{WebUrl}">
|
||||||
|
<img src="$self->{WebUrl}images/logo-squidanalyzer.png" title="SquidAnalyzer $VERSION" border="0">
|
||||||
|
</a> SquidAnalyzer
|
||||||
|
|
||||||
|
Feel free to define your own header but take care to not break current design.
|
||||||
|
For example:
|
||||||
|
|
||||||
|
CustomHeader <a href="http://my.isp.dom/"><img src="http://my.isp.dom/logo.png" title="My ISP link" border="0" width="100" height="110"></a> My ISP Company
|
||||||
|
126,1 Bas
|
||||||
|
|
||||||
=item LogFile squid_access_log_file
|
=item LogFile squid_access_log_file
|
||||||
|
|
||||||
Set the path to the Squid log file.
|
Set the path to the Squid log file.
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
.\" ========================================================================
|
.\" ========================================================================
|
||||||
.\"
|
.\"
|
||||||
.IX Title "SQUIDANALYZER 1"
|
.IX Title "SQUIDANALYZER 1"
|
||||||
.TH SQUIDANALYZER 1 "2014-03-03" "perl v5.14.2" "User Contributed Perl Documentation"
|
.TH SQUIDANALYZER 1 "2014-03-15" "perl v5.14.2" "User Contributed Perl Documentation"
|
||||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||||
.\" way too many mistakes in technical documents.
|
.\" way too many mistakes in technical documents.
|
||||||
.if n .ad l
|
.if n .ad l
|
||||||
@ -341,6 +341,24 @@ You should give a path that can be read by a Web browser.
|
|||||||
.IX Item "WebUrl"
|
.IX Item "WebUrl"
|
||||||
The \s-1URL\s0 of the SquidAnalyzer javascript, \s-1HTML\s0 and images files.
|
The \s-1URL\s0 of the SquidAnalyzer javascript, \s-1HTML\s0 and images files.
|
||||||
Default: /squidreport
|
Default: /squidreport
|
||||||
|
.IP "CustomHeader" 4
|
||||||
|
.IX Item "CustomHeader"
|
||||||
|
This directive allow you to replace the SquidAnalyze logo by your custom
|
||||||
|
logo. The default value is defined as follow:
|
||||||
|
.Sp
|
||||||
|
.Vb 3
|
||||||
|
\& <a href="$self\->{WebUrl}">
|
||||||
|
\& <img src="$self\->{WebUrl}images/logo\-squidanalyzer.png" title="SquidAnalyzer $VERSION" border="0">
|
||||||
|
\& </a> SquidAnalyzer
|
||||||
|
.Ve
|
||||||
|
.Sp
|
||||||
|
Feel free to define your own header but take care to not break current design.
|
||||||
|
For example:
|
||||||
|
.Sp
|
||||||
|
.Vb 2
|
||||||
|
\& CustomHeader <a href="http://my.isp.dom/"><img src="http://my.isp.dom/logo.png" title="My ISP link" border="0" width="100" height="110"></a> My ISP Company
|
||||||
|
\& 126,1 Bas
|
||||||
|
.Ve
|
||||||
.IP "LogFile squid_access_log_file" 4
|
.IP "LogFile squid_access_log_file" 4
|
||||||
.IX Item "LogFile squid_access_log_file"
|
.IX Item "LogFile squid_access_log_file"
|
||||||
Set the path to the Squid log file.
|
Set the path to the Squid log file.
|
||||||
|
@ -117,3 +117,10 @@ WriteDelay 3600
|
|||||||
# Set it to 0 to disable this feature.
|
# Set it to 0 to disable this feature.
|
||||||
TopUrlUser 10
|
TopUrlUser 10
|
||||||
|
|
||||||
|
# This directive allow you to replace the SquidAnalyze logo by your custom
|
||||||
|
# logo. The default value is defined as follow:
|
||||||
|
# <a href="$self->{WebUrl}">
|
||||||
|
# <img src="$self->{WebUrl}images/logo-squidanalyzer.png" title="SquidAnalyzer $VERSION" border="0">
|
||||||
|
# </a> SquidAnalyzer
|
||||||
|
# Feel free to define your own header but take care to not break current design.
|
||||||
|
#CustomHeader <a href="http://my.isp.dom/"><img src="http://my.isp.dom/logo.png" title="My ISP link" border="0" width="100" height="110"></a> My ISP Company
|
||||||
|
Loading…
x
Reference in New Issue
Block a user