[horde] Modifying files -- best practice?

Tim Streit ledoktre at meanie.us
Thu Aug 28 04:30:21 UTC 2014


On Aug 27, 2014, at 1:54 AM, Jan Schneider <jan at horde.org> wrote:

> 
> Zitat von Michael M Slusarz <slusarz at horde.org>:
> 
>> Quoting Tim Streit <ledoktre at meanie.us>:
>> 
>>> I'm just going through and doing some themeing, and I'm wondering what is best practice to customize some files.
>>> 
>>> -Themes -- no prob.  Create a new theme.
>>> -Templates -- ??   For example, most files are using PNG files, I'd rather use SVG - personal preference.  I can modify some files to use this, but I assume next update will undo my work.
>> 
>> Templates (i.e. the View in MVC) are, in general, are a difficult thing to abstract. You are correct that you need to make sure to make backup copies of your templates when/if you upgrade.
> 
> That being said, you can use the 'templates' setting in registry.local.php to point to a different folder, symlink unchanged templates to there, and replace the ones you modify with real files.
> Obviously you need to keep a close look at template changes that you might have to apply to your versions after updates. But at least your changes aren't overwritten on updates.
> 
> Changing all the code to use SVG instead of PNG sounds like a bad idea though, just for personal preference.
> 
>>> -/imp/lib/Flag/Imap# vim Deleted.php  -  this is an example of something small-- I want to change the color of an email marked as deleted.
>> 
>> You are correct - this is the only place to change this.  Probably need to abstract this better in the future with something like a CSS class name ... although part of me says the reason I did it this way is because it was not easy to do this via CSS.  (Not looking at the code at the moment, so can't provide more insight than that.)
> 
> But you can override this in the prefs, so you add some imp/config/prefs.d/ file to your theme pack.
> 
>> For the record - if doing many changes in Horde, it is probably easier to use git instead of installing via packages.  Git will typically handle most merges/updates without conflict, so it provides a way of using the base files without having to make copies.
>> 
>>> I know on config files, we insert '.local' into the name and put the changes there, and it works.  Is this the same for ALL php files?
>> 
>> No.  This is not a general PHP thing - it is a Horde config file thing.
>> 
>> michael
The themes setting in registry.local.php seemed to do the trick for that.  I did see an option in there for ‘themefs’, which I set for each application I was using to be a full system path to a custom base directory.  When I logout, clear cache, and refresh, I can tell its not referencing the new path.

Is ‘themefs’ setting working in registry.local.php from the latest release version?

Thanks,


More information about the horde mailing list