Location: PHPKode > scripts > CNCat Free Edition > cncat-free-edition/cncat_config/themes/simple/item.tpl
{TEMPLATE items_top}
            {IF $CNCAT[banner][items_top]}
                <center style="padding: 10px;">{$CNCAT[banner][items_top]}</center>
            {ENDIF}
            <!-- Links -->
            <table id="links" width="100%">
{/TEMPLATE}

{TEMPLATE item 
    (ITEM  [item_id, item_title, item_rating_moder, item_rating_users,
            item_favour, item_descr, 
            item_meta_keywords, item_meta_descr,
            item_submit_date,
            item_display_ext,
            link_url, link_target, link_jumps_from, link_jumps_to, link_rating_pr, link_rating_cy,
            ext_text1, ext_text2, ext_text3]
    )
}
                <tr><td>
                    {cn_str($CNCAT[item][_number] + $CNCAT[page][start_item_num])}.<br>
	            {IF $CNCAT[item][_favicon_url]}
	               	<div style="border:0;width:16px;height:16px;margin:2px 2px 0 0;background-image:url({cn_str($CNCAT[item][_favicon_url])})"></div>
	            {ENDIF}
                <td><td width="100%">
                    {IF $CNCAT[item][link_target] == 1}
                        <a target="_blank" href="{$CNCAT[item][link_url]}"><strong>{cn_str($CNCAT[item][item_title])}</strong></a>
                    {ENDIF}
                    {IF $CNCAT[item][link_target] == 2}
                        <a target="_blank" href="{$CNCAT[abs]}cncat_jump.php?{$CNCAT[item][item_id]}"><strong>{cn_str($CNCAT[item][item_title])}</strong></a>
                    {ENDIF}
                    {IF $CNCAT[item][link_target] == 3}
                        <a target="_blank" href="{$CNCAT[item][link_url]}" onclick="location.href='{$CNCAT[abs]}cncat_jump.php?{$CNCAT[item][item_id]}'; return false;"><strong>{cn_str($CNCAT[item][item_title])}</strong></a>
                    {ENDIF}
                    <small>
                        ({$CNCAT[item][link_jumps_from]}/{$CNCAT[item][link_jumps_to]})
                        {IF $CNCAT[item][link_rating_moder]} / {$CNCAT[item][link_rating_moder]}{ENDIF}
                        {IF $CNCAT[item][link_rating_pr] >= 0} / {$CNCAT[lang][pr]}: {$CNCAT[item][link_rating_pr]}{ENDIF}
                        {IF $CNCAT[item][link_rating_cy] >= 0} / {$CNCAT[lang][cy]}: {$CNCAT[item][link_rating_cy]}{ENDIF}
                        {IF $CNCAT[item][item_rating_moder]>0 || $CNCAT[item][item_rating_users]>0} 
                            / {$CNCAT[lang][rating]}: <span title="{$CNCAT[lang][administrator]}">{IF $CNCAT[item][item_rating_moder]>0}{$CNCAT[item][item_rating_moder]}{ELSE}{$CNCAT[lang][no]}{ENDIF}</span>/<span title="{$CNCAT[lang][users]}">{IF $CNCAT[item][item_rating_users]>0}{$CNCAT[item][item_rating_users]}{ELSE}{$CNCAT[lang][no]}{ENDIF}</span>
                        {ENDIF}
                        {IF $CNCAT[config][rating_enable]}
                            / <a href="{cn_str($CNCAT[item][_ext_url])}#vote">{$CNCAT[lang][appreciate]}</a>
                        {ENDIF}
                        {IF $CNCAT[config][comments_links_enable]}
                            / <a href="{cn_str($CNCAT[item][_ext_url])}#comments">{$CNCAT[lang][comments]} {IF $CNCAT[item][item_com_count]}(<strong>{$CNCAT[item][item_com_count]}</strong>){ENDIF}</a>
                        {ENDIF}
                        {IF $CNCAT[item][item_favour] > 0}<img src="{$THEMEURL}images/faviteml.gif" alt="" />{ENDIF}{IF $CNCAT[item][item_favour] > 1}<img src="{$THEMEURL}images/favitemr.gif" alt="" />{ENDIF}
                        {IF $CNCAT[item][item_favour] > 2}<img src="{$THEMEURL}images/faviteml.gif" alt="" />{ENDIF}{IF $CNCAT[item][item_favour] > 3}<img src="{$THEMEURL}images/favitemr.gif" alt="" />{ENDIF}
                        {IF $CNCAT[item][item_favour] > 4}<img src="{$THEMEURL}images/faviteml.gif" alt="" />{ENDIF}{IF $CNCAT[item][item_favour] > 5}<img src="{$THEMEURL}images/favitemr.gif" alt="" />{ENDIF}
                        {IF $CNCAT[item][item_favour] > 6}<img src="{$THEMEURL}images/faviteml.gif" alt="" />{ENDIF}{IF $CNCAT[item][item_favour] > 7}<img src="{$THEMEURL}images/favitemr.gif" alt="" />{ENDIF}
                        {IF $CNCAT[item][item_favour] > 8}<img src="{$THEMEURL}images/faviteml.gif" alt="" />{ENDIF}{IF $CNCAT[item][item_favour] > 9}<img src="{$THEMEURL}images/favitemr.gif" alt="" />{ENDIF}
                        | {cn_date($CNCAT[item][item_submit_date])}
                    </small>
                    <p>
                        {cn_str($CNCAT[item][item_descr])} 
                        {IF $CNCAT[item][item_display_ext] == 1}
                            <a href="{cn_str($CNCAT[item][_ext_url])}">[+]</a>
                        {ENDIF}
                        {IF $CNCAT[config][links_broken_notify]}
                            <br /><small>{cn_str($CNCAT[item][link_url])} <a href="javascript:baditem('{$CNCAT[item][item_id]}')" title="{$CNCAT[lang][broken_notify]}">[X]</a></small>
                        {ENDIF}
                    </p>
                    {DISPLAY EXTFIELDS}
                    {IF $CNCAT[item][_control_bar]}
                    <p><small>
                        <a href="{$CNCAT[abs]}{$CNCAT[system][dir_admin]}index.php?act=links&amp;mode=delete&amp;id={$CNCAT[item][item_id]}">{$CNCAT[lang][do_delete]}</a>&nbsp;&bull;&nbsp;
                        <a href="{$CNCAT[abs]}{$CNCAT[system][dir_admin]}index.php?act=links&amp;mode=isolation&amp;id={$CNCAT[item][item_id]}">{$CNCAT[lang][do_isolation]}</a>&nbsp;&bull;&nbsp;
                        <a href="{$CNCAT[abs]}{$CNCAT[system][dir_admin]}index.php?act=links&amp;mode=asnew&amp;id={$CNCAT[item][item_id]}">{$CNCAT[lang][do_asnew]}</a>&nbsp;&bull;&nbsp;
                        <a href="{$CNCAT[abs]}{$CNCAT[system][dir_admin]}index.php?act=links_add&amp;mode=forms&amp;edit=1&amp;id={$CNCAT[item][item_id]}">{$CNCAT[lang][do_edit]}</a>&nbsp;&bull;&nbsp;
                        <a href="{$CNCAT[abs]}{$CNCAT[system][dir_admin]}index.php?act=check&amp;mode=checkone&amp;id={$CNCAT[item][item_id]}">{$CNCAT[lang][do_check]}</a>&nbsp;&bull;&nbsp;
                        {DISPLAY ADMIN_RATING}
                    </small></p>
                    {ENDIF}
                </td></tr>
                {IF $CNCAT[banner][items_middle] && $CNCAT[item][_number]==intval($CNCAT[item][_count]/2-1)}
                <tr><td colspan="3">
                    <center>{$CNCAT[banner][items_middle]}</center>
                </td></tr>
                {ENDIF}
{/TEMPLATE}

