Introduction 

What does it do? 

pforum is a very tiny forum extension for TYPO3 CMS.

Features 

  • Create forum records (backend only)
  • Create topic records (e.g. the question)
  • Create post records (e.g. the answer)
  • Store up to two images for each topic and post
  • Unauthenticated mode: every new topic or post creates its own pforum user record
  • Authenticated mode: the frontend user record (fe_users) is assigned to topics and posts
  • Inform users about new posts by email, if an email address is provided
  • Frontend admin users can manage topic and post records
  • Backend module to manage topics and posts

What it does not 

Please keep in mind that we don't want to provide a full-featured forum extension. If you need one, please use the forum extension by Mittwald.

  • No images, such as smileys, in the textarea
  • No HTML in the textarea
  • No avatars for users
  • No highlighting of topics and posts
  • No pinned topics or posts at the top of the list
  • No overview of all topics and posts by a user
  • No quoting of previous topics or posts
  • No anchor links to jump to a specific topic or post
  • No birthday reminders
  • No links in general

Users manual 

Insert plugin on page 

  1. Create a page

    First of all, you need a page where you can add the pforum plugin.

  2. Add the plugin

    Switch to the Page module and select your newly created page in the page tree. Click the "+ Content" button to open the Content Element Wizard. Switch to the Plugin tab and click the panel named Forum to add the plugin to the page.

  3. Configure the plugin

    If you want, you can give the content element a name and configure a different detail page on the Plugin tab.

  4. Save

    Don't forget to save your record.

Create forum records 

It's your job to create forum records that users can create topics and posts in. A forum record is meant to be a category or discussion topic, such as "Let's talk about cars", "Sell and buy", or simply "Windows 11".

  1. Create storage

    Create a new page of type "Storage Folder" in the page tree.

  2. Create a forum record

    Switch to the List module and choose your newly created storage folder from the page tree. In the right-hand frame, click the + button in the upper left. Look for the Forum section and click Forum from the list to create a new forum record.

    Fill in the title (required) and teaser fields. Don't add any teaser records yourself — that's the job of your users in the frontend.

Installation 

Composer 

If your TYPO3 installation runs in Composer mode, please execute the following command:

composer req jweiland/pforum
vendor/bin/typo3 extension:setup --extension=pforum
Copied!

If you work with DDEV please execute this command:

ddev composer req jweiland/pforum
ddev exec vendor/bin/typo3 extension:setup --extension=pforum
Copied!

Extension Manager 

On TYPO3 installations that don't run in Composer mode, you can still install pforum via the Extension Manager:

  1. Log in

    Log in to the backend of your TYPO3 installation as an administrator or system maintainer.

  2. Open the Extension Manager

    Click on Extensions in the left-hand menu to open the Extension Manager.

  3. Update extensions

    Choose Get Extensions from the upper select box and click the Update now button in the upper right.

  4. Install pforum

    Use the search field to find pforum. Select the pforum entry from the search results and click the cloud icon to install pforum.

Next step 

Configure pforum.

Extension settings 

Some general settings for pforum can be configured in Admin Tools > Settings.

Tab: Basic 

From email address 

Default: <empty>

Define the email address that is used to inform users about new topics and posts.

If this value is empty, pforum tries to use the email address from $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']. If this is not set either, sending an email fails with an exception.

From email name 

Default: <empty>

Define the sender name that is used to inform users about new topics and posts.

If this value is empty, pforum tries to use the sender name from $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']. If this is not set either, sending an email fails with an exception.

TypoScript 

pforum needs some basic TypoScript configuration. To do so, you have to add an extension template ("+ext template") to either the root page of your website or to the specific page that contains the pforum plugin.

  1. Locate the page

    Decide where you want to insert the TypoScript template. Either the root page or the page with the pforum plugin works fine.

  2. Create a TypoScript template

    Switch to the Template module and select the page you chose above in the page tree. Choose Click here to create an extension template from the right-hand frame. In the TYPO3 community, this is also known as an "+ext template".

  3. Add the static template

    Choose Info/Modify from the upper select box and then click the Edit the whole template record button below the small table. On the Includes tab, locate the Include static (from extension) section. Use the search field below Available items to search for pforum. Usually only one record is shown. Select it to move that record to the left.

  4. Save

    If you want, give the template a name on the General tab, then save and close it.

  5. Open the Constant Editor

    Choose Constant Editor from the upper select box.

  6. pforum constants

    Choose PLUGIN.TX_PFORUM from the category select box to show only pforum-related constants.

  7. Configure constants

    Adapt the constants to your needs.

  8. Configure TypoScript

    Since constants only allow you to modify a fixed selection of TypoScript, switch back to Info/Modify and click Setup. Here you can configure all pforum-related settings.

