Skip to content

Theme template path not applied to slides.js, outline.css, print.css, opera.css #24

Description

@Whyglobaleyes

Please Please forgive me, I've been using Claude to try to tweak the templates and create one of my own. Claude flagged up a problem and I asked if it was worth reporting. Apologies in advance if this is irrelevant or wrong, I'm not a programmer at all and I don't begin to understand the detail of the following (being a code-monkey got a whole lot more of a nuiscance)

Summary

When a custom theme is set via $conf['template'] or the s5theme URL parameter, only slides.css is loaded from the selected theme's folder (ui/<theme>/slides.css). The JS engine and three other stylesheets are hardcoded to the default theme folder regardless of which theme is active:

<script src="' . $this->base . 'default/slides.js" type="text/javascript"></script>
<link rel="stylesheet" href="' . $this->base . 'default/outline.css" ... />
<link rel="stylesheet" href="' . $this->base . 'default/print.css" ... />
<link rel="stylesheet" href="' . $this->base . 'default/opera.css" ... />

Component: lib/plugins/s5/renderer.php, method s5_init()

Impact

Any per-theme customization to slides.js (e.g. font-scaling behavior, navigation logic) is silently ignored — the default copy always runs instead. Same applies to outline/print/opera CSS overrides placed in a custom theme folder.

Expected behavior

Either:

  • (a) document clearly that these four files are intentionally shared across all themes and must be edited in ui/default/ directly, or
  • (b) use $this->tpl consistently for all five asset paths, matching the pattern already used for slides.css.

Secondary issue, same method

$this->tpl = $_GET['s5theme'] ?? $this->getConf('template');

?? only falls back on null/unset, not empty string. A URL with &s5theme= (empty value, as generated by the plugin's own slideshow-link icon) resolves $this->tpl to '', breaking the slides.css path entirely (ui//slides.css, theme never applied). Suggest:

$this->tpl = !empty($_GET['s5theme']) ? $_GET['s5theme'] : $this->getConf('template');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions