Announcement

  •  » Themes
  •  » Modus: How to clone?

#1 2019-06-07 14:09:33

WuppiGER
Member
Germany
2016-05-31
38

Modus: How to clone?

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

Code:

$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

 

#2 2019-06-07 16:27:11

WuppiGER
Member
Germany
2016-05-31
38

Re: Modus: How to clone?

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

Code:

$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

 

#3 2019-06-07 17:55:31

flop25
Piwigo Team
2006-07-06
6965

Re: Modus: How to clone?

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)


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 
  •  » Themes
  •  » Modus: How to clone?

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact