index.php File Reference

Go to the source code of this file.

Variables

 $hiddenFilesWildcards = Array("*.php", "*~")
 Specify which files should be hidden in the file listing using unix/DOS wildcards (? and *).
 $allowSubDirs = true
 Show sub directories and let the user change to them.
 $allowPHPDownloads = false
 Allow the users to download .php files.
 $useAutoThumbnails = true
 Automatically generate and display thumbnails for image files.
 $cacheThumbnails = true
 Cache any thumbnails created for later use in a subdirectory called .snifthumbs.
 $snifServer = $_SERVER['HTTP_HOST']
 Set the server name to be reported on generated pages.
 $snifDateFormat = 'd-m-y'
 Set the date and time format used for file modified dates.
 $hiddenFilesRegex = Array()
 Specify which files should be hidden in the file listing using regular expressions.
 $useDescriptionsFrom = "descript.ion"
 Description file, leave blank for no descriptions.
 $separationString = "\t"
 Define the string that should be used to separate file names and descriptions in the description files.
 $useExternalImages = false
 Use external images instead of built-in ones.
 $externalIcons
 State the filenames for external file icons.
 $externalStylesheet = ""
 Use an external stylesheet file for setting the colors of the snif output.
 $externalConfig = ""
 Use an external configuration file.
 $descriptionFilenamesCaseSensitive = false
 Filenames in description files are case insensitive.
 $usePaging = 0
 If a directory contains more than this number of files, display it on multiple pages.
 $directDirectoryLinks = false
 Make links to directories in a file listing point directly to that directory.
 $thumbnailHeight = 50
 Sets the maximum size of thumbnails.
 $thumbnailWidth = 150
 $useBackForDirUp = true
 Use "back" instead of ".." to go up in directories.
 $displayColumns
 Determines which columns to display and in which order.
 $tableWidth100Percent = false
 Sets the listing to always occupy the whole width of the screen instead of only the necessary space.
 $descriptionColumnWidth = 0
 Turns on and sets fixed width description column.
 $truncateLength = 30
 Specifies how long file and directory names are to be truncated.
 $protectDirsWithHtaccess = true
 Specifies whether to hide and forbid access to all directories that contain a .htaccess file.
 $alwaysUseLanguage = ""
 Specifies whether to use automatic translation selection (default) or always use the same language.


Variable Documentation

$allowPHPDownloads = false

Allow the users to download .php files.

This will expose the full contents of the downloaded files (including any password used in it). Be careful with this! This only makes sense if you don't hide all .php files.

Definition at line 315 of file index.php.

$allowSubDirs = true

Show sub directories and let the user change to them.

It will be impossible to go above the directory this script is in.

Definition at line 307 of file index.php.

$alwaysUseLanguage = ""

Specifies whether to use automatic translation selection (default) or always use the same language.

Set to an empty string to enable automatic selection, or set to a two-character language code. Valid language codes are: de, en, nl, no, pl, sv (for a complete and up-to-date list, see the $languageStrings array below.

Definition at line 530 of file index.php.

$cacheThumbnails = true

Cache any thumbnails created for later use in a subdirectory called .snifthumbs.

This subdirectory is created in every directory and contains the cached thumbnails of its parent directory. This directory is hidden by the default settings of snif. If an image file is updated, so is the thumbnail. If an image is removed though, the thumbnail has to be removed manually.

Definition at line 333 of file index.php.

$descriptionColumnWidth = 0

Turns on and sets fixed width description column.

Set to 0 to not restrict description column width. Can lead to strange results when not zero and $tableWidth100Percent==true and does not fully work with IE.

Definition at line 506 of file index.php.

$descriptionFilenamesCaseSensitive = false

Filenames in description files are case insensitive.

If a file in a directory is called MyProgram.ZIP, adding a description line for myprogram.zip will be used for this file. If you set this to true, filenames in description files and directories must be exactly the same.

Definition at line 437 of file index.php.

$directDirectoryLinks = false

Make links to directories in a file listing point directly to that directory.

Defaults to false. Set this to true if you want to display individual index files for each directory. If you want to display a subdirectory with snif, copy the subdir/index.php from the snif archive to that directory.

Definition at line 453 of file index.php.

$displayColumns

Initial value:

 Array(
        "download",
        "icon",
        "name",
        "type",
        "size",
        "date",
        "description"
)
Determines which columns to display and in which order.

To hide a column, delete it from this array. To rearrange columns, change their order in this array. Default value is $displayColumns = Array("download, "icon", "name", "type", "size", "date", "description"); Possible values are: download a link to download instead of open files icon a file icon according to its extension name the filename type the file extension size the file size date the file's modified date description the file's description, if any cvsversion the file's CVS version tag

Definition at line 484 of file index.php.

$externalConfig = ""

Use an external configuration file.

This can be used to configure multiple installations of snif on the same machine the same way without changing the individual scripts. Should be an absolute path, like "/etc/snif.conf". Set to an empy string to use the settings that are set in this file.

Settings are read in the following order: First, the built-in settings of the snif file are read. If $externalConfig is set to a file, this file is include()ed afterwards, overwriting the previous settings. Then, snif begins its work. This means that you can just copy this config section into your config file, set $externalConfig in the snif index file to the config file location, and change the config file according to your needs. If you want to use the default of a particular setting, just delete it from the config file, as the default will be used then. Still unclear? Email me!

Definition at line 428 of file index.php.

$externalIcons

Initial value:

 Array (
        "archive"       => "",
        "binary"        => "",
        "dirup"   => "",
        "folder"        => "",
        "HTML"          => "",
        "image"         => "",
        "text"          => "",
        "unknown"       => "",
        "download"      => "",   // 7x16 pixels
        "asc"           => "",       // 5x3 pixels
        "desc"          => ""      // 5x3 pixels
)
State the filenames for external file icons.

Only used if $useExternalImages == true. Paths are relative to the directory of snif. Icon size should be 16x16 pixels, except where noted otherwise. Use an empty string to use the internally stored image for that icon.

Definition at line 389 of file index.php.

$externalStylesheet = ""

Use an external stylesheet file for setting the colors of the snif output.

Have a look at the colors section in the default snif stylesheet for the names of the styles that are used by snif. Set to an empty string to use the built-in stylesheet.

Definition at line 409 of file index.php.

$hiddenFilesRegex = Array()

Specify which files should be hidden in the file listing using regular expressions.

Do not use expression limiters or modifiers. These patterns will be merged with $hiddenFilesWildcards.

Definition at line 363 of file index.php.

$hiddenFilesWildcards = Array("*.php", "*~")

Specify which files should be hidden in the file listing using unix/DOS wildcards (? and *).

This is case insensitive. This script, the current directory (.), the description file and the external stylesheet will be automatically hidden.

Definition at line 301 of file index.php.

$protectDirsWithHtaccess = true

Specifies whether to hide and forbid access to all directories that contain a .htaccess file.

This is to prevent access to directories that are forbidden for normal HTTP access. There is no way for snif to no which directories are forbidden, therefore as .htaccess files are mostly used to restrict access, you may use this directive to forbid access to them through snif.

Definition at line 521 of file index.php.

$separationString = "\t"

Define the string that should be used to separate file names and descriptions in the description files.

Defaults to "\t" (tab).

Definition at line 374 of file index.php.

$snifDateFormat = 'd-m-y'

Set the date and time format used for file modified dates.

For the syntax of this string, please refer to http://www.php.net/manual/en/function.date.php DEPRECATED, please use languageStrings instead.

Deprecated:

Definition at line 356 of file index.php.

$snifServer = $_SERVER['HTTP_HOST']

Set the server name to be reported on generated pages.

Use this only if your server reports the wrong name if $_SERVER['HTTP_HOST'] (which is the default) is used.

Definition at line 347 of file index.php.

$tableWidth100Percent = false

Sets the listing to always occupy the whole width of the screen instead of only the necessary space.

Definition at line 498 of file index.php.

$thumbnailHeight = 50

Sets the maximum size of thumbnails.

Images with one dimension bigger than the respective value will be downsized. Smaller images will stay unchanged. Defaults to 50 height and 150 width.

Definition at line 460 of file index.php.

$thumbnailWidth = 150

Definition at line 461 of file index.php.

$truncateLength = 30

Specifies how long file and directory names are to be truncated.

Defaults to 30, set to 0 to turn off truncation.

Definition at line 512 of file index.php.

$useAutoThumbnails = true

Automatically generate and display thumbnails for image files.

This feature requires GDlib 2.0+.

Definition at line 322 of file index.php.

$useBackForDirUp = true

Use "back" instead of ".." to go up in directories.

Definition at line 466 of file index.php.

$useDescriptionsFrom = "descript.ion"

Description file, leave blank for no descriptions.

Definition at line 368 of file index.php.

$useExternalImages = false

Use external images instead of built-in ones.

If you set this to true, you should specify every value in the $externalIcons array below. If you don't, internal images will be used instead.

Definition at line 381 of file index.php.

$usePaging = 0

If a directory contains more than this number of files, display it on multiple pages.

Useful for very large directories. $usePaging sets the number of files displayed per page. Set to 0 to disable multiple pages.

Definition at line 444 of file index.php.


Generated on Fri Jun 6 22:21:09 2008 for CrocoPat by  doxygen 1.5.1