<?php 
/*
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
 * 
 * Licensed under the terms of the GNU Lesser General Public License:
 * 		http://www.opensource.org/licenses/lgpl-license.php
 * 
 * For further information visit:
 * 		http://www.fckeditor.net/
 * 
 * "Support Open Source software. What about a donation today?"
 * 
 * File Name: config.php
 * 	Configuration file for the File Manager Connector for PHP.
 * 
 * File Authors:
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
 */

global $Config ;

/* connect to BLOG:CMS */
$path = substr(__FILE__,0,strpos(__FILE__,'admin'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR));
require($path.'cfg.php');
global $member;
if (!$member->isLoggedIn()) {
		$Config['Enabled'] = false ;
		return;
}

/* get member media dir */
// $Config['UserFilesPath'] = ''; --- not set on purpose
$Config['UserFilesAbsolutePath'] = $DIR_MEDIA.$member->getID();

/* try to create new private media directories if needed */
if (!@is_dir($Config['UserFilesAbsolutePath'])) {
	$oldumask = umask(0000);
	if (!@mkdir($Config['UserFilesAbsolutePath'], 0777)) {
		$Config['Enabled'] = false ;
		return;
	}
	umask($oldumask);				
} 

// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = true ;


$Config['AllowedExtensions']['File']	= array() ;
$Config['DeniedExtensions']['File']		= array('php','php3','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi') ;

$Config['AllowedExtensions']['Image']	= array('jpg','gif','jpeg','png','tif') ;
$Config['DeniedExtensions']['Image']	= array() ;

$Config['AllowedExtensions']['Flash']	= array('swf','fla') ;
$Config['DeniedExtensions']['Flash']	= array() ;

$Config['AllowedExtensions']['Media']	= array('swf','fla','jpg','gif','jpeg','png','avi','mpg','mpeg') ;
$Config['DeniedExtensions']['Media']	= array() ;

?>