# Plugin Configuration Reference

The **Configuration** tab in the GravityOps Forum dashboard is where you set the global behavior of your forum. These settings control the URL structure and the primary method of displaying your forum.

---

## 1. Forum Title (Hub)

-   **Forum Title (Hub)**: The display title for the main forum index page.
-   **Default**: `Forum Hub`.
-   **Example**: This title appears as the main heading when viewing the list of all boards and forums.

---

## 2. Forum Base Slug

-   **Forum Base Slug**: The base segment for your forum's URL structure.
-   **Default**: `forum`.
-   **Example**: If your slug is `forum`, the index page will be at `yourdomain.com/forum/`.
-   **Note**: This is only applicable when **Custom Rewrite Rules** are enabled.

---

## 3. Show User Avatars

-   **Show User Avatars**: Global toggle for avatar rendering in forum views.
-   **Default**: Enabled.
-   **Per-user control**: Each logged-in user can hide their own avatar from the profile "Forum Settings" section when this global toggle is enabled.

Avatar rendering behavior:

| Global setting | User profile setting ("Show my avatar") | User has Gravatar | What is shown                                                                                                            |
|----------------|-----------------------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------|
| Disabled       | Any value                               | Yes/No            | Plugin generic avatar icon                                                                                               |
| Enabled        | Disabled                                | Yes/No            | Plugin generic avatar icon                                                                                               |
| Enabled        | Enabled (or unset default)              | Yes               | Gravatar image (falls back to plugin generic avatar if WordPress returns empty)                                          |
| Enabled        | Enabled (or unset default)              | No                | WordPress default avatar image from Discussion settings (falls back to plugin generic avatar if WordPress returns empty) |

Important caveat:

- When avatar display is enabled in this plugin, it attempts WordPress avatar output first (`get_avatar()`), then automatically falls back to the plugin's generic avatar icon if WordPress returns empty.

---

## 4. Custom Rewrite Rules

-   **Enable Custom Rewrite Rules**: A checkbox that toggles how the forum is routed and displayed.
-   **Enabled (Default)**:
    -   The plugin handles routing automatically via clean WordPress permalinks (e.g., `/forum/{forum-slug}/{topic-id}/`).
    -   No manual page creation is required, but you must have WordPress Permalinks set to something other than **Plain**.
-   **Disabled (Shortcode Mode)**:
    -   The forum will only be accessible via the WordPress page(s) where you have placed the forum shortcodes.
    -   Use this mode if you want full control over where the forum appears or if your environment doesn't support custom rewrites.

---

## 5. Strict Pretty URLs

-   **Strict Pretty URLs**: Only applicable when **Custom Rewrite Rules** are enabled.
-   **Purpose**: Ensures all forum links strictly use the centralized URL structure. If you have placed forum shortcodes on separate WordPress pages for custom layouts, this setting prevents the plugin from navigating users to those pages, keeping them within the main forum structure.

---

## 6. Advanced Page Mapping (Overrides)

By default, GravityOps Forum automatically discovers the WordPress pages where you've placed its shortcodes. This section allows you to manually specify or override those locations.

-   **Index Page**: The primary page for the forum index.
-   **Forum Page**: Dedicated page for viewing a single forum.
-   **Topic Page**: Dedicated page for viewing a single topic and its replies.
-   **Profile Page**: Dedicated page for the user profile view.

If any of these are left as **"Auto-Discover"**, the plugin will continue to look for the shortcodes on your published pages.

---

## 7. User Profile Settings

In addition to the global plugin configuration, users have access to their own "Forum Settings" on their profile page (e.g., `/forum/profile/`).

-   **Show my avatar in the forum**: Allows individual users to toggle avatar visibility for their own forum posts/profile display. This setting is only visible if the global **Show User Avatars** setting is enabled.
-   **Edit Profile**: By default, logged-in users can update their profile information using the registration form mapped in the **Forms** tab.

### Developer Note: Disabling Profile Editing
The ability for users to edit their profile via the forum can be disabled globally using the `gofrm_enable_profile_editing` filter:

```php
add_filter( 'gofrm_enable_profile_editing', '__return_false' );
```
