Closed Jimmi08 closed 2 years ago
Marking as invalid.
Tested with define('USERTHEME', 'jayya');
in e_module.php
Resulting source code contains:
<link id="stylesheet-jayya-style" rel="stylesheet" media="all" property="stylesheet" type="text/css" href="/e107v2/e107_themes/jayya/style.css?1634602182" />
@CaMer0n jayya is not html theme
@Jimmi08
I tested again with your exact steps to reproduce:
defined('USERTHEME', 'bootstrap3');
in class2.php directly after e_module.php loading routine.
(Sitetheme set to "bootstrap5" and running on PHP 8.1)
Resulting source code contains:
<link id="stylesheet-bootstrap3-style" rel="stylesheet" media="all" property="stylesheet" type="text/css" href="/e107v2/e107_themes/bootstrap3/style.css?1634602182" />
THEME constant equals:
./e107_themes/bootstrap3/
You wrote:
I am aware about layout and menu issues, but this is about something else.
Then you would already know that HEADER/FOOTER wont display if the stored layout for the current theme doesn't match a layout by the same name in the "USERTHEME" folder.
header and footer are not loaded it means that with HTML themes USERTHEME is ignored somewhere
No it doesn't. See answer above.
Any direct using of e107::getPref('sitetheme') for loading something is wrong.
Solution: Use the constants provided. THEME, THEME_ABS, USERTHEME.
Thanks for your time. So USERTHEME is the solution.
USERTHEME is not defined in admin area
Bug Description
USERTHEME doesn't work with new 2.3 themes
What I am trying to do
I am using USERTHEME in e_module.php in the plugin (user select skin and sitetheme is changed) . I am aware about layout and menu issues, but this is about something else.
This should be possible because in class2.php is USERTHEME defined after loading e_module addon.
What happens?
It can be fixed with using USERTHEME.
Because if I use some old v1 theme (with theme.php), it works. F.e.:
define('USERTHEME', "Rideblue");
How to Reproduce
Steps to reproduce the behavior:
define('USERTHEME', "bootstrap3");
in class2.php before define it in class2.php : (or in e_module of any plugin)Expected Behavior
Site theme change
Note
There is already correct code how this should work in js_manager.php file:
Any direct using of
e107::getPref('sitetheme')
for loading something is wrong.Thanks