Running id_theme = 9 in 2.0.19, theme_default = 1, theme_guests = 9. repair_settings does not correct theme_default, changed it manually to theme_default = 9, $settings['default_theme_url'] is still /Themes/default. Seeing same thing in clean 2.0.19 install. Causing a problem with Arantor's Tidy Child Boards mod -
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/css/tidychildboards2.css?fin20" />
<style type="text/css">.tidy_child { width:' . floor(90/$modSettings['tidy_child_boards']) . '%; }</style>';
Won't load tidychildboards2.css from theme css, only from Curve.
Obviously. That's what this means:
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/css/tidychildboards2.css?fin20" />
The default theme is Curve (theme id = 1).
If you want it to load from the current theme...
<link rel="stylesheet" type="text/css" href="' . $settings['theme_url'] . '/css/tidychildboards2.css?fin20" />
<style type="text/css">.tidy_child { width:' . floor(90/$modSettings['tidy_child_boards']) . '%; }</style>';
Will try that, thanks. I thought theme_default was current 'Overall forum default' in theme settings.
That was deliberate on my part in the mod so you didn't get many duplicates of the CSS file, or if people didn't install it into different themes in the package manager, it'd still work.
That's sensible as a starting point. Easy to change if anyone wants to.
And to answer Sir Osis's implied question, default_theme_dir and default_theme_url *always* point at Themes/default (one has the full path, the other the full URL) so that for themes that don't supply a full list of templates or whatever, it has the correct location to fall back to.
theme_dir and theme_url are always "visitor's current theme" even if that is also the default theme.
Ant's fix worked. :) I usually move template, css, language files, anything that's changed (except sources) into theme directory so it's all in one place. Working on a clone on my server, makes it easier to move to production site and do followup if it's all together.