You need to be logged in to post in the forum - Log In
An active JCE Pro Subscription is required to post in the forum - Buy a Subscription
- Support
- Forum
- JCE Plugins / Addons
- Specific Folder for user custom field
Support is currently Offline
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
From 09:00 To 17:00 Europe/London (BST)
Please post your question in the Forum and we will get back to you as soon as we can.
Hi,
I have multiple JCE Editor User Profiles with different folders they use - this works great.
like here https://www.joomlacontenteditor.net/support/tutorials/editor/setting-the-file-directory-path
However, I have user images (like profiles images). This user custom field is a JCE media field.
So only for this specific field I want to use a specific folder per user:
like images/users/$user
There will be the user image for each single user.
There is no component I can use for this setup in the profile.
Or, how could I do the setup here? Because in the custom field setup I also cannot choose a profile to use.
Thanks!
Sigrid
I have multiple JCE Editor User Profiles with different folders they use - this works great.
like here https://www.joomlacontenteditor.net/support/tutorials/editor/setting-the-file-directory-path
However, I have user images (like profiles images). This user custom field is a JCE media field.
So only for this specific field I want to use a specific folder per user:
like images/users/$user
There will be the user image for each single user.
There is no component I can use for this setup in the profile.
Or, how could I do the setup here? Because in the custom field setup I also cannot choose a profile to use.
Thanks!
Sigrid
I've been looking into this today and I can't find an effective way to do it via a JCE Profile.
The only viable option I think is to tak advantage of JCE Filesystem Events via a Joomla plugin, and manipulate the root directory value based on certain parameters.
JCE Filesystem Events are events that are triggered before and after some filesystem functions, like upload delete etc. An example plugin containing all the available events is here - https://github.com/widgetfactory/wf_filesystem_events
In your instance you could do something like:
The only viable option I think is to tak advantage of JCE Filesystem Events via a Joomla plugin, and manipulate the root directory value based on certain parameters.
JCE Filesystem Events are events that are triggered before and after some filesystem functions, like upload delete etc. An example plugin containing all the available events is here - https://github.com/widgetfactory/wf_filesystem_events
In your instance you could do something like:
class PlgSystemWf_filesystem_events extends JPlugin
{
/**
* onWfFileSystemGetRootDir
* @param string $path The relative root directory path, eg: "images".
* @return void
*/
public function onWfFileSystemGetRootDir(&$path)
{
$app = JFactory::getApplication();
$user = JFactory::getUser();
// into images field file browser...
if ($app->input->getCmd('fieldid') === 'jform_images_image_intro') {
// append the username to the current root file directory path
$path .= '/' . $user->username;
}
}
}
Just because you're not paranoid doesn't mean everybody isn't out to get you.
I've been looking into this today and I can't find an effective way to do it via a JCE Profile.
The only viable option I think is to tak advantage of JCE Filesystem Events via a Joomla plugin, and manipulate the root directory value based on certain parameters.
JCE Filesystem Events are events that are triggered before and after some filesystem functions, like upload delete etc. An example plugin containing all the available events is here - https://github.com/widgetfactory/wf_filesystem_events
In your instance you could do something like:
The only viable option I think is to tak advantage of JCE Filesystem Events via a Joomla plugin, and manipulate the root directory value based on certain parameters.
JCE Filesystem Events are events that are triggered before and after some filesystem functions, like upload delete etc. An example plugin containing all the available events is here - https://github.com/widgetfactory/wf_filesystem_events
In your instance you could do something like:
class PlgSystemWf_filesystem_events extends JPlugin
{
/**
* onWfFileSystemGetRootDir
* @param string $path The relative root directory path, eg: "images".
* @return void
*/
public function onWfFileSystemGetRootDir(&$path)
{
$app = JFactory::getApplication();
$user = JFactory::getUser();
// into images field file browser...
if ($app->input->getCmd('fieldid') === 'jform_images_image_intro') {
// append the username to the current root file directory path
$path .= '/' . $user->username;
}
}
}
Just because you're not paranoid doesn't mean everybody isn't out to get you.
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!