Như tiêu đề, nhờ anh cho em hỏi cách Cho hiển thị hình ảnh ở block global.new_files của module download với ạ.
Thank's.............................
Mở modules/download/blocks/global.new_files.php
Tìm
, updatetime
Thêm sau
, fileimage
Tìm
$xtpl->assign('ROW', $row);
Thêm bên trên
if(!empty($row['fileimage']) and file_exists(NV_ROOTDIR . '/' . NV_ASSETS_DIR . $row['fileimage'])){
$row['fileimage'] = NV_BASE_SITEURL . NV_ASSETS_DIR . $row['fileimage'];
}elseif(!empty($row['fileimage']) and file_exists(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . $row['fileimage'])){
$row['fileimage'] = NV_BASE_SITEURL . NV_UPLOADS_DIR . $row['fileimage'];
}else{
$row['fileimage'] = '';
}
Thêm bên dưới
if(!empty($row['fileimage'])){
$xtpl->parse('main.loop.image');
}
Mở themes/ten-theme/modules/download/block_new_files.tpl
Trong khối <!-- BEGIN: loop --> ..........<!-- END: loop -->
Thêm đoạn code này vào vị trí muốn hiển thị ảnh
<!-- BEGIN: image -->
<a href="{ROW.link}" title="{ROW.title}"><img src="{ROW.fileimage}" alt="{ROW.title}"></a>
<!-- END: image -->
Trung tâm ứng dụng NukeViet
Ghi rõ nguồn khi sao chép thông tin từ website này.
Sử dụng CMS NukeViet, thiết kế bởi TDFOSS.,LTD