NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP
PHÁT TRIỂN
Luôn đồng hành cùng bạn!
Chuyên: WEBDESIGN - HOSTING - DOMAIN - CCTV
Hotline: 0903 880 905 - 0931 435 998


Hiển thị các bài đăng có nhãn NukeViet. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn NukeViet. Hiển thị tất cả bài đăng
Hướng Dẫn Sticky Menu Khi Cuộn Xuống trong NukeViet CMS 4.xmở file layout/header_extended.tpl
tìm
 <nav>
<div class="container">
<div class="row">
[MENU_SITE]
</div>
</div>
</nav>

Và thay thế thành đoạn sau
<nav class="second-nav stickymenu" id="menusite"><div class="container"><div class="row"><div class="bg box-shadow wraper">[MENU_SITE]</div></div></div> </nav>
<script type="text/javascript"> $(function() { var sticky_navigation_offset_top = $('.stickymenu').offset().top; var sticky_navigation = function(){ var scroll_top = $(window).scrollTop(); if (scroll_top > sticky_navigation_offset_top) { $('.stickymenu').css({ 'position': 'fixed', 'z-index': 990,'top':0 }); } else { $('.stickymenu').css({ 'position': 'relative', 'width': '100%' }); } }; sticky_navigation(); $(window).scroll(function() { sticky_navigation(); }); }); </script> 

vào file default\css\style.css thêm css
.stickymenu { background: red; margin: 0 auto 0; width: 100%; }
 

NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP
PHÁT TRIỂN
WEBDESIGN - HOSTING - DOMAIN
Autosave là một tính năng hay song cách hoạt động của nó gây khó chịu, dưới đây là cách bạn có thể tạm thời tắt tính năng này
Autosave là một plugin của ckeditor đã tích hợp mặc định trong trình soạn thảo NukeViet từ các phiên bản NukeViet 4. Đây là một plugin khá hay của ckeditor làm hạn chế việc mất nội dung trong quá trình soạn thảo vì nhiều lý do, song một điều gây khó chịu cho người sử dụng là thường hiển thị hộp thoại hỏi lại việc khôi phục nội dung trước đó trong khi người viết không có nhu cầu.


tắt autosave ckeditor
Hộp thoại gợi ý khôi phục nội dung đã được tự động lưu trước đó

Trong khi đợi giải pháp tốt hơn từ nhà phát triển, và bạn cũng chắc chắn không có nhu cầu dùng nhiều đến tính năng này, thì hãy làm theo bên dưới để tạm thời tắt tính năng này, bạn sẽ không còn bị làm phiền với cái hộp thoại này nữa!

