Theme System
Theme System
Theme Overview
What are Themes?
Themes control the visual appearance and layout of your forum:
- Colors and Styles - Visual design
- Layout Structure - Page organization
- Typography - Fonts and text styling
- Components - UI elements styling
Theme Structure
themes/
âââ my-theme/
âââ theme.json # Theme metadata
âââ assets/ # CSS, JS, images
â âââ css/
â â âââ frontend.css
â â âââ admin.css
â âââ js/
â â âââ main.js
â âââ img/
â âââ logo.png
âââ views/ # Template overrides (optional)
âââ layouts/Theme Configuration
theme.json
Every theme requires a theme.json file:
{
"name": "My Theme",
"id": "my-theme",
"version": "1.0.0",
"description": "A custom theme for Flatboard 5",
"author": "Your Name",
"author_url": "https://example.com",
"author_email": "author@example.com",
"screenshot": "screenshot.png",
"requires": {
"flatboard": ">=5.0.0"
},
"styles": [
"assets/css/frontend.css"
],
"scripts": [
"assets/js/main.js"
],
"variables": {
"primary_color": "#007bff",
"secondary_color": "#6c757d"
},
"hide_color_settings": false,
"theme_settings": {},
"form_config": {}
}Advanced Configuration Options
Hide Color Settings
If your theme manages colors differently (e.g., using CSS variables or external frameworks), you can hide the color customization panel:
{
"hide_color_settings": true
}When set to true, the color settings section will not appear in the admin panel. This is useful for themes like Bootswatch that manage colors through their own system.
Advanced Theme Settings
Add custom configuration options that appear in the admin panel:
{
"theme_settings": {
"layout_style": "default",
"enable_animations": true,
"custom_option": "value"
}
}Form Configuration (form_config)
Create advanced configuration forms with multiple field types:
{
"form_config": {
"form_id": "my_theme_config",
"form_title": "Theme Configuration",
"submit_text": "Save Settings",
"fields": {
"layout_style": {
"type": "select",
"label": "Layout Style",
"description": "Choose the layout style",
"default": "default",
"category": "general",
"options": {
"default": "Default",
"wide": "Wide",
"compact": "Compact"
}
},
"enable_animations": {
"type": "checkbox",
"label": "Enable Animations",
"description": "Enable smooth animations",
"default": true,
"category": "general"
},
"custom_html": {
"type": "textarea",
"label": "Custom HTML",
"description": "Add custom HTML content",
"default": "",
"category": "advanced"
}
},
"categories": {
"general": "General",
"advanced": "Advanced"
}
}
}Supported field types:
select- Dropdown menu with optionscheckbox- Boolean checkboxtextarea- Multi-line text input (supports HTML)text- Single-line text input
- Minified via
AssetMinifier(unless.min.*files are provided) - Cached via
AssetLoaderwith automatic cache invalidation - Optimized for production performance
Creating a Theme
Step 1: Create Directory
mkdir -p themes/my-theme/assets/{css,js,img}Step 2: Create theme.json
Create the theme configuration file with metadata.
Step 3: Create Stylesheet
assets/css/frontend.css:
/* Theme Variables */
:root {
--primary-color: #007bff;
--secondary-color: #6c757d;
--background-color: #ffffff;
--text-color: #212529;
--border-color: #dee2e6;
}
/* Global Styles */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background-color: var(--background-color);
color: var(--text-color);
}
/* Header */
.header {
background-color: var(--primary-color);
color: white;
padding: 1rem;
}
/* Navigation */
.nav {
display: flex;
gap: 1rem;
}
/* Buttons */
.btn {
padding: 0.5rem 1rem;
border: none;
border-radius: 0.25rem;
background-color: var(--primary-color);
color: white;
cursor: pointer;
}
.btn:hover {
opacity: 0.9;
}Step 4: Create JavaScript (Optional)
assets/js/main.js:
// Theme JavaScript
document.addEventListener('DOMContentLoaded', function() {
// Your theme-specific JavaScript
console.log('Theme loaded!');
});Theme Customization
CSS Variables
Use CSS variables for easy customization:
:root {
--theme-primary: #007bff;
--theme-secondary: #6c757d;
--theme-background: #ffffff;
--theme-text: #212529;
}Color Schemes
Support light/dark modes:
/* Light mode */
:root {
--bg-color: #ffffff;
--text-color: #000000;
}
/* Dark mode */
[data-theme="dark"] {
--bg-color: #1a1a1a;
--text-color: #ffffff;
}Responsive Design
Use media queries for mobile support:
/* Desktop */
.container {
max-width: 1200px;
margin: 0 auto;
}
/* Tablet */
@media (max-width: 768px) {
.container {
max-width: 100%;
padding: 0 1rem;
}
}
/* Mobile */
@media (max-width: 480px) {
.container {
padding: 0 0.5rem;
}
}Installing a Theme
Method 1: From the Admin Panel (Recommended, since 5.2.2)
.zip archive â no FTP or shell access required.- Download the theme
.zipfrom the Flatboard Resource Center or from the theme author - Go to Admin â Themes
- Click "Install a theme"
- Select the
.ziparchive and confirm â the archive is validated, extracted, and the theme appears in the list automatically
The server validates the archive integrity, MIME type, size, and the presence of a valid theme.json before extracting.
Method 2: Manual Installation (FTP / SSH)
The manual workflow is: download â extract locally â upload the folder â activate.
Step 1: Download and Extract
- Download the theme
.zipfrom the Flatboard Resource Center or from the theme author - Extract the archive on your local machine â you should get a folder (e.g.
my-theme/) withtheme.jsonat its root
.zip file to the server directly. Extract the archive first, then upload the resulting folder.Step 2: Upload the Theme Folder
Via FTP
Connect to your server with an FTP client (FileZilla, Cyberduck, etc.) and upload the extracted theme folder into the themes/ directory of your Flatboard installation:
your-flatboard/
âââ themes/
âââ my-theme/ â upload this folder (not the .zip)
âââ theme.json
âââ assets/Via SSH
If you have shell access, extract directly on the server:
cd /path/to/your-flatboard/themes/
unzip my-theme.zip # extracts to my-theme/Step 3: Activate the Theme
Once the folder is uploaded, go to Admin â Themes, find your theme in the list, and click Activate. The theme is applied immediately.
Activating an Installed Theme
From Admin Panel
- Go to Admin â Themes
- Find your theme in the list
- Click Activate
- Theme is immediately active
Manual Activation
If needed, you can manually set the active theme by editing config.json:
{
"theme": {
"active": "my-theme"
}
}Template Overrides
Override Views
Create custom templates:
themes/my-theme/views/
âââ layouts/
â âââ main.php
âââ discussions/
â âââ list.php
âââ posts/
âââ view.phpTemplate Hierarchy
Flatboard 5 checks in this order:
- Theme views (if exists)
- Default views
Theme Best Practices
Design Principles
- Consistency - Maintain consistent styling
- Accessibility - Ensure WCAG compliance
- Performance - Optimize CSS and JS
- Responsiveness - Support all screen sizes
Code Quality
- Organize CSS - Use logical structure
- Comment Code - Add helpful comments
- Minimize CSS - Remove unused styles
- Validate - Validate CSS/HTML
Testing
- Multiple Browsers - Test in Chrome, Firefox, Safari, Edge
- Mobile Devices - Test on phones and tablets
- Different Resolutions - Test various screen sizes
- Accessibility - Test with screen readers
Default Themes
Flatboard 5 includes several default themes:
Default Theme
- Name: Default
- Description: ThÚme par défaut de Flatboard 5 avec un design moderne et épuré, supportant les modes clair et sombre
- Version: 5.0.0
- Edition: Available in both Community and Pro editions
- Clean, modern design
- Responsive layout
- Light and dark mode support
- Customizable color variables
- Standard theme settings
Premium Theme
- Name: Premium
- Description: ThÚme premium sophistiqué démontrant toutes les possibilités avancées de personnalisation de Flatboard 5
- Version: 5.0.0
- Edition: Available in Pro edition only
- Advanced customization options
- Multiple layout options (default, centered, wide, compact)
- Animation support (none, subtle, normal, high)
- Parallax effects
- Customizable hero sections
- Advanced form configuration (
form_config) - Multiple navbar styles (default, glass, solid, transparent)
- Card styles (elevated, bordered, minimal)
- Extensive theme settings
Bootswatch Theme
- Name: Bootswatch
- Description: ThÚme intégrant tous les thÚmes Bootswatch pour Bootstrap 5. Sélectionnez parmi 26 thÚmes Bootswatch disponibles
- Version: 1.0.0
- Edition: Available in both Community and Pro editions
- Based on Bootstrap 5
- 26 color schemes available (Brite, Cerulean, Cosmo, Cyborg, Darkly, Flatly, Journal, Litera, Lumen, Lux, Materia, Minty, Morph, Pulse, Quartz, Sandstone, Simplex, Sketchy, Slate, Solar, Spacelab, Superhero, United, Vapor, Yeti, Zephyr)
- Professional appearance
- Theme selector in admin panel
- Color settings hidden (
hide_color_settings: true) - colors managed by Bootswatch system
Futurist CyberNeon Theme
- Name: Futurist CyberNeon
- Description: ThÚme futuriste ultra-moderne avec des néons cyberpunk, des effets lumineux dynamiques et un design immersif
- Version: 5.1.0
- Cyberpunk aesthetic
- Neon glow effects
- Holographic effects
- Animated gradients
- Perfect for tech and gaming communities
Nord Theme
- Name: Nord
- Description: ThÚme arctique inspiré de Nord Theme avec une palette de couleurs polaire harmonieuse
- Version: 1.0.0
- Arctic color palette
- Polar-inspired design
- Clean and minimal
Christmas Theme
- Name: Christmas 2025
- Description: ThÚme festif de Noël avec animations de flocons de neige, couleurs chaleureuses et effets visuels magiques
- Version: 1.0.0
- Festive holiday design
- Snowflake animations
- Garland effects
- Warm color scheme
Theme Customization via Admin
Most themes support admin customization through the admin panel:
- Go to Admin â Themes
- Select active theme
- Click "Customize" or "Configure"
- Modify settings:
- Color Variables - Customize primary, secondary, background, and text colors (unless
hide_color_settingsis enabled) - Theme Settings - Configure theme-specific options defined in
theme_settings - Advanced Configuration - Use
form_configfor complex settings with multiple field types - Logo Configuration - Upload and configure theme logo
- Color Variables - Customize primary, secondary, background, and text colors (unless
- Preview changes
- Save
Color Customization
By default, themes expose color variables that can be customized in the admin panel:
- Primary and secondary colors
- Success, danger, warning, info colors
- Background colors (light and dark modes)
- Text colors (light and dark modes)
"hide_color_settings": true in theme.json to hide the color customization panel.Advanced Configuration
Themes can define advanced configuration forms using form_config:
- Select Fields - Dropdown menus with predefined options
- Checkboxes - Boolean toggles for features
- Text Areas - Multi-line inputs (supports HTML for custom content)
- Text Fields - Single-line inputs
- Categories - Organize settings into groups
These settings are automatically saved and can be accessed in your theme's PHP templates via the theme configuration system.
Troubleshooting
Theme Not Loading
Check:
- Theme directory structure is correct
theme.jsonis valid- CSS/JS files exist
- Check error logs
Styles Not Applying
Solution:
- Clear browser cache
- Clear Flatboard cache
- Check CSS file paths
- Verify file permissions
Theme Conflicts
Solution:
- Deactivate other themes
- Check for CSS conflicts
- Review theme code
- Test in isolation
Migration from Flatboard 4
Themes from Flatboard 3 and 4 are NOT compatible with Flatboard 5 due to the complete architecture rewrite. You'll need to:
- Recreate themes for Flatboard 5
- Adapt existing designs to new structure
- Update CSS to match new HTML structure
- Test thoroughly after migration
Migration Steps
- Analyze Old Theme - Review structure and styles
- Create New Structure - Set up Flatboard 5 theme structure
- Port Styles - Adapt CSS to new HTML
- Update Templates - Recreate template overrides
- Test - Test all pages and features
Publishing Your Theme
Once you've created your theme, you can share it with the Flatboard community by publishing it in the Flatboard Resource Center.
Publishing Requirements
Before submitting your theme, ensure:
- â Theme follows Flatboard 5 structure
- â
theme.jsonis complete and valid - â
Screenshot included (
screenshot.png) - â Theme is tested and working
- â Documentation included (README.md)
- â No security vulnerabilities
- â Compatible with latest Flatboard 5 version
Submit Your Theme
- Visit the Flatboard Resource Center
- Log in to your account
- Select "Theme" as resource type
- Fill in theme information:
- Theme name and description
- Version number
- Compatibility (Community/Pro/Both)
- Screenshot
- Download link or file
- Submit for review
Theme Distribution
After approval, your theme will be:
- Listed in the Resource Center
- Searchable by users
- Available for download
- Rated and reviewed by users
- Potentially featured if exceptional
Resources
- Plugin Guide - Plugin integration
- Developer Guide - Advanced development
- Troubleshooting - Common issues
- Flatboard Resource Center - Submit your theme
Last updated: March 12, 2026