[geeklog-devel] Template development (was 1.8.0 discussion)

Joe Mucchiello jmucchiello at yahoo.com
Tue Dec 21 15:08:43 EST 2010


> Personally, if you are going to be working on a template plugin I would
> rather see that work go into the Geeklog template class itself. I rather
> not
> split future theme development with 2 template options.

The two template options would involve caching and non-caching which was the 
original purpose of my CTL library. The first draft of the library had no if or 
other stuff. It just did the caching. The fancy stuff came later.

> I wanted the ability:
> 
> - to have if statements in template files

Done. And else, and loops. Done and done.

> - topics to have their own themes (this is based on some work I need to do
> yet)

Doable, as long as $tid or $topic is properly set globally. This will take some 
core modification because topic is transient, only existing if the URL includes 
it.

> - have a base theme with any new themes just needing the template files
> that
> have been modified

Done two ways, as you said OR with a custom directory under each theme. Never 
could figure out which was better. Putting a custom directory in each theme 
directory makes it easy for the site operator to tweak a theme without losing 
his changes after every upgrade. Doing it strictly by theme is nice for keeping 
theme sizes smaller, not that it really an issue.

Direct access to $LANG globals in templates. Done.


I wrote all of that in 2008 and it was taken up by glFusion. What I'd like to do 
for  Geeklog is split the caching part out of the template engine and make the 
template engine caching-aware. This way security-minded folks who don't like the 
idea of caching can turn it completely off but still get the benefits of {if} 
and people needing the performance boost can get it by turning on the caching.
 
> I will also add in your patch Joe for 1.8.0. At first I thought it was not
> needed if you do end up working on the Geeklog template class but after
> thinking about it having those 4 set_var calls in one place is best.

I actually assumed that would be the best use of that function.

The added benefit of allowing external development of the template engine is 
just for my benefit.

> If Joe ends up working on the Geeklog template class then after the
> Professional CSS theme and topic stuff I will probably work on the Forum
> then. This would mean reviewing Blaines updated forum (and  probably
> modifying it to work with a straight install of geeklog again) from
> NexPro,
> and setting up a proper repository and bugtracker.

Tom, once the patch is in Geeklog I will create a new template class that does 
all you are asking for and more. And it will work with all the existing template 
files and it will allow easier design of new features. Being able to vet new 
template features in a plugin has got to be a great way to move forward with 
many new features.


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist8.pair.net/pipermail/geeklog-devel/attachments/20101221/9d153d7b/attachment.html>


More information about the geeklog-devel mailing list