Nhà xuất bản cung cấp templates có thể tùy chỉnh để hiển thị các bài viết và khối để tích hợp thanh bên/widget. Hướng dẫn này bao gồm việc tùy chỉnh mẫu và cấu hình khối.
Mẫu Mục đích publisher_index.tplTrang chủ mô-đun publisher_item.tplXem bài viết đơn publisher_category.tplDanh sách danh mục publisher_archive.tplTrang lưu trữ publisher_search.tplKết quả tìm kiếm publisher_submit.tplMẫu gửi bài viết publisher_print.tplChế độ xem thân thiện với bản in
Mẫu Mục đích publisher_block_latest.tplKhối bài viết mới nhất publisher_block_spotlight.tplKhối bài viết nổi bật publisher_block_category.tplKhối danh sách danh mục publisher_block_author.tplKhối bài viết của tác giả
{* Available in publisher_item.tpl *}
< {$item.title}> {* Article title *}
< {$item.body}> {* Full content *}
< {$item.summary}> {* Summary/excerpt *}
< {$item.author}> {* Author name *}
< {$item.authorid}> {* Author user ID *}
< {$item.datesub}> {* Publication date *}
< {$item.datemodified}> {* Last modified date *}
< {$item.counter}> {* View count *}
< {$item.rating}> {* Average rating *}
< {$item.votes}> {* Number of votes *}
< {$item.categoryname}> {* Category name *}
< {$item.categorylink}> {* Category URL *}
< {$item.itemurl}> {* Article URL *}
< {$item.image}> {* Featured image *}
{* Available in publisher_category.tpl *}
< {$category.name}> {* Category name *}
< {$category.description}> {* Category description *}
< {$category.image}> {* Category image *}
< {$category.total}> {* Article count *}
< {$category.link}> {* Category URL *}
Sao chép templates vào chủ đề của bạn để tùy chỉnh:
themes/mytheme/modules/publisher/
└── publisher_block_latest.tpl
{* themes/mytheme/modules/publisher/publisher_item.tpl *}
< article class = " publisher-article " >
< span class = " author " > By < {$item.author}> </ span >
< span class = " date " > < {$item.datesub}> </ span >
< a href = " < {$item.categorylink}> " > < {$item.categoryname}> </ a >
< figure class = " featured-image " >
< img src = " < {$item.image}> " alt = " < {$item.title}> " >
< p class = " attribution " > < {$item.who_when}> </ p >
< a href = " < {$xoops_url}>/modules/publisher/submit.php?itemid= < {$item.itemid}> " >
< a href = " < {$item.printlink}> " target = " _blank " > Print </ a >
< a href = " < {$item.maillink}> " > Email </ a >
Chặn Mô tả Tin tức mới nhất Hiển thị các bài viết gần đây Tiêu điểm Bài viết nổi bật Thực đơn danh mục Điều hướng danh mục Lưu trữ Lưu trữ liên kết Tác giả hàng đầu Nhà văn tích cực nhất Mặt hàng phổ biến Bài viết được xem nhiều nhất
Tùy chọn Mô tả Các mục để hiển thị Số lượng bài viết Bộ lọc danh mục Giới hạn ở các danh mục cụ thể Hiển thị tóm tắt Hiển thị đoạn trích bài viết Độ dài tiêu đề Tiêu đề cắt ngắn Mẫu Chặn tệp mẫu
{* themes/mytheme/modules/publisher/blocks/publisher_block_latest.tpl *}
< div class = " publisher-latest-block " >
< {foreach item=item from=$block.items}>
< article class = " block-item " >
< a href = " < {$item.link}> " > < {$item.title}> </ a >
< {if $block.show_summary}>
< span class = " date " > < {$item.date}> </ span >
< span class = " views " > < {$item.counter}> views </ span >
{* Show different content for different users *}
< a href = " admin/item.php?op=edit&itemid= < {$item.itemid}> " > Admin Edit </ a >
< {elseif $item.uid == $xoops_userid}>
< a href = " submit.php?itemid= < {$item.itemid}> " > Edit Your Article </ a >
{* Add status-based styling *}
< article class = " article < {$item.status}> " >
{* Format dates with Smarty *}
< time datetime = " < {$item.datesub|date_format:'%Y-%m-%d'}> " >
< {$item.datesub|date_format:$xoops_config.dateformat}>
../User-Guide/Basic-Configuration - Cài đặt mô-đun
../User-Guide/Creating-Bài viết - Quản lý nội dung
../../04-API-Reference/Template/Template-System - Công cụ tạo mẫu XOOPS
../../02-Core-Concepts/Themes/Theme-Development - Tùy chỉnh chủ đề