When using the filemanager the PHP connector crates folders based on the current type. ie when I browse files and set the type to Image it will browse /<root>/UserFilesPath/Image/
Is there any way to alter the names of these types?
Thanks inadvance
Is there any way to alter the names of these types?
Thanks inadvance

RE: Alter default folders created by Filemanager
Can somebody more clever than us post a solution?
I'm looking for a solution to this problem for the past 4 days.
Thks
RE: Alter default folders created by Filemanager
take your connector.php and add near line 60 after the allowed type check this line:
$sResourceType="";
now you will browse /<root>/UserFilesPath/.
but attention ... the extensions-check of the uploaded-file shouldn't work longer!
RE: Alter default folders created by Filemana
The idea behind is to get the value from sResourceType in connector.ext, and by using a function to return another 'customized' path for this value.
in config.asp
'set to true/false to allow editor to use a custom path for files,images,media,flash'
Dim AllowCustomDirectory
AllowCustomDirectory = true
'select case to match *sResourceType* with the new directory
Function CustomDirectoryPath(sResourceType)
if sResourceType = "" then
exit function
end if
Select Case sResourceType
Case "File"
CustomDirectoryPath = "documents" ' new path for files '
Case "Images"
CustomDirectoryPath = "docimages" ' new path for images '
Case "Flash","Media"
CustomDirectoryPath = "docimages" ' new path for media/ '
Case Else
exit function
End Select
end function
in connector.asp
after line 71
eg:
' Check if it is an allower resource type.
if (Not IsAllowedType( sResourceType )) Then Exit Sub
add those 3 lines:
'check Custome Directory
if AllowCustomDirectory then
sResourceType = CustomDirectoryPath(sResourceType)
end if
I haven't tested this fully, but that seems to do the job.
RE: Alter default folders created by Filemanager
CustomDirectoryPath(sResourceType)
should really be in io.asp and not in config.asp..just to keep things tidy
RE: Alter default folders created by Filemanager
http://sourceforge.net/tracker/index.ph ... tid=543655
RE: Alter default folders created by Filemanager
Smalls.
RE: Alter default folders created by Filemanager
http://sourceforge.net/tracker/index.ph ... tid=543655