Chapter 8. Adding Community Forums

The open society, the unrestricted access to knowledge, the unplanned and uninhibited association of men for its furtherance these are what may make a vast, complex, ever growing, ever changing, ever more specialized and expert technological world, nevertheless a world of human community.

—J Robert Oppenheimer

In the previous chapter, we created our entire layout structure. Now, we will use this layout structure, without additional enhancements, to fully host the magazine's forum.

In this chapter, we will:

  • Take a look at the built-in forums available through the eZ Webin packages
  • Use and configure the content classes and functionality to create a community system for our magazine
  • Learn how the eZ Webin blog content class works
  • Create an editor blog

The magazine's forum

As we learned in the previous chapters, eZ Webin comes bundled with a lot of useful features and extensions. One of these is the forum data object, which allows us to create a complete community bulletin board application without writing a single line of code.

Adding the Forum

To add a forum, we have to log in to the eZ Webin backend from http://packtmediaproject/index.php/ezwebin_site_admin/. From the Content structure tab, we have to add a new Forums object by using the drop-down menu located at the bottom of the page as shown here:

Adding the Forum

Next, we have to set up the name of the forum and add a simple description, in order to better describe it:

Adding the Forum

After we save the Forums object, we can start to populate it by using the Forum objects. The difference between the two dataobjects is that the former acts as a container or repository for the forum structure, whereas the latter is a container for the Forum topic dataobject.

As before, we can add a Forum object by using the drop-down menu at the bottom of the page, as shown here:

Adding the Forum

We can create a lot of different forums on our site—one for every argument that we want to talk about.

Adding the Forum

In the screenshot, we can see some of the topics that we created for the site's forum. We created a Chitchat forum for non-technical related issues, a Tech and gadgets forum where users can discuss new technologies, a Programming stuff forum related to web development, and a Church of Emacs Vs Cult of VI forum for software comparison discussions.

Creating a sticky post

It is useful to add a sticky post to give the required importance to a particular argument, which is also referred to as thread. For example, the forum rules should always be visible at the top of the selected forum.

To create a sticky post, we have to add a Forum topic to the Forum object, by using the drop-down bar that we used before, and select the checkbox named Sticky.

Creating a sticky post

Forum access control list

The bulletin board provided by eZ Publish is not as powerful as some renowned ones, such as vBullettin or phpBB, but it has all of the basic features required of a multipurpose CMF in order to manage a simple forum. Moreover, the eZ Publish forum object is released with some default configuration that is useful for instantiating it and using it immediately. For example, the default access control list of the forum object is set to allow to an anonymous user to read the forums and all of the threads, but to only allow registered users to write on it.

If we want to change the permissions for a single Forum channel—for example, by creating a private forum that only certain users can see—we have to use the Roles and policies functionality provided by the CMF.

We saw this menu in the previous chapters, when we created a new section for our site. Now, we will use it to create a private forum only for the users in the Editor role group.

Creating the Private forums section

First of all, we need to create a new Section called Private forums. To do this, we will open the Setup tab in the backend, and then click on the Sections link in the leftmost sidebar. As we did before, we will create a new section by clicking on the New section button.

We will call the new section Private forums. Next, we will select Content structure from the Navigation part drop-down list.

Creating the Private forums section

Next, we will click on the OK button, after which we will be redirected to the section's list page. Here, we need to click on the plus icon (+), which is displayed on the rightmost side of the screen, to assign the selected section to a content subtree.

Navigate to the selected forum(s) that you want to assign as private, and select the appropriate checkbox. Then, to save your selection, click on the Select button.

Now, the forum will be inaccessible to all users except those in the Administration role group.

Creating the Private forums section

We have to grant users who are editors the ability to see the private forum. After we open the Roles and policies link in the Setup tab, we have to click on the Editor link.

Creating the Private forums section

Here, we will select the Subtree option from the drop-down menu located at the bottom of the Users and groups using the <Editor> role box, and then click on the Assign with limitation button.

Creating the Private forums section

The system will ask us which section we want to enable for this role group. We will choose the Private forums section that we created previously.

Creating the Private forums section

Next, we need to confirm the users (or the user groups) to be assigned to the section. We will again choose the Editors. Save your work by clicking on the Select button. Now, all of the users that we created in this group should be able to see and use the private forums.

Creating the Private forums section
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.149.19