// -->

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MyBB 1.8 Theme Generation
#1
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
  • Templating rules — correct interpolation syntax ({$variable}, {$array['key']}), the prohibition on PHP tags and logic tags (<if>, <else>, <loop>) in vanilla MyBB, and proper sub-component inclusion via variable names
  • Global variable dictionary — theme assets, settings, viewer profile variables, and core injection points ({$headerinclude}, {$header}, {$navigation}, {$footer})
  • Theme XML package specification — the complete schema for outputting importable theme XML, including properties, stylesheets with CDATA wrapping, and template sets
  • Compliance notes — XHTML 1.0 Transitional / HTML5 markup requirements and the core CSS class names (.tborder, .thead, .tcat, .trow1, .trow2, .tfoot) that must be preserved

─── ◆ ───

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.


Attached Files
.zip   mybb-theme-context.zip (Size: 1,019 bytes / Downloads: 0)
— Z E R O S  T O  H E A V E N ! —
Photonamus Industries • Founder
Reply


Messages In This Thread
MyBB 1.8 Theme Generation - by Photonamus - 08-23-2026, 03:44 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)