Community Support for OpenDocMan (Deprecated)
Custom config and file types - Printable Version

+- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com)
+-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html)
+--- Forum: OpenDocMan Support - Community Based (https://forum.opendocman.com/forum-6.html)
+--- Thread: Custom config and file types (/thread-303.html)



Custom config and file types - Korakal - 08-10-2010

Hi,

I have just installed OpenDocMan 1.2.5.7 and after a completed install I have two questions that couldn't be answered by either the manual nor by searching for similar topics on this board.

Question 1:
what is the format to add customised parameters to the config_local.php (which is being advised). You can copy config_local.php.sample, but it doesn't tell me anything about the format of adding parameters.
I have tried several formats, combinations of tags, but I don't get it to pickup my config. Except for the config lines that are included in the sample (these are picked up - so the file is being included correctly).

Adapting the config in 'config.php' works for these parameters, but that is not recommended.

So to show you my config_local.php, I have compressed it a little in the code block below (removed the comments, etc) and replaced my private config data with a 'my...':

Code:
<?php
/*
config_local.php - OpenDocMan local config file
Copyright (C) 2007  Stephen Lawrence, Jon Miner
*/

$GLOBALS['database'] = 'mydatabasename'; // Enter the name of the database here
$GLOBALS['user'] = 'mydatabaseusername'; // Enter the username for the database
$GLOBALS['pass'] = 'mydatabasepassword'; // Enter the password for the username
$GLOBALS['hostname'] = 'mydatabasehost'; // Enter the hostname that is serving the database

$GLOBALS['CONFIG']['base_url'] = 'mybaseurl';
$GLOBALS['CONFIG']['dataDir'] = 'mydatadir';
$GLOBALS['allowedFileTypes'] = array('image/gif', 'text/html', 'text/plain', 'application/pdf', 'application/x-pdf', 'application/x-lyx', 'application/msword', 'image/jpeg', 'image/pjpeg', 'image/png', 'application/msexcel', 'application/msaccess', 'text/richtxt', 'application/mspowerpoint', 'application/octet-stream', 'application/x-zip-compressed','image/tiff','image/tif','application/vnd.ms-powerpoint');

// up to here, the config from this file is being picked up. The lines below are ignored...probably because of wrong formatting

$GLOBALS['root_username']  = 'Beheerder';
$GLOBALS['allow_signup'] = 'Off';
$GLOBALS['authorization'] = 'Off';
$GLOBALS['file_expired_action'] = '4';

?>
What is the right formatting of the last four parameters?

Second question:
when I try to upload a PDF file (from my Mac, in Firefox), I am being told that the filetype is not supported and I should add it to the MIME type list. However, I see 'application/x-pdf' being listed. I have tried it with several PDF files. Their file extension is '.pdf'. What would cause this?

Thanks for your help.
Mark


Re: Custom config and file types - bit2bit - 08-14-2010

@2.question: just try adding 'application/pdf' to the listed mimetypes in your config.php; just without the 'x-'