In this tutorial, I will explain how to setup Joomla users to publish articles, and upload media-content into user/group-specific upload folders.
Joomla's default editor is TinyMCE. We need to install another editor that has options for setting user-specific upload folders.
1) Install JCE: https://www.joomlacontenteditor.net/. Set JCE as the default editor in Global configuration.
2) Create a user account: "frederick". Assign "frederick" to group: "registered".
On the "Basic Settings" tab of Frederick's user account, set the Editor option to "Editor JCE.
3) Let us setup user-frederick to publish from the backend via a group-add:
- create a group:legal-team; group parent = registered.
- Add user "frederick" to group "legal-team"
- add group "legal team" to the "special viewing access level"
- Allow backend login: refer to tutorial: Joomla ACL Tutorial: create a user account and allow backend login: http://nairabytes.net/joomla/joomla-acl-tutorial-create-a-user-account-and-allow-backend-login
4) Allow user to publish articles via Joomla backend: Joomla ACL Tutorial: allow user account to publish articles via Joomla backend: http://nairabytes.net/joomla/joomla-acl-tutorial-allow-user-account-to-publish-articles-via-joomla-backend
5) Now, let us setup the media upload folder:
- As administrator, go to Content >> Media....
Note: I have deleted the default files and directories in the new Joomla installation im using for this tutorial.
- Create a folder with name:"fredericks-folder"
6) Configure JCE Profile for user-Frederick:
To make/force user-frederick's media content into "fredericks-folder", we need to set up JCE editor-profiles on the group that user-frederick belongs to.
- Goto Components >> JCE Editor >> Editor Profiles.
- Select the Default Profile and make a copy.
- Click to open the copied profile; on the "Setup-tab", details-section, change "Name" to Legal Team Profile
- scroll down to the "Users Group" section. Uncheck every group except "legal team", and "Super users"... (only super users and the legal team will have access)
- In the users-list, use the "add users" button to add user "Frederick".
See screenshots below:
Profile name: Legal Team Profile name
User group: select legal-team
user-frederick is selected in the users list
user-frederick is selected in the users list
On the Editors Parameters Tab, set Filesystem >> File Directory Path to: images/fredericks-folder
On the Plugin Parameters Tab, set File Browser >> File Directory Path to: images/fredericks-folder
After creating the Legal Team Profile, dont forget to move it above the Default Profile. Tip: any created profile should be moved above the Default Profile.
NOTES:
According to Joomlacontenteditor documentation, the following are some considerations on File Directory Path options.
File Directory Path
Relative path to file directory. Defaults to images if left blank. This path can contain the variables (eg: images/$usertype/$username) :
$id - Will be replaced with the user ID
$username - Will be replaced with the user username
$usertype - Will be replaced with the user usertype eg: author
$profile - Will be replaced with the profile name
$group - Will be replaced with the profile name
$year - Will be replaced with current year, eg: 2010
$month - Will be replaced with current month number, eg: 06
$day - Will be replaced with the day number, eg: 10
examples, with reference to sample group: legal-team:
- if File Directory Path is set to "images/$username", every user in the legal-team group will have an upload folder with their own username.....meaning a directory named "frederick" will automatically be created the first time user-frederick wants to upload an image. Same will happen for all other "usernames" in the legal-team usergroup.
- if File Directory Path is set to "images/$group", all users in the legal-team group will have a common upload folder/foldername as "Legal_Team_Profile". This is because the "Legal Team Profile" is applied to the Legal Team user-group where they all belong. Folder will be automatically created when a user in the group uploads a file.
- if File Directory Path is set to "images/$usertype", things work a little different: all "Registered-group" users will have a common upload folder by name "Registered". All "Authors-group" users will have a common upload folder "Authors"., etc
Links: Read Full JCE Editor Parameters documentation: https://www.joomlacontenteditor.net/support/documentation/100-profiles/318-profiles-editor-parameters
Thats all folks, thanks for dropping by.