valid xhtml 1.0 strict
 

last changed : 01/24/10

Howto

How to configure a download list like shown at efileman.de ?

How to manipulate the download time value in download.log ?

How to change efileman according to the needs ?

How to get a description for a listed file ?


How to configure a download list like shown at efileman.de ?

Install efileman according the installation instructions so you have one supervisor as first.

  1. Add a second user as supervisor with all needed permissions in particular the permission to change the configuration.
  2. Logout and login with the new created account values of second user.
  3. Go to the first user and disable all permissions exepting download permission ! Don't forget to disable the supervisor status ! Change the default skin for this user to a download skin of your choice. Change the User Path to an absolute path to the directory which contains the files you want to offer. Set User URL to the respective url or to the same value as User Path without alias name in case of you want to use the download counter feature.
  4. Now switch to global options and set Enable Login to No. Set Enable Download Counter to yes if you want to use download counter.

If you set Enable Login to No, only the values of the first user account applies to the file listing.

top

How to manipulate the download time value in download.log ?

The download.log has the following structure:

filename1[tab]count value[tab]time value
filename2[tab]count value[tab]time value
...

The values are separated by Tab, because it's one of the few values (cross system) which are not allowed in a file name.

A filename (without path) will be added to the list by the first counted download, with that the count value start with 1.

The time value is the complete date of the first download represented by the number of non-leap seconds since whatever time the system considers to be the epoch (that's 00:00:00, January 1, 1904 for MacOS, and 00:00:00 UTC, January 1, 1970 for most other systems).

To manipulate or set up this value remember the following:

1 minute = 60 seconds
1 hour = 60 minutes = 3600 seconds
1 day = 24 hours = 86400 seconds

The command 'perl -e "print time;"' gives the current time value 1068045212 (Linux/Windows) which is equivalent to 11/05/2003. With that you could eg. add 86400 four times to 1068045212 to get 1068390812 (11/09/2003) and enter the result in your download list.

top

How to change efileman according to the needs ?

The "heart" of efileman 7.1 is module main.pm, the "brain" is defaults.pm. main.pm controls when which method will be called. In defaults.pm will be global and user variables declared and default values defined for them.

The following gives an overview to defaults.pm.

sub get_global_vars() declares global variables

   array @global_vars contains the variable names in that displayed order
   array @global_types defines the varible types in the same order

sub get_user_vars() declares user variables

   array @na_vars contains the variable names in that displayed order
   array @na_types defines the variable types in the same order
   array @na_useradmin defines whether these variables are to show in useradmin mode
   array @na_register defines whether these variables are to show in register screen

   These values are also used for "new account defaults" excepting user name, password and email address.

sub get_global_defaults() defines default values for global variables

sub get_user_defaults() defines default values for user variables
   These defaults applies only to "new account defaults" which will be saved in efileman_config.pm as a hash named CRACC.
   Every new user will be display in efileman admin mode with default values defined by CRACC.

That enables to add new user variables eg. user address and fon number without editing other modules or skins.

top

How to get a description for a listed file ?

Since version 7.1.0.67 of efileman will be process special files to display a description to a listed file. Create an extra text file (file-description file) named like .filename.dsc, eg. ".efileman.zip.dsc". This file will be hide and the content of this file will be placed into a manager.skin if there a placeholder ##filedescription## exists, like in in "download_filedesc". If ##filedescription## not exists in the used skin, the .dsc file will be listed.
For example, efileman is in use to show a download list without login and the first user is configured with the "download_filedesc" skin to show the file descriptions. Another user is configured with the default skin to get listed the .dsc files for editing purposes.

Another way to create the description file is to use an upload skin with <input type="text" name="##filedesccnt##"> like in in "upload_filedesc" skin. The entered text will be saved as the respective description file.

top



 
 
bookmark this site at del.icio.us bookmark this site at mister-wong.de bookmark this site at furl.net bookmark this site at ho.tli.st bookmark this site at blogmarks.net bookmark this site at stumbleupon.com bookmark this site at scuttle.org