Chapter 7. Forums Portlet
Prev |  |

## Chapter 7. Forums Portlet

### Thomas Heute

`<theute@jboss.org>`

## 7.1. Introduction

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 tropics 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.

## 7.2. Functionalities

User features:

Admin 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
- 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

## 7.3. Installation

First you need to create the database structure, go to the `forums` directory and type `sh build.sh ddl` it will create a file `forums/output/resources/setup/setup.ddl`.

Feed your database with this file, you may also want to have some entries for testing if you do feed your database with this other file as well: `forums/output/resources/setup/setup.sql`. `root# mysql -u portal -p jbossportal < forums/output/resources/setup/setup.ddl` and `root# mysql -u portal -p jbossportal < forums/output/resources/setup/setup.sql` are the two commands you need to type if you are using MySQL

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/standard`. 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).

## 7.4. Security

You can restrict access to the forums for certain roles, when you define a rule, the first element of the pattern must be the category name while the second is the forum name. For example the following rule `<<rule role="myrole" patterns="Category name:Forum name" level="add"/>` will give `add` privilege to the role `myrole` on the forum called "Forum name" of the category called "Category name". You can also use regular expression like: `<<rule role="myrole" patterns="Admin name:.*" level="add"/>` to give add access to the entire category.

Prev | Up |
Chapter 6. AdminCMS Portlet | Home |