{if $results} {* SHOW USERS *} {if $type == 'users'}
{$paging}
{foreach from=$results item=u name=foo}
{if $user.avatar != ''} {$u.username} {else} {$u.username} {/if}
{$u.items} {$lang.items}
{$u.followers} {$lang.followers}
{$lang.member_since}: {$u.register_datetime|date_format:"%b %Y"}
{if $u.freelance == 'true'} {$lang.available_freelancer}
{/if}

{$u.sales}

{$lang.sales}

{section name=foo1 start=1 loop=6 step=1} {if $u.rating >= $smarty.section.foo1.index} {else} {/if} {/section}
{/foreach}
{elseif $type == 'collections'}
{$paging}
{foreach from=$results item=c name=foo}
{if $c.photo != ''} {$c.name|escape} {else} {$c.name|escape} {/if}

{$c.name}

{$lang.by}: {$users[$c.user_id].username}

{$c.text|nl2br}

{$c.items}

{$lang.items}

{section name=foo start=1 loop=6 step=1} {if $c.rating > $smarty.section.foo.index} {else} {/if} {/section}
{$c.votes} {$lang.votes}
{/foreach}
{else}
{if isset($smarty.get.categories) && is_array($smarty.get.categories)} {foreach from=$smarty.get.categories item=c key=k} {/foreach} {/if}
{$paging}
{foreach from=$results item=i name=foo}
{$i.name|escape}
{$lang.in} {foreach from=$i.categories item=c name=foo} {$categories[$c].name} {if !$smarty.foreach.foo.last} \ {/if} {/foreach}

{$currency.symbol}{$i.price|string_format:"%.0f"}

{$i.sales} {$lang.sales}

{section name=foo start=1 loop=6 step=1} {if $i.rating > $smarty.section.foo.index} {else} {/if} {/section}
{/foreach}
{/if} {$paging} {else}

{$lang.no_results_found}

{$lang.search_for}:
{$lang.search_in}:

{$lang.search_again}

{$lang.or} {$lang.browse_categories}

{/if}
{$lang.finetune_results}
{$searchText} {$lang.in} {$lang[$type]}
{if isset($smarty.get.categories) && is_array($smarty.get.categories)} {foreach from=$smarty.get.categories item=c key=k} {/foreach} {/if}