View 

view.templateRootPaths 

Default: Value from constants EXT:pforum/Resources/Private/Templates/

You can override our templates with your own site package extension. We recommend changing this value in the TypoScript constants.

view.partialRootPaths 

Default: Value from constants EXT:pforum/Resources/Private/Partials/

You can override our partials with your own site package extension. We recommend changing this value in the TypoScript constants.

view.layoutsRootPaths 

Default: Value from constants EXT:pforum/Resources/Layouts/Templates/

You can override our layouts with your own site package extension. We recommend changing this value in the TypoScript constants.

Persistence 

persistence.storagePid 

Set this value to a Storage Folder (PID) where you have stored the records.

Example: plugin.tx_pforum.settings.storagePid = 21,45,3234

Settings 

settings.auth 

Default: 1 (no authentication)

Example: plugin.tx_pforum.settings.auth = 2

Define whether creating new topics and posts requires an authenticated frontend user.

  • Value 1: No authentication. Everyone can create topics and posts. We recommend this for intranet environments.
  • Value 2: An authenticated frontend user is required to create topics and posts.

settings.emailIsMandatory 

Default: 0

Example: plugin.tx_pforum.settings.emailIsMandatory = 1

If activated, an additional input field is displayed where the user must enter a valid email address. Useful in case of auth = 1. The email address is added to the pforum user record.

settings.usernameIsMandatory 

Default: 0

Example: plugin.tx_pforum.settings.usernameIsMandatory = 1

If activated, an additional input field is displayed where the user must enter a username. Useful in case of auth = 1. The username is added to the pforum user record.

settings.useImages 

Default: 0

Example: plugin.tx_pforum.settings.useImages = 1

If activated, two additional upload fields are added to the form for new topics and posts.

settings.uidOfAdminGroup 

Default: 0

Example: plugin.tx_pforum.settings.uidOfAdminGroup = 14

By default, you, as an administrator, have to modify or delete topic and post records in the TYPO3 backend. With this setting you can define a frontend user group that should act as an administrator to edit and delete records in the frontend.

settings.uidOfUserGroup 

Default: 0

Example: plugin.tx_pforum.settings.uidOfUserGroup = 26

If authentication is required (auth = 2), you have to define a frontend user group that is allowed to create new topics and posts.

settings.pidOfDetailPage 

Default: 0

Example: plugin.tx_pforum.settings.pidOfDetailPage = 26

By default, all detail views are displayed on the same page as the forum record list. For design reasons, it may make sense to define a dedicated detail view page.

settings.topic.hideAtCreation 

Default: 0

Example: plugin.tx_pforum.settings.topic.hideAtCreation = 1

By default, every new topic created in the frontend is directly visible. If you want to prevent this, activate this option — an administrator will then have to review the topic first.

settings.topic.activateByAdmin 

Default: 0

Example: plugin.tx_pforum.settings.topic.activateByAdmin = 1

By default, hidden records can only be activated by a backend editor. If you want your frontend administrator to be able to enable hidden topics, activate this option here.

settings.post.hideAtCreation 

Default: 0

Example: plugin.tx_pforum.settings.post.hideAtCreation = 1

By default, every new post created in the frontend is directly visible. If you want to prevent this, activate this option — an administrator will then have to review the post first.

settings.post.activateByAdmin 

Default: 0

Example: plugin.tx_pforum.settings.post.activateByAdmin = 1

By default, hidden records can only be activated by a backend editor. If you want your frontend administrator to be able to enable hidden posts, activate this option here.

settings.new.uploadFolder 

Default: 1:user_upload/tx_pforum/

Example: plugin.tx_pforum.settings.new.uploadFolder = 2:dropbox/pforum/

Only valid if you have activated useImages. Define the default storage location for uploaded images in the frontend.

settings.image.* 

Default:

settings.image {
  width = 120c
  height = 90c
  minWidth = 120
  maxWidth = 120
  minHeight = 90
  maxHeight = 90
}
Copied!

With these values you can manipulate the topic and post image size.

settings.pageBrowser.itemsPerPage 

Default: 15

Example: plugin.tx_pforum.settings.pageBrowser.itemsPerPage = 10

If there are a lot of records, the page browser helps you navigate through all these records. Define the maximum number of records to display per page.

Administrator manual 

Pforum administration module 

pforum comes with its own administration module. Here an administrator, or an editor with the appropriate permissions, can activate hidden topic and post records.

