Hướng dẫn nâng cấp giao diện tương thích từ NukeViet 4.4.00 lên NukeViet 4.4.04 - nukeviet/update GitHub Wiki
Nếu giao diện của bạn có và cần sử dụng block themes/ten-theme/blocks/global.QR_code.php thì có ba hướng xử lý:
- Cài lại thư viện endroid/qrcode:
composer require endroid/qrcode
. Bằng cách này bạn không phải sửa block nữa nhưng sẽ yêu cầu máy chủ hỗ trợ PHP >= 7.1 - Xóa nó, copy từ giao diện mặc định qua và xử lý lại giao diện theo nhu cầu của bạn.
- Cập nhật theo hướng dẫn này:
- Xóa file themes/ten-theme/blocks/global.QR_code.ini
- Sửa file themes/ten-theme/blocks/global.QR_code.php:
Xóa 2 function: nv_block_qr_code_config và nv_block_qr_code_config_submit.
Tìm đến:
$block_config['selfurl'] = NV_MAIN_DOMAIN . nv_url_rewrite($current_page_url, true);
Thay bằng:
str_starts_with($current_page_url, NV_MY_DOMAIN) && $current_page_url = substr($current_page_url, strlen(NV_MY_DOMAIN));
$block_config['selfurl'] = NV_MY_DOMAIN . nv_url_rewrite($current_page_url, true);
- Sửa file themes/ten-theme/blocks/global.QR_code.tpl:
Tìm và xóa:
data-level="{QRCODE.level}" data-ppp="{QRCODE.pixel_per_point}" data-of="{QRCODE.outer_frame}"
- Sửa file themes/ten-theme/config.ini:
Tìm và xóa:
<config>a:3:{s:5:"level";s:1:"M";s:15:"pixel_per_point";i:4;s:11:"outer_frame";i:1;}</config>
- Sửa file themes/ten-theme/js/main.js Tìm và xóa (trong function qrcodeLoad):
+ "&l=" + $(a).data("level") + "&ppp=" + $(a).data("ppp") + "&of=" + $(a).data("of")
Sửa file themes/ten-theme/modules/statistics/main.tpl nếu có
- Tìm đến đoạn mã như ở đây và thay bằng đoạn mã như ở đây
- Tìm đến đoạn mã như ở đây và thay bằng đoạn mã như ở đây
- Tìm đến đoạn mã như ở đây và thay bằng đoạn mã như ở đây
- Tìm đến đoạn mã như ở đây và thay bằng đoạn mã như ở đây
- Tìm đến đoạn mã như ở đây và thay bằng đoạn mã như ở đây
Mở file themes/ten-theme/modules/news/viewcat_two_column.tpl nếu có tìm
<!-- BEGIN: loopcat -->
Thêm xuống dưới
<!-- BEGIN: block_topcat -->
<div class="block-top clear">
{BLOCK_TOPCAT}
</div>
<!-- END: block_topcat -->
Tìm:
<!-- END: loopcat -->
Thêm lên trên:
<!-- BEGIN: block_bottomcat -->
<div class="bottom-cat clear">
{BLOCK_BOTTOMCAT}
</div>
<!-- END: block_bottomcat -->
Mở themes/ten-theme/modules/news/search.tpl nếu có, tìm
<h3><a href="{LINK}" title="{TITLEROW}" {TARGET_BLANK}>{TITLEROW}</a></h3>
Thay thành
<h3><a href="{LINK}" title="{TITLE}" {TARGET_BLANK}>{TITLEROW}</a></h3>
Mở themes/ten-theme/config.php tìm
$nv_Cache->delMod('settings');
Thêm xuống dưới
$gfonts = new NukeViet\Client\Gfonts();
$gfonts->destroyAll();
Mở themes/ten-theme/modules/users/block.login.tpl (nếu có) và themes/ten-theme/modules/users/block.user_button.tpl (nếu có) tìm những đoạn
{NV_BASE_SITEURL}themes/{BLOCK_THEME}/js/users.js
Hoặc
{NV_BASE_SITEURL}themes/default/js/users.js
Thay lại thành
{NV_BASE_SITEURL}themes/{BLOCK_JS}/js/users.js
Mở file themes/ten-theme/modules/page/block.about.tpl (nếu có) tìm đến đoạn:
<h3 class="margin-bottom"><a title="{TITLE}" href="{LINK}">{TITLE}</a></h3>
Sửa lại thành:
<!-- BEGIN: image -->
<div class="image pull-left">
<a href="{LINK}" title="{TITLE}"> <img src="{IMAGE}" alt="{TITLE}" class="img-responsive" /></a>
</div>
<!-- END: image -->
<h3 class="margin-bottom">
<a title="{TITLE}" href="{LINK}">{TITLE}</a>
</h3>