This commit is contained in:
Roman Kelesidis 2023-12-26 11:28:50 +07:00
parent 0a85ab2860
commit 34ccbbda72
2 changed files with 2 additions and 1 deletions

View File

@ -355,6 +355,7 @@ function display_attachments($post_id)
'FILESIZE' => $filesize,
'COMMENT' => $comment,
'TARGET_BLANK' => $target_blank,
'IS_IMAGE' => !empty($target_blank), // Проверка на то, что загружаемый файл является картинкой
'DOWNLOAD_COUNT' => declension((int)$attachments['_' . $post_id][$i]['download_count'], 'times'),
));
}

View File

@ -52,7 +52,7 @@
<legend>{postrow.attach.attachrow.S_UPLOAD_IMAGE} {L_ATTACHMENT}</legend>
<p class="attach_link">
<a href="{postrow.attach.attachrow.U_DOWNLOAD_LINK}" {postrow.attach.attachrow.TARGET_BLANK}><b>{postrow.attach.attachrow.DOWNLOAD_NAME}</b></a>
<span class="attach_stats med">({postrow.attach.attachrow.FILESIZE}, {L_DOWNLOADED}: {postrow.attach.attachrow.DOWNLOAD_COUNT})</span>
<span class="attach_stats med">({postrow.attach.attachrow.FILESIZE}, <!-- IF postrow.attach.attachrow.IS_IMAGE -->{L_VIEWS}<!-- ELSE -->{L_DOWNLOADED}<!-- ENDIF -->: {postrow.attach.attachrow.DOWNLOAD_COUNT})</span>
</p>
<!-- IF postrow.attach.attachrow.COMMENT -->
<p class="attach_comment med">