- Nếu theme của bạn làm từ theme default và có file /themes/ten-theme/modules/search/form.tpl Mở /themes/ten-theme/modules/search/form.tpl và tìm Mã: Chọn tất cả Thêm vào sau: Mã: Chọn
Trang 1- Nếu theme của bạn làm từ theme default và có file /themes/ten-theme/modules/search/form.tpl
Mở /themes/ten-theme/modules/search/form.tpl và tìm
Mã: Chọn tất cả
<! BEGIN: main >
Thêm vào sau:
Mã: Chọn tất cả
<div id="cse" style="width: 100%;display:none">
Loading
</div>
<script src="http://www.google.com/jsapi"
type="text/javascript"></script>
<script type="text/javascript" >
google.load('search', '1',
{
language : nv_sitelang
});
</script>
<link rel="stylesheet"
href="http://www.google.com/cse/style/look/default.css"
type="text/css" />
Tìm
Mã: Chọn tất cả
var a = $("#form_search [name=q]").val();
if({NV_MIN_SEARCH_LENGTH} <= a.length && {NV_MAX_SEARCH_LENGTH} >= a.length) {
a = rawurlencode(a), window.open("http://www.google.com/cse?
cx={SEARCH_ENGINE_UNIQUE_ID}&ie=UTF-8&q=" + a, "_blank");
return!1
}else {
return a.focus(), !1
}
Đổi lại thành
Mã: Chọn tất cả
var a = $("#form_search [name=q]").val();
$("div.sea-frame").hide();
$("#cse").show();
$("#search_result").hide();
var customSearchControl = new
google.search.CustomSearchControl('{SEARCH_ENGINE_UNIQUE_ID}');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_R ESULTSET);
customSearchControl.draw('cse');
customSearchControl.execute(a);
- Nếu theme của bạn làm từ theme modern và có file /themes/ten-theme/modules/search/form.tpl Mở
Tìm
Mã: Chọn tất cả
Trang 2<div class="box-border-shadow content-box clearfix">
Thay lại thành
Mã: Chọn tất cả
<div id="cse" style="width: 100%;display:none">
Loading
</div>
<script src="http://www.google.com/jsapi"
type="text/javascript"></script>
<script type="text/javascript" >
google.load('search', '1',
{
language : nv_sitelang
});
</script>
<link rel="stylesheet"
href="http://www.google.com/cse/style/look/default.css"
type="text/css" />
<div id="id_form_search" class="box-border-shadow content-box clearfix">
Tìm
Mã: Chọn tất cả
<a href="IntSearch" class="IntSearch">{LANG.search_adv_internet}</a>
Nếu có thay lại thành
Mã: Chọn tất cả
<a href="#" class="IntSearch">{LANG.search_adv_internet}</a>
Tìm
Mã: Chọn tất cả
if({NV_MIN_SEARCH_LENGTH} <= a.length && {NV_MAX_SEARCH_LENGTH} >= a.length) {
a = rawurlencode(a), window.open("http://www.google.com/cse?
cx={SEARCH_ENGINE_UNIQUE_ID}&ie=UTF-8&q=" + a, "_blank");
return!1
}else {
return a.focus(), !1
}
Nếu có thay lại thành
Mã: Chọn tất cả
var a = $("#form_search [name=q]").val();
$("#id_form_search").hide();
$("#cse").show();
$("#search_result").hide();
var customSearchControl = new
google.search.CustomSearchControl('{SEARCH_ENGINE_UNIQUE_ID}');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_R ESULTSET);
customSearchControl.draw('cse');
customSearchControl.execute(a);
Trang 3Gợi ý: Nếu giao diện riêng của bạn có file /themes/ten-theme/modules/search/form.tpl và bạn không chỉnh sửa gì ở nó thì có thể chỉ cần copy file đè file
/themes/ten-theme/modules/search/form.tpl từ giao diện gốc tương ứng.
3.2) Chỉnh sửa giao diện module menu:
Nếu theme của bạn có thư mục /themes/ten-theme/modules/menu/ và bạn đang sử dụng block global.menu_style.php cần chú ý chỉnh sửa các file tpl tương ứng trong thư mục /themes/ten-theme/modules/menu/ theo file tương ứng trong /themes/default/modules/menu/.
3.3) Chỉnh sửa giao diện module news
Nếu theme của bạn có /themes/ten-theme/modules/news/topic.tpl và được làm từ theme default thì mở /themes/ten-theme/modules/news/topic.tpl ra tìm
Mã: Chọn tất cả
<! BEGIN: main >
thêm vào bên dưới
Mã: Chọn tất cả
<div style="background:#F2F2F2;border : 1px solid #ccc; padding:5px"> <a style="font-size:13px;" title="{TOPPIC_TITLE}"
href="{TOPPIC_LINK}"><strong>{TOPPIC_TITLE}</strong></a>
</div>
<! BEGIN: topicdescription >
<div style="background:#fff; padding:8px; border-bottom : 1px solid
#ccc;">
{TOPPIC_DESCRIPTION}
</div>
<! END: topicdescription >
Nếu theme của bạn có /themes/ten-theme/modules/news/topic.tpl và được làm từ theme modern thì mở /themes/ten-theme/modules/news/topic.tpl ra tìm
Mã: Chọn tất cả
<! BEGIN: main >
thêm vào bên dưới
Mã: Chọn tất cả
<div class="cat-nav" style="border:1px solid #ccc;padding:4px;">
<a href="{TOPPIC_LINK}" class="current-cat"
title="{TOPPIC_TITLE}">{TOPPIC_TITLE}</a>
</div>
<! BEGIN: topicdescription >
<div style="border:1px solid #ccc;border-top:none;padding:4px;">
{TOPPIC_DESCRIPTION}
</div>
<! END: topicdescription >
<div class="clear"> </div>
Trang 4Mã: Chọn tất cả
<span class="time">{TIME}</span>
| <span class="date">{DATE}</span>
Thay lại thành
Mã: Chọn tất cả
<span class="time">{LANG.pubtime}: {TIME} - {DATE}</span>
3.4) Chỉnh sửa file /themes/ten-theme/layout/footer.tpl
- Mở /themes/ten-theme/layout/footer.tpl và thêm vào tại vị trí thích hợp đoạn:
Mã: Chọn tất cả
<! BEGIN: theme_type >
{LANG.theme_type_select}: <! BEGIN: loop ><! BEGIN: other ><a href="{STHEME_TYPE}" title="{STHEME_INFO}">{STHEME_TITLE}</a><! END: other ><! BEGIN: current >{STHEME_TITLE}<! END: current ><! BEGIN: space > | <! END: space ><! END: loop ><! END:
theme_type >
3.5) Chỉnh sửa file /themes/ten-theme/theme.php
Mở /themes/ten-theme.php thêm vào sau
Mã: Chọn tất cả
$xtpl->assign( 'THEME_IMG_CRONJOBS', NV_BASE_SITEURL "index.php?
second=cronjobs&p=" nv_genpass() );
Đoạn
Mã: Chọn tất cả
// Chuyen doi giao dien
if( ! empty( $global_config['switch_mobi_des'] ) and !
empty( $module_info['mobile'] ) )
{
$num_theme_type = sizeof( $global_config['array_theme_type'] ) - 1;
foreach( $global_config['array_theme_type'] as $i => $theme_type ) {
$xtpl->assign( 'STHEME_TYPE', NV_BASE_SITEURL "index.php?" NV_LANG_VARIABLE "=" NV_LANG_DATA "&" NV_NAME_VARIABLE "=" $module_name "&nv" NV_LANG_DATA "themever=" $theme_type
"&nv_redirect=" nv_base64_encode( $client_info['selfurl'] ) ); $xtpl->assign( 'STHEME_TITLE', $lang_global['theme_type_' $i] );
$xtpl->assign( 'STHEME_INFO',
sprintf( $lang_global['theme_type_chose'], $lang_global['theme_type_'
$i] ) );
if( $theme_type == $global_config['current_theme_type'] )
Trang 5{
$xtpl->parse( 'main.theme_type.loop.current' );
}
else
{
$xtpl->parse( 'main.theme_type.loop.other' );
}
if( $i < $num_theme_type )
$xtpl->parse( 'main.theme_type.loop.space' );
$xtpl->parse( 'main.theme_type.loop' );
}
$xtpl->parse( 'main.theme_type' );
}
unset( $theme_type, $i, $num_theme_type );
3.6) Sửa file viewcat_list.tpl
Nếu theme của bạn có file theme/modules/news/viewcat_list.tpl thì mở /themes/ten-theme/modules/news/viewcat_list.tpl ra tìm
Mã: Chọn tất cả
</table>
Nếu có, thêm vào dưới
Mã: Chọn tất cả
<! BEGIN: generate_page >
<div class="generate_page">
{GENERATE_PAGE}
</div>
<! END: generate_page >
3.7) Chỉnh sửa blocks banner
Nếu theme của bạn có theme/blocks/global.banners.tpl thì mở
/themes/ten-theme/blocks/global.banners.tpl ra tìm
Mã: Chọn tất cả
<! BEGIN: loop >
<div style="margin-top:2px;">
Nếu có, thay lại thành
Mã: Chọn tất cả
<! BEGIN: loop >
<div class="clear"></div>
<div style="margin-top:2px;position:relative">
Tìm
Mã: Chọn tất cả
<! > <![endif] >
</object>
Trang 6Thêm vào bên dưới
Mã: Chọn tất cả
<! BEGIN: fix_link ><a href="{DATA.link}"
onclick="this.target='_blank'" title="{DATA.file_alt}"
style="position:absolute; top:0;left:0;width:{DATA.file_width}px;
height:{DATA.file_height}px"> </a><! END: fix_link >
3.8 ) Thêm giao diện module voting
- Nếu theme của bạn làm từ theme default thì tạo file /themes/modules/voting/main.tpl với nội dung
Mã: Chọn tất cả
<! BEGIN: main >
<! BEGIN: loop >
<form class="voting" action="">
<h2>{VOTING.question}</h2>
<fieldset>
<! BEGIN: resultn >
<p>
<input type="checkbox" name="option[]"
value="{RESULT.id}" onclick="return
nv_check_accept_number(this.form,'{VOTING.accept}','{VOTING.errsm}')"/>{ RESULT.title}
</p>
<! END: resultn >
<! BEGIN: result1 >
<p>
<input type="radio" name="option" value="{RESULT.id}" />{RESULT.title}
</p>
<! END: result1 >
<div style="padding-top: 10px;" class="clearfix">
<div class="submit">
<input class="submit" type="button"
value="{VOTING.langsubmit}" onclick="nv_sendvoting(this.form,
'{VOTING.vid}', '{VOTING.accept}', '{VOTING.checkss}',
'{VOTING.errsm}');" />
</div>
<a class="forgot fl" title="{VOTING.langresult}"
href="javascript:void(0);" onclick="nv_sendvoting(this.form,
'{VOTING.vid}', 0, '{VOTING.checkss}', '');">{VOTING.langresult}</a> </div>
</fieldset>
</form>
<br/><br/>
<! END: loop >
<! END: main >
- Nếu theme của bạn làm từ theme modern thì tạo file /themes/modules/voting/main.tpl với nội dung
Mã: Chọn tất cả
Trang 7<! BEGIN: main >
<! BEGIN: loop >
<div class="box-border">
<div class="content-box">
<form action="" method="post">
<div class="block-vote">
<p>
<strong>{VOTING.question}</strong>
</p>
<! BEGIN: resultn >
<p>
<input type="checkbox" name="option[]"
value="{RESULT.id}" onclick="return
nv_check_accept_number(this.form,'{VOTING.accept}','{VOTING.errsm}')"/> <span class="right">{RESULT.title}</span>
</p>
<! END: resultn ><! BEGIN: result1 >
<p>
<input type="radio" name="option"
value="{RESULT.id}" />
{RESULT.title}
</p><! END: result1 >
<div class="f-action">
<input class="button" type="button"
value="{VOTING.langsubmit}" onclick="nv_sendvoting(this.form,
'{VOTING.vid}', '{VOTING.accept}', '{VOTING.checkss}',
'{VOTING.errsm}');"/>
<a title="{VOTING.langresult}"
href="javascript:void(0);" onclick="nv_sendvoting(this.form,
'{VOTING.vid}', 0, '{VOTING.checkss}', '');">
{VOTING.langresult}</a>
</div>
</div>
</form>
</div>
</div>
<br/>
<! END: loop >
<! END: main >
3.9) Chỉnh sửa file header.tpl
Mở file /themes/theme-cua-ban/layout/header.tpl
tìm
Mã: Chọn tất cả
<body>
thêm vào sau
Mã: Chọn tất cả
<noscript>
<div id="nojavascript">{THEME_NOJS}</div>
</noscript>
Trang 83.10) Nếu giao diện của bạn có file sau /themes/ten-theme/modulews/news/search.tpl hãy mở nó lên, tìm dòng
Mã: Chọn tất cả
<! END: pages_viewpages >
và thay lại thành
Mã: Chọn tất cả
<! END: pages_result >
3.11) Nếu giao diện của bạn làm từ theme default (hoặc modern) hãy copy hai file
viewdetailusers.tpl và memberslist.tpl trong thư mục /themes/defult(hoặc
modern)/modules/users/ vào giao diện của bạn.
3.12) Nếu theme của bạn có file /themes/theme-cua-ban/modules/news/theme.php mở nó ra tìm Mã: Chọn tất cả
function topic_theme( $topic_array, $topic_other_array, $generate_page )
Thay lại bằng
Mã: Chọn tất cả
function topic_theme( $topic_array, $topic_other_array, $generate_page,
$page_title, $description )
Tìm
$xtpl = new XTemplate( "topic.tpl", NV_ROOTDIR "/themes/" $module_info['template']
"/modules/" $module_file );
Thêm vào bên dưới
Mã: Chọn tất cả
$xtpl->assign( 'TOPPIC_TITLE', $page_title );
$xtpl->assign( 'TOPPIC_LINK', NV_BASE_SITEURL "index.php?"
NV_LANG_VARIABLE "=" NV_LANG_DATA "&" NV_NAME_VARIABLE "="
$module_name "&" NV_OP_VARIABLE "=topic/" $topicalias );
if( !empty( $description )){ $xtpl->assign( 'TOPPIC_DESCRIPTION',
$description );
$xtpl->parse( 'main.topicdescription' ); }
4) Download file Upgrade_NukeViet_3.3.06.r1500_to_3.4.02.r1929.zip về giải nén, upload các file trong thư mục "nukeviet" đè lên các file đang sử dụng.
5)
- Upload tất cả các file vừa chỉnh sửa trong theme lên site (nếu có chỉnh sửa)
-Nếu bạn có tích hợp diễn đàn, hãy sửa lại giá trị DIR_FORUM trong file includes/constants.php Mã: Chọn tất cả
//Thu muc chua dien dan
define( "DIR_FORUM", "forum" );
6) Hệ thống sẽ đình chỉ hoạt động của site sau khi upload đè các file và có thể có một số thông
Trang 9báo lỗi hiển thị trong và ngoài site tuy nhiên sau khi thực hiện nâng cấp sẽ hết.
Nếu bạn bị trang trắng sau khi upload đè các file thì hãy mở file /data/config_global.php tìm $global_config['gzip_method'] = 1; sửa lại thành $global_config['gzip_method'] = 0;
7) Nhấn F5 để trình duyệt load lại giao diện.
8 ) Đăng nhập quyền quản trị tối cao sau đó để hệ thống tự chuyển trang, nhận được thông báo nâng cấp, nhấp chọn "Thực hiện nâng cấp" tuyệt đối không chọn "Xóa gói nâng cấp".
9) Tiếp tục làm theo những gì được hướng dẫn tại trang nâng cấp.
10) Sau khi nâng cấp hoàn tất vào Cấu hình => Cấu hình site tại ô Cho phép chuyển đổi giao
diện mobile, desktop hãy chỉnh theo ý thích.
11) Vào Cấu hình => Cấu hình chung tại "Loại captcha" chọn captcha bạn muốn => Lưu lại.
12) Nếu bạn có sử dụng block global.menu_style.php trên site thì vào phần Quản lý giao diện
=> Quản lý block để sửa lại tất cả các block này (thêm cấu hình Số Kí tự và Hiển Thị Mô Tả) Sau khi cấu hình vào dọn Dẹp hệ thống => Xóa các thông báo lỗi.
13)
- Sau khi nâng cấp xong vào quản lý giao diện => thiết lập layout nhấp Lưu lại để hệ thống cập nhật giao diện mới cho chức năng xem danh sách thành viên.
- Từ r1841 hệ thống tạo thêm chức năng xem danh sách thành viên và đặt phân quyền ở mức quản trị được xem Để thay đổi quyền xem, vào cấu hình module của module users và thay đổi giá trị đó thành Tất cả hoặc Quản trị hoặc Thành viên
Nếu bạn sử dụng các ngôn ngữ khác tiếng việt, tiếng anh và tiếng pháp cần hoàn thiện các gói ngôn ngữ ngày, tham khảo trên http://translate.nukeviet.vn để có bản đầy đủ hơn.
Những vấn đề lỗi khác sau khi nâng cấp thành công hoặc không liên quan đến việc nâng cấp các bạn vui lòng không thao luận tại đây mà chuyển sang viewtopic.php?
f=101&t=24964
P/S: Vá lỗi trang trắng khi sửa thông tin thành viên tại đây:
viewtopic.php?f=150&t=25498
Sửa lần cuối bởi hoaquynhtim99 vào ngày 19 Tháng 12 2012, 10:24 với 3 lần sửa trong tổng số
Nguyên nhân: bổ xung chú ý trước khi nâng cấp
NukeViet: Chia sẻ thành công - Kết nối đam mê
Trang 10Phát triển Modules
Bài viết: 3632
Ngày tham gia: 12 Tháng 11 2010, 10:42
Đến từ: Bình Định, Đà Nẵng
Đã cảm ơn: 19 lần
Được cảm ơn: 536 lần
•
•
Đầu trang
Share On:
Re: Hướng dẫn nâng cấp lên NukeViet 3.4.02.r1929
gửi bởi xoideo » 26 Tháng 10 2012, 03:23
ai chụp lại dùm mình cái trang hướng dẫn từ NukeViet 3.4.01 Revision 1758:
cám ơn !
Thiếu Nhi Thánh Thể http://xudoanthanhtam.vn
Trà Bảo Lộc http://baoloctea.com
xoideo
Thành viên chính thức
Bài viết: 98
Ngày tham gia: 20 Tháng 1 2011, 10:45
Đã cảm ơn: 5 lần
Được cảm ơn: 3 lần
•
Đầu trang
Re: Hướng dẫn nâng cấp lên NukeViet 3.4.02.r1929
gửi bởi hoaquynhtim99 » 26 Tháng 10 2012, 03:36
Nếu site của bạn không thuộc hai phiên bản đó thì hãy nâng cấp lên phiên bản thích hợp theo các hướng dẫn: viewforum.php?f=149