|
HistView Api Doc | |||||
PREV NEXT | Frames No Frame | |||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() | hvconfig |
![]() |
Processing a history file and prepare it for HTML output
Constructor Summary | ||
void | histview(string $infile, [string $basename]) Create an instance and read the input file into the internal array |
Method Summary | ||
boolean | add_mark(string $name, string $symbol, string $icon, [string $cssclass]) Add another mark to the set | |
private string | getdlurl(string $type) Check whether there is a file to download - and create URL if any | |
string | out() Generate the output page content | |
private boolean | pline(string $line) Process a single line from the input file | |
boolean | process() Process the input file | |
void | set_basedir(string $type, string $dir) Override base URLs for archives. | |
void | set_cssclass([string $cplus], [string $cminus], [string $cchange], [string $cbug]) Override CSS classes for change details | |
boolean | set_icon([string $plus], [string $minus], [string $change], [string $bug], [string $tar], [string $deb], [string $rpm]) Override default icon settings icons can either be a character/string or a complete IMG tag | |
boolean | set_mark([string $plus], [string $minus], [string $change], [string $bug], [string $ver]) Override default identifier mark settings Identifier marks are the characters used to identify the changes, such as a "+" for a new feature or a "!" for a bug | |
void | set_max_relnum(integer $relnum) Set the maximum release number To take our example from set_basedir again (dummy-0. | |
void | set_relname(string $relname) Set the release extension for *. | |
void | set_separator(string $separator) Set the URL parameter separator By default, HistView uses the ";" as separator (as recommended by W3C). | |
void | use_dlclass([boolean $use]) Set download class usage By default, HistView is set not to use the provided download class. |
Constructor Detail |
void histview(string $infile, [string $basename])
Create an instance and read the input file into the internal array
infile
- input file namebasename
- basename for files (e.g. "histview" for
histview-0.1.3-izzy1.noarch.rpm). If not set, it falls back to the
filename of $infile w/o path and extension.Method Detail |
boolean add_mark(string $name, string $symbol, string $icon, [string $cssclass])
Add another mark to the set
name
- unique name for the marksymbol
- one character like '!' for a bugicon
- complete image tag or string to display instead of the symbolcssclass
- CSS class to apply (default:"changed")private string getdlurl(string $type)
Check whether there is a file to download - and create URL if any
type
- Type (one of tar, deb, rpm)string out()
Generate the output page content
private boolean pline(string $line)
Process a single line from the input file
line
- the input line to parseboolean process()
Process the input file
void set_basedir(string $type, string $dir)
Override base URLs for archives. With $type='base' set the string to cut of to leave the download URL. Example: Your files are somewhere below /var/www/files/download, and your servers document root is /var/www, so you would specify "/var/www" here. If your files reside outside the servers document root, say below /var/ftp/download, you should create a directory alias called "/ftp/" pointing to /var/ftp, and specify "/var" here.
type
- tar, deb, rpm or basedir
- the directory for this typevoid set_cssclass([string $cplus], [string $cminus], [string $cchange], [string $cbug])
Override CSS classes for change details
cplus
- CSS class for "+" (default:"feature")cminus
- CSS class for "-" (default:"removed")cchange
- CSS class for "*" (default:"changed")cbug
- CSS class for "!" (default:"bugfix")boolean set_icon([string $plus], [string $minus], [string $change], [string $bug], [string $tar], [string $deb], [string $rpm])
Override default icon settings icons can either be a character/string or a complete IMG tag
plus
- FeatureAdd Iconminus
- Removed stuff Iconchange
- Changed stuff Iconbug
- BugFix Icontar
- Tarball Icondeb
- Debian Iconrpm
- RPM Iconboolean set_mark([string $plus], [string $minus], [string $change], [string $bug], [string $ver])
Override default identifier mark settings Identifier marks are the characters used to identify the changes, such as a "+" for a new feature or a "!" for a bug
plus
- FeatureAdd markminus
- Removed stuff markchange
- Changed stuff markbug
- BugFix markver
- Version markvoid set_max_relnum(integer $relnum)
Set the maximum release number To take our example from set_basedir again (dummy-0.1.2-johnny3.noarch.rpm), the relnum of that package is "3" (the number immediately following the release extension). To find the latest package, histview would "replace" this part by $i, counting down from max_relnum to 0 until it finds a file.
relnum
- max release number to check forvoid set_relname(string $relname)
Set the release extension for *.deb/*.rpm For the fictive package dummy-0.1.2-johnny3.noarch.rpm this would be "johnny"
relname
- extension to usevoid set_separator(string $separator)
Set the URL parameter separator By default, HistView uses the ";" as separator (as recommended by W3C). If your setup does not support this, and you cannot change the setup: Change the separator to "&"
separator
- One character to separate parameters in URLsvoid use_dlclass([boolean $use])
Set download class usage
By default, HistView is set not to use the provided download class. Using
it, the links are pointing to the calling script, and the parameters
"file" (the filename) and "dir" (the directory type, e.g. "deb") are
added. That means you can hide the directories from your users, and
even add some download counter script or whatever.
If you want that, simply turn it on here.
use
- Whether to use the download class (TRUE, Default) or not (FALSE)
|
HistView Api Doc | |||||
PREV NEXT | Frames No Frame | |||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This document was generated by phpdocgen 0.17-rc3.
Copyright © 2002-03 Stéphane GALLAND (under the GNU General Public License)