I'm trying to use a custom themes directory, but this doesn't seem to work.
config_default.inc.php suggests that I can use $conf['themes_dir'] to customise the directory where my themes reside. When I change this, however, and remove the default themes directory, Piwigo is unable to find the themes anymore:
Warning: include(/themeconf.inc.php): failed to open stream: No such file or directory in /var/www/html/include/template.class.php on line 1141
Warning: include(): Failed opening '/themeconf.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/include/template.class.php on line 1141
Fatal error: Uncaught --> Smarty: Unable to load template 'file:menubar.tpl' <-- thrown in /var/www/html/include/smarty/libs/sysplugins/smarty_internal_template.php on line 195
It seems that (at least in some places), Piwigo ignores the $conf['themes_dir'] setting. One of these places is in commons.inc.php: $template = new Template(PHPWG_ROOT_PATH.'themes', $theme );
There's probably more of such places, as I couldn't work around the issue by just changing that line.
Could this be fixed so that I can use this setting?
And if not, could it be removed from the defualt config file?
Thanks,
Guno
I'm trying to use a custom themes directory, but this doesn't seem to work.
[config_default.inc.php](https://github.com/Piwigo/Piwigo/blob/13.8.0/include/config_default.inc.php#L845) suggests that I can use `$conf['themes_dir']` to customise the directory where my themes reside. When I change this, however, and remove the default _themes_ directory, Piwigo is unable to find the themes anymore:
> Warning: include(/themeconf.inc.php): failed to open stream: No such file or directory in /var/www/html/include/template.class.php on line 1141
>
> Warning: include(): Failed opening '/themeconf.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/include/template.class.php on line 1141
>
> Fatal error: Uncaught --> Smarty: Unable to load template 'file:menubar.tpl' <-- thrown in /var/www/html/include/smarty/libs/sysplugins/smarty_internal_template.php on line 195
It seems that (at least in some places), Piwigo ignores the `$conf['themes_dir']` setting. One of these places is in [commons.inc.php](https://github.com/Piwigo/Piwigo/blob/13.8.0/include/common.inc.php#L242):
` $template = new Template(PHPWG_ROOT_PATH.'themes', $theme );`
There's probably more of such places, as I couldn't work around the issue by just changing that line.
Could this be fixed so that I can use this setting?
And if not, could it be removed from the defualt config file?
Thanks,
Guno
<!-- github-sync-id:1888795490 -->
Should always be in the PHPWG_ROOT_PATH.'themes' so it receives updates after every upgrade, while it is possible to select a different themes_dir configuration variable for the manually installed themes.
In practice, if you have a custom themes_dir configuration variable, in some cases it is not honored for installed themes or, the other way around, the content coming from the installation is searched (and not found) in the path of that variable.
I can confirm this. There is a mix of paths.
I guess the idea is that the content installed from:
- https://github.com/Piwigo/Piwigo/tree/master/themes
Should always be in the `PHPWG_ROOT_PATH.'themes'` so it receives updates after every upgrade, while it is possible to select a different `themes_dir` configuration variable for the manually installed themes.
In practice, if you have a custom `themes_dir` configuration variable, in some cases it is not honored for installed themes or, the other way around, the content coming from the installation is searched (and not found) in the path of that variable.
<!-- github-comment-id:3588615895 -->
adam
changed title from Not possible to use custom themes directory to Not possible to use custom themes directory 2026-10-27 11:27:28 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I'm trying to use a custom themes directory, but this doesn't seem to work.
config_default.inc.php suggests that I can use
$conf['themes_dir']to customise the directory where my themes reside. When I change this, however, and remove the default themes directory, Piwigo is unable to find the themes anymore:It seems that (at least in some places), Piwigo ignores the
$conf['themes_dir']setting. One of these places is in commons.inc.php:$template = new Template(PHPWG_ROOT_PATH.'themes', $theme );There's probably more of such places, as I couldn't work around the issue by just changing that line.
Could this be fixed so that I can use this setting?
And if not, could it be removed from the defualt config file?
Thanks,
Guno
Anyone who can comment on this?
I can confirm this. There is a mix of paths.
I guess the idea is that the content installed from:
Should always be in the
PHPWG_ROOT_PATH.'themes'so it receives updates after every upgrade, while it is possible to select a differentthemes_dirconfiguration variable for the manually installed themes.In practice, if you have a custom
themes_dirconfiguration variable, in some cases it is not honored for installed themes or, the other way around, the content coming from the installation is searched (and not found) in the path of that variable.Not possible to use custom themes directoryto Not possible to use custom themes directory