Hướng dẫn nâng cấp giao diện tương thích từ NukeViet 4 Official (4.0.29) lên NukeViet 4.1 Official (4.1.02) - nukeviet/update GitHub Wiki
Kiểm tra lại javascript của giao diện để tương thích với Jquery 3. Hiện tại chúng tôi kiểm tra với NukeViet cơ bản cần phải tìm các đoạn có dạng
$(window).load(function () {
Thay lại thành
$(window).on('load', function() {
Nếu giao diện sử dụng Bootstrap riêng cần cập nhật tối thiểu lên bản 3.3.6 để tương thích với Jquery 3.
Nếu bạn cần chỉnh sửa giao diện module two-step-verification theo phong cách riêng hãy bổ sung giao diện này vào giao diện bạn sử dụng.
Mở themes/ten-theme/theme.php tìm
Tìm
$xtpl->assign('THEME_SEARCH_URL', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=seek&q=');
Thay lại thành
if (!$global_config['rewrite_enable']) {
$xtpl->assign('THEME_SEARCH_URL', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=seek&q=');
} else {
$xtpl->assign('THEME_SEARCH_URL', nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=seek', true) . '?q=');
}
Tìm file xử lý javascript chính của giao diện (ví dụ themes/ten-giao-dien/js/main.js
) cập nhật theo hướng sau:
Bổ sung thêm biến reCapIDs = [];
Ví dụ thêm vào đầu file dòng:
var reCapIDs = [];
Thêm giá trị callback
cho hàm tipShow
ví dụ:
function tipShow(a, b) {
Thay lại thành:
function tipShow(a, b, callback) {
Trong hàm tipShow
thay:
$("#tip").attr("data-content", b).show("fast");
tip_active = !0
Thành:
if (typeof callback != "undefined") {
$("#tip").attr("data-content", b).show("fast", function() {
if (callback == "recaptchareset" && typeof nv_is_recaptcha != "undefined" && nv_is_recaptcha) {
$('[data-toggle="recaptcha"]', $(this)).each(function() {
var parent = $(this).parent();
var oldID = $(this).attr('id');
var id = "recaptcha" + (new Date().getTime()) + nv_randomPassword(8);
var ele;
var btn = false, pnum = 0, btnselector = '';
$(this).remove();
parent.append('<div id="' + id + '" data-toggle="recaptcha"></div>');
for (i = 0, j = nv_recaptcha_elements.length; i < j; i++) {
ele = nv_recaptcha_elements[i];
if (typeof ele.pnum != "undefined" && typeof ele.btnselector != "undefined" && ele.pnum && ele.btnselector != "" && ele.id == oldID) {
pnum = ele.pnum;
btnselector = ele.btnselector;
btn = $('#' + id);
for (k = 1; k <= ele.pnum; k ++) {
btn = btn.parent();
}
btn = $(ele.btnselector, btn);
break;
}
}
var newEle = {};
newEle.id = id;
if (btn != false) {
newEle.btn = btn;
newEle.pnum = pnum;
newEle.btnselector = btnselector;
}
nv_recaptcha_elements.push(newEle);
});
reCaptchaLoadCallback();
}
});
} else {
$("#tip").attr("data-content", b).show("fast");
}
tip_active = 1;
Thực hiện tương tự cho hàm ftipShow
Thay đổi hàm change_captcha
để hỗ trợ reload ReCAPTCHA ví dụ:
function change_captcha(a) {
if (typeof nv_is_recaptcha != "undefined" && nv_is_recaptcha) {
for (i = 0, j = reCapIDs.length; i < j; i++) {
var ele = reCapIDs[i];
var btn = nv_recaptcha_elements[ele[0]];
if ($('#' + btn.id).length) {
if (typeof btn.btn != "undefined" && btn.btn != "") {
btn.btn.prop('disabled', true);
}
grecaptcha.reset(ele[1]);
}
}
reCaptchaLoadCallback();
} else {
$("img.captchaImg").attr("src", nv_base_siteurl + "index.php?scaptcha=captcha&nocache=" + nv_randomPassword(10));
"undefined" != typeof a && "" != a && $(a).val("");
}
return !1
}
Thêm giá trị callback
cho hàm modalShow
và modalShowByObj
: Đối chiếu với giao diện default để sửa.
Bổ sung hai hàm reCaptchaLoadCallback
và reCaptchaResCallback
:
var reCaptchaLoadCallback = function() {
for (i = 0, j = nv_recaptcha_elements.length; i < j; i++) {
var ele = nv_recaptcha_elements[i];
if ($('#' + ele.id).length && typeof reCapIDs[i] == "undefined") {
var size = '';
if (typeof ele.btn != "undefined" && ele.btn != "") {
ele.btn.prop('disabled', true);
}
if (typeof ele.size != "undefined" && ele.size == "compact") {
size = 'compact';
}
reCapIDs.push([
i, grecaptcha.render(ele.id, {
'sitekey': nv_recaptcha_sitekey,
'type': nv_recaptcha_type,
'size': size,
'callback': reCaptchaResCallback
})
]);
}
}
}
var reCaptchaResCallback = function() {
for (i = 0, j = reCapIDs.length; i < j; i++) {
var ele = reCapIDs[i];
var btn = nv_recaptcha_elements[ele[0]];
if ($('#' + btn.id).length) {
var res = grecaptcha.getResponse(ele[1]);
if (res != "") {
if (typeof btn.btn != "undefined" && btn.btn != "") {
btn.btn.prop('disabled', false);
}
}
}
}
}
Thay đổi cách xử lý khi hiển thị tip top và tip bottom ví dụ:
Thay:
$("[data-toggle=tip], [data-toggle=ftip]").click(function() {
var a = $(this).attr("data-target"),
d = $(a).html(),
b = $(this).attr("data-toggle"),
c = "tip" == b ? $("#tip").attr("data-content") : $("#ftip").attr("data-content");
a != c ? ("" != c && $('[data-target="' + c + '"]').attr("data-click", "y"), "tip" == b ? ($("#tip .bg").html(d), tipShow(this, a)) : ($("#ftip .bg").html(d), ftipShow(this, a))) : "n" == $(this).attr("data-click") ? "tip" == b ? tipHide() : ftipHide() : "tip" == b ? tipShow(this, a) : ftipShow(this, a);
return !1
});
Thành:
$("[data-toggle=tip], [data-toggle=ftip]").click(function() {
var a = $(this).attr("data-target"),
d = $(a).html(),
b = $(this).attr("data-toggle"),
c = "tip" == b ? $("#tip").attr("data-content") : $("#ftip").attr("data-content");
var callback = $(this).data("callback");
a != c ? ("" != c && $('[data-target="' + c + '"]').attr("data-click", "y"), "tip" == b ? ($("#tip .bg").html(d), tipShow(this, a, callback)) : ($("#ftip .bg").html(d), ftipShow(this, a, callback))) : "n" == $(this).attr("data-click") ? "tip" == b ? tipHide() : ftipHide() : "tip" == b ? tipShow(this, a, callback) : ftipShow(this, a, callback);
return !1
});
Bổ sung thao tác xử lý sau khi load:
if (typeof nv_is_recaptcha != "undefined" && nv_is_recaptcha && nv_recaptcha_elements.length > 0) {
var a = document.createElement("script");
a.type = "text/javascript";
a.async = !0;
a.src = "https://www.google.com/recaptcha/api.js?hl=" + nv_lang_interface + "&onload=reCaptchaLoadCallback&render=explicit";
var b = document.getElementsByTagName("script")[0];
b.parentNode.insertBefore(a, b);
}
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/banners
thì thực hiện các bước dưới đây:
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/js/banners.js
thì đối chiếu với file themes/default/js/banners.js
để sửa đổi.
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/banners/theme.php
thì đối chiếu với file modules/banners/theme.php
để sửa đổi.
Cập nhật global.banners.tpl
Mở themes/ten-giao-dien/modules/banners/global.banners.tpl:
Tìm:
<!-- END: type_image -->
Thêm xuống dưới:
<!-- BEGIN: bannerhtml -->
<div class="clearfix text-left">
{DATA.bannerhtml}
</div>
<!-- END: bannerhtml -->
Cập nhật logininfo.tpl
Mở themes/ten-giao-dien/modules/banners/logininfo.tpl:
Tìm:
<!-- END: captcha -->
Thêm xuống dưới:
<!-- BEGIN: recaptcha -->
<div class="form-group">
<label class="col-sm-6 control-label">{N_CAPTCHA}:</label>
<div class="col-xs-24">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="button"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent().parent())
})
</script>
</div>
</div>
<!-- END: recaptcha -->
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/comment
thì thực hiện các bước dưới đây:
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/js/comment.js
thì đối chiếu với file themes/default/js/comment.js
để sửa đổi.
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/comment/theme.php
thì đối chiếu với file modules/comment/theme.php
để sửa đổi.
Cập nhật main.tpl
Mở themes/ten-giao-dien/modules/comment/main.tpl:
Tìm:
<!-- END: captcha -->
Thêm xuống dưới:
<!-- BEGIN: recaptcha -->
<div class="form-group clearfix">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $("#buttoncontent", $('#{RECAPTCHA_ELEMENT}').parent().parent().parent())
})
</script>
</div>
<!-- END: recaptcha -->
Tìm:
<input id="buttoncontent" type="button" value="{LANG.comment_submit}" onclick="sendcommment('{MODULE_COMM}', '{MODULE_DATA}_commentcontent', '{AREA_COMM}', '{ID_COMM}', '{ALLOWED_COMM}', '{CHECKSS_COMM}', {GFX_NUM});" class="btn btn-primary" />
Thay lại thành:
<input id="buttoncontent" type="button" value="{LANG.comment_submit}" onclick="sendcommment(this, '{MODULE_COMM}', '{MODULE_DATA}_commentcontent', '{AREA_COMM}', '{ID_COMM}', '{ALLOWED_COMM}', '{CHECKSS_COMM}', {GFX_NUM});" class="btn btn-primary" />
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/contact
thì thực hiện các bước dưới đây:
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/js/contact.js
thì đối chiếu với file themes/default/js/contact.js
để sửa đổi.
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/contact/theme.php
thì đối chiếu với file modules/contact/theme.php
để sửa đổi.
Bổ sung giao diện block.supporter.tpl
Sao chép file themes/default/modules/contact/block.supporter.tpl
sang themes/ten-giao-dien/modules/contact/block.supporter.tpl
và chỉnh sửa lại cho hợp lý.
Cập nhật form.tpl
Mở themes/ten-giao-dien/modules/contact/form.tpl:
Tìm:
<input type="text" maxlength="60" value="{CONTENT.fphone}" name="fphone" class="form-control" placeholder="{LANG.phone}" />
</div>
</div>
Thêm xuống dưới:
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<em class="fa fa-home fa-lg fa-horizon"></em>
</span>
<input type="text" maxlength="60" value="{CONTENT.faddress}" name="faddress" class="form-control" placeholder="{LANG.address}" />
</div>
</div>
Tìm:
<div class="form-group">
<label><input type="checkbox" name="sendcopy" value="1" checked="checked" /><span>{LANG.sendcopy}</span></label>
</div>
Thêm xuống dưới:
<!-- BEGIN: captcha -->
Tìm:
<input type="text" placeholder="{LANG.captcha}" maxlength="{NV_GFX_NUM}" value="" name="fcode" class="fcode required form-control display-inline-block" style="width:100px;" data-pattern="/^(.){{NV_GFX_NUM},{NV_GFX_NUM}}$/" onkeypress="nv_validErrorHidden(this);" data-mess="{LANG.error_captcha}"/>
</div>
</div>
Thêm xuống dưới
<!-- END: captcha -->
<!-- BEGIN: recaptcha -->
<div class="form-group">
<div class="middle text-center clearfix">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent())
})
</script>
</div>
</div>
<!-- END: recaptcha -->
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/voting
thì thực hiện các bước dưới đây:
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/js/voting.js
thì đối chiếu với file themes/default/js/voting.js
để sửa đổi.
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/banners/theme.php
thì đối chiếu với file modules/voting/theme.php
để sửa đổi.
Cập nhật global.voting.tpl
Mở themes/ten-giao-dien/modules/voting/global.voting.tpl:
Tìm:
<input class="btn btn-success btn-sm" type="button" value="{VOTING.langsubmit}" onclick="nv_sendvoting(this.form, '{VOTING.vid}', '{VOTING.accept}', '{VOTING.checkss}', '{VOTING.errsm}');" />
<input class="btn btn-primary btn-sm" value="{VOTING.langresult}" type="button" onclick="nv_sendvoting(this.form, '{VOTING.vid}', 0, '{VOTING.checkss}', '');" />
Thay lại thànhL
<input class="btn btn-success btn-sm" type="button" value="{VOTING.langsubmit}" onclick="nv_sendvoting(this.form, '{VOTING.vid}', '{VOTING.accept}', '{VOTING.checkss}', '{VOTING.errsm}', '{VOTING.active_captcha}');" />
<input class="btn btn-primary btn-sm" value="{VOTING.langresult}" type="button" onclick="nv_sendvoting(this.form, '{VOTING.vid}', 0, '{VOTING.checkss}', '', '{VOTING.active_captcha}');" />
Tìm:
<!-- END: main -->
Thêm lên trên:
<!-- BEGIN: has_captcha -->
<div id="voting-modal-{VOTING.vid}" class="hidden">
<div class="clearfix">
<!-- BEGIN: basic -->
<div class="m-bottom">
<strong>{LANG.enter_captcha}</strong>
</div>
<div class="clearfix">
<div class="margin-bottom">
<div class="row">
<div class="col-xs-12">
<input type="text" class="form-control rsec" value="" name="captcha" maxlength="{GFX_MAXLENGTH}"/>
</div>
<div class="col-xs-12">
<img class="captchaImg display-inline-block" src="{SRC_CAPTCHA}" height="32" alt="{N_CAPTCHA}" title="{N_CAPTCHA}" />
<em class="fa fa-pointer fa-refresh margin-left margin-right" title="{CAPTCHA_REFRESH}" onclick="change_captcha('.rsec');"></em>
</div>
</div>
</div>
</div>
<!-- END: basic -->
<!-- BEGIN: recaptcha -->
<div class="m-bottom text-center">
<strong>{N_CAPTCHA}</strong>
</div>
<div class="margin-bottom clearfix">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}" data-toggle="recaptcha"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent()),
pnum: 3,
btnselector: '[name="submit"]'
})
</script>
</div>
<!-- END: recaptcha -->
<input type="button" name="submit" class="btn btn-primary btn-block" value="{VOTING.langsubmit}" onclick="nv_sendvoting_captcha(this, {VOTING.vid}, '{LANG.enter_captcha_error}');"/>
</div>
</div>
<!-- END: has_captcha -->
Cập nhật main.tpl
Mở themes/ten-giao-dien/modules/voting/main.tpl:
Tìm:
<input class="btn btn-success btn-sm" type="button" value="{VOTING.langsubmit}" onclick="nv_sendvoting(this.form, '{VOTING.vid}', '{VOTING.accept}', '{VOTING.checkss}', '{VOTING.errsm}');" />
<input class="btn btn-primary btn-sm" type="button" value="{VOTING.langresult}" onclick="nv_sendvoting(this.form, '{VOTING.vid}', 0, '{VOTING.checkss}', '');"/>
Thay lại thành:
<input class="btn btn-success btn-sm" type="button" value="{VOTING.langsubmit}" onclick="nv_sendvoting(this.form, '{VOTING.vid}', '{VOTING.accept}', '{VOTING.checkss}', '{VOTING.errsm}', '{VOTING.active_captcha}');" />
<input class="btn btn-primary btn-sm" type="button" value="{VOTING.langresult}" onclick="nv_sendvoting(this.form, '{VOTING.vid}', 0, '{VOTING.checkss}', '', '{VOTING.active_captcha}');"/>
Tìm:
<!-- END: loop -->
Thêm lên trên:
<!-- BEGIN: has_captcha -->
<div id="voting-modal-{VOTING.vid}" class="hidden">
<div class="clearfix">
<!-- BEGIN: basic -->
<div class="m-bottom">
<strong>{LANG.enter_captcha}</strong>
</div>
<div class="clearfix">
<div class="margin-bottom">
<div class="row">
<div class="col-xs-12">
<input type="text" class="form-control rsec" value="" name="captcha" maxlength="{GFX_MAXLENGTH}"/>
</div>
<div class="col-xs-12">
<img class="captchaImg display-inline-block" src="{SRC_CAPTCHA}" height="32" alt="{N_CAPTCHA}" title="{N_CAPTCHA}" />
<em class="fa fa-pointer fa-refresh margin-left margin-right" title="{CAPTCHA_REFRESH}" onclick="change_captcha('.rsec');"></em>
</div>
</div>
</div>
</div>
<!-- END: basic -->
<!-- BEGIN: recaptcha -->
<div class="m-bottom text-center">
<strong>{N_CAPTCHA}</strong>
</div>
<div class="margin-bottom clearfix">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}" data-toggle="recaptcha"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent()),
pnum: 3,
btnselector: '[name="submit"]'
})
</script>
</div>
<!-- END: recaptcha -->
<input type="button" name="submit" class="btn btn-primary btn-block" value="{VOTING.langsubmit}" onclick="nv_sendvoting_captcha(this, {VOTING.vid}, '{LANG.enter_captcha_error}');"/>
</div>
</div>
<!-- END: has_captcha -->
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/news
thì thực hiện các bước dưới đây:
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/js/news.js
thì đối chiếu với file themes/default/js/news.js
để sửa đổi.
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/news/theme.php
thì đối chiếu với file modules/news/theme.php
để sửa đổi.
Cập nhật block_groups.tpl
Mở themes/ten-giao-dien/modules/news/block_groups.tpl:
Tìm khoảng dòng 6:
<a href="{ROW.link}" title="{ROW.title}"><img src="{ROW.thumb}" alt="{ROW.title}" width="{ROW.blockwidth}" class="img-thumbnail pull-left"/></a>
Thay lại thành:
<a href="{ROW.link}" title="{ROW.title}" {ROW.target_blank} ><img src="{ROW.thumb}" alt="{ROW.title}" width="{ROW.blockwidth}" class="img-thumbnail pull-left"/></a>
Tìm khoảng dòng 8:
<a {TITLE} class="show" href="{ROW.link}" data-content="{ROW.hometext}" data-img="{ROW.thumb}" data-rel="block_tooltip">{ROW.title}</a>
Thay lại thành:
<a {TITLE} class="show" href="{ROW.link}" {ROW.target_blank} data-content="{ROW.hometext_clean}" data-img="{ROW.thumb}" data-rel="block_tooltip">{ROW.title_clean}</a>
Cập nhật block_headline.tpl
Mở themes/ten-giao-dien/modules/news/block_headline.tpl:
Tìm khoảng dòng 11:
<a title="{HOTSNEWS.title}" href="{HOTSNEWS.link}"><img class="img-responsive" id="slImg{HOTSNEWS.imgID}" src="{PIX_IMG}" alt="{HOTSNEWS.image_alt}" /></a><h3><a title="{HOTSNEWS.title}" href="{HOTSNEWS.link}">{HOTSNEWS.title}</a></h3>
Thay lại thành:
<a title="{HOTSNEWS.title}" href="{HOTSNEWS.link}" {HOTSNEWS.target_blank}><img class="img-responsive" id="slImg{HOTSNEWS.imgID}" src="{PIX_IMG}" alt="{HOTSNEWS.image_alt}" /></a><h3><a title="{HOTSNEWS.title}" href="{HOTSNEWS.link}" {HOTSNEWS.target_blank}>{HOTSNEWS.title}</a></h3>
Tìm khoảng dòng 33:
<a {TITLE} class="show" href="{LASTEST.link}" data-content="{LASTEST.hometext}" data-img="{LASTEST.homeimgfile}" data-rel="block_headline_tooltip">{LASTEST.title}</a>
Thay lại thành:
<a {TITLE} class="show" href="{LASTEST.link}" {LASTEST.target_blank} data-content="{LASTEST.hometext_clean}" data-img="{LASTEST.homeimgfile}" data-rel="block_headline_tooltip">{LASTEST.title}</a>
Cập nhật block_news.tpl
Mở themes/ten-giao-dien/modules/news/block_news.tpl:
Tìm khoảng dòng 6:
<a title="{blocknews.title}" href="{blocknews.link}"><img src="{blocknews.imgurl}" alt="{blocknews.title}" width="{blocknews.width}" class="img-thumbnail pull-left"/></a>
Thay lại thành:
<a title="{blocknews.title}" href="{blocknews.link}" {blocknews.target_blank}><img src="{blocknews.imgurl}" alt="{blocknews.title}" width="{blocknews.width}" class="img-thumbnail pull-left"/></a>
Tìm khoảng dòng 8:
<a {TITLE} class="show" href="{blocknews.link}" data-content="{blocknews.hometext}" data-img="{blocknews.imgurl}" data-rel="block_news_tooltip">{blocknews.title}</a>
Thay lại thành:
<a {TITLE} class="show" href="{blocknews.link}" {blocknews.target_blank} data-content="{blocknews.hometext_clean}" data-img="{blocknews.imgurl}" data-rel="block_news_tooltip">{blocknews.title}</a>
Cập nhật block_newscenter.tpl
Mở themes/ten-giao-dien/modules/news/block_newscenter.tpl:
Tìm khoảng dòng 7 đến dòng 9:
<div class="margin-bottom text-center"><a href="{main.link}"><img src="{main.imgsource}" alt="{main.title}" width="{main.width}" class="img-thumbnail"/></a></div>
<h2 class="margin-bottom-sm"><a href="{main.link}" title="{main.title}">{main.titleclean60}</a></h2>
<p>{main.hometext}</p>
Thay lại thành:
<div class="margin-bottom text-center"><a href="{main.link}" title="{main.link}" {main.target_blank}><img src="{main.imgsource}" alt="{main.title}" width="{main.width}" class="img-thumbnail"/></a></div>
<h2 class="margin-bottom-sm"><a href="{main.link}" title="{main.title}" {main.target_blank}>{main.titleclean60}</a></h2>
{main.hometext}
Tìm khoảng dòng 16:
<a class="show black h4" href="{othernews.link}" <!-- BEGIN: tooltip -->data-placement="{TOOLTIP_POSITION}" data-content="{othernews.hometext}" data-img="{othernews.imgsource}" data-rel="tooltip"<!-- END: tooltip --> title="{othernews.title}" ><img src="{othernews.imgsource}" alt="{othernews.title}" class="img-thumbnail pull-right margin-left-sm" style="width:65px;"/>{othernews.titleclean60}</a>
Thay lại thành:
<a class="show black h4" href="{othernews.link}" {othernews.target_blank} <!-- BEGIN: tooltip -->data-placement="{TOOLTIP_POSITION}" data-content="{othernews.hometext_clean}" data-img="{othernews.imgsource}" data-rel="tooltip"<!-- END: tooltip --> title="{othernews.title}" ><img src="{othernews.imgsource}" alt="{othernews.title}" class="img-thumbnail pull-right margin-left-sm" style="width:65px;"/>{othernews.titleclean60}</a>
Cập nhật block_tophits.tpl
Mở themes/ten-giao-dien/modules/news/block_tophits.tpl:
Tìm khoảng dòng 6:
<a title="{blocknews.title}" href="{blocknews.link}"><img src="{blocknews.imgurl}" alt="{blocknews.title}" width="{blocknews.width}" class="img-thumbnail pull-left"/></a>
Thay lại thành:
<a title="{blocknews.title}" href="{blocknews.link}" {blocknews.target_blank}><img src="{blocknews.imgurl}" alt="{blocknews.title}" width="{blocknews.width}" class="img-thumbnail pull-left"/></a>
Tìm khoảng dòng 8:
<a {TITLE} class="show" href="{blocknews.link}" data-content="{blocknews.hometext}" data-img="{blocknews.imgurl}" data-rel="block_news_tooltip">{blocknews.title}</a>
Thay lại thành:
<a {TITLE} class="show" href="{blocknews.link}" {blocknews.target_blank} data-content="{blocknews.hometext_clean}" data-img="{blocknews.imgurl}" data-rel="block_news_tooltip">{blocknews.title}</a>
Cập nhật content.tpl
Mở themes/ten-giao-dien/modules/news/content.tpl:
Tìm khoảng dòng 107:
<input maxlength="255" value="{DATA.keywords}" name="keywords" type="text" class="form-control" />
</div>
</div>
Thêm xuống dưới:
<!-- BEGIN: captcha -->
Tìm khoảng dòng 118 đến dòng 119:
<br />
Thay lại thành:
<!-- END: captcha -->
<!-- BEGIN: recaptcha -->
<div class="form-group">
<label class="col-sm-4 control-label">{N_CAPTCHA} <span class="txtrequired">(*)</span></label>
<div class="col-sm-20">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent())
})
</script>
</div>
</div>
<!-- END: recaptcha -->
Cập nhật detail.tpl
Mở themes/ten-giao-dien/modules/news/detail.tpl:
Tìm khoảng dòng 19:
<li><a class="dimgray" title="{LANG.print}" href="javascript: void(0)" onclick="nv_open_browse('{URL_PRINT}','{TITLE}',840,500,'resizable=yes,scrollbars=yes,toolbar=no,location=no,status=no');return false"><em class="fa fa-print fa-lg"> </em></a></li>
Thay lại thành:
<li><a class="dimgray" rel="nofollow" title="{LANG.print}" href="javascript: void(0)" onclick="nv_open_browse('{URL_PRINT}','{TITLE}',840,500,'resizable=yes,scrollbars=yes,toolbar=no,location=no,status=no');return false"><em class="fa fa-print fa-lg"> </em></a></li>
Tìm khoảng dòng 22:
<li><a class="dimgray" title="{LANG.savefile}" href="{URL_SAVEFILE}"><em class="fa fa-save fa-lg"> </em></a></li>
Thay lại thành:
<li><a class="dimgray" rel="nofollow" title="{LANG.savefile}" href="{URL_SAVEFILE}"><em class="fa fa-save fa-lg"> </em></a></li>
Tìm khoảng dòng 109 đến dòng 110:
<span itemprop="rating">{DETAIL.numberrating}</span> -
<span itemprop="votes">{DETAIL.click_rating}</span> {LANG.rating_count}
Thay lại thành:
<span itemprop="rating" id="numberrating">{DETAIL.numberrating}</span> -
<span itemprop="votes" id="click_rating">{DETAIL.click_rating}</span> {LANG.rating_count}
Tìm khoảng dòng 176:
<a href="{TOPIC.link}" <!-- BEGIN: tooltip -->data-placement="{TOOLTIP_POSITION}" data-content="{TOPIC.hometext}" data-img="{TOPIC.imghome}" data-rel="tooltip"<!-- END: tooltip --> title="{TOPIC.title}">{TOPIC.title}</a>
Thay lại thành:
<a href="{TOPIC.link}" {TOPIC.target_blank} <!-- BEGIN: tooltip -->data-placement="{TOOLTIP_POSITION}" data-content="{TOPIC.hometext_clean}" data-img="{TOPIC.imghome}" data-rel="tooltip"<!-- END: tooltip --> title="{TOPIC.title}"><h4>{TOPIC.title}</h4></a>
Tìm khoảng dòng 198:
<a href="{RELATED_NEW.link}" <!-- BEGIN: tooltip -->data-placement="{TOOLTIP_POSITION}" data-content="{RELATED_NEW.hometext}" data-img="{RELATED_NEW.imghome}" data-rel="tooltip"<!-- END: tooltip --> title="{RELATED_NEW.title}">{RELATED_NEW.title}</a>
Thay lại thành:
<a href="{RELATED_NEW.link}" {RELATED_NEW.target_blank} <!-- BEGIN: tooltip -->data-placement="{TOOLTIP_POSITION}" data-content="{RELATED_NEW.hometext_clean}" data-img="{RELATED_NEW.imghome}" data-rel="tooltip"<!-- END: tooltip --> title="{RELATED_NEW.title}"><h4>{RELATED_NEW.title}</h4></a>
Tìm khoảng dòng 216:
<a class="list-inline" href="{RELATED.link}"<!-- BEGIN: tooltip --> data-placement="{TOOLTIP_POSITION}" data-content="{RELATED.hometext}" data-img="{RELATED.imghome}" data-rel="tooltip"<!-- END: tooltip --> title="{RELATED.title}">{RELATED.title}</a>
Thay lại thành:
<a href="{RELATED.link}" {RELATED.target_blank} <!-- BEGIN: tooltip --> data-placement="{TOOLTIP_POSITION}" data-content="{RELATED.hometext_clean}" data-img="{RELATED.imghome}" data-rel="tooltip"<!-- END: tooltip --> title="{RELATED.title}"><h4>{RELATED.title}</h4></a>
Cập nhật search.tpl
Mở themes/ten-giao-dien/modules/news/search.tpl:
Tìm khoảng dòng 113:
<h3><a href="{LINK}">{TITLEROW}</a></h3>
Thay lại thành:
<h3><a href="{LINK}" title="{TITLEROW}" {TARGET_BLANK}>{TITLEROW}</a></h3>
Cập nhật sendmail.tpl
Mở themes/ten-giao-dien/modules/news/sendmail.tpl:
Tìm khoảng dòng 72:
<!-- END: captcha -->
Thêm xuống dưới:
<!-- BEGIN: recaptcha -->
<div class="form-group">
<label for="semail" class="col-sm-4 control-label">{N_CAPTCHA}<em>*</em></label>
<div class="col-sm-20">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent())
})
</script>
</div>
</div>
<!-- END: recaptcha -->
Cập nhật topic.tpl
Mở themes/ten-giao-dien/modules/news/topic.tpl:
Tìm khoảng dòng 18:
<a href="{TOPIC.link}" title="{TOPIC.title}"><img alt="{TOPIC.alt}" src="{TOPIC.src}" width="{TOPIC.width}" class="img-thumbnail pull-left imghome" /></a>
Thay lại thành:
<a href="{TOPIC.link}" title="{TOPIC.title}" {TOPIC.target_blank}><img alt="{TOPIC.alt}" src="{TOPIC.src}" width="{TOPIC.width}" class="img-thumbnail pull-left imghome" /></a>
Tìm khoảng dòng 20:
<h3><a href="{TOPIC.link}" title="{TOPIC.title}">{TOPIC.title}</a></h3>
Thay lại thành:
<h3><a href="{TOPIC.link}" title="{TOPIC.title}" {TOPIC.target_blank}>{TOPIC.title}</a></h3>
Tìm khoảng dòng 39:
<a title="{TOPIC_OTHER.title}" href="{TOPIC_OTHER.link}">{TOPIC_OTHER.title}</a>
Thay lại thành:
<a title="{TOPIC_OTHER.title}" href="{TOPIC_OTHER.link}" {TOPIC_OTHER.target_blank}>{TOPIC_OTHER.title}</a>
Cập nhật viewcat_grid.tpl
Mở themes/ten-giao-dien/modules/news/viewcat_grid.tpl:
Tìm khoảng dòng 19:
<a href="{CONTENT.link}" title="{CONTENT.title}"><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="150px" class="img-thumbnail pull-left imghome" /></a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="150px" class="img-thumbnail pull-left imghome" /></a>
Tìm khoảng dòng 22:
<a href="{CONTENT.link}" title="{CONTENT.title}">{CONTENT.title}</a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm khoảng dòng 55:
<a title="{CONTENT.title}" href="{CONTENT.link}"><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail"/></a>
Thay lại thành:
<a title="{CONTENT.title}" href="{CONTENT.link}" {CONTENT.target_blank}><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail"/></a>
Tìm khoảng dòng 57:
<h4><a class="show" href="{CONTENT.link}" <!-- BEGIN: tooltip -->data-content="{CONTENT.hometext_clean}" data-img="" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{CONTENT.title}">{CONTENT.title}</a></h4>
Thay lại thành:
<h4><a class="show" href="{CONTENT.link}" {CONTENT.target_blank} <!-- BEGIN: tooltip -->data-content="{CONTENT.hometext_clean}" data-img="" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{CONTENT.title}">{CONTENT.title}</a></h4>
Cập nhật viewcat_list.tpl
Mở themes/ten-giao-dien/modules/news/viewcat_list.tpl:
Tìm khoảng dòng 17:
<a class="show h4" href="{CONTENT.link}" <!-- BEGIN: tooltip -->data-content="{CONTENT.hometext}" data-img="{CONTENT.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{CONTENT.title}">
Thay lại thành:
<a class="show h4" href="{CONTENT.link}" {CONTENT.target_blank} <!-- BEGIN: tooltip -->data-content="{CONTENT.hometext_clean}" data-img="{CONTENT.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{CONTENT.title}">
Cập nhật viewcat_main_bottom.tpl
Mở themes/ten-giao-dien/modules/news/viewcat_main_bottom.tpl:
Tìm khoảng dòng 23:
<a href="{CONTENT.link}" title="{CONTENT.title}"><img alt="{HOMEIMGALT}" src="{HOMEIMG}" width="{IMGWIDTH}" class="img-thumbnail pull-left imghome" /></a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}><img alt="{HOMEIMGALT}" src="{HOMEIMG}" width="{IMGWIDTH}" class="img-thumbnail pull-left imghome" /></a>
Tìm khoảng dòng 26:
<a href="{CONTENT.link}" title="{CONTENT.title}">{CONTENT.title}</a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm khoảng dòng 40 đến dòng 42:
<p>
{CONTENT.hometext}
</p>
Thay lại thành:
{CONTENT.hometext}
Tìm khoảng dòng 53:
<a class="show h4" href="{OTHER.link}" <!-- BEGIN: tooltip -->data-content="{OTHER.hometext}" data-img="{OTHER.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{OTHER.title}">{OTHER.title}</a>
Thay lại thành:
<a class="show h4" href="{OTHER.link}" {OTHER.target_blank} <!-- BEGIN: tooltip -->data-content="{OTHER.hometext_clean}" data-img="{OTHER.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{OTHER.title}">{OTHER.title}</a>
Cập nhật viewcat_main_left.tpl
Mở themes/ten-giao-dien/modules/news/viewcat_main_left.tpl:
Tìm khoảng dòng 28:
<a class="show h4" href="{OTHER.link}" <!-- BEGIN: tooltip -->data-content="{OTHER.hometext}" data-img="{OTHER.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{OTHER.title}">{OTHER.title}</a>
Thay lại thành:
<a class="show h4" href="{OTHER.link}" {OTHER.target_blank} <!-- BEGIN: tooltip -->data-content="{OTHER.hometext_clean}" data-img="{OTHER.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{OTHER.title}">{OTHER.title}</a>
Tìm khoảng dòng 37:
<a title="{CONTENT.title}" href="{CONTENT.link}"><img src="{HOMEIMG}" alt="{HOMEIMGALT}" width="{IMGWIDTH}" class="img-thumbnail pull-left imghome" /></a>
Thay lại thành:
<a title="{CONTENT.title}" href="{CONTENT.link}" {CONTENT.target_blank}><img src="{HOMEIMG}" alt="{HOMEIMGALT}" width="{IMGWIDTH}" class="img-thumbnail pull-left imghome" /></a>
Tìm khoảng dòng 40:
<a title="{CONTENT.title}" href="{CONTENT.link}">{CONTENT.title}</a>
Thay lại thành:
<a title="{CONTENT.title}" href="{CONTENT.link}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm khoảng dòng 54:
<p>{CONTENT.hometext}</p>
Thay lại thành:
{CONTENT.hometext}
Cập nhật viewcat_main_right.tpl
Mở themes/ten-giao-dien/modules/news/viewcat_main_right.tpl:
Tìm khoảng dòng 25:
<a title="{CONTENT.title}" href="{CONTENT.link}"><img src="{HOMEIMG}" alt="{HOMEIMGALT}" width="{IMGWIDTH}" class="img-thumbnail pull-left imghome" /></a>
Thay lại thành:
<a title="{CONTENT.title}" href="{CONTENT.link}" {CONTENT.target_blank}><img src="{HOMEIMG}" alt="{HOMEIMGALT}" width="{IMGWIDTH}" class="img-thumbnail pull-left imghome" /></a>
Tìm khoảng dòng 28:
<a title="{CONTENT.title}" href="{CONTENT.link}">{CONTENT.title}</a>
Thay lại thành:
<a title="{CONTENT.title}" href="{CONTENT.link}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm khoảng dòng 42:
<p>{CONTENT.hometext}</p>
Thay lại thành:
{CONTENT.hometext}
Tìm khoảng dòng 50:
<a class="show h4" href="{OTHER.link}" title="{OTHER.title}" <!-- BEGIN: tooltip -->data-content="{OTHER.hometext}" data-img="{OTHER.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip -->>{OTHER.title}</a>
Thay lại thành:
<a class="show h4" href="{OTHER.link}" title="{OTHER.title}" {OTHER.target_blank} <!-- BEGIN: tooltip -->data-content="{OTHER.hometext_clean}" data-img="{OTHER.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> >{OTHER.title}</a>
Cập nhật viewcat_page.tpl
Mở themes/ten-giao-dien/modules/news/viewcat_page.tpl:
Tìm khoảng dòng 19:
<a href="{CONTENT.link}" title="{CONTENT.title}"><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail pull-left imghome" /></a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail pull-left imghome" /></a>
Tìm khoảng dòng 22:
<a href="{CONTENT.link}" title="{CONTENT.title}">{CONTENT.title}</a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm khoảng dòng 40 đến dòng 42:
<p>
{CONTENT.hometext}
</p>
Thay lại thành:
{CONTENT.hometext}
Tìm khoảng dòng 55:
<a href="{CONTENT.link}" title="{CONTENT.title}"><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail pull-left imghome" /></a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail pull-left imghome" /></a>
Tìm khoảng dòng 58:
<a href="{CONTENT.link}" title="{CONTENT.title}">{CONTENT.title}</a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm khoảng dòng 72 đến dòng 74:
<p>
{CONTENT.hometext}
</p>
Thay lại thành:
{CONTENT.hometext}
Tìm khoảng dòng 91:
<em class="fa fa-angle-right"> </em><a href="{RELATED.link}" title="{RELATED.title}">{RELATED.title} <em>({RELATED.publtime}) </em></a>
Thay lại thành:
<em class="fa fa-angle-right"> </em><a href="{RELATED.link}" title="{RELATED.title}" {EXTLINK}>{RELATED.title} <em>({RELATED.publtime}) </em></a>
Cập nhật viewcat_top.tpl
Mở themes/ten-giao-dien/modules/news/viewcat_top.tpl:
Tìm khoảng dòng 18:
<a href="{CONTENT.link}" title="{CONTENT.title}"><img id="imghome" alt="{HOMEIMGALT0}" src="{HOMEIMG0}" width="{IMGWIDTH0}" class="img-thumbnail pull-left imghome" /></a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}><img id="imghome" alt="{HOMEIMGALT0}" src="{HOMEIMG0}" width="{IMGWIDTH0}" class="img-thumbnail pull-left imghome" /></a>
Tìm khoảng dòng 21:
<a href="{CONTENT.link}" title="{CONTENT.title}">{CONTENT.title}</a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm khoảng dòng 48:
<em class="fa fa-angle-right"> </em><a title="{CONTENT.title}" href="{CONTENT.link}">{CONTENT.title}</a>
Thay lại thành:
<em class="fa fa-angle-right"> </em><a title="{CONTENT.title}" href="{CONTENT.link}" {CONTENT.target_blank}>{CONTENT.title}</a>
Cập nhật viewcat_two_column.tpl
Mở themes/ten-giao-dien/modules/news/viewcat_two_column.tpl:
Tìm khoảng dòng 19:
<a href="{NEWSTOP.link}" title="{NEWSTOP.title}"><img alt="{HOMEIMGALT0}" src="{HOMEIMG0}" width="{IMGWIDTH0}" class="img-thumbnail pull-left imghome" /></a>
Thay lại thành:
<a href="{NEWSTOP.link}" title="{NEWSTOP.title}" {NEWSTOP.target_blank}><img alt="{HOMEIMGALT0}" src="{HOMEIMG0}" width="{IMGWIDTH0}" class="img-thumbnail pull-left imghome" /></a>
Tìm khoảng dòng 22:
<a href="{NEWSTOP.link}" title="{NEWSTOP.title}">{NEWSTOP.title}</a>
Thay lại thành:
<a href="{NEWSTOP.link}" title="{NEWSTOP.title}" {NEWSTOP.target_blank}>{NEWSTOP.title}</a>
Tìm khoảng dòng 49:
<a class="show h4" href="{NEWSTOP.link}" <!-- BEGIN: tooltip -->data-content="{NEWSTOP.hometext}" data-img="{NEWSTOP.imghome}" data-placement="{TOOLTIP_POSITION}" data-rel="tooltip"<!-- END: tooltip --> title="{NEWSTOP.title}">{NEWSTOP.title}</a>
Thay lại thành:
<a class="show h4" href="{NEWSTOP.link}" {NEWSTOP.target_blank} <!-- BEGIN: tooltip -->data-content="{NEWSTOP.hometext_clean}" data-img="{NEWSTOP.imghome}" data-placement="{TOOLTIP_POSITION}" data-rel="tooltip"<!-- END: tooltip --> title="{NEWSTOP.title}">{NEWSTOP.title}</a>
Tìm khoảng dòng 67:
<a href="{CONTENT.link}" title="{CONTENT.title}">{CONTENT.title}</a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm khoảng dòng 82:
<a href="{CONTENT.link}" title="{CONTENT.title}"><img alt="{HOMEIMGALT01}" src="{HOMEIMG01}" width="{IMGWIDTH0}" class="img-thumbnail pull-left imghome" /></a>
Thay lại thành:
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}><img alt="{HOMEIMGALT01}" src="{HOMEIMG01}" width="{IMGWIDTH0}" class="img-thumbnail pull-left imghome" /></a>
Tìm khoảng dòng 94:
<a class="show h4" href="{CONTENT.link}" <!-- BEGIN: tooltip -->data-content="{CONTENT.hometext}" data-img="{CONTENT.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{CONTENT.title}">{CONTENT.title}</a>
Thay lại thành:
<a class="show h4" href="{CONTENT.link}" {CONTENT.target_blank} <!-- BEGIN: tooltip -->data-content="{CONTENT.hometext_clean}" data-img="{CONTENT.imghome}" data-rel="tooltip" data-placement="{TOOLTIP_POSITION}"<!-- END: tooltip --> title="{CONTENT.title}">{CONTENT.title}</a>
Tìm khoảng dòng 128:
$(window).load(function(){
Thay lại thành:
$(window).on('load', function() {
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/seek
thì thực hiện các bước dưới đây:
Cập nhật form.tpl
Mở themes/ten-giao-dien/modules/seek/form.tpl:
Tìm:
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
Thay lại thành:
<script src="//www.google.com/jsapi" type="text/javascript"></script>
Tìm:
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
Thay lại thành:
<link rel="stylesheet" href="//www.google.com/cse/style/look/default.css" type="text/css" />
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/users
thì thực hiện các bước dưới đây:
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/js/users.js
thì đối chiếu với file themes/default/js/users.js
để sửa đổi.
Nếu giao diện của bạn có tồn tại themes/ten-giao-dien/modules/users/theme.php
thì đối chiếu với file modules/users/theme.php
để sửa đổi.
Cập nhật avatar.tpl
Mở themes/ten-giao-dien/modules/users/avatar.tpl:
Tìm khoảng dòng 2 đến dòng 3:
<script src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery/jquery.Jcrop.min.js" type="text/javascript"></script>
<link href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery/jquery.Jcrop.min.css" rel="stylesheet" type="text/css" />
Thay lại thành:
<link type="text/css"href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/cropper/cropper.min.css" rel="stylesheet" />
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/cropper/cropper.min.js"></script>
Tìm khoảng dòng 37 đến dòng 42:
<input type="hidden" id="x1" name="x1"/>
<input type="hidden" id="y1" name="y1"/>
<input type="hidden" id="x2" name="x2"/>
<input type="hidden" id="y2" name="y2"/>
<input type="hidden" id="w" name="w"/>
<input type="hidden" id="h" name="h"/>
Thay lại thành:
<input type="hidden" id="crop_x" name="crop_x"/>
<input type="hidden" id="crop_y" name="crop_y"/>
<input type="hidden" id="crop_width" name="crop_width"/>
<input type="hidden" id="crop_height" name="crop_height"/>
Cập nhật block.login.tpl
Mở themes/ten-giao-dien/modules/users/block.login.tpl:
Tìm khoảng dòng 4:
<button type="button" class="login btn btn-success btn-sm" onclick="modalShowByObj('#guestLogin_{BLOCKID}')">
Thay lại thành:
<button type="button" class="login btn btn-success btn-sm" onclick="modalShowByObj('#guestLogin_{BLOCKID}', 'recaptchareset')">
Tìm khoảng dòng 8:
<button type="button" class="register btn btn-primary btn-sm" onclick="modalShowByObj('#guestReg_{BLOCKID}')">
Thay lại thành:
<button type="button" class="register btn btn-primary btn-sm" onclick="modalShowByObj('#guestReg_{BLOCKID}', 'recaptchareset')">
Cập nhật block.user_button.tpl
Mở themes/ten-giao-dien/modules/users/block.user_button.tpl:
Tìm khoảng dòng 2:
<span><a title="{GLANG.signin} - {GLANG.register}" class="pa pointer button" data-toggle="tip" data-target="#guestBlock_{BLOCKID}" data-click="y"><em class="fa fa-user fa-lg"></em><span class="hidden">{GLANG.signin}</span></a></span>
Thay lại thành:
<span><a title="{GLANG.signin} - {GLANG.register}" class="pa pointer button" data-toggle="tip" data-target="#guestBlock_{BLOCKID}" data-click="y" data-callback="recaptchareset"><em class="fa fa-user fa-lg"></em><span class="hidden">{GLANG.signin}</span></a></span>
Cập nhật confirm.tpl
Mở themes/ten-giao-dien/modules/users/confirm.tpl:
Tìm khoảng dòng 32:
<!-- END: captcha -->
Thêm xuống dưới:
<!-- BEGIN: recaptcha -->
<div class="form-group">
<div class="middle text-center clearfix">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent())
})
</script>
</div>
</div>
<!-- END: recaptcha -->
Tìm khoảng dòng 34:
<input name="openid_account_confirm" value="1" type="hidden" />
Thêm xuống dưới
<!-- BEGIN: redirect --><input name="nv_redirect" value="{REDIRECT}" type="hidden" /><!-- END: redirect -->
Cập nhật info.tpl
Mở themes/ten-giao-dien/modules/users/info.tpl:
Tìm khoảng dòng 13:
<!-- BEGIN: edit_password --><li class="{PASSWORD_ACTIVE}"><a data-toggle="tab" data-location="{EDITINFO_FORM}/password" href="#edit_password">{LANG.edit_password}</a></li><!-- END: edit_password -->
Thêm xuống dưới:
<!-- BEGIN: 2step --><li><a href="{URL_2STEP}">{LANG.2step_status}</a></li><!-- END: 2step -->
Cập nhật login_form.tpl
Mở themes/ten-theme/modules/users/login_form.tpl
đối chiếu với themes/default/modules/users/login_form.tpl
để chỉnh sửa phù hợp do có nhiều thay đổi.
Cập nhật lostactivelink.tpl
Mở themes/ten-giao-dien/modules/users/lostactivelink.tpl:
Tìm:
<div class="form-group">
<div class="middle text-right clearfix">
<img class="captchaImg display-inline-block" src="{SRC_CAPTCHA}" width="{GFX_WIDTH}" height="{GFX_HEIGHT}" alt="{N_CAPTCHA}" title="{N_CAPTCHA}" /><em class="fa fa-pointer fa-refresh margin-left margin-right" title="{CAPTCHA_REFRESH}" onclick="change_captcha('.bsec');"></em><input type="text" style="width:100px;" class="bsec required form-control display-inline-block" name="nv_seccode" value="" maxlength="{GFX_MAXLENGTH}" placeholder="{GLANG.securitycode}" data-pattern="/^(.){{GFX_MAXLENGTH},{GFX_MAXLENGTH}}$/" onkeypress="validErrorHidden(this);" data-mess="{GLANG.securitycodeincorrect}" />
</div>
</div>
Thêm lên trên:
<!-- BEGIN: captcha -->
Thêm xuống dưới:
<!-- END: captcha -->
<!-- BEGIN: recaptcha -->
<div class="form-group">
<div class="middle text-center clearfix">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent())
})
</script>
</div>
</div>
<!-- END: recaptcha -->
Cập nhật lostpass_form.tpl
Tìm:
<div class="form-group">
<div class="middle text-right clearfix">
<img class="captchaImg display-inline-block" src="{SRC_CAPTCHA}" width="{GFX_WIDTH}" height="{GFX_HEIGHT}" alt="{N_CAPTCHA}" title="{N_CAPTCHA}" /><em class="fa fa-pointer fa-refresh margin-left margin-right" title="{CAPTCHA_REFRESH}" onclick="change_captcha('.bsec');"></em><input type="text" style="width:100px;" class="bsec required form-control display-inline-block" name="nv_seccode" value="" maxlength="{GFX_MAXLENGTH}" placeholder="{GLANG.securitycode}" data-pattern="/^(.){{GFX_MAXLENGTH},{GFX_MAXLENGTH}}$/" onkeypress="validErrorHidden(this);" data-mess="{GLANG.securitycodeincorrect}" />
</div>
</div>
Thêm lên trên:
<!-- BEGIN: captcha -->
Thêm xuống dưới
<!-- END: captcha -->
<!-- BEGIN: recaptcha -->
<div class="form-group">
<div class="middle text-right clearfix">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent().parent())
})
</script>
</div>
</div>
<!-- END: recaptcha -->
Cập nhật openid_login.tpl
Mở themes/ten-giao-dien/modules/users/openid_login.tpl:
Tìm:
<!-- END: captcha -->
Thêm xuống dưới:
<!-- BEGIN: recaptcha -->
<div class="form-group">
<div class="middle text-center clearfix">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent())
})
</script>
</div>
</div>
<!-- END: recaptcha -->
Cập nhật register_form.tpl
Mở themes/ten-giao-dien/modules/users/register_form.tpl:
Tìm:
<!-- BEGIN: agreecheck -->
<div>
<div>
<div class="form-group text-center check-box required" data-mess="">
<input type="checkbox" name="agreecheck" value="1" class="fix-box" onclick="validErrorHidden(this,3);"/>{LANG.accept2} <a onclick="usageTermsShow('{LANG.usage_terms}');" href="javascript:void(0);"><span class="btn btn-default btn-xs">{LANG.usage_terms}</span></a>
</div>
</div>
</div>
<!-- END: agreecheck -->
Di chuyển lên trên thành phần:
<!-- BEGIN:reg_captcha -->
<div class="form-group">
<div class="middle text-center clearfix">
<img class="captchaImg display-inline-block" src="{SRC_CAPTCHA}" width="{GFX_WIDTH}" height="{GFX_HEIGHT}" alt="{N_CAPTCHA}" title="{N_CAPTCHA}" />
<em class="fa fa-pointer fa-refresh margin-left margin-right" title="{CAPTCHA_REFRESH}" onclick="change_captcha('.rsec');"></em>
<input type="text" style="width:100px;" class="rsec required form-control display-inline-block" name="nv_seccode" value="" maxlength="{GFX_MAXLENGTH}" placeholder="{GLANG.securitycode}" data-pattern="/^(.){{GFX_MAXLENGTH},{GFX_MAXLENGTH}}$/" onkeypress="validErrorHidden(this);" data-mess="{GLANG.securitycodeincorrect}" />
</div>
</div>
<!-- END: reg_captcha -->
Tìm:
<!-- END: reg_captcha -->
Thêm xuống dưới:
<!-- BEGIN: reg_recaptcha -->
<div class="form-group">
<div class="middle text-center clearfix">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}" data-toggle="recaptcha"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent()),
pnum: 4,
btnselector: '[type="submit"]'
})
</script>
</div>
</div>
<!-- END: reg_recaptcha -->
Cập nhật userinfo.tpl
Mở themes/ten-giao-dien/modules/users/userinfo.tpl:
Tìm khoảng dòng 73:
<tr>
<td>{LANG.st_login2}</td>
<td>{USER.st_login}</td>
Thêm xuống dưới:
</tr>
<tr>
<td>{LANG.2step_status}</td>
<td>{USER.active2step} (<a href="{URL_2STEP}">{LANG.2step_link}</a>)</td>
Cập nhật viewdetailusers.tpl
Mở themes/ten-giao-dien/modules/users/viewdetailusers.tpl:
Tìm khoảng dòng 15:
<li><em class="fa fa-angle-right"> </em> {LANG.last_login}: {USER.last_login}</li>
</ul>
</div>
</div>
Thêm xuống dưới:
<!-- BEGIN: for_admin -->
<div class="m-bottom clearfix">
<div class="pull-right">
{LANG.for_admin}:
<!-- BEGIN: edit --><a href="{USER.link_edit}" class="btn btn-info btn-xs"><i class="fa fa-edit"></i> {GLANG.edit}</a><!-- END: edit -->
<!-- BEGIN: delete --><a href="#" class="btn btn-danger btn-xs" data-toggle="admindeluser" data-userid="{USER.userid}" data-link="{USER.link_delete}" data-back="{USER.link_delete_callback}"><i class="fa fa-trash-o"></i> {GLANG.delete}</a><!-- END: delete -->
</div>
</div>
<!-- END: for_admin -->