Skip to main content
The forum settings panel provides centralized configuration for core operational parameters. Adjust forum behavior, set rate limits, and control content organization.

Forum Settings Overview

Access the settings interface at /admin/settings to configure forum-wide options. Settings are stored in the database and apply immediately when saved.

ForumSettings Model

The settings system uses the ForumSettings model with five configurable properties:
type ForumSettings struct {
    ForumName          string  // Display name for the forum
    ForumEnabled       bool    // Global enable/disable toggle
    PostLimitPerDay    int     // Maximum posts per user per day
    CommentLimitPerDay int     // Maximum comments per user per day
    MaxTagsPerPost     int     // Maximum tags assignable to posts
}
Each setting has default values that apply when not explicitly configured:
  • ForumName: “oForum”
  • ForumEnabled: true
  • PostLimitPerDay: 20
  • CommentLimitPerDay: 100
  • MaxTagsPerPost: 3

Forum Name Configuration

Set the display name for your forum:
forum_name
string
default:"oForum"
The forum’s display name, shown in:
  • Page titles
  • Header/navigation
  • Meta tags for SEO
  • Email notifications (if implemented)
Choose a name that:
  • Reflects your community’s purpose
  • Is memorable and distinctive
  • Avoids special characters that may break formatting
  • Is reasonably short (1-3 words recommended)
1

Navigate to settings

Access /admin/settings in the admin panel.
2

Enter forum name

Type your desired forum name in the “Forum Name” field.
3

Save settings

Click the save button to apply the change immediately.

Forum Enabled/Disabled Toggle

Control whether the forum is accessible to users:
forum_enabled
boolean
default:"true"
Global toggle for forum accessibility:Enabled (true):
  • Forum operates normally
  • Users can view, post, and comment
  • All functionality available
Disabled (false):
  • Forum becomes read-only or inaccessible
  • Users see maintenance message
  • Admin panel remains accessible to administrators
Disabling the forum affects all users except administrators. Use this during:
  • Scheduled maintenance
  • Emergency moderation situations
  • Database migrations
  • Major configuration changes
Communicate with your community before disabling the forum.

Usage Scenarios

Scheduled Maintenance:
1. Announce maintenance window to users
2. Disable forum before starting work
3. Perform necessary updates
4. Re-enable forum when complete
5. Confirm functionality
Emergency Response:
1. Disable forum immediately
2. Address security issue or spam attack
3. Clean up problematic content
4. Re-enable with monitoring

Rate Limits

Control content creation velocity to prevent spam and ensure quality:

Post Limit Per Day

post_limit_per_day
integer
default:"20"
Maximum number of posts a user can create in a 24-hour rolling window.Recommended values:
  • 5-10: Small, focused communities (high quality emphasis)
  • 20: Default balanced setting
  • 50+: Large, high-activity forums
  • 0 or very high: Effectively unlimited (not recommended)
This limit prevents:
  • Spam floods
  • Bot attacks
  • Accidental duplicate posts
  • Content quality dilution

Comment Limit Per Day

comment_limit_per_day
integer
default:"100"
Maximum number of comments a user can create in a 24-hour rolling window.Recommended values:
  • 50: Small communities with careful moderation
  • 100: Default balanced setting
  • 200+: High-activity discussion forums
Higher than post limits because:
  • Comments are responses (less spammy)
  • Active discussions require multiple comments
  • Lower individual impact than posts
Rate limits apply per user, not globally. They reset on a rolling 24-hour window (not at midnight). This means if a user posts at 3 PM, their limit resets at 3 PM the next day.

Choosing Rate Limits

Consider these factors when setting limits: Community Size:
  • Small (under 100 users): Lower limits maintain quality
  • Medium (100-1000 users): Default limits work well
  • Large (1000+ users): Higher limits prevent legitimate user frustration
Community Activity:
  • Low activity: Conservative limits encourage thoughtful posts
  • High activity: Generous limits prevent legitimate users from hitting limits
Spam Risk:
  • New forum: Lower limits until trust established
  • Established forum: Can increase limits gradually
  • High spam target: Keep stricter limits
