Stabalizing our callbacks

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Stabalizing our callbacks

Post 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!
Post Reply

Return to “Developers Discussion”