A 5 adding a new article. Creating and displaying articles (content) in Joomla using sections and categories, a blog on Joomla and a More button
If you've been thinking about giving users the ability to add articles and content to your Joomla site, you've probably already discovered that this seemingly simple task is not so easy to solve. Initially, you have at least two paths. The first is to use the standard functionality, because the control system Joomla content has many built-in useful features, including adding articles from the site. And the second is to use third-party modules and components, including various CCKs. Having skimmed through the features and descriptions found in other reviews, you will most likely want to use third-party components, as they clearly provide a wider range of settings and features. However, a detailed study with the installation of components on test systems showed that not everything is as good as described.
Existing solutions for organizing users to add articles and materials to the Joomla site
Before proceeding, it is worth specifying the criteria that were taken as a basis:
The solution must either do not make changes to standard mechanisms, or make them so minimal that later you can easily add other modules and components to the site.
Required moderation added materials.
It is necessary that the user couldn't randomly mess up the current site structure somehow or add materials to those categories that are used only for organizing the internal tasks of the site.
If there is a need to make edits to the code (finishing), then they should be minimal. It's one thing when you already have a stream of articles and know the specifics of what you expect from users. Accordingly, you understand that your work will be useful. Another thing is when you just add functionality and it is not known whether there will be a flow and if so, which one. After all, you should always remember that if someone really wants to add material, then it will not be difficult for him to send word document, or OpenOffice, or even html to email.
It is desirable that there are all sorts of convenient functions, such as the ability for the user to see the status of his articles, organizing the process of moderating articles, adding tags, adding pictures, and others.
The criteria are quite basic, but even they were enough to eventually stop at adding materials in a standard way. But first things first. The first to consider were various CCK, such as ContentBuilder and K2. The main problem was the change in standard mechanisms and the need to make a sufficiently large amount of edits, so they had to be abandoned. For example, after downloading from the official site and installing K2, which, according to statements, should already have a convenient functionality for adding materials, it turned out that all content should be used only through K2 (hence, almost all modules for Joomla without K2 support become useless) and that the form for adding materials still needs to be adjusted to fit your needs (for example, the availability of all categories to the user). Of course, it is quite possible that after a certain time of studying K2, this task could be solved much easier, but transferring everything that is, just for the sake of one function, and looking for analogues to existing modules is not rational.
Note: Remember that this is only about the task of adding content by users. Of course, with the help of CCK you can build complex and powerful sites, but this is not required in the current task.
The following modules and components were considered, which are also are CCKs but do not change the standard structure. These are Zoo (like CCK), SobiPro (like a catalog) and ChronoConnectivity (separate words about it). Free version Zoo provides a ready-to-publish module. However, after viewing the finished forms and finding solutions to problems with security settings, it became clear that, in addition to the fact that all added articles will go alone(in other words, many questions remain about how to relate custom articles and categories to site articles and categories), need to make a lot of edits into display templates in order to organize the moderation process (accepted, rejected, under moderation, and so on) with the ability for users to view the status of their articles. SobiPro is a pretty good catalog, but it has the same problems as Zoo. You will need to make edits and think about the relationship between SobiPro content and standard content. ChronoConnectivity is a very powerful component for building all sorts of forms and synchronizing within the database. If you need to completely sharpen the whole process of adding materials or something to your needs, then this can be easily done with it. However, there are no pre-installed options in it, so absolutely everything will have to be configured from scratch. And this is a very long time.
After researching in the field of CCK, it became clear that it was worth looking at more mundane solutions. And the most obvious these are blogs. However, as it turned out, there are not so many free blog components. And those that met, by and large, turned out to be similar to the standard mechanism. So there is no point in using them. However, two fairly good free blogging components caught my eye: Hekima Blogs and UAM. However, it became clear to them that will have to make some adjustments to fully organize the moderation process and fix some bugs.
Gradually considering solutions from the most complex and eventually reaching the blog components, it became more and more clear that initially on almost any site (if it was not originally conceived for the flow of articles) it is quite enough to use the standard Joomla mechanism. However, there were no normal instructions on the Internet for setting it up and solving such a banal issue as separating user images from the general catalog of site images. Only fragmentary solutions of individual subtasks. Nevertheless, having collected the solutions together, we got a fairly simple and convenient instruction for setting up the addition of materials by users.
Configuring users to add materials and articles to the Joomla site using standard tools
The final instruction for setting up users to add articles and materials to the Joomla site turned out to be large in terms of the number of points, but actually quite simple to organize. The first thing you need is download and install free editor JCE with localization (link to the developer's website; there is a Russian language there; in extreme cases, you can always download it from other resources). Unlike the standard TinyMCE Editor, it has a customizable and quite convenient picture manager. Now, you can start setting up.
1. Open " Website - General settings" and set the default editor " Editor JCE". This must be done so that all users enter articles from this particular editor.
2. Open " Material Manager". Then click the " Settings". Go to the tab " Rights"and for the group Registered set the permission to create material (item "Create"). Leave the rest of the items disabled. This setting will allow users to add content and articles from the site, but not publish them. In other words, once added, articles will be unpublished by default. In general, simple moderation.
3. Open " Category manager" and create a category " For consideration". Subsequently, all added articles will fall into this category (for convenience).
4. Create a hidden menu if you don't have one. A hidden menu is the same as a regular menu, but placed in a position that is not in the template.
5. In the hidden menu, create an item with Alias " add material"and title" Add article". Select item type "Create material". Set access level " Registered" (on the left side) and the default category "For Consideration" (in the main settings area). This is done so that an unauthorized user, when selecting an item, gets to the login page and that all materials fall into one category (for subsequent sorting).
6. We create an item already in the menu, which is shown to all users. Set item type Nickname". Specify as the target point previous paragraph from the hidden menu. open item is needed so that all users can see that you can create material on the site. When clicking on such an item by unauthorized users, they will be redirected to the authorization page.
Now, let's get started setting up the JCE editor
7. Open the JCE editor in the menu " Components". Go to the tab with profiles. Enable the profile " front end". This is exactly the profile that will be applied to users when adding an article from the site.
8. Open profile" front end and set the following settings
8.1. In the first tab in the " Users"check the box next to the group" Registered" to apply the settings to registered users.
8.2. Go to tab " Features and Layout". Set the item "Editor Switch" to No to eliminate the possibility of submitting bare html.
8.3. Create on the site in the directory " images"directory" reviews". This directory will store pictures of user articles for the duration of moderation.
8.4. Return to the admin panel and go to the tab " Editor Options". Then on the left side select the tab " File system" and indicate in paragraph " Path to file directory" path " images/reviews"
8.5. In the same tab, disable the item " Folder tree"
8.6. In the same tab, specify maximum size images, for example, 100.
8.7. In the same tab, specify actions in case of conflict " Create unique name...". This is done so that the pictures of other users cannot be overwritten. After all, after the article has been moderated by you, you can always transfer the pictures to the public folder.
8.8. We save the settings.
8.9. Go to tab " Plugin Options" and on the left side of the screen select the tab " Image Manager". Then set the file size limit, for example, 100 (as before).
8.10. Disable the items "Delete folder", "Delete file", "Rename file", "Cut, copy" (for a directory and file), "Rename folder".
8.11. Specify the path to the directory of image files " images/reviews"
8.12. We save the settings.
8.13. In the tab " Plugin Options"open tab" Link" on the left side. And specify the desired settings for default links. For example, the goal " in a new window".
8.14. In the same tab, disable all items with access to the link structure (search, etc.), as well as pop-ups. This is done in order to access internal structure at ordinary users did not have.
8.15. Save and close the editor.
9. We are trying to open the item " Create material" under an unauthorized user and we see that the login form has opened. We are trying to open the same item with a logged in user and we see that the material editing form has opened, but with a bunch of extra areas that users do not really need.
10. First of all, open " Extensions - Plugin Manager"and expose the group" Special" for all buttons (Image, Page Break, Material, and so on) except the button " More". This will hide the buttons for normal users, but leave them open for those users who have access to the admin.
11. Unfortunately, it is not possible to hide blocks from the form that are not needed, as well as add an introductory text, with the settings. Therefore, you will have to copy the display template file from the component to the site template, and then edit it.
11.1. open the way" %site root%/components/com_content/views/form/tmpl" and copy the file " edit.php"to your template along the way" %your template%/html/content/form/".
11.2. Open the file "edit.php" in any text editor and add the introductory text you need, as shown below (the text comes after the 44th line or search for "
11.3. Now, to hide blocks, it is necessary for all tags fieldset, except for the first one, add display hiding via style, like this:
Friends, I use cookies to give you the best experience on my site. If you agree, click "OK".OK