GitGram — config.php — GitGram
Hobbes_OS2_Archive / main / v1.05 / config.php4,000 B↓ Raw
<?php
if (!defined('HOBBES')) { http_response_code(403); exit; }

// Paths
define('ROOT_DIR',      __DIR__);
define('DATA_DIR',      ROOT_DIR . '/data');
define('UPLOADS_DIR',   DATA_DIR . '/uploads');
define('POOL_DIR',      DATA_DIR . '/pool');
define('USERS_DIR',     DATA_DIR . '/users');
define('FILES_DIR',     DATA_DIR . '/files');
define('INDEX_DIR',     DATA_DIR . '/index');
define('SETTINGS_DIR',  DATA_DIR . '/settings');
define('INVITES_DIR',   DATA_DIR . '/invites');
define('CATS_FILE',     DATA_DIR . '/categories/categories.json');
define('SETTINGS_FILE', SETTINGS_DIR . '/settings.json');
define('SEARCH_FILE',   INDEX_DIR . '/search.json');
define('CATALOG_FILE',  INDEX_DIR . '/catalog.json');

// Upload size limits
define('MAX_MEDIA_SIZE', 200 * 1024 * 1024); // 200 MB for media
define('MAX_FILE_SIZE',  200 * 1024 * 1024); // 200 MB for programs

// Allowed extensions
define('OS2_EXTENSIONS', [
    'zip','wpi','exe','cmd','bat','inf','rpm',
    'tar','gz','bz2','lzh','arj','7z','cab','img','iso',
]);
define('MEDIA_EXTENSIONS', [
    'jpg','jpeg','png','gif','bmp','ico',
    'wav','mp3','mid','midi','au','aiff',
    'avi','mov','mp4','mpeg','mpg',
]);
define('DOC_EXTENSIONS', [
    'txt','nfo','diz','doc','html','htm','pdf','rtf','me',
]);

// Role hierarchy (index = weight)
define('ROLES', ['guest', 'contributor', 'editor', 'admin']);

// OS/2 user-agent patterns
define('OS2_UA_PATTERNS', [
    'OS/2', 'Warp', 'WebExplorer', 'Warpzilla',
    'Lynx.*OS', 'SPRY', 'PMX',
]);

// Default site settings
define('DEFAULT_SETTINGS', [
    'site_name'         => 'Hobbes OS/2 Archive',
    'site_tagline'      => 'The Premier OS/2 Software Repository',
    'open_registration' => false,
    'show_splash'       => true,
    'landing_content'   =>
"# Welcome to the Hobbes OS/2 Archive

This archive is dedicated to OS/2 software, utilities, drivers, and media.
Browse our categories to find programs for Warp 3, Warp 4, eComStation, and ArcaOS.

## Getting Started

- **Guests** (OS/2 browsers): Full browse and download access
- **Contributors**: Upload and share your OS/2 software
- **Editors**: Approve submissions and manage categories

Use the navigation above to browse by category or search the archive.",
    'splash_content'    =>
"# Not Running OS/2?

This archive is designed for the OS/2 community. Guests browsing from non-OS/2 systems
need an account to access downloads.

**If you have an invite code**, use it to register for an account.
**If you are running OS/2**, please verify your browser sends the correct User-Agent string.

This restriction helps us serve the OS/2 community first.",
    'two_spot' => [
        'enabled' => false,
        'bg'      => '#000080',
        'text'    => '#ffff00',
    ],
    'css' => [
        'bg_color'          => '#c0c0c0',
        'text_color'        => '#000000',
        'link_color'        => '#000080',
        'visited_color'     => '#800080',
        'header_bg'         => '#000080',
        'header_text'       => '#ffffff',
        'nav_bg'            => '#003399',
        'nav_text'          => '#ffffff',
        'nav_hover_bg'      => '#0055cc',
        'th_bg'             => '#000080',
        'th_text'           => '#ffffff',
        'tr_alt_bg'         => '#e8e8ff',
        'tr_hover_bg'       => '#c8c8e8',
        'border_color'      => '#808080',
        'btn_bg'            => '#c0c0c0',
        'btn_text'          => '#000000',
        'btn_border'        => '#808080',
        'panel_bg'          => '#ffffff',
        'panel_border'      => '#808080',
        'accent'            => '#000080',
        'footer_bg'         => '#000080',
        'footer_text'       => '#ffffff',
        'input_bg'          => '#000080',
        'input_text'        => '#ffff00',
        'input_border'      => '#808080',
        'error_bg'          => '#ffcccc',
        'success_bg'        => '#ccffcc',
        'info_bg'           => '#ccccff',
        'muted_color'       => '#444444',
    ],
]);
Ready
GitGram