Chapter 9. Forums Portlet
Prev |  | Next

## Chapter 9. Forums Portlet

### Thomas Heute

`<theute@jboss.org>`

## 9.1. Introduction

### Warning

The forums portlet is GPL licensed

The forums portlet is a port of the phpBB forums as a Java portlet. It is packaged independently of the core, so you can easily use it or not depending on your own needs.

Above is the main window displayed by default to any user. It lists all the forums classified by categories. It is possible to see how many topics and posts where written for each forum and the date and user of the last post. All those categories and forums can be configured if the user has the correct privileges. The next image show the main administration interface available to users with the correct credentials.

## 9.2. Functionalities

User features:

- See the list of forums
- Post a new topic
- Read a topic
- Reply to an existing post
- Fast-reply to an existing post in the same page as the thread
- Email notification
- Quote a existing forum posts

Admin features:

- Create a new category of forum
- Edit the name of a category
- Delete a category and move the content to another category
- Create a new forum
- Edit the name and description of a forum
- Delete a forum and move the content to another forum
- Classify categories
- Classify forums
- Edit forum posts

## 9.3. Installation

If you are deploying from binary , just move portal-forums.ear in to your deploy directory.

If you are deploying from source :

To install forums, you need to go to the directory `forums` and type `sh build.sh deploy` it will create a file `portal-forums.ear` and copy it to `$JBOSS_HOME/server/default/deploy` . If JBoss is already running you have nothing to do but to go to a page where the forums should be displayed (see your configuration).

To have the mail notification working, make sure that you correctly configure the mail service with an existing SMTP account in the file: `$PORTAL_HOME/core/src/resources/portal-server-war/WEB-INF/jboss-service.xml`

## 9.4. Configuration

In `$FORUMS_HOME/src/resources/portal-forums-war/WEB-INF/portlet.xml you can configure the following options:`

- `floodInterval` : Minimal time in seconds between two messages by a user.
- `fromAddress` : Email address appearing in the `From` field of notification emails.

## 9.5. Security

You can restrict access to the forums for certain roles, to do so edit the file `$FORUMS_HOME/src/resources/portal-forums-war/WEB-INF/jboss-portlet.xml` . You should see the existing part:

                <scheme>
                <domain></domain>
                <item>
                <path>/</path>
                <permission>
                <permission-name>Add</permission-name>
                <role-name>Users</role-name>
                </permission>
                <permission>
                <permission-name>Admin</permission-name>
                <role-name>Admins</role-name>
                </permission>
                <!-- For non logged users -->
                <permission>
                <permission-name>Read</permission-name>
                <role-name></role-name>
                </permission>
                </item>
                </scheme>

This means that a user with role Users has the permission to add posts in forums, a user with role Admins has the permissions to Admin anything, while an anonymous user (not logged on), can only read.

If you want users to only view a category named "myCategory" to a certain role "myRole", here is an `item` that you can add:

                <item>
                <path>/myCategory</path>
                <permission>
                <permission-name>ReadCategory</permission-name>
                <role-name>myRole</role-name>
                </permission>
                </item>

Prev | Up | Next
Chapter 8. User and Role Administration | Home | Chapter 10. Security