Announcement

  •  » Requests
  •  » Modus theme should be made more moding friendly

#1 2019-11-24 17:46:36

Djelle
Member
2019-10-09
14

Modus theme should be made more moding friendly

I have some trouble making my own theme build on modus. Turned out it was a bug in Piwigo preventing me from activating my theme. And thus making it look like my theme didn't work (Bug is reported to GitHub).

I have now made it work. But not in a nice way. I had to copy ALL files from Modus to a new theme. Setting 'parent' => 'modus' in themeconf.inc.php does not work. Because I had to copy functions.inc.php and make changes to it. And thus this file is loaded from both my theme and from modus, which throws an error.

The reason I had to change functions.inc.php is so my theme's settings is saved in the DB under a new name.

All this trouble might be prevented by making the Modus theme save it's settings in the DB under the name: directory-name+'_theme'. Instead of the hardcoded 'modus_theme".

I am sadly not good enough with PHP to program this myself. But I hope someone might find this an easy task :)

Have fun, and keep up the good work.
/Djelle

Offline

 

#2 2019-11-24 19:17:08

Djelle
Member
2019-10-09
14

Re: Modus theme should be made more moding friendly

Found 2 hardcoded URL's in /admin/modus_admin.tpl as well.

<img src="{$ROOT_URL}themes/modus/skins/{$skin_code}-screenshot.jpg"/>
<a href="{$ROOT_URL}themes/modus/skins/{$skin_code}-screenshot.jpg" class="icon-zoom-in"

And the name of the theme. Also hardcoded.

<h2>{'Modus theme config'|translate}</h2>

Last edited by Djelle (2019-11-24 19:25:39)

Offline

 
  •  » Requests
  •  » Modus theme should be made more moding friendly

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact