Hiện mình muốn đưa ngày tháng năm đăng bài viết theo dạng tách riêng hàm time ra như hình:
[img]https://i.imgur.com/8w6TQ2t.png[/img]
Mình đã tiến hành thêm code để gọi hàm publtime ra như sau:
ở theme.php của module mình thêm vào sau đoạn code:
$array_row_i['publtime'] = nv_date('d/m/Y', $array_row_i['publtime']);
của function viewcat_page_new
code thêm:
$array_row_i['publtime_d'] = nv_date('d', $array_row_i['publtime']);
$array_row_i['publtime_m'] = nv_date('m', $array_row_i['publtime']);
$array_row_i['publtime_Y'] = nv_date('Y', $array_row_i['publtime']);
Ở file: viewcat_page (Mình cho hiển thị bản tin theo dạng mới lên trên)
code được thêm là:
<span class="date">{CONTENT.publtime_d}</span>
<span class="month">{CONTENT.publtime_m}</span>
<span class="year">{CONTENT.publtime_Y}</span>
Nhưng khi ra trang chủ thì thời gian hiển thị không đúng vưới thời gian đăng bài
[img]https://i.imgur.com/F8eJFbI.png[/img]
Thank!
ở theme.php của module mình thêm vào sau đoạn code:
Thêm trước chứ thêm sau là sai ý @Nguyễn Tất Thắng
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