1. Sửa tập tin cấu hình ckeditor
Mở assets/editors/ckeditor/config.js
Tìm
CKEDITOR.editorConfig = function( config ) {
Thêm bên dưới
config.removePlugins= 'autosave';
2. Dọn dẹp hệ thống
Truy cập ACP / Công cụ web / Làm sạch cache để các thay đổi có hiệu lực

NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP
PHÁT TRIỂN
WEBDESIGN - HOSTING - DOMAIN
Hướng dẫn tự đông thêm liên kết cho từ khóa được tìm thấy trong nội dung của các module sử dụng NukeViet. Phương án này làm tăng đáng kể các liên kết nội bộ, hữu ích cho SEO
Cơ chế hoạt động

Dựa vào danh sách từ khóa (tag) của module, tìm trong nội dung tất cả các từ khóa có trong danh sách và thêm liên kết đến trang xem danh sách bài viết thuộc từ khóa cho từ khóa đó
Yêu cầu về module có thể tích hợp

Module có sử dụng chức năng tag (Quản lý từ khóa)
Một module có thể: news, shops, download

Hướng dẫn tích hợp cho module news (và các module ảo)
Mở modules/news/funcs/detail.php
Tìm
$contents = detail_theme($news_contents, $array_keyword, $related_new_array, $related_array, $topic_array, $content_comment);
Thêm bên trên
$auto_link_config = array(
    'auto_link' => 1, // 1: kích hoạt, 0: không kích hoạt
    'auto_link_casesens' => 1, // 1: không phân biệt ký tự HOA/thường, 0: ngược lại
    'auto_link_target' => '_blank', // phương án mở liên kết, xem thêm https://www.w3schools.com/tags/att_a_target.asp
    'auto_link_limit' => 3, // số lượng từ khóa sẽ thay thế. VD nội dung có 10 từ khóa thì chỉ thay thế 3 từ đầu tiên
    'auto_link_content' => $news_contents['bodyhtml'] // biến nội dung cần thay thế
);

if ($auto_link_config['auto_link']) {
    $reg_post = $auto_link_config['auto_link_casesens'] ? '/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))($content)/imsu' : '/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))($content)/msu';
    $sql = 'SELECT keywords, alias FROM ' . NV_PREFIXLANG . '_' . $module_data . '_tags';
    $array_keywords = $nv_Cache->db($sql, 'tid', $module_name);
    foreach ($array_keywords as $keyword) {
        $url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $module_info['alias']['tag'] . '/' . $keyword['alias'];
        $regexp = str_replace('$content', $keyword['keywords'], $reg_post);
        $replace = '<a title="$1" href="$$$url$$$" ' . (! empty($keyword['auto_link_target']) ? 'target="' . $keyword['auto_link_target'] . '"' : '') . '>$1</a>';
        $newtext = preg_replace($regexp, $replace, $auto_link_config['auto_link_content'], $auto_link_config['auto_link_limit']);
        if ($newtext != $keyword['keywords']) {
            $auto_link_config['auto_link_content']= str_replace('$$$url$$$', $url, $newtext);
        }
    }
    $news_contents['bodyhtml'] = $auto_link_config['auto_link_content'];
}
Hướng dẫn tích hợp cho module Shops (và module ảo)
Mở modules/shops/funcs/detail.php
Tìm
$contents = detail_product($data_content, $data_unit, $data_others, $array_other_view, $content_comment, $compare_id, $popup, $idtemplate, $array_keyword);
Thêm bên trên
$auto_link_config = array(
    'auto_link' => 1, // 1: kích hoạt, 0: không kích hoạt
    'auto_link_casesens' => 1, // 1: không phân biệt ký tự HOA/thường, 0: ngược lại
    'auto_link_target' => '_blank', // phương án mở liên kết, xem thêm https://www.w3schools.com/tags/att_a_target.asp
    'auto_link_limit' => 3, // số lượng từ khóa sẽ thay thế. VD nội dung có 10 từ khóa thì chỉ thay thế 3 từ đầu tiên
    'auto_link_content' => $data_content[NV_LANG_DATA . '_bodytext'] // biến nội dung cần thay thế
);

if ($auto_link_config['auto_link']) {
    $reg_post = $auto_link_config['auto_link_casesens'] ? '/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))($content)/imsu' : '/(?!(?:[^<\[]+[>\]]|[^>\]]+<\/a>))($content)/msu';
    $sql = 'SELECT keywords, alias FROM ' . $db_config['prefix'] . '_' . $module_data . '_tags_' . NV_LANG_DATA;
    $array_keywords = $nv_Cache->db($sql, 'tid', $module_name);
    foreach ($array_keywords as $keyword) {
        $url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $module_info['alias']['tag'] . '/' . $keyword['alias'];
        $regexp = str_replace('$content', $keyword['keywords'], $reg_post);
        $replace = '<a title="$1" href="$$$url$$$" ' . (! empty($keyword['auto_link_target']) ? 'target="' . $keyword['auto_link_target'] . '"' : '') . '>$1</a>';
        $newtext = preg_replace($regexp, $replace, $auto_link_config['auto_link_content'], $auto_link_config['auto_link_limit']);
        if ($newtext != $keyword['keywords']) {
            $auto_link_config['auto_link_content']= str_replace('$$$url$$$', $url, $newtext);
        }
    }
    $data_content[NV_LANG_DATA . '_bodytext'] = $auto_link_config['auto_link_content'];
}

NHÀ CUNG CẤP DỊCH VỤ CHUYÊN NGHIỆP
PHÁT TRIỂN
WEBDESIGN - HOSTING - DOMAIN

Translate

Quan tâm nhiều

Theo thời gian

Biểu mẫu liên hệ

Tên

Email *

Thông báo *