Closed (fixed)
Project:
IMCE
Version:
6.x-1.2
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 May 2009 at 09:01 UTC
Updated:
19 May 2011 at 21:11 UTC
i want to store all the files belong to or associate with a note in a separate folde,such as sites/default/files/nodes/{$nid}/.Who can tell me how to do this..Thank you...
Comments
Comment #1
ufku commentedThis not possible with IMCE.
Comment #2
francewhoaufku is correct. That I know of the only placeholder available in IMCE is %uid
"Use %uid as a placeholder for user ID. Ex: users/user%uid creates directories such as users/user1, users/user42, etc."
You can do that with PHP though "If you want more flexibility in directory paths you can execute php to return a directory path.
For php execution your directory path must start with php: and the rest must be a valid php code that is expected to return the actual directory path.
Ex: php: return 'users/'.$user->name; defines users/USER-NAME as the directory path.
A multi-level directory example php: return date('Y', $user->created).'/'.date('m', $user->created).'/'.$user->uid; defines MEMBERSHIP-YEAR/MONTH/USER-ID as the directory path, resulting in self-categorized user directories based on membership date.
Note that you should use the $user variable instead of $GLOBALS['user'] since they are not always the same object." source: the description text at admin/settings/imce/profile
Comment #3
francewhoaAnother option is the module http://drupal.org/project/filenode
Comment #4
ufku commentedClosing 6.x-1.x issues as this branch is no more supported.