1 maxchock Sep 17, 2008 09:33
3 maxchock Sep 22, 2008 17:01
ya, i understand what you mean about the media directory location, i'll take care that later.
I put the code into the ".../FCKeditor/editor/filemanager/upload/php/config.php" but it doesn't seems to work. When i wanna upload the file, it doesn't give any successful message, even i hard code the path and just add $current_User->get('login') also fail. here is the code of ".../FCKeditor/editor/filemanager/upload/php/config.php"
global $Config, $current_User;
// SECURITY: You must explicitelly enable this "uploader".
$Config['Enabled'] = true ;
// Path to uploaded files relative to the document root.
$Config['UserFilesPath'] = '/home/okucommy/public_html/bj/gallery2/g2data/albums/'.$current_User->get('login').'/';
$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') ;
$Config['DeniedExtensions']['Image'] = array() ;
$Config['AllowedExtensions']['Flash'] = array('swf','fla') ;
$Config['DeniedExtensions']['Flash'] = array() ;
Am i doing something wrong here? what is the variable to retrive user login?
THanks & regards,
Max.
IanLewis wrote:
I'm kind of assuming you mean the b2evolution media directory when you say upload directory.
You can find where the upload directory is set and use the global $current_User to set the directory path.
something like:global $current_User, $Plugins; $gallery2sso = $Plugins->get_by_code('evo_gallery2_auth'); if (!empty($gallery2sso)) { $gallerypath = $gallery2sso->Settings->get('gallery2path'); $uploadpath = $gallerypath.'albums/'.$current_User->get('login').'/'; } else { //Gallery2 not installed. Use the previous value for upload directory? }
As a side note, usually you don't put your gallery2 data under your web server root. Normally /www/whatever/gallery2/ would contain php files but no album/image data. Would having your album directory as your upload/media directory really work?
I'm kind of assuming you mean the b2evolution media directory when you say upload directory.
You can find where the upload directory is set and use the global $current_User to set the directory path.
something like:
As a side note, usually you don't put your gallery2 data under your web server root. Normally /www/whatever/gallery2/ would contain php files but no album/image data. Would having your album directory as your upload/media directory really work?