Hi
i've read that modus would be the new default theme. Ok - it looks nice - i want to use it :). Modus exists for 2.9.5 - ok - i want make some changes in header.tpl (footer.tpl, ...).
At the moment i use a clone of "elegant". I've changed ONLY 2 .tpl-Files. I have the same plan with modus. But i have a problem to clone this theme.
My Todo:
* create a new directory
** copy themeconf.inc.php, index.php to this dir.
* create sub-dir: template
** copy the tpl
=> no configiguration in Admin/Themes-Menu.
Ok i must copy /admin/ to my Clone
=> Error (missing functions.inc.php)
Ok functions.inc.php
=> Works
But it don't work @ the frontend - some errors
Warning: filemtime(): stat failed for ./themes/fotobastler_v2/css/base.css.tpl in /****/include/template.class.php on line 1894
[...]
Fatal error: Uncaught --> Smarty: Missing template name <-- thrown in /****/include/smarty/libs/sysplugins/smarty_template_source.php on line 157
My themeconf.inc.php
$themeconf = array( 'name' => 'fotobastler_v2', 'parent' => 'modus', );
No other changes @ the moment.
I could copy /css/ from modus to my theme ... but what happend with changes in new versions of modus? Not a good idea?
What am i doing wrong?
Piwigo version: 2.9.5
PHP version: 7.3
Thanks
Offline
Ok i found the solution...
I MUST copy
/admin/
/js/
/language/
/skins/
functions.inc.php
to my clone...
/css/ is edited in my header.tpl and linked zu "modus".
Content of my themeconf.inc.php
$themeconf = array( 'name' => 'fotobastler_v2', 'parent' => 'modus', );
Edited at the moment only header.tpl and footer.tpl
Did I miss something else? Can I optimize something? I would like to have less "original" files in the clone-dir .... in case something changes there, I do not have to worry about anything :). I think "functions.inc.php" is a good candidate for changes ;) [optimizing, bug-fixing, compatibility etc.]
Offline
If you want your child theme to have admin pages you need to copy everything and you may even need to change in the code some mention to Modus too.
if you just want to overwrite some tpl or js, you just need themeconf.inc.php + the tpl/css file(s)
Offline