CMS_Compiler.class.php

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
peter2108
Forum Members
Forum Members
Posts: 10
Joined: Sat Feb 09, 2008 10:23 am
Location: Wakefield, UK

CMS_Compiler.class.php

Post by peter2108 »

This class  extends Smarty_Compiler and overrides the method _compile_custom_tag and basically nothing else. The changes in the method are not extensive either - just three or four lines. One of them is:

Code: Select all

$this->_plugins['function'][$tag_command][4] = false;
which is just before a call to_push_cacheable_state. The base class method sets the above true.

One effect of this change is apparently to write {nocache abc...} and stuff into compiled templates. I have been banging my head trying to understand what this {nocache} stuff is for and am basically clueless.

A counsel of despair I switched the above line back to the default 'true' to see what happened. The ugly {nocache} stuff went away and things seem still to work. So ....

Can anyone tell me what {nocache} is for? Also can a developer tell me whether this class  CMS_Compiler.class.php) which is in the Smarty lib is part of Smarty or a modification added for CMSMS?

I'm new to CMSMS but have plenty of time at the moment so I thought I would try and write some docs because developers don't often have much time for that. Catch is understanding the stuff. Explaining a template without {nocache} spilled all over it would be much easier   :)

Thanks for any clues

-- Peter
Post Reply

Return to “Developers Discussion”