How would one go about having a unique forum made when user does a certain thing on a web site? On this web site I am making there are user groups and every time a group is made by a user, I want a unique forum made just for that group. Is this possible with PHPBB or do I need to code my own forum. I also want each forum to have the same settings and categories.

Thanks for any help.

Dani AI

Generated

— good question. As pointed toward the phpBB community resources, there are three practical ways to give each user-created group its own forum with the same structure: use an existing extension (simplest), write a phpBB extension that clones a template forum when a group is created (recommended for control), or perform direct database inserts (fast but risky).

A safe, maintainable workflow to implement via an extension:

  • Create one “template” parent forum with the categories/subforums and settings you want copied.
  • Add an extension that listens for the group-creation event in phpBB’s event system.
  • In the listener, copy the template structure: create a new parent forum, duplicate child forums, copy settings, and assign ACLs so the new group has the proper access.
  • Run phpBB’s forum sync/repair routines and clear caches after creation.

Example pseudocode (implementation details depend on your phpBB version):

onGroupCreated($group_id, $group_name) {
  $new_parent = clone_template_forum($template_forum_id, $group_name);
  foreach ($template_children as $child) {
    clone_subforum($child, $new_parent);
  }
  set_group_permissions($group_id, $new_parent, $permissions_array);
  sync_forum_tree($new_parent);
  purge_cache();
}

Cautions and tips:

  • Do work on a development copy and back up the database before touching production.
  • Avoid raw DB edits unless you understand phpBB’s forum tree structure (nested set values) and permission tables — mistakes corrupt the forum tree.
  • If you expect many groups, consider limiting the number of physical forums (performance and admin UI clutter). An alternative is one parent forum with group-filtered subareas or using topic prefixes plus group ACLs.
  • Check compatibility with the phpBB version in use; APIs and events changed between major releases.

Recommended Answers

All 2 Replies

Thank you so much that is what I was looking for.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.