Page 1 of 1

Stabalizing our callbacks

Posted: Tue Feb 07, 2006 3:18 am
by Ted
Well, since we try very hard not to break backwards compatibility with the module API, it's gotten a little unwieldy.  Particularly since 0.11 came out with the alternate rendering loop.

Anyway, I spent the evening trying to consolidate our callbacks in the render loop and have deprecated a few.  I just figured I'd pass it along just in case people wonder why some trickier modules aren't working right in 0.12.

Deprecated:
  • ContentTemplate  --  Use TemplatePreCompile instead
  • ContentTitle -- This is just a dumb method and not really useful except to eat CPU cycles
  • ContentData -- Use ContentPreCompile instead
  • ContentHtmlBlob -- Use GlobalContentPreCompile instead
  • ContentPreRender -- This is just semantics.  Use ContentPreCompile instead
  • ContentPostRenderNonCached -- There is no point where everything is pasted together, so it's not terribly useful
The ones that should be used now are:
  • SmartyPreCompile -- This is called before any smarty content is processed.  This means content, templates, module template, global content, etc
  • SmartyPostCompile -- This is after the {tags} are removed and functions are put in place, but before any caching
  • ContentPreCompile -- SmartyPreCompile, but only for {content}
  • ContentPostCompile -- SmartyPostCimpile, but only for {content}
  • GlobalContentPreCompile -- SmartyPreCompile, but only for {global_content} or {html_blob}
  • GlobalContentPostCompile -- SmartyPostCompile, but only for {global_content} or {html_blob}
  • TemplatePreCompile -- SmartyPreCompile, but only for content templates
  • TemplatePostCompile -- SmartyPostCompile, but only for content templates
  • ContentPostRender -- Processed after all smarty stuff has taken place.  This will be called on every page load, so nothing intensive should go here.
These changes will be in 0.12-beta2.

Thanks!