Usage
Installation
Unpack archive to some directory, which could be accessed from Web.
Change mode of created &name; directory so it can be
accessed from Web. Command
chmod -R u=rwX,g-rwx,o=rX &name;/
will do the job. This will make the directory world-writable. In fact,
making it writable for the webserver user only is sufficient enough.
Installation is done.
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 &name; as a standalone web application or you want
to include it in some bigger project.
If you want to use it as an standalone application, edit the config file
and ignore $fm_cfg['origvars']
variable.
If you want to use as a part of some bigger project, edit the config file
with focusing on $fm_cfg['origvars'].
&name; provides itself a lot of actions such as confirm of deletion
file and others. $fm_cfg['origvars'] are
variables, which will be kept by &name;, so each page reload will be
processed in right way by others components of your PHP script.
If $fm_cfg['origvars'] is not a
constant, you can comment it out in config file and always set it in your main
program to the right value before doing command which will include
index.php file of &name; 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 &name;. 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 &name; 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
&name; 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 &name; 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 &name; you can use also plugins attached to distribution.
The first one, auth.php, allows you to restrict
access to &name; 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.
Running
If you have edited config file and wanted &name; as a standalone
application, try to access &name; using some web browser.
If you want to run it as a part of some other PHP web application, write
include() or require() command with
path and filename to the index.php file of &name; project
on the place, where you want to have file manager.
Security notes
If you want to secure &name;, put security stuff commands or
include() command to security stuff script at the beginning
of config file. That file is loaded by init.inc.php at the
beggining of script execution.