Overview   Package   Tree   Index 
HistView Api Doc
PREV  NEXT Frames  No Frame 
SUMMARY:  FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Api
Class hvconfig

Direct Known Subclasses:
download, histview

class hvconfig

Configuration for HistView and Download Class

Authors:
Izzy (devel@izzysoft.de)
Version:
$Revision: 63 $ $Date: 2009-10-11 19:57:06 +0200 (So, 11. Okt 2009) $
Copyright:
(c) 2003-2009 by Itzchak Rehberg and IzzySoft

Field Summary
string$arch
Default architecture for packages (RPM style - for Debian, it will be calculated based on this)
string$argsep
Though "&" works for most sites (and even is used by most sites), this does not conform to the W3C standards since it usually introduces some entity. So if you can, use ";" instead.
string$basedir
Base directory.
string$blacklistAction
Action to perform when remote address is contained in blacklist file Valid actions are: "pass" (no action), "deny" (reject request)
string$blacklistfile
IP Blacklist file (e.
string$bug
ChangeLog Symbol for a bug
string$cbug
CSS class for a bug comment
string$cchange
CSS class for a change comment
string$change
ChangeLog Symbol for a change
string$cminus
CSS class for removed stuff
string$cplus
CSS class for a new feature
string$crawlerfile
Read crawler network names from a file
array$db
Database to store download statistics.
string$debbase
Directory holding the *.
string$deficon
Icon to use by default.
integer$dlFileLimit
Limit the download per IP and prog to a given number within a given time.
boolean$dlLimitAutopurge
Shall the database table recording data to check the download attempts for limiting them be purged automatically?
integer$dlTimeLimit
Time interval (in seconds) to monitor for limits.
string$dltype
How to handle files to download: Use Download Class ("internal"), or directly link to them ("direct")
array$excludes
Files to exclude
string$ibug
Icon for a bug
string$ichange
Icon for a change
string$icondir
URL directory where all other icons are stored
string$ideb
Icon for Debian packages
string$ignore
ChangeLog Symbol introducing a line to be ignored
string$ignorefile
Read bots to ignore from a file
string$iminus
Icon for removed stuff
string$iplus
Icon for new feature
string$irpm
Icon for RPM packages
string$itar
Icon for tar files
array$map_names
(array[filename]=progname]
integer$max_relnum
Highest release number to expect.
string$minus
ChangeLog Symbol for removed things
string$noRefererAction
Action for requests w/o referer Valid actions are: "pass" (no action), "deny" (reject request), "whois" (network check - and reject crawler networks)
string$plus
ChangeLog Symbol for new feature
string$rejectfile
Read bots to reject from a file
string$rejectheader
Header for rejected clients
string$rejectmsg
Message to give to rejected clients
string$relname
Release Name - this is the (optional) string appended to the official version number, as you find it e.
string$rpmbase
Directory holding the *.
integer$statisticsmode
Shall we use the statistic functions (download counter)?
string$tarbase
Directory holding your *.
string$ver
ChangeLog Symbol introducing the version number


Field Detail

arch

string $arch

Default architecture for packages (RPM style - for Debian, it will be calculated based on this)


argsep

string $argsep

Separator for arguments in the URL


basedir

string $basedir

Base directory. Most times this is your web servers DOCUMENT_ROOT. For details, see also histview::set_basedir(). Leave empty if you are using the download class (i.e. hvconfig::dltype is set to "internal").


blacklistAction

string $blacklistAction

Action to perform when remote address is contained in blacklist file Valid actions are: "pass" (no action), "deny" (reject request)


blacklistfile

string $blacklistfile

IP Blacklist file (e.g. from http://sblam.com/blacklist.txt)


bug

string $bug

ChangeLog Symbol for a bug


cbug

string $cbug

CSS class for a bug comment


cchange

string $cchange

CSS class for a change comment


change

string $change

ChangeLog Symbol for a change


cminus

string $cminus

CSS class for removed stuff


cplus

string $cplus

CSS class for a new feature


crawlerfile

string $crawlerfile

Read crawler network names from a file


db

array $db

Database to store download statistics. Irrelevant (i.e. not used) when statistics are turned off (statisticsmode=0). To override these settings later, it won't work this way -- use the db_setup method instead! The array defined here has the elements host, database, user, pass, table


debbase

string $debbase

Directory holding the *.deb files for download. This is often the same for all your apps, since it mostly points to the same repository


deficon

string $deficon

Icon to use by default. This must be a complete <IMG> tag.


dlFileLimit

integer $dlFileLimit

Limit the download per IP and prog to a given number within a given time. If set to 0, there will be no limit. If you want to use this, keep in mind there may be good reasons for multiple downloads of the same prog, e.g. if you provide multiple formats (RPM,DEB,TGZ) - so a good number for the limit is the number of formats provided plus a "chance" for trouble, say formats + 2


dlLimitAutopurge

boolean $dlLimitAutopurge

Shall the database table recording data to check the download attempts for limiting them be purged automatically? This is recommended, so the sample config sets this to TRUE.


dlTimeLimit

integer $dlTimeLimit

Time interval (in seconds) to monitor for limits. Make it small enough, but not too small. The best setting also depends on the average size of the files you offer for download, your setting for $dlFileLimit, and the assumed transfer rates. Say you assume a single download to be done in 30s, and you want to permit 5 downloads, they would take 2:30 minutes. If a bot/crawler is firing them, it's done by that. Add a bit for eventual trouble in routing, so you should be fine with 5min (300s). Remember that every *ATTEMPT* will be considered, so this value should be fine in this case.


dltype

string $dltype

How to handle files to download: Use Download Class ("internal"), or directly link to them ("direct")


excludes

array $excludes

Files to exclude


ibug

string $ibug

Icon for a bug


ichange

string $ichange

Icon for a change


icondir

string $icondir

URL directory where all other icons are stored


ideb

string $ideb

Icon for Debian packages


ignore

string $ignore

ChangeLog Symbol introducing a line to be ignored


ignorefile

string $ignorefile

Read bots to ignore from a file


iminus

string $iminus

Icon for removed stuff


iplus

string $iplus

Icon for new feature


irpm

string $irpm

Icon for RPM packages


itar

string $itar

Icon for tar files


map_names

array $map_names

Map filenames to prognames. If the filename does not directly reflect the prog name you want to record into your stats table, you can set up a map entry here. Example: A new version of your lib package is not 100% backwards compatible, so you name the new packages "mylib2" instead of simply "mylib" as it was before. But for statistics you do not want a new progname. So in your hv-localconf.inc, you write: $this->map_names['mylib2'] = 'mylib';


max_relnum

integer $max_relnum

Highest release number to expect. The release number is the number following the relname (or, if relname is not set, the version). Example: "prog-0.3.5-1_i386.deb" and "prog-0.3.5-johnny1_i386.deb" both have the relnum set to "1". HistView is looping to find the latest release - so here we tell it when to stop at latest.


minus

string $minus

ChangeLog Symbol for removed things


noRefererAction

string $noRefererAction

Action for requests w/o referer Valid actions are: "pass" (no action), "deny" (reject request), "whois" (network check - and reject crawler networks)


plus

string $plus

ChangeLog Symbol for new feature


rejectfile

string $rejectfile

Read bots to reject from a file


rejectheader

string $rejectheader

Header for rejected clients


rejectmsg

string $rejectmsg

Message to give to rejected clients


relname

string $relname

Release Name - this is the (optional) string appended to the official version number, as you find it e.g. for Medibuntu with "medibuntu" in "googleearth-4.3_4.3.7204.836-0medibuntu1_i386.deb"


rpmbase

string $rpmbase

Directory holding the *.rpm files for download. This is often the same for all your apps, since it mostly points to the same repository


statisticsmode

integer $statisticsmode

Shall we use the statistic functions (download counter)? 0-No, 1-Yes


tarbase

string $tarbase

Directory holding your *.tar.gz files for download. If you have only one, it will be sufficient to define it here. Otherwise, you will have to override this setting in the corresponding PHP file


ver

string $ver

ChangeLog Symbol introducing the version number


 Overview   Package   Tree   Index 
HistView Api Doc
PREV  NEXT Frames  No Frame 
SUMMARY:  FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Submit a bug

This document was generated by phpdocgen 0.17-rc3.
Copyright © 2002-03 Stéphane GALLAND (under the GNU General Public License)