From redaxo-multiglossar
Debugs MultiGlossar replacement engine internals in REDAXO including OUTPUT_FILTER hook, DOMDocument parsing, regex text replacement, template placeholders, and URL profile resolution for missing replacements, broken tooltips, addon integration, or performance issues.
How this skill is triggered — by the user, by Claude, or both
Slash command
/redaxo-multiglossar:multiglossar-replacement-engineThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Frontend replacement is executed in `boot.php` via `rex_extension::register('OUTPUT_FILTER', ...)` and delegated to `MultiGlossar\\Parser` (`lib/glossar/multiglossar.php`).
Frontend replacement is executed in boot.php via rex_extension::register('OUTPUT_FILTER', ...) and delegated to MultiGlossar\\Parser (lib/glossar/multiglossar.php).
OUTPUT_FILTER receives the rendered page HTML.clang_id.This architecture avoids raw global string replacement and limits changes to parsed text nodes.
Key parser methods:
init_dom($source) - detects configured start/end scope, loads glossary rows, initializes ignored tags/classesparse_dom() - traverses the DOM and rebuilds final outputparse_childs($node) - recursive node walk with lock checkstext_replace($content) - regex-based term matching and replacement token strategy<!--exclude-->...<!--endexclude--> comment pairs are transformed into temporary elements and excluded from matching.
Replacement behavior includes:
term_alt are additional searchable markerscasesensitive)article_complete IDs where all matches are replaced\\b...\\b) to reduce accidental substring hitsReplacement markup is driven by config replace_definition. Supported placeholders include:
---DEFINITION---, ---URL---, ---TERM--- (escaped variants)---DEFINITION_RAW---, ---URL_RAW---, ---TERM_RAW--- (raw variants)This enables custom tooltip/link markup without touching PHP code.
resolveUrlKey() resolves the query key/namespace for glossary detail URLs:
gloss_id_<clangId>Url\\Profile or rex_url_generator_profileThis is important when URL profiles rewrite parameter names.
The parser normalizes certain UIkit tooltip patterns so configured output remains valid with dynamic definitions (for example converting direct data-uk-tooltip usage to a uk-tooltip="title: ..." format when needed).
a, headings, script, style, configured classes/tags).clang_id specific.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub friendsofredaxo/claude-marketplace --plugin redaxo-multiglossar