8.3 Finish and Test our News Member Groups

Previously, we use the Joomla User Management system to create several News groups and connected them to Access Levels. In this article, we will we will review steps 5, 6, 7, 8 and 9 of the Custom Group creation process and then test the back end of our Community News Demo website. But before we dive into the details, we will take a step back and look at the hidden structure involved in building an Community News team. As we outlined earlier, a Community News team includes several groups. These groups include:

Public visitors to our Community News website.

Registered Members of our Community News website who have access to view or see areas of the website that are not accessible to the general public.

Special Registered Members such as Featured Authors who have the ability to create articles and post events on the front end of our website.

Front End Administrators have the ability to approve and post articles without the need to log into the back end of the website.

Back End Administrators who can log into the back end of the website in order to moderate reader comments, send newsletter, as well as create events and publish articles written by them or submitted by other members of the community.

Each of these groups needs their own place to post and share knowledge. Each of these posts consists of an article which is made visible by creating a menu item linked to the article. While all of these menu items could be placed on a single Main Menu, it is better to create separate menus for each of these groups.

In our example, this means having a Main Menu for the Public, a Members Menu for Registered Users, a Featured Authors Menu for Featured Authors, and an Administrator Menu for Back End Administrators who want to approve articles and events without logging into the backend of our News website. Each menu will only be visible to members who log into the front end of the website as a member of the associated group.

To make these three new menus more visible, we will place them near the top of the website. The Administrator Menu will go just below the header image and above the Main Menu in the Below Top position. We will not use the Brand Row because it has a special function which we turned off. Instead, we will place the Members Menu in the Banner row just below the Main Menu and the Featured Authors Menu in the same row. Here is what it will look like:

01

Below is what these menus will look like to an administrator who logs into the front end of our site. Thanks to Joomla Access Levels, Registered Members only see the Members Menu and the Main Menu. Featured Authors see the Main Menu, the Members Menu and the Featured Authors Menu. The public only sees the Main Menu.

02

Now that we understand the eventual goal, let's dive into the details on how to create these 3 menus and their associated menu items.

#5 Create an Administrator Menu to appear on the top row of the Front End whenever an administrator logs in
Several new menu items will be needed for the Back End Administrators of our website to be accessed by various levels of both of our new administrator groups. We could just add these menu items to the main menu. But it is better to leave the Main Menu for links needed by the General Public. We will therefore create a new Administrator Menu and place it on the hidden “below-top” row of our home page. This way whenever an administrator logs into the front end of our website, there will be an obvious new administrator menu that pops up with the links they need to use to go to their particular areas on our website.

To create a new Administrator Menu, log in as a Super User and click on Menus, Manage, New. For Title, type in Administrator Menu. For Unique Name, type in administratormenu (no spaces). For Description, type in Administrator Menu.

03

Then click Save and Close. This will bring us back to the Menu Manager where our new menu now appears in the table of menus:

04

Click “Add a module for this menu.” For Module Title, type Administrator Menu. Leave Title at Show. For Position, click on News 1 below top position. For Access, change the access to the Special Admin Access Level. This will allow all administrators access to the Administrator Menu – even though the actual menu items each group sees will depend on the access level of each menu item.

05

Click Save and Close.

Create Menu Items in the Administrator Menu to Display the Categories and Articles for each custom Group
Now we need to display our new categories and articles on our website. Click Menus, Administrator Menu and click Add New Menu Item. For type, select Category Blog. Use the Drop Down arrow to select the Featured Author Tips category. For title, call it Featured Author Tips. For Access, click on the Special Access Level (so all Administrator groups can see it). Then click Save and New. For the remaining 3 groups, also use category blogs assigned to their categories. But for access, click on their precise access group. For example, the Newsletter Team Tips Menu Item would be assigned to the Newsletter Team Access Group. Also go the Create ArticleMenu Item in the Bottom Menu and edit it to change its location to the Administrator Menu. Then click Save and Close. Then log into the front end of your News website as the News site administrator to view the new Administrator Menu.

By default, the News 1 template does not show the title of any modules in the Bottom Top, Cart or Brand module rows:

06

To show the titles of our three new menus, go to Templates, Code and click on the News 1 template to edit it. Then click on the index.php file and scroll down to Line 259 (which is the below-top module row) and replace the word “none” with the word “card”. Then go to Line 296 (which is the banner module position) and replace the word “none” with the word “card”. Then Line 301 (which is the top-a module position) and replace the word “none” with the word “card”. Then Line 306 (which is the top-b module position) and replace the word “none” with the word “card”. Save and close the index.php file.