Setting limits too low frustrates legitimate users. Monitor rate limit hits in your logs and adjust based on actual usage patterns rather than theoretical spam prevention.

Tag Limits

max_tags_per_post
integer
default:"3"
Maximum number of tags that can be assigned to a single post.Recommended values:
  • 1-2: Simple categorization (forums with clear topics)
  • 3: Default balanced setting
  • 5: Complex categorization needs
  • 10+: Not recommended (dilutes tag effectiveness)
This limit ensures:
  • Focused categorization
  • Meaningful tag usage
  • Cleaner post appearance
  • Better tag-based filtering

Tag Limit Strategy

Strict (1-2 tags):
  • Forces users to choose primary category
  • Clearer organization
  • Less flexibility
Balanced (3-5 tags):
  • Primary category + secondary attributes
  • Example: “Bug Report” + “Frontend” + “Critical”
  • Most versatile approach
Permissive (5+ tags):
  • Maximum flexibility
  • Risk of over-categorization
  • May reduce tag effectiveness
Fewer tags per post often leads to better organization. Users forced to choose the most relevant tags create clearer categorization than allowing unlimited tagging.

Saving Settings

Apply configuration changes to your forum:
1

Modify settings

Update any of the five settings fields with your desired values.
2

Click save

Click the “Save Settings” button at the bottom of the form.
3

Confirm changes

Settings apply immediately. Verify the changes by:
  • Checking the forum name in the header
  • Testing rate limits (if modified)
  • Attempting to create a post with tags (if tag limit modified)

Settings Persistence

Settings are stored in the forum_settings database table:
CREATE TABLE forum_settings (
    key TEXT PRIMARY KEY,
    value TEXT NOT NULL
);
Each setting is stored as a key-value pair:
Key                    | Value
-----------------------|--------
forum_name             | My Forum
forum_enabled          | true
post_limit_per_day     | 20
comment_limit_per_day  | 100
max_tags_per_post      | 3
The system uses upsert logic to update existing values or insert new ones:
INSERT INTO forum_settings (key, value) 
VALUES ($1, $2) 
ON CONFLICT (key) DO UPDATE SET value = $2
Settings take effect immediately without restart. However, rate limit changes only affect new actions - existing rate limit counters don’t reset when limits change.

Best Practices

Follow these guidelines for effective forum configuration:

Initial Setup

  1. Set forum name before announcing the forum
  2. Start with default rate limits and adjust based on actual usage
  3. Keep forum enabled unless actively working on issues
  4. Use conservative tag limits (3 or fewer) initially

Ongoing Management

Monitor rate limit hits:
  • Review logs for users hitting limits
  • Distinguish between spam and legitimate users
  • Adjust limits if many legitimate users affected
Adjust for growth:
  • Increase limits as community matures
  • Established users earn higher trust
  • Scale limits with forum size
Communicate changes:
  • Announce limit adjustments to users
  • Explain rationale for restrictions
  • Provide feedback mechanism

Emergency Procedures

Spam Attack:
1. Disable forum immediately
2. Ban offending accounts
3. Delete spam content
4. Lower rate limits temporarily
5. Re-enable forum with monitoring
6. Restore original limits after threat passes
Performance Issues:
1. Lower rate limits to reduce load
2. Investigate performance bottleneck
3. Address underlying issue
4. Restore original limits
Settings changes are logged in the database. Consider implementing an audit trail for tracking configuration changes over time.

Testing Settings

Verify your configuration changes:

Forum Name

  • Check page title in browser tab
  • Verify header displays new name
  • Inspect HTML meta tags

Forum Enabled/Disabled

  • Log out and attempt to access forum
  • Confirm appropriate message displays
  • Verify admin panel remains accessible

Rate Limits

  • Create test account
  • Attempt to exceed limits
  • Verify appropriate error message
  • Confirm limit resets after 24 hours

Tag Limits

  • Create or edit a post
  • Attempt to add more tags than limit
  • Verify UI prevents exceeding limit
  • Check saved post has correct tags
Test setting changes in a development environment when possible, especially forum disable toggle and rate limit adjustments.

Build docs developers (and LLMs) love