Design Themes Modification When Updating from CNCat 4.1.3 to CNCat 4.2
extended.tpl
Modifications:
- Users comments and rates displaying added.
- Form for users rate and adding comments implemented.
New Elements:
- Templates ext_comment, ext_comments_*.
- $CNCAT[item][item_rating_users] –users rate;
- $CNCAT[item][item_votes_count] – number of users vote;
- $CNCAT[item][item_com_count] – number of comments.
Apply Modifications:
- To display users rate results, above the code
<tr><td class="name">{$CNCAT[lang][jumps_to]}
add the following code:
{IF $CNCAT[config][rating_enable]}
<tr>
<td class="name">{$CNCAT[lang][users_rating]}:</td>
<td class="text">
{IF $CNCAT[item][item_rating_users] > 0}
{cn_str($CNCAT[item][item_rating_users])} ({$CNCAT[lang][votes_count]}: {$CNCAT[item][item_votes_count]})
{ELSE}
{$CNCAT[lang][no]}
{ENDIF}
</td>
</tr>
{ENDIF}
- To display comments and the form for adding comments and rates, below the following code
{DISPLAY EXTFIELDS}
add
{DISPLAY COMMENTS}
- Copy all templates starting with ext_comment, ext_comments from the extended.tpl file of version 4.2.