Page 1 of 1

plugin content_dump send error in smarty 3

Posted: Thu Sep 13, 2012 4:39 pm
by uloloi
Hi, I like to use content_dump so much!

But in CMSMS 11.1.+, well, with the use of smarty 3 the source generates an error becuase the use of _compile_source is mmm... deprecated?

How can I solve this line in the source of the plugin, I can't find the solution in the manual of smarty. How to compile source with smarty 3? :S

Error: at line 806 in file mysite\lib\smarty\sysplugins\smarty_internal_templatebase.php:

Call of unknown method '_compile_source'.



It is generated when I use content_dump optiion do_smarty( param:compile ...)

Code: Select all

$smarty->_compile_source('temporary template', $content_dump[$i]->content->data, $_compiled);			

Re: plugin content_dump send error in smarty 3

Posted: Sat Sep 15, 2012 11:30 am
by psy
See Calguy's post about the Smarty3 way of compiling:
http://forum.cmsmadesimple.org/viewtopi ... 75#p284375

To echo the output:

Code: Select all

$smarty->display('string:'. $mysmartydata);
To save the ouput for later use:

Code: Select all

$myvar = $smarty->fetch('string:'.$mysmartydata);
More info of course in the Smarty docs.