<!--
1 - int,
2 - double,
3 - varchar(255),
4 - datetime,
5 - text
-->

{TEMPLATE item_ext_field}
    {IF $CNCAT[extfield][type] == 1 || $CNCAT[extfield][type] == 2}
        {IF is_numeric($CNCAT[extfield][value])}
            <br />{cn_str($CNCAT[extfield][title])}: {cn_str($CNCAT[extfield][value])}
        {ENDIF}
    {ELSE}
        {IF $CNCAT[extfield][value]}
            {IF $CNCAT[extfield][type] == 3}
                <br />{cn_str($CNCAT[extfield][title])}: {cn_str($CNCAT[extfield][value])}
            {ENDIF}
            {IF $CNCAT[extfield][type] == 4}
                <br />{cn_str($CNCAT[extfield][title])}: {cn_date($CNCAT[extfield][value])}
            {ENDIF}
            {IF $CNCAT[extfield][type] == 5}
                <br />{cn_str($CNCAT[extfield][title])}: {cn_str($CNCAT[extfield][value])}
            {ENDIF}
            {IF $CNCAT[extfield][type] == 6}
                <br />{cn_str($CNCAT[extfield][title])}:
                <a href="{$CNCAT[abs]}cncat_image.php?item={$CNCAT[item][item_id]}&amp;field={$CNCAT[extfield][name]}"><img src="{$CNCAT[abs]}cncat_image.php?item={$CNCAT[item][item_id]}&amp;thumb=1&amp;field={$CNCAT[extfield][name]}" /></a>
            {ENDIF}
        {ENDIF}
    {ENDIF}
{/TEMPLATE}

