Ребятушки_), может кто сталкивался, нужно из модификатора Smarty «достучаться» до MODx.
Я решил как-то так:
Костыль в /core/components/modxsmarty/model/modxSmarty/modxsmarty.class.php
...
public static $_modx;
...
function __construct(modX &$modx, $params= array ()) {
modxSmarty::$_modx = & $modx;
...
<?php
function smarty_modifier_thumb($input, $options) {
$modx = & modxSmarty::$_modx;
$options = explode(',', $options);
return $modx->runSnippet('phpthumbof',array('input'=>$input,'options'=>join('&',$options)));
}
Но думаю что можно без костыля…
PS: сей изврат нужен для красоты вида:
{$Item.tv_img|thumb:'w=30,h=30,zc=C'}