![]() |
|
MyBB 1.8 Theme Generation - [AI] [Infrastructure] [IT] [ForumDev] - Printable Version +- Photonamus Industries Forums (https://forum.photonamus.com) +-- Forum: Administrator's Corner (https://forum.photonamus.com/forumdisplay.php?fid=28) +--- Forum: [Site] AI Library - Photonamus.com (https://forum.photonamus.com/forumdisplay.php?fid=31) +--- Thread: MyBB 1.8 Theme Generation - [AI] [Infrastructure] [IT] [ForumDev] (/showthread.php?tid=48) |
MyBB 1.8 Theme Generation - [AI] [Infrastructure] [IT] [ForumDev] - Photonamus - 08-23-2026 MyBB 1.8 Theme Generation — Context Document
Specification for AI-assisted MyBB theme creation — templating rules, variables, and XML packaging
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This is a compact context document that gives an AI assistant the knowledge it needs to generate valid MyBB 1.8 themes — complete with correct template syntax, global variable references, and properly structured XML output ready for import. MyBB's templating system has specific rules that AI models frequently get wrong without guidance. This document prevents the most common mistakes: using PHP tags inside templates, generating logic tags that don't exist in vanilla MyBB, and producing malformed theme XML. ─── ◆ ───
What It Covers
─── ◆ ───
How to Use It Paste the contents into a new conversation when you need AI help building or modifying a MyBB theme. The document is deliberately compact — it focuses on the rules the AI needs to follow rather than exhaustive documentation of every MyBB feature. This keeps it small enough to leave room in the context window for your actual design work. Works best when paired with a clear description of the visual design you want. The AI handles the correct syntax and packaging; you focus on the look and feel. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Document Contents Code: # MYBB 1.8 THEME GENERATION ENGINE SPECIFICATION
## TEMPLATING RULES
1. SYNTAX: Use {$variable} or {$array['key']} for interpolation. Never use PHP tags (<?php ?>) inside templates.
2. NO ENGINE LOGIC: Vanilla MyBB HAS NO <if>, <else>, <loop>, or <include> tags. Never generate logic tags in template code.
3. INCLUSIONS: Include sub-components via variable names (e.g., {$headerinclude}, {$header}, {$navigation}, {$footer}).
4. COMPLIANCE: Standard XHTML 1.0 Transitional / HTML5 markup with MyBB core class names (.tborder, .thead, .tcat, .trow1, .trow2, .tfoot).
## GLOBAL VARIABLE DICTIONARY
- Theme Assets: {$theme['imgdir']}, {$theme['imglangdir']}
- Settings: {$mybb->settings['bbname']}, {$mybb->settings['bburl']}
- Viewer Profile: {$mybb->user['uid']}, {$mybb->user['username']}, {$mybb->user['avatar']}
- Core Injections: {$headerinclude} (in <head>), {$header} (top bar), {$navigation} (breadcrumbs), {$footer} (bottom)
## THEME XML PACKAGE SPECIFICATION
When outputting a full theme XML, wrap inside this schema:
<?xml version="1.0" encoding="UTF-8"?>
<theme version="1800" name="[Theme Name]">
<properties>
<property name="imgdir">images/[theme_folder]</property>
<property name="tablespace">4</property>
<property name="borderwidth">1</property>
</properties>
<stylesheets>
<stylesheet name="global.css" attachedto="no_attached"><![CDATA[/* CSS RULES HERE */]]></stylesheet>
</stylesheets>
<templatesets>
<templateset name="[Theme Name]">
<template name="headerinclude" version="1800"><![CDATA[<!-- HTML HEAD CONTENT -->]]></template>
<template name="header" version="1800"><![CDATA[<!-- HEADER CONTENT -->]]></template>
<template name="footer" version="1800"><![CDATA[<!-- FOOTER CONTENT -->]]></template>
</templateset>
</templatesets>
</theme>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Download the .zip below to use this document with your AI assistant.
|