[geeklog-devel] caching template library

Mark R. Evans mevans at ecsnet.com
Mon Oct 29 16:55:30 EDT 2007


I have the caching library running on a GL 15cvs site (
http://glcvs.gllabs.org) with several plugins installed and everything is
working well.  I have the main plugins, Media Gallery, Forum, ChatterBlock,
Bad Behavior2, CAPTCHA and the DokuWiki integration installed.   I'll be
happy to install others if there is one you use that isn't included above.
Or if you have a premium plugin you want to see running there for testing,
I'll be happy to install them as well.  If anyone wants credentials to login
and work with the plugins, just shoot me an email and I'll set you up.

Also, I have gl Messenger, commentfeeds, gl util, nettools and vthemes
installed on www.gllabs.org and it is also running the caching template
library without issue.

My performance tests are published at
http://www.gllabs.org/staticpages/index.php?page=cachetemplate

Media Gallery has a few issues where I called parse prior to all the
set_vars and it was in places that were critical, so that needed to be fixed
since it would keep you from editing albums, etc.  All issues are fixed in
the MG development code and will be released well before GL 15 goes out the
door.

There are a few places that need to be modified in the core code to fix the
set_var after parse issues, those are well documented in Joe's install doc.

>From a plugin perspective, I think the risk is pretty low going with the
caching library for 1.5. As Joe pointed out, ADMIN_list changes, theme
changes, the move to 4.01 Strict, these are all major changes that will
affect plugins, so it would be a smart move to make it all happen with 1.5.0
.

I still believe it brings a very positive feature to Geeklog and should
strongly be considered for inclusion in the next release.

Thanks!
Mark



On 10/29/07, Joe Mucchiello <jmucchiello at yahoo.com> wrote:
>
> This all had to come wait till I was on vacation, didn't it?
>
> Thanks Vinny.
>
> My opinion is that this code is now or never. As Mark has said, there
> are several poor practices in plugins (and core code) where a template
> is parsed then setvar is called and the output only looks right because
> of the final call to finish. With the version change to 1.5 and with
> the fact that ADMIN_list API was broken between versions, this is the
> perfect time to say 1.4 plugins probably do not work with 1.5. Changing
> the template library in some future 1.5.1 if these plugins with poor
> practices break between 1.5 and 1.5.1. Much better to give the plugin
> writers one large hump to get over than a series of smaller ones.
>
> Additionally, I think this library would be perfect for your "little"
> templates. Since the caching library works via "include", creating a
> template called "rawlink.thtml":
>     <a href="{url}" {extras}>{link}</a>
> is not "expensive". The functions already exist (COM_createLink) the
> implementations just need work:
> function COM_createLink($content, $url, $attr = array())
> {
>     global $_CONF;
>     static $T = false;
>     if (!$T) {
>         $T = new Template($_CONF['path_layout']);
>         $T->set_file('rawlink.thtml');
>     }
>     $T->unset_var(Array('url','extras','link'));
>     ... // should be obvious what follows
> }
> Or instead of one file per snippet, put a bunch of snippets into a
> single file and use the setblock API to fish out the bits you need:
> <!--- BEGIN ulist --->
> <ul class="{ul_class}">
> <!--- BEGIN listitem --->
> <li class="{li_class}">
> {li_content}</li>
> <!--- END listitem --->
> </ul>
> <!--- END ulist --->
> <!--- BEGIN link --->
> <a href="{link_url}" {link_extras}>{link_content}</a>
> <!--- END link --->
> // etc with select/option pairs, ordered lists, even divs
>
> Then a global template class instance could be used to process these
> snippets as needed.
>
> But that stuff gets pushed further into the future the longer the delay
> of putting the template class into the core is delayed.
>
>   Joe
>
> At 11:49 AM 10/24/2007, Vincent Furia wrote:
> > Joe,
> >
> > I think this would be great to get into the release.  The only
> problem
> > may be how bloated this release already is with all the GSOC and
> other
> > code changes.  I'll try to see if I can beat Michael to testing your
> > code out and comparing performance.
> >
> > -Vinny
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist8.pair.net/pipermail/geeklog-devel/attachments/20071029/f7ff672d/attachment.html>


More information about the geeklog-devel mailing list