Theme Development Guide
Build commercial-grade dizzy themes with a clear inheritance model, mode-aware assets, admin validation, and a release process suitable for marketplace distribution across current and future theme-enabled releases.
Audience
Theme developers, agencies, and marketplace sellers who need to build or maintain a frontend dizzy theme without breaking the stock package.
What this guide covers
Theme discovery, manifests, inheritance, runtime asset loading, minified assets, token inheritance, admin activation, packaging, and QA expectations.
Recommended approach
Start from a child theme with parent: "default", keep overrides narrow, and always ship updated readable and minified runtime assets together.
| Fresh install | In current stock distributions, fresh-install files are delivered in ScriptFiles/ and the installation database is delivered separately in MySQL/. |
|---|---|
| Update path | Upgrade packages are delivered separately under Updates/. The exact update guide and SQL path can change from release to release, so always follow the update documentation bundled with that package. |
| Theme location | Inside the package, stock themes live under ScriptFiles/themes/. After upload, that same structure becomes the runtime themes/ directory. |
- Create a new folder inside ScriptFiles/themes/, for example ScriptFiles/themes/customTheme.
- Add a theme.json manifest with a valid slug, a human-readable name, and parent: "default".
- Add a preview asset such as preview.svg or preview.png.
- Copy only the templates you intend to override, for example layouts/header/header.php or layouts/main.php.
- Maintain your visual system in scss/style.css and scss/night_style.css.
- Generate the production outputs style.min.css, night_style.min.css, and any required *.min.js assets before release.
- Upload or deploy the theme into the runtime themes/ directory, then open Admin > Design > Site Theme and activate it.
- Run a full smoke test across guest pages, authenticated pages, light mode, dark mode, AJAX partials, and mobile breakpoints before shipping.
active theme -> parent theme -> default
Base Theme
The base theme is default. If a requested slug cannot be resolved, dizzy falls back to this base slug.
Parent Chain
A theme can declare a single parent in theme.json. Missing views, previews, and theme assets are resolved through that chain.
Loop Protection
The chain builder tracks visited themes and stops on cycles. You cannot safely build circular inheritance and the validator rejects self-parenting.
| Discovery | All readable directories inside themes/ are candidates. A valid theme does not need every file locally, but the resolved chain must satisfy the required view set. |
|---|---|
| Manifest | theme.json is optional but strongly recommended. Without it, the system can infer defaults, but the result is not suitable for a polished commercial release. |
| View Resolution | Templates and partials should be included through dizzy_theme_view_path() so the runtime can resolve the active theme chain instead of assuming a hardcoded directory. |
| Asset Resolution | Theme assets can be resolved through dizzy_theme_asset_url() or through dizzy_asset_url('themes/<slug>/...'). Both paths eventually pass through the mode-aware theme resolver. |
ScriptFiles/
themes/
default/
theme.json
404.php
age_verification.php
becomeCreator.php
blog.php
blog_post.php
chat.php
contents.php
hashtag.php
invoice.php
landing.php
landing_two.php
legal.php
license.php
live.php
maintenance.php
page.php
payment-failed.php
payment-success.php
post.php
posts.php
product.php
profile.php
purchase_point.php
reel_views.php
register.php
reset_password.php
saved.php
settings.php
verifyme.php
layouts/
main.php
agencies.php
agency.php
community.php
communities.php
community_leaderboard.php
creators.php
friends_stories.php
header/
age_confirm.php
meta.php
css.php
javascripts.php
header.php
left_menu.php
login_form.php
page_right.php
posts.php
storyImageCreator.php
storyTextCreator.php
live/
freeLive.php
paidLive.php
scheduledLive.php
scss/
style.css
style.min.css
night_style.css
night_style.min.css
js/
age-confirm.js
age-confirm.min.js
agencyDirectory.js
agencyDirectory.min.js
character_count.js
character_count.min.js
creatorAgencies.js
creatorAgencies.min.js
creatorAutoMessage.js
creatorAutoMessage.min.js
creatorBulkMessages.js
creatorBulkMessages.min.js
inora.js
inora.min.js
inora_do.js
inora_do.min.js
main.js
main.min.js
community.js
community.min.js
obsOverlays.js
obsOverlays.min.js
share.js
share.min.js
videojs-loader.js
videojs-loader.min.js
css/
img/
mp3/
landing_plugins/
testTheme/
theme.json
preview.svg
customTheme/
theme.json
preview.svg
blog.php
profile.php
layouts/
community.php
header/
header.php
scss/
style.css
style.min.css
night_style.css
night_style.min.css
js/
main.js
main.min.js
community.js
community.min.js
img/
hero-pattern.png
landing_plugins/
customLandingPlugin/
manifest.json
preview.png
landing.php
- Top-level page files such as blog.php, profile.php, chat.php, and settings.php are valid theme override points.
- The layouts/ directory is where most reusable partials, wrappers, widgets, and page sections live.
- The scss/ and js/ directories are runtime-critical because prod mode can load their minified pairs.
- The css/, img/, and mp3/ directories contain supportive theme assets that can also be overridden or extended.
- The landing_plugins/ directory is separate from the core site theme and should be used only for landing page plugins.
Minimal child theme
The absolute minimum is usually theme.json, a preview image, and the handful of overridden files you actually need.
Bundled example
The stock package includes ScriptFiles/themes/testTheme as a lightweight example of a child theme with a manifest, preview, and token-based styling.
Commercial expectation
A sellable theme should ship maintainable CSS, minified production assets, a stable preview, and clear version metadata.
{
"name": "Custom Theme",
"version": "1.0.0",
"description": "Production-ready child theme for dizzy.",
"author": "Your Company",
"parent": "default",
"preview": "preview.svg",
"tokens": {
"brand_primary": "#eab308",
"brand_secondary": "#f59e0b"
},
"light_tokens": {
"page_background": "#fffdf2",
"panel_background": "#ffffff",
"menu_text": "#5b3b00"
},
"dark_tokens": {
"page_background": "#17120a",
"panel_background": "#241c11",
"menu_text": "#fff4c2"
}
}
| name | Human-readable theme name shown in the admin theme list. |
|---|---|
| version | Theme release number. Use semantic versioning if you plan to ship updates. |
| description | Short summary for administrators and buyers. |
| author | Company or developer identity displayed in admin. |
| parent | Parent theme slug. For most third-party themes this should be default. |
| preview | Relative path to the preview file inside the theme directory. If omitted, the system falls back to the base preview image. |
| tokens | Shared token values applied in both light and dark modes. |
| light_tokens | Light-mode-only token overrides. |
| dark_tokens | Dark-mode-only token overrides. |
<?php include dizzy_theme_view_path('layouts/footer.php'); ?>
<?php include dizzy_theme_view_path('layouts/header/header.php'); ?>
<link rel="stylesheet"
href="<?php echo iN_HelpSecure(dizzy_theme_asset_url('scss/home-extra.css', (string)$version)); ?>">
<script src="<?php echo iN_HelpSecure(dizzy_theme_asset_url('js/main.js', (string)$version)); ?>" defer></script>
<?php
$themeName = isset($currentTheme) ? (string)$currentTheme : 'default';
?>
<script src="<?php echo iN_HelpSecure(dizzy_asset_url('themes/' . $themeName . '/js/community.js', (string)$version)); ?>" defer></script>
- Missing views are searched in the parent chain before the runtime gives up.
- Theme preview assets are resolved through the same chain.
- Theme CSS and JS files are also mode-aware, so prod can prefer .min assets while dev prefers readable files.
- If a requested asset does not exist in the child theme, the chain can resolve the file from the parent or default.
// Avoid hardcoding the base theme
include 'themes/default/layouts/footer.php';
echo '<script src="themes/default/js/main.js"></script>';
// Prefer the resolver
include dizzy_theme_view_path('layouts/footer.php');
echo '<script src="' . iN_HelpSecure(dizzy_theme_asset_url('js/main.js', (string)$version)) . '"></script>';
- Production mode prefers minified CSS and JS files automatically.
- If a minified file exists, it can override the readable file during live runtime.
- Updating only style.css or main.js is not enough for a release build.
- Outdated minified files are one of the easiest ways to ship a broken or partially updated theme.
| Light CSS | scss/style.css in dev, scss/style.min.css in prod when available. |
|---|---|
| Dark CSS | scss/night_style.css in dev, scss/night_style.min.css in prod when available. |
| JavaScript | *.js in dev, *.min.js in prod when available. |
| Dev cache busting | When the asset mode is dev, dizzy can append a file modification time query string automatically. |
scss/style.css -> scss/style.min.css
scss/night_style.css -> scss/night_style.min.css
js/main.js -> js/main.min.js
js/community.js -> js/community.min.js
terser themes/customTheme/js/main.js -o themes/customTheme/js/main.min.js --compress --mangle
terser themes/customTheme/js/community.js -o themes/customTheme/js/community.min.js --compress --mangle
Merge order
Token resolution starts from the base theme, then applies parent tokens, then applies the active child theme tokens. Child keys override parent keys with the same name.
Common vs mode-specific
tokens apply to both modes. light_tokens and dark_tokens override them only in the matching mode.
Admin overrides
Admin custom color settings can still override portions of the UI. Tokens should be treated as theme defaults, not as the final authority in every installation.
brand_primary
brand_secondary
page_background
panel_background
panel_border
text_primary
text_muted
header_top
header_icon
menu_icon
menu_text
hover_surface
The bundled ScriptFiles/themes/testTheme/theme.json shows a clean token setup: shared brand colors in tokens, then readable light/dark surface and text values in the mode-specific sections.
themes/default/layouts/header/header.php
themes/customTheme/layouts/header/header.php
- layouts/header/header.php for header markup and announcement areas.
- layouts/main.php for page composition and wrapper changes.
- post.php, profile.php, or page-specific templates for feature-specific UI changes.
- scss/style.css and scss/night_style.css for the primary visual language.
- layouts/header/css.php because it contains token injection, custom color handling, and the base stylesheet contract.
- layouts/header/javascripts.php because it wires core scripts, PWA logic, and page-specific runtime features.
- AJAX partials and widget layouts because they can be used in multiple screens and modal flows.
- Theme name, slug, author, version, description, and preview image.
- Parent theme and the resolved chain.
- Warnings such as missing preview assets or missing manifests.
- Errors that block activation, such as missing required views or invalid parent references.
- An administrator clicks Activate on the Site Theme page.
- The request is protected with CSRF validation.
- dizzy validates the selected theme again on the server side.
- If validation passes, the system writes the theme slug into i_configurations.active_theme.
- The write is verified immediately. If verification fails, the previous theme is restored.
Site Theme
Controls the real product UI: layouts, page templates, core theme assets, tokens, guest pages, member pages, and the active frontend experience.
Landing Plugin
Controls a landing experience under the landing page system. It is not a replacement for a full site theme and should not be treated as one.
themes/customTheme/landing_plugins/customLandingPlugin/
manifest.json
preview.png
landing.php
- theme.json with a real version number and accurate metadata.
- A clean preview asset that represents the shipped design.
- All overridden PHP templates you own.
- Editable CSS files and readable JavaScript files.
- Production-ready minified CSS and JS files.
- Any custom images, fonts, icons, audio files, or landing plugin assets required by the theme.
- Stale .min files that no longer match the readable source files.
- Broken parent references.
- Preview files that do not exist.
- Temporary development assets, backups, or editor junk.
- Hardcoded references to another custom theme.
1. Bump the manifest version.
2. Review and finalize style.css and night_style.css.
3. Regenerate all minified CSS and JS outputs.
4. Confirm each .min file matches its readable pair.
5. Review the preview image.
6. Validate the theme in admin.
7. Smoke test in dev mode and prod mode.
8. Test activation on a clean installation.
9. Archive only the final theme folder for delivery.
404.php
layouts/main.php
layouts/header/meta.php
layouts/header/css.php
layouts/header/javascripts.php
layouts/header/header.php
landing.php
landing_two.php
settings.php
post.php
profile.php
chat.php
live.php
contents.php
- Guest landing pages and guest navigation.
- Home feed, composer, stories, and comments.
- Single post, profile, chat, settings, live, community, and blog pages.
- AJAX partials, popups, notifications, widgets, and modal flows.
- Light mode and dark mode contrast.
- Mobile, tablet, and desktop breakpoints.
- Theme activation and re-activation from admin.
- Prod asset mode with minified files present.
1. Activate the theme in admin.
2. Hard-refresh the browser.
3. Visit guest pages while logged out.
4. Visit member pages while logged in.
5. Trigger modals, comments, and AJAX widgets.
6. Switch light/dark mode.
7. Confirm the site still works after cache clear.
8. Repeat once in a production-like asset mode.
- Check the folder name for unsupported characters.
- Confirm the folder is directly inside themes/.
- Check that the directory is readable and the manifest is valid JSON.
- Read the validation report on the Site Theme page.
- Check the parent theme slug and the resolved required views.
- Make sure the target installation contains the theme files you packaged.
- Regenerate the minified CSS and JS outputs after your latest CSS and JS changes.
- Hard refresh the browser and clear CDN or proxy caches.
- Remember that prod mode prefers .min files when they exist.
- Check whether the readable file was updated but its minified pair was forgotten.
- Define explicit light_tokens and dark_tokens instead of relying only on shared tokens.
- Check whether admin custom color settings are overriding your defaults.
- Verify that the active mode is loading the correct CSS output file.
- Where do I create my theme in the stock package?
- Create it inside ScriptFiles/themes/. After deployment, that structure becomes the runtime themes/ directory.
- Do I need to copy the entire default theme to create a new product theme?
- No. A child theme can stay small. Copy only the templates and assets you actually want to own, and let the parent chain provide the rest.
- Can a theme work without theme.json?
- Technically yes, because the runtime can infer defaults. Professionally, no. A sellable theme should always ship a valid manifest.
- Should I edit style.css directly?
- Yes. In this workflow, style.css and night_style.css are the files you maintain. After updating them, regenerate the matching .min.css files for production.
- Do I really need *.min files?
- Yes, if the target installation runs in production mode and you want predictable runtime behavior. dizzy prefers minified CSS and JS in prod when those files exist, so a professional theme release should treat minified files as mandatory production assets.
- Why does this guide not use a premium theme name in examples?
- Stock packages may not bundle separately licensed commercial themes. This guide uses generic names such as customTheme so the documentation remains accurate across different distributions and future updates.
- Start from a child theme and keep the diff against default as small as practical.
- Prefer resolver helpers over hardcoded file paths.
- Keep style.css, night_style.css, and the matching minified outputs synchronized on every release.
- Use tokens for branding and contrast, and use template overrides for structure.
- Test both guest and authenticated flows.
- Test light mode and dark mode explicitly.
- Ship a real preview image and a real version number.
- Treat the admin validation screen as part of your release workflow, not as an afterthought.
Back to the main documentation
Return to the installation, integrations, update notes, and general setup guide.