{TEMPLATE items_bottom}
            </table>
            <!-- /Links -->
            {IF $CNCAT[banner][items_bottom]}
                <center style="padding: 10px;">{$CNCAT[banner][items_bottom]}</center>
            {ENDIF}
{/TEMPLATE}

{TEMPLATE admin_rating_top}
<!-- Moders rating -->
{/TEMPLATE}

{TEMPLATE admin_rating_num}<a href="{$CNCAT[abs]}{$CNCAT[system][dir_admin]}index.php?act=links&amp;mode=rating&amp;value={$CNCAT[admin][item_rating_value]}&amp;id={$CNCAT[item][item_id]}">{$CNCAT[admin][item_rating_value]}</a>{/TEMPLATE}

{TEMPLATE admin_rating_num_active}<strong>{$CNCAT[admin][item_rating_value]}</strong>{/TEMPLATE}

{TEMPLATE admin_rating_delim} {/TEMPLATE}

{TEMPLATE admin_rating_bottom}
<!-- /Moders rating -->
{/TEMPLATE}

{TEMPLATE itemcount}
    <!-- Items count -->
    <p>
    {IF $CNCAT[page][cat_item_count] > 0}
        {$CNCAT[lang][items_in_category]}: {$CNCAT[page][cat_item_count]}
    {ELSE}
        {$CNCAT[lang][no_items_in_category]}
    {ENDIF}
    </p>
    <!-- /Items count -->
{/TEMPLATE}

{TEMPLATE brokenscript}
    {if $CNCAT[config][links_broken_notify]}
        <script type="text/javascript">
        <!--
            function baditem(l) 
            {
                t=screen.height/2-50;
                w=screen.width/2-50;
                wnd=window.open("","baditem"+l,"width=200,height=100,top="+t+",left="+w);
                wnd.document.write("<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'><HTML><HEAD><TITLE>{$CNCAT[lang][broken_warning]}<"+"/TITLE><META http-equiv='Content-Type' content='text/html; charset={$CNCAT[lang][charset]}'><"+"/HEAD><BODY style='font-family:verdana;font-size:11px;color:gray;'><center><B>{$CNCAT[lang][broken_sure]}<"+"/B><br><br>");
                wnd.document.write("<a href={$CNCAT[abs]}cncat_add.php?bad="+l+">{$CNCAT[lang][yes]}<"+"/a> &nbsp;|&nbsp; <a href='javascript:window.close();'>{$CNCAT[lang][no]}<"+"/a><"+"/center><"+"/BODY><"+"/HTML>");
                wnd.document.close();
            }
        //-->
        </script>
    {endif}
{/TEMPLATE}

{TEMPLATE newitems_top}
            <!-- New items -->
            <table>
            <tr><td>
                <strong>{$CNCAT[lang][new_items]}</strong><br><br>
{/TEMPLATE}

{TEMPLATE newitem
    (ITEM[item_id, item_title, item_descr, link_url, link_target])
}
                {IF $CNCAT[item][link_target] == 1}
                    <a target="_blank" href="{$CNCAT[item][link_url]}"><strong>{cn_str($CNCAT[item][item_title])}</strong></a>
                {ENDIF}
                {IF $CNCAT[item][link_target] == 2}
                    <a target="_blank" href="{$CNCAT[abs]}cncat_jump.php?{$CNCAT[item][item_id]}"><strong>{cn_str($CNCAT[item][item_title])}</strong></a>
                {ENDIF}
                {IF $CNCAT[item][link_target] == 3}
                    <a target="_blank" href="{$CNCAT[item][link_url]}" onclick="location.href='{$CNCAT[abs]}cncat_jump.php?{$CNCAT[item][item_id]}'; return false;"><strong>{cn_str($CNCAT[item][item_title])}</strong></a>
                {ENDIF}
                <br>
                <small>{cn_str($CNCAT[item][item_descr])}</small>
                <br><br>
{/TEMPLATE}

{TEMPLATE newitems_bottom}
            </td></tr>
            </table>  
            <!-- /New items -->
{/TEMPLATE}
Return current item: CNCat Free Edition