Table of Contents
- How to use the Classes
Starting with version 0.1.6, HistView as well as the download class support two configuration files. One of them is mandatory: class.hvconfig.inc defines the default settings for both of the classes. These settings are to 80..90% fine for everybody, but 10..20% may need to be "personalized". On the next update, however, the file would be overwritten by a new version - you had to check everything for changes to modify the file yourself again. To avoid that, a "personal configuration file" named hv-localconf.inc is included automatically by class.hvconfig.inc if it is found (in other words: this file is optional). Both of these files have to reside in the same directory together with the other class files.
Where modifications take place
As you may already have guessed by above description, you should not directly modify the shipped class.hvconfig.inc - but rather copy the lines you need to change to the other file, hv-localconf.inc, and modify them there. At the first time, you need to create this file (since it is not shipped). An example hv-localconf.inc may look like this:
<?php $this->debbase = "/var/repos/ubuntu/hardy/universe/binary-all"; $this->rpmbase = "/var/repos/redhat/RPMS.mine"; $this->relname = "sample"; $this->icondir = "/icons"; $this->db["database"] = "statistics"; $this->db["user"] = "apache"; $this->db["pass"] = "h#2$YjKT"; ?>
But these are already all settings you possibly need to adjust (but certainly to different values). Still, we will describe the other settings as well - but the description in the Wiki may not always be up-to-date with the latest version. So if you miss something here, or suspect something may have changed, please refer to the API Reference as shipped with the distribution (or, if you took the source from the repository, use e.g. PhpDocGen to generate the API Reference yourself).
Modification at runtime
If you need to re-define settings at a later point (i.e. outside the configuration files), please don't use the settings discussed here - since they will only be evaluated by the classes constructor. Instead, use the corresponding methods described in the API Reference. Examples for this can be found in the file histview.php which comes with the distribution.