Skip to content

Configuration

Complete guide to configuring the Gold Standard Module settings.

Overview

The Gold Standard Module provides extensive configuration options through the XOOPS admin panel. All settings are organized into logical categories for easy management.


Accessing Configuration

  1. Navigate to Admin → Modules → Gold Standard
  2. Click Settings or Preferences
  3. Modify options as needed
  4. Click Save to apply changes

General Settings

flowchart LR
    A[General Settings] --> B[Module Name]
    A --> C[Items Per Page]
    A --> D[Date Format]
    A --> E[Default Status]

Module Display Name

Setting Description Default
module_name Display name shown in menus "Gold Standard"
module_description Short description "Article Management"

Pagination

Setting Description Default
items_per_page Items shown per page 20
admin_items_per_page Items in admin lists 50

Date & Time

Setting Description Default
date_format PHP date format string "Y-m-d H:i"
timezone Timezone for dates Server default

Content Settings

Article Options

Setting Description Default
enable_comments Allow comments on articles Yes
enable_ratings Allow article ratings Yes
auto_approve Auto-approve new articles No
default_status Default status for new articles Draft

Editor Configuration

Setting Description Default
editor WYSIWYG editor to use "tinymce"
allowed_html Allowed HTML tags Standard safe tags
max_content_length Maximum content length 50000 chars

Media Settings

Image Uploads

Setting Description Default
max_image_size Maximum image file size 2MB
allowed_image_types Allowed image extensions jpg, png, gif, webp
image_quality JPEG compression quality 85
create_thumbnails Auto-create thumbnails Yes

Thumbnail Dimensions

Setting Description Default
thumb_width Thumbnail width 150px
thumb_height Thumbnail height 150px
medium_width Medium image width 600px
medium_height Medium image height 400px

SEO Settings

URL Structure

Setting Description Default
use_seo_urls Enable SEO-friendly URLs Yes
url_pattern URL pattern for articles /article/{slug}

Meta Tags

Setting Description Default
auto_meta_description Auto-generate meta descriptions Yes
meta_description_length Max meta description length 160 chars
auto_meta_keywords Auto-generate meta keywords No

Notification Settings

Email Notifications

Event Description Default
notify_new_article Notify admins of new articles Yes
notify_new_comment Notify author of new comments Yes
notify_approval Notify author when approved Yes

Notification Template

// Configure in config/notifications.php
return [
    'new_article' => [
        'subject' => 'New article submitted: {title}',
        'template' => 'email/new-article.tpl',
    ],
];

Performance Settings

Caching

Setting Description Default
enable_cache Enable output caching Yes
cache_lifetime Cache TTL in seconds 3600
cache_driver Cache backend "file"

Database

Setting Description Default
query_cache Enable query caching Yes
lazy_loading Use lazy loading for relations Yes

API Settings

REST API

Setting Description Default
enable_api Enable REST API Yes
api_rate_limit Requests per minute 60
require_auth Require authentication Yes

API Keys

# Generate API key via CLI
php xoops_cli.php goldstandard:api:generate-key --user=1

Configuration via Code

Reading Configuration

use Xmf\Module\Helper;

$helper = Helper::getHelper('goldstandard');

// Get single value
$itemsPerPage = $helper->getConfig('items_per_page');

// Get with default
$editor = $helper->getConfig('editor', 'textarea');

Overriding in module.json

{
  "config": {
    "items_per_page": {
      "name": "items_per_page",
      "title": "_MI_GOLDSTANDARD_ITEMS_PER_PAGE",
      "description": "_MI_GOLDSTANDARD_ITEMS_PER_PAGE_DESC",
      "formtype": "textbox",
      "valuetype": "int",
      "default": 20
    }
  }
}

Environment-Specific Configuration

Development

// config/development.php
return [
    'debug' => true,
    'cache' => false,
    'api_rate_limit' => 0,
];

Production

// config/production.php
return [
    'debug' => false,
    'cache' => true,
    'cache_lifetime' => 7200,
];


goldstandard #configuration #settings #admin