phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-developers] Re: Class structures & templates (was Re: [Php


From: Brent Kelly
Subject: [Phpgroupware-developers] Re: Class structures & templates (was Re: [Phpgroupware-developers] Filename Standards?)
Date: Wed, 06 Nov 2002 11:23:36 +1300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

Chris Weiss wrote
What kind of modifications?  Most templates just make changes to the surrounding
structure and lets the app define how it will look inside that.  

Yea, implementing the surrounding template structure went relatively smoothly - although my template is using a right hand navigation bar which required a few modifications to the core files as it appears they were hard-coded to only support top or left hand navigation (calling parse_navbar() directly after the header).

However implementing the templates into the individual applications was a bit more fun. Due to the ui class files being centralised in the inc/ directory, as far as I can tell, your interface is pretty much restricted to the way the current interface works / is layed out. It would be nice if you were able to modify the ui code that uses your .tpl files without having to (potentially) impact other templates for that application.

Anyways, i've heard some whispering about an e-templates system being under development so hopefully this might add a bit more flexibility in implementing custom templates :).

I also recal the used of php file in some of the apps's template dirs, though I don't no if they
will provide what you are looking for.  IIRC, anglemail does this to handle the
it's different layouts within the templates.

Yea in the apps i've modified so far, theres been limited support for what i've described above, with custom head.inc.php files being used (if they exist) to draw the header for the app etc. Perhaps an example of a simple implementation allowing a little more flexibility in the user interface would be to have the ui class methods check the template directories for the existance of specific files that would be used instead of that function. e.g. for calander.uicalander.month you could have the month function have a:

if (file_exists($this->template_dir.'/month.inc.php')) {
   include($this->template_dir.'/month.inc.php');
} else {
   //rest of function here
}

That would allow your template to override the month() function by simply having a month.inc.php file in your template directory. I guess in the end that would come down to whoever is writing each individual application.

Anyway, just voicing a few thoughts i've had while implementing this new template :).

Thanks,

Brent Kelly,
Zeald Ltd.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]