If settings.topic.hideAtCreation and settings.post.hideAtCreation are deactivated in TypoScript, you can hide this module for editors, since it serves no purpose in that case.

Routes 

Currently, we don't have any route configuration here. There is no slug field in the frontend forms for topics and posts, so there is currently no way to create human-readable URLs. We may add a slug field to the forum records, since these records are created in the backend.

Please file an issue ticket for this if you're interested.

Updating 

If you update pforum to a newer version, please read this section carefully!

Upgrade to version 7.0.0 

  • Post/Topic image uploads now use Extbase's native #[FileUpload] attribute instead of a custom PropertyMappingConfiguration type converter. If you have overridden Resources/Private/Partials/Post/FormFields.html or Resources/Private/Partials/Topic/FormFields.html in your own site package, replace the two indexed <f:form.upload name="{post}[images][0]" /> / [1] fields with a single <f:form.upload property="images" multiple="1" /> field and adjust your template accordingly.
  • Topic::getCrdate() and Post::getCrdate() now return ?DateTime instead of DateTime. If your own code or overridden templates rely on a non-nullable creation date, add a null check.

Upgrade to version 4.0.0 

We have changed many parts of the Fluid templates. Please check the image and link sections in your overridden templates and adjust them accordingly.

Known problems 

Currently, there are no known problems.

ChangeLog 

Version 7.0.0 

  • [TASK] Migrate Post/Topic image uploads to Extbase's native FileUpload API, including duplicate-file handling and automatic upload folder creation
  • [BUGFIX] Apply the settings.new.uploadFolder TypoScript/FlexForm setting to Post/Topic file uploads again, which had no effect since the migration to the native FileUpload API
  • [BUGFIX] Fix duplicate validation of mandatory email/username fields
  • [BUGFIX] Fix missing request context in FluidEmail sent from TopicController::mailToUser()
  • [TASK] Remove Singleton pattern from ExtConf and stop using TSFE in controllers and helpers
  • [TASK] Remove obsolete TCA columns and database fields already provided by TYPO3 core
  • [TASK] Make crdate nullable in Topic and Post
  • [TASK] Configure pforum backend templates via page TSconfig instead of ext_typoscript_setup.typoscript
  • [TASK] Remove obsolete static template registration left over from the Site Sets migration
  • [TASK] Suggest installing jweiland/checkfaluploads for mandatory upload consent
  • [DOCU] Fix typos and improve English wording across the documentation

Version 6.2.4 

  • [SECURITY] Restrict edit/update/delete/activate actions on Topics and Posts to their owning frontend user

Version 6.2.3 

  • [BUGFIX] Replace hardcoded tab labels with localized labels in tt_content

Version 6.2.2 

  • [BUGFIX] PSR Refactoring for controller actions with major fixes
  • [BUGFIX] Fix FluidEmail request context and session type safety in PostController
  • [BUGFIX] Backend Page Module Previews: Migrated the custom backend preview for the pforum plugin to the modern TYPO3 v12/v13 API.

Version 6.2.1 

  • [BUGFIX] Initialize error property in PostCheckFileReferenceEvent

Version 6.2.0 

  • [BUGFIX] Frontend FileUpload handling fix
  • [BUGFIX] PSR Refactoring for controller actions with major fixes

Version 6.1.2 

  • [BUGFIX] Fixed default values inside extension otherwise throws errors in dev.

Version 6.1.1 

  • [TASK] Updated wizard title with [extension] name format

Version 6.1.0 

  • [TASK] Implemented Upgrade wizard for migrating list_type to custom CType

Version 6.0.2 

  • [BUGFIX] SiteSet identifier renamed by removing default

Version 6.0.1 

  • [BUGFIX] Fixed Backend Module issues
  • [BUGFIX] Fixed Fluid Formatting Issues
  • [BUGFIX] Fixed TCA type bugs

Version 6.0.0 

  • [TASK] Add support for TYPO3 v13 LTS
  • [TASK] Removed old version support
  • [TASK] Replaced deprecated functions

Version 5.0.0 

  • [TASK] Add support for TYPO3 v12 LTS
  • [TASK] Removed old version support
  • [TASK] Updated Testing framework
  • [TASK] Replaced deprecated functions

Version 4.0.3 

  • [DOCU] Update route section
  • [DOCU] Missing space in Includes.rst.txt

Version 4.0.2 

  • [DOCU] Add documentation
  • [BUGFIX] Allow TYPO3 versions higher than 11.5.16

Version 4.0.1 

  • [BUGFIX] Use PostCheckFileReferenceEvent of pforum

Version 4.0.0 

  • Add TYPO3 11 compatibility
  • Remove TYPO3 9 compatibility