Change the Background color of the Administrator Menu
Currently, the Administrator Menu has the News 1 template default background color. To change the background color to make the administrator menu more noticeable, go to Templates Styles and assign the below top row to Styles Color 4 or 5:

07

If the row line appears after logging out, add the following to user.css:

.container-header .grid-child {padding: 0;}

#6 Create a Members Menu
To create a new Members Menu, click on Menus, Manage, New. For Title, type in Members Menu. For Unique Name, type membersmenu (no spaces). For Description, type in Members Menu. Then click Save and Close.

This will bring us back to the Menu Manager where our new menu now appears in the table of menus. Click on “Add a module for this menu.” For Module Title, type in Members Menu. For Title, leave it at Show. For Position, click on News 1 banner position. For Access, change the access to the Registered Access Level. Then click the Conditions tab and set it to appear on all Pages. Then click Save and Close to close the Conditions tab and Save and Close to close the Member module. Then go to Templates, Styles and edit the News 1 template so that the Banner Row background color is color 5.

Create Members Menu Items
Go to Content, Articles to create a new article called First Steps for New Members. Here is the text: This is the page where we will post instructions for new Members of our Community News network. It will include tips on how to submit events and or articles. To log out, and return to our Home page, click the member log out button.

Then click Save and Close. Next, go to Menus, Members Menu and click New. For Menu Item Type, select Articles, Single Article. Then select First Steps for New Members. Change access level to Registered. Then click Save and Close.

Next go to the Bottom Menu and click the Log Out Menu Item to edit it. Change the Log Out menu item location from the bottom menu to the members menu. Then click Save and Close.

Set Up a Registration Captcha tool
To allow new members and authors to register on the front end of our website, we first need to add a captcha tool to cut down on spam registrations. This is a simple captcha: https://extensions.joomla.org/extension/access-a-security/site-security/qlcaptcha/

Here is the direct link to the Downloads page. https://github.com/hoochicken/plg_captcha_qlcaptcha/releases

Click System, Install, Extensions to install the captcha. Then go to Systems, Manage, Plugins. Click Captcha – qlcaptcha. Click Enable. Then click the Styles tab and change the background color to light blue and the angle to 12. Then click Save and Close.

Click Global Configurations and set the Default Captcha. Then go to Users, Manage and click Options. Change Allow User Registration to Yes. Then click Save and Close.

After registering, this notice will appear: Your account has been created and a verification link has been sent to the email address you entered. Note that you must verify the account by selecting the verification link when you get the email and then an administrator will activate your account before you can login.

After opening your email and clicking on the link, the following notice will appear: Your email address has been verified. Once an administrator approves your account you will be notified by email and you can login to the site.

You will then receive an email as the site administrator. To approve the account, click the link provided. You will then need to log in as a Super User. You will get this notice: The user's account has been activated and the user has been notified about it.

Log out of the front end. Alternately, you can register the remaining new members by logging into the backend. Then click Users, Manage, New. Once you have registered your new members, go your News website front end and click Member Login. Here is what our Membersmenu looks like:

08

We can change the order of these two menu items by going to Menus, Member Menu. We will leave the items vertically displayed as we will be putting the Featured Authors Menu on the same row.

#7 Create a Featured Authors Menu
To create a new Featured Authors Menu, click on Menus, Manage, New. For Title, type Featured Authors Menu. For Unique Name, type in featuredauthorsmenu (no spaces). For Description, type Featured Authors Menu. Then click Save and Close.

This will bring us back to the Menu Manager where our new menu now appears in the table of menus. Click on “Add a module for this menu.” For Module Title, type Featured Authors Menu. For Title, leave it at Show. For Position, click the News 1 banner position. For Access, change the access to the Featured Authors Access Level. Click the Conditions tab and set the menu to display on all pages. Then click Save and Close.

Create Featured Author Menu Items
Go to Content, Articles and click New. For Title, type How to Create a News Article. Here is the initial text of this article:

In this article, we will explain the steps for creating and submitting a news article. To create your News article, open a Libre Writer new document. Then type or copy paste your text and images into a Libre Writer document. Then right click on each image and click Compress. Change the resolution to 150 dpi. Then click OK. Then right click on the image again and click Save to save the image to your images folder in your file manager. The image file name should be lower case with no spaces. To Resize and Crop images, Debian has a free tool called Gthumb. But any graphic editing tool will do. Finally, rename and Save your finished image to your File Manager.

To submit your News article, log into our News website and click on Create an Article in the Featured Authors Menu. See this article for more information about writing a new article:
https://createasecurenewswebsite.com/first-steps/3-news-topics-and-articles/3-3-how-to-write-and-post-news-articles

If you have any questions, feel free to email us!

Assign the article to the Featured Author Tips category. Change the access level to Featured Authors. Then click Save and Close. Next go to Menus, Service Provider Menu, New. For Menu Item Type, select Articles, Category Blog. Then select the Featured Authors Information category. For title, call it Service Provider Information. For Access, click on the Featured Authors Access Level. Then click Save and Close.

Then click New. For Menu Item Type, select Articles, Single Article. Then select the How to Create a News article article. For title, type How to Create a News Article. For Access, click on the Featured Author Access Level. Then click Save and Close.

#10 Assign at least one User to each custom group so we can test our system.
The power of Joomla Groups, Permissions and Access Levels is that we can define what different groups see when they log into the front end of our website. To test our new system, we will need at least one user assigned to each of the new custom groups in addition to our super user. Earlier, we created email addresses for 9 demo group members, We then added 4 of these members using the back end control panel rather than having them register on the front end. Here we will add the Author1 member to the Featured Author group. Go to Users Manage and click on the Author1 to edit this member. Then click Assigned User Groups. Then check the Featured Author box.

09

Repeat for Author2 and Reporter1. Then add the Events Coordinator to the Events group. Add the Newsletter Coordinator to the Newsletter Group. Add the Tech Team Coordinator to the Tech Team group.

Go to Global Configurations to turn off front end editing. To get the menus to appear side by side, add to user.css:
.container-banner {display: flex; padding: 0px 15px;}

Then log in to the front end of our News website as author1 to view the Featured Authors menu which will also show the Members menu:

10

#11 Simplify the Joomla Login form
Go to System, Manage, Plugins and disable "Multi-factor Authentication – Passkeys." and disable "System - Passkey (Passwordless) Login. Also disable the System Remember Me plugin.

#12 Define Precise Permissions for Each Custom Group
We are nearly ready to set Global Permissions for each custom group. But first we need to install the BW Postman Newsletter. We will explain how to use this later. For now, find it in the Extensions Directory. Then download them and install it. Then go to to System, Global Configurations and click on the Permissions tab. The Permission Setting screen opens at the Public Table which has all permissions set in Red for Not Allowed:

11

Scroll down and click on the Registered tab to display the Registered Permissions Table. All they are allowed to do is log into the front end of our website. Click on the Featured Authors Permissions Table:

12

Click on the Author Group Permissions table and you will see that they have the same permissions as the Featured Authors group.

We will next set the Permissions for the Newsletter Team. Click on the Newsletter Team group Permissions Table. Then click on BW Postmanin the side menu. Then click on the Permissions tab:

13

Unfortunately, the Newsletter Team is not allowed to administrate the BW Postment Newsletter Component. Change Inherited to Allowed:

14

Then click Save. We will eventually install an Events Calendar. But for now, we will simply give the Events Team access to the entire back end except Global Configurations. So click on Global Configurations at the top of the left side menu. Then click on Events Team. Change Access Administration Interface from Inherited (not allowed) to Allowed. Then click Save.

Finally, click on the Tech Team. This group has the same permissions at the Administrator group which means they have access to all Administration Interfaces (and everything else) EXCEPT they do not have access to Super User settings which means that they cannot access Global Configurations. They also do not have access to Configure Options. Change Configure Options from Inherited not allowed to Allowed. Then click Save and Close. Note that we accomplished all of these Global Configuration settings without using the Deny Option for any action and without changing the settings of the Super User group.

#9 Test our New Access Control System…
Our last step is to test our new access control system. We need to test the back end access control to make sure that each administrator group has the correct access to the back end of the website and to the correct tools on the back end of the website. Try to log into the back end as the Editorwho is a Backend Administrator. The Administrator sees almost everything except Global Configurations.

Next, log into the back end as the Newsletter Coordinator. This time there is access to the back end and to Content and the Newsletter.

15

Next, log into the back end as the Events Team Coordinator. This group should see the same menu as the Editor. Next, log into the back end as the Tech Team Coordinator. This group should also see all of the tools in the back end with the exception of Global Configurations which is only displayed for members of the Super User group.

Front End Menu Tests
In addition to verifying the back end access, we should verify that the front end access has been correctly set. Try to log into the front end as the Editor who is a Registered User and Publisher You should see the Member Menu and the Featured Author Menu.

Next, log into the front end as the Newsletter Team Coordinator. This time there is also access to the Admin menu and the Newsletter Team Tips.

Next, log into the front end as the Events Team Coordinator. This group should see the same menus as the Newsletter Coordinator and and the Events Team Tips. Last, log into the front end as the Tech Team Coordinator. This group should see all the menus.

What’s Next?
Now that we have a better understanding of the Joomla Access Control System, in the article, we will explain how to add a process for allowing and approving reader comments.