2.2. Configuration

Configuration variables are located in config.inc.php file. It is recommented to leave this file untouched and create config-local.inc.php file, where your own configuration definitions will be stored. If this file is present, it is included after config.inc.php file. Described approach should bring you more easy upgrading in future releases.

Original variables property

Determine if you want to use phpWebFileManager as a standalone web application or you want to include it in some bigger project.

Other properties

Than edit others variables in config file. More information about every specific variable are described in config.inc.php file.

Header and footer redefinition

There is a possibility to change header and footer of phpWebFileManager. You may define in your local configuration file two functions: fm_header() and fm_footer(). These functions accept one parameter - associative array with file some management variable values. Use var_dump() to debug this associative array to get idea what options are passed in. If these function will not be defined in configuration file, default ones will be used. They are located near beginning of index.php file and they could be used as an inspiration for you own header and footer functions.

File upload

If you want to provide file uploading, you must create world writeable directory. Imagine that it is directory upload/, so than run command

chmod o+w upload/

to make it world writeable.

PostNuke compatibility

Since version 0.2.2 phpWebFileManager has an ability to act as a PostNuke module (add-on).

Simply copy the directory into modules/ subdirectory of your PostNuke installation. Than log into administration and in subsection Modules regenerate module list. You can than initialize and activate phpWebFileManager module and if you like, make it accessible through some block and so on.

You might want also use some of security features of PostNuke. If you choose to have phpWebFileManager menu entry visible only for trusted user with admin rights, go to the administration subsection Permissions and make appropriate changes.

PostNuke specific configuration is overriden in init.inc.php file. Note, that currently none from allow/deny file management actions features are used. This will probably change soon, when someone from the PostNuke community help me with setting up particular rights according to internal PostNuke user information.

Plugins

Since version 0.3 of phpWebFileManager you can use also plugins attached to distribution.

The first one, auth.php, allows you to restrict access to phpWebFileManager script using HTTP authentication. Refer to that file for more information. You have to edit username and password in that file and set up (just uncomment) appropriate require_once call in config.inc.php configuration file.

The second plugin is called file.php. It allows you to restrict access to View files. More information about usage of this plugin are in that file, where you may also need to edit location of apache-mime.types file.