Managing the Discussion Forums Using PHP-Nuke

0
141
7 min read

PHP-Nuke has an awesome discussion board module, the Forums module, which is a complete application. phpBB—the leading free, open-source discussion board application—has been ‘refitted’ as a PHP-Nuke module, providing integration with the PHP-Nuke user accounts.

Forum Structure

Rather than having a single discussion area, with topics intermingling with other topics, themes of conversation are organized into a number of different containers, rather like the folder and file structure of your hard disk.

The top-level of organization is the category. Note that the categories here are different from the categories we have met in the other modules!

Within categories, the next level of organization is into forums. Forums consist of topics, and finally, users are able to creating postings on these topics. Thus categories, forums, and topics act like folders, with postings being analogous to the files, to continue the file system analogy.

Only forum administrators can create categories and forums. Topics (and obviously postings, since they are the real body of a discussion area) can be added by users of the forum. A topic is essentially a ‘first’ posting, with subsequent postings on that topic being replies to the topic subject.

Here is a diagram of the forums hierarchy:

Building Websites with PHP-Nuke

Although a forum is contained in a category, the term ‘forum’ is generally used informally to refer to the whole discussion environment, covering categories, forums, topics, and postings. When you ‘post to a forum’, you are actually posting to a topic in a particular forum of a certain category! The general term ‘board’ or ‘discussion board’ is usually used to refer to the whole forum experience.

Access to categories and forums can be restricted to groups of users. These restricted categories and forums can also be made invisible to those unable to access them. This is in contrast with other modules in PHP-Nuke where you restrict access to the entire module. In general, visitors either see all the contents of the module or none of it. The Forums module enables a set of ‘mini-administrators’, forum moderators, who are able to control who is able to post what, and where. We’ll see more about that later.

The Forums Administration Area

The Forums administration area is accessed through the PHP-Nuke Administration area, in the same way as for any other module.

Building Websites with PHP-Nuke

This brings you to an area very different from the other PHP-Nuke module administration areas. This is the phpBB administration area, and is the nerve center of your phpBB forums.

The page has a frame-based layout, with the left-hand frame being the navigation panel, giving you links to the various phpBB administration tasks. The right-hand frame holds the main page content.

Building Websites with PHP-Nuke

This screen shows you some statistics about your board, and the details of current, online visitors. Clicking on the Admin Index link will return you to this page, with the Forum Index link taking you into your forums. The Preview Forum link also takes you to your forums, but opens them up in the right-hand frame of the browser, retaining the phpBB administration navigation in the left-hand frame, so you can continue to work in the phpBB administration area if you need to.

phpBB is truly awesome. It is arguably one of the most impressive free, open-source PHP web applications available, and we can only scratch the surface of its true power here..

Here we will step through the tasks of creating the structure to allow users to make postings, follow the posting process, and also see how to make some basic configuration changes.

Forum Configuration

Just as with PHP-Nuke where we began by making changes to PHP-Nuke’s site configuration, here too, we begin with some global configuration settings for phpBB. Clicking on the Configuration link in the General Admin part of the left-hand panel takes you to the phpBB configuration area. There are many options; only some of the top ones are shown here:

Building Websites with PHP-Nuke

The Domain Name, Site name, and Site description fields are similar to the Site URL, Site Name, and Slogan fields of the PHP-Nuke preferences. The Domain Name field holds the domain name of your site, and we’ll set the Site name and Site description fields to match those in our PHP-Nuke site configuration.

We will also set the Cookie Domain to our site domain name, and the Cookie name to dinoportalforum. Note that if you change these settings after your site has gone live with people having visited the forums and logged in, then they won’t be able to log in automatically since the Forums module will be looking for a different cookie from the one they have stored in their browser.

PHP-Nuke generally uses the PHP mail() function to send its emails, but the Forums module offers the option to use an SMTP server to send mail. If you know the details of an SMTP server that you can use (possibly your Internet Service Provider has given you access to an SMTP server), then you can enter the settings for this in the Email Settings panel. If you don’t have access to an SMTP server, then the default action of the Forums module is to use the PHP mail() function, as PHP-Nuke would normally do.

Scrolling down the screen you will find a Submit button that will save your changes.

Creating a Category

Click on the Management link in the Forum Admin panel to begin creating the forum structure. First, you will need to create a category:

Building Websites with PHP-Nuke

Once you enter the name for the category into the box and click on the Create new category button, you have a category.

Creating a Forum

When the page reloads after creating the category, you are presented with a screen confirming the creation of your forum, and a Click Here to return to Forum Administration link. Clicking this link brings you to a page with the list of current categories displayed, along with links to edit, delete, or change their ordering in the list. You are also able to continue creating new categories.

Immediately underneath our new category is a box for entering the name of a new forum for that category, and clicking on the Create new forum button will create a forum of that name:

Building Websites with PHP-Nuke

When the page reloads, you will be given a screen into which you can enter a description of the forum, and set some properties for it. You can assign the forum to another category from the Category dropdown, or you can set the Forum Status. The Forum Status is Locked or Unlocked. An Unlocked forum is free for all to view and contribute to; a Locked forum requires the user to have specific access to write or post to it.

Building Websites with PHP-Nuke

There are also ‘pruning’ options available for removing topics that haven’t seen enough activity in the forum. These options will be useful for keeping your ‘board’ clean over time.

Clicking on the Create new forum button creates the forum:

Building Websites with PHP-Nuke

Now we have forums, we are ready for topics. It is only a matter of time before we are posting!

The Visitor Experience

Open a new browser window, visit your PHP-Nuke site, and click on the Forums link. The visitor is welcomed to the Forums module with a list of the categories:

Building Websites with PHP-Nuke

Clicking on the Who is Online link presents you with a list of people who are currently viewing the forum, and where they are in the forum.

Clicking on one of the forums takes you to the list of topics in that forum. At the moment, our forum is empty.

Building Websites with PHP-Nuke

As the screen is encouraging us to do, we can click on the new topic button to post a new topic to the forum. We do not have to be an administrator to do this, but we do have to be a registered user of the PHP-Nuke site.

Posting a Topic

The form for posting a new topic is rather exciting:

Building Websites with PHP-Nuke

You can enter the Subject of your topic, and enter the body of the topic in the Message body box. You are able to use a range of formatting effects within the body of your posting, including inserting those the little emoticons by clicking on them to add them to your text.

Before posting your topic, it is worth taking a moment to preview it by clicking on the Preview Post button:

Building Websites with PHP-Nuke

If you are happy with the posting as it is, click on the Submit button and the posting is submitted. Your new topic is displayed in the forum’s topic list:

Building Websites with PHP-Nuke

Clicking on the topic title brings up the submitted postings for that topic. At this point, we have only one—the topic posting:

Building Websites with PHP-Nuke

Users can now continue the discussion by posting a reply to this post. The author of the post is able to reply to, edit, or delete his or her own post with the aid of the three icons in the top right-hand corner of the post before any replies have been posted to the posting.

LEAVE A REPLY

Please enter your comment!
Please enter your name here