[dev] patch to make customized templates without changing default templates possible

Morton Jonuschat morton+dev at jonuschat.de
Wed Jan 15 01:00:43 PST 2003


While I was digging throught the source code of the horde framework to 
find out how to change the horde framework menus to appear on the left 
side of the screen (corporate design issues)  I came to notice that 
there was no easy way to change the templates without changing the 
default templates delivered with horde or one of the applications.

Attached to this mail is patch that adds a single function to 
lib/Horde.php to add the function Horde::getTemplate. The function 
checks if a local/customized version of the file exists and either 
returns the filename of the customized template or the application default.

The applications that usually use some form of  the call "require 
HORDE_TEMPLATES . '/common-footer.inc';" would need to be changed to 
"require Horde::getTemplate('/common-footer.inc');".

The performance impact should be bearable since most of the 
file_exists() calls should be caught by the php stat-cache.

I've done a proof-of-concept on the admin-part of the horde framework 
plus a few pages within imp and nag to verify the function works in 
other applications aswell.

-- 
Morton Jonuschat <morton at jonuschat.de>
-------------- next part --------------
z'µìmjÛZržžÜ²Ç+¹¶ÞtÖ¦z+uë^š™Zµçb}ôò¥æ©¦XœjبŸú
µël¶·š™(³{^7õ¼­zÀÞ±É赫ڊV›•å+–m§ÿåŠËl†ŠÝzŠàýªÜ†+Þ³÷^¿ö­µ§!™éí³ý´Ó}5ןöñß9i½ÿ†ŠÝzצ¦V­z†ã


More information about the dev mailing list