get_relation_id($relation, "user", $user, $params['type'], $params['object']); if ($relation_id) { $smarty->assign('has_relation', true); } else { $smarty->assign('has_relation', false); } $count = $relationlib->get_relation_count("tiki.user.like", $params['type'], $params['object']); $smarty->assign('type', $params['type']); $smarty->assign('object', $params['object']); $smarty->assign('count', $count); $smarty->assign('count_label', $count_label); $smarty->assign('count_only', $count_only); return $smarty->fetch('like.tpl'); }