[solved] smarty3 problems with CMSMS 1.11.4

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

[solved] smarty3 problems with CMSMS 1.11.4

Post by nicmare »

i have this udt but it does not work in cmsms 1.11.4 anymore:

Code: Select all

$gcbops =& cmsms()->GetGlobalContentOperations();
$obj    =& $gcbops->LoadHtmlBlobByName("getpage");
$smarty =& cmsms()->GetSmarty();

if(isset($params['showprice'])){
$showprice = $params['showprice'];
}
if(isset($params['alias'])){
$pages = $params['alias'];
}
if(isset($params['target'])){
$target = $params['target'];
}
if(isset($params['class'])){
$class = $params['class'];
}
if(isset($params['mode'])){
$mode = $params['mode'];
}
if(isset($params['sidebar'])){
$sidebar = $params['sidebar'];
}
if(isset($params['tmbheight'])){
$tmbheight = $params['tmbheight'];
} else {
$tmbheight = 120;
}
if(isset($params['tmbwidth'])){
$tmbwidth = $params['tmbwidth'];
} else {
$tmbwidth = 170;
}
if(isset($params['showfilter'])){
$showfilter = $params['showfilter'];
}
if(isset($params['filteritems'])){
$filteritems = $params['filteritems'];
}
if(isset($params['menuitems'])){
$menuitems = $params['menuitems'];
}
$smarty->assign('pages', $pages);
$smarty->assign('target', $target);
$smarty->assign('class', $class);
$smarty->assign('mode', $mode);
$smarty->assign('sidebar', $sidebar);
$smarty->assign('tmbheight', $tmbheight);
$smarty->assign('tmbwidth', $tmbwidth);
$smarty->assign('showfilter', $showfilter);
$smarty->assign('filteritems', $filteritems);
$smarty->assign('menuitems', $menuitems);
$smarty->assign('showprice', $showprice);
$smarty->_compile_source('temporary template', $obj->content, $_compiled );
return $smarty->_eval('?>' . $_compiled);
_compile_source is unkown. how to adapt that code to work with smarty3 please??
Last edited by nicmare on Fri Feb 22, 2013 9:36 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: smarty3 problems with CMSMS 1.11.4

Post by Dr.CSS »

There is a post about "what we broke" and it has to do with the calls in UDTs and modules like you are doing...
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: smarty3 problems with CMSMS 1.11.4

Post by nicmare »

i know this and similar threads. but can't find a solution for my problem.

alright. after investigating some time in third party modules, i think i found the solution for smarty3:

Code: Select all

$compiled = $smarty->fetch('eval:' . $obj->content);
return $compiled;
Post Reply

Return to “Modules/Add-Ons”