$name)
{
$tpl_cat[$cat] = $self_url.'&smart_generate='.$cat;
}
$tpl_cat['all'] = $self_url.'&smart_generate=all';
$template->assign(array(
'SMART_URL' => $tpl_cat,
'SMART_PATH' => SMART_PATH,
));
$template->set_prefilter('categories', 'smart_cat_list_prefilter');
}
function smart_cat_list_prefilter($content, &$smarty)
{
global $smart_count;
$search[0] = '{if isset($category.U_MANAGE_ELEMENTS) }';
$replacement[0] = $search[0].'
{if isset($SMART_URL[$category.ID])}
| {\'Regenerate photos list of this SmartAlbum\'|@translate}
{/if}';
if ($smart_count > 0)
{
$search[1] = '{\'apply automatic sort order\'|@translate}';
$replacement[1] = $search[1].'
| {\'Regenerate photos list of all SmartAlbums\'|@translate}';
}
$search[2] = '{$category.NAME}';
$replacement[2] = $search[2].'
{if isset($SMART_URL[$category.ID])}
{/if}';
return str_replace($search, $replacement, $content);
}
?>