code này trước có người share rồi nhưng lỗi nhiều quá nên hôm nay share lại cho ae dùng
Thiết kế > cài đặt bố trí > thư viện ảnh > bố cục danh sách hình ảnh
[code]{% if current_photo != false %}
[{{photo_id}}-{{a}}=]
{% else %}
[{{photo_id}}-{{a}}]
{% endif %}[/code]
code thông tin người dùng trong thư viện
Get các biến cần thiết đặt trên cùng nhé
[code]{% set last=photo_layout|split('[')|length %}
{% set a=photo_layout|split('=]')[0]|split('-')|last %}
{% set i,j,d=a-1,a+1,last-1 %}
{% set next=photo_layout|split('[')[j]|split('-')[0] %}
{% set per=photo_layout|split('[')[i]|split('-')[0] %}[/code]
đặt tiếp code vào nơi muốn hiển thị xem tiếp, quay lại
[code]{% if d > 1 %}
<div style="padding:5px">
{% if 1 < a %}
<a style="float:left" href="/galery.php?id=view_foto&foto_uid={{per}}&uid={{user_id}}" class="btn btn-danger">Trước</a>
{% endif %}
{% if a < d %}
<a style="float:right" href="/galery.php?id=view_foto&foto_uid={{next}}&uid={{user_id}}" class="btn btn-danger">Tiếp</a>
{% endif %}
<div style="clear:both"></div></div>
{% endif %}[/code]
Code này ưu việt hơn mấy code đã share trên mạng
Nguồn: b0ysh0ck_hn