Hướng dẫn nâng cấp giao diện tương thích từ NukeViet 4.1 Beta 1 (4.1.00) lên NukeViet 4.1 Beta 2 (4.1.01) - nukeviet/update GitHub Wiki
Mở themes/ten-giao-dien/theme.php:
Tìm:
global $home, $array_mod_title, $lang_global, $language_array, $global_config, $site_mods, $module_name, $module_info, $op_file, $mod_title, $my_head, $my_footer, $client_info, $module_config, $op, $rewrite_keys;
Trong đó xóa:
, $rewrite_keys
Tìm:
if (empty($rewrite_keys)) {
Thay lại thành:
if (!$global_config['rewrite_enable']) {
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.
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 -->
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.
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.
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ý.
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/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.
Mở themes/ten-giao-dien/modules/news/block_groups.tpl:
Tìm:
<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:
<a {TITLE} class="show" href="{ROW.link}" data-content="{ROW.hometext_clean}" data-img="{ROW.thumb}" data-rel="block_tooltip">{ROW.title_clean}</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>
Mở themes/ten-giao-dien/modules/news/block_headline.tpl:
Tìm:
<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:
<a {TITLE} class="show" href="{LASTEST.link}" data-content="{LASTEST.hometext_clean}" 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>
Mở themes/ten-giao-dien/modules/news/block_news.tpl:
Tìm:
<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:
<a {TITLE} class="show" href="{blocknews.link}" data-content="{blocknews.hometext_clean}" 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>
Mở themes/ten-giao-dien/modules/news/block_newscenter.tpl:
Tìm:
<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>
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>
Tìm:
<a class="show black h4" href="{othernews.link}" <!-- 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>
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>
Mở themes/ten-giao-dien/modules/news/block_tophits.tpl:
Tìm:
<a title="{blocknews.title}" href="{blocknews.link}"><img src="{blocknews.imgurl}" alt="{blocknews.title}" width="{blocknews.width}" class="img-thumbnail pull-left"/></a>
<!-- END: imgblock -->
<a {TITLE} class="show" href="{blocknews.link}" data-content="{blocknews.hometext_clean}" data-img="{blocknews.imgurl}" data-rel="block_news_tooltip">{blocknews.title}</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>
<!-- END: imgblock -->
<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>
Mở themes/ten-giao-dien/modules/news/content.tpl:
Tìm:
<div class="form-group">
<label class="col-sm-4 control-label">{LANG.captcha} <span class="txtrequired">(*)</span></label>
Thêm lên trên
<!-- BEGIN: captcha -->
Tìm:
<img alt="{CAPTCHA_REFRESH}" src="{CAPTCHA_REFR_SRC}" width="16" height="16" class="refresh" onclick="change_captcha('#fcode_iavim');" />
</div>
</div>
Thêm xuống dưới:
<!-- 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 -->
Mở themes/ten-giao-dien/modules/news/detail.tpl:
Tìm:
<a href="{TOPIC.link}" <!-- BEGIN: tooltip -->data-placement="{TOOLTIP_POSITION}" data-content="{TOPIC.hometext_clean}" 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:
<a href="{RELATED_NEW.link}" <!-- 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}">{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:
<a class="list-inline" href="{RELATED.link}"<!-- BEGIN: tooltip --> data-placement="{TOOLTIP_POSITION}" data-content="{RELATED.hometext_clean}" 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>
Mở themes/ten-giao-dien/modules/news/search.tpl:
Tìm:
<h3><a href="{LINK}">{TITLEROW}</a></h3>
Thay lại thành:
<h3><a href="{LINK}" title="{TITLEROW}" {TARGET_BLANK}>{TITLEROW}</a></h3>
Mở themes/ten-giao-dien/modules/news/sendmail.tpl:
Tìm:
<!-- 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 -->
Mở themes/ten-giao-dien/modules/news/topic.tpl:
Tìm:
<a href="{TOPIC.link}" title="{TOPIC.title}"><img alt="{TOPIC.alt}" src="{TOPIC.src}" width="{TOPIC.width}" class="img-thumbnail pull-left imghome" /></a>
<!-- END: homethumb -->
<h3><a href="{TOPIC.link}" title="{TOPIC.title}">{TOPIC.title}</a></h3>
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>
<!-- END: homethumb -->
<h3><a href="{TOPIC.link}" title="{TOPIC.title}" {TOPIC.target_blank}>{TOPIC.title}</a></h3>
Tìm:
<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>
Mở themes/ten-giao-dien/modules/news/viewcat_grid.tpl:
Tìm:
<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:
<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:
<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:
<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>
Mở themes/ten-giao-dien/modules/news/viewcat_list.tpl:
Tìm:
<a class="show h4" href="{CONTENT.link}" <!-- BEGIN: tooltip -->data-content="{CONTENT.hometext_clean}" 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}">
Mở themes/ten-giao-dien/modules/news/viewcat_main_bottom.tpl:
Tìm:
<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:
<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:
<a class="show h4" href="{OTHER.link}" <!-- 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>
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>
Mở themes/ten-giao-dien/modules/news/viewcat_main_left.tpl:
Tìm:
<a class="show h4" href="{OTHER.link}" <!-- 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>
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:
<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:
<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>
Mở themes/ten-giao-dien/modules/news/viewcat_main_right.tpl:
Tìm:
<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:
<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:
<a class="show h4" href="{OTHER.link}" title="{OTHER.title}" <!-- BEGIN: tooltip -->data-content="{OTHER.hometext_clean}" 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>
Mở themes/ten-giao-dien/modules/news/viewcat_page.tpl:
Tìm:
<a href="{CONTENT.link}" title="{CONTENT.title}"><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail pull-left imghome" /></a>
<!-- END: image -->
<h2>
<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}><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail pull-left imghome" /></a>
<!-- END: image -->
<h2>
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm:
<a href="{CONTENT.link}" title="{CONTENT.title}"><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail pull-left imghome" /></a>
<!-- END: image -->
<h3>
<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}><img alt="{HOMEIMGALT1}" src="{HOMEIMG1}" width="{IMGWIDTH1}" class="img-thumbnail pull-left imghome" /></a>
<!-- END: image -->
<h3>
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm:
<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>
Mở themes/ten-giao-dien/modules/news/viewcat_top.tpl:
Tìm:
<a href="{CONTENT.link}" title="{CONTENT.title}"><img id="imghome" alt="{HOMEIMGALT0}" src="{HOMEIMG0}" width="{IMGWIDTH0}" class="img-thumbnail pull-left imghome" /></a>
<!-- END: image -->
<h2>
<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}><img id="imghome" alt="{HOMEIMGALT0}" src="{HOMEIMG0}" width="{IMGWIDTH0}" class="img-thumbnail pull-left imghome" /></a>
<!-- END: image -->
<h2>
<a href="{CONTENT.link}" title="{CONTENT.title}" {CONTENT.target_blank}>{CONTENT.title}</a>
Tìm:
<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>
Mở themes/ten-giao-dien/modules/news/viewcat_two_column.tpl:
Tìm:
<a href="{NEWSTOP.link}" title="{NEWSTOP.title}"><img alt="{HOMEIMGALT0}" src="{HOMEIMG0}" width="{IMGWIDTH0}" class="img-thumbnail pull-left imghome" /></a>
<!-- END: image -->
<h3>
<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}><img alt="{HOMEIMGALT0}" src="{HOMEIMG0}" width="{IMGWIDTH0}" class="img-thumbnail pull-left imghome" /></a>
<!-- END: image -->
<h3>
<a href="{NEWSTOP.link}" title="{NEWSTOP.title}" {NEWSTOP.target_blank}>{NEWSTOP.title}</a>
Tìm:
<a class="show h4" href="{NEWSTOP.link}" <!-- 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>
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:
<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:
<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:
<a class="show h4" href="{CONTENT.link}" <!-- 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>
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>
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:
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.
Mở themes/ten-giao-dien/modules/users/avatar.tpl:
Tìm:
<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:
<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"/>
Mở themes/ten-giao-dien/modules/users/block.login.tpl:
<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:
<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')">
Mở themes/ten-giao-dien/modules/users/block.user_button.tpl:
Tìm:
<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>
Mở themes/ten-giao-dien/modules/users/confirm.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 -->
Mở themes/ten-giao-dien/modules/users/login_form.tpl:
Tìm:
<!-- END: captcha -->
Thêm xuống dưới:
<!-- BEGIN: recaptcha -->
<div class="form-group loginCaptcha">
<div class="middle text-center clearfix">
<!-- BEGIN: default --><div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}" data-toggle="recaptcha"></div></div><!-- END: default -->
<!-- BEGIN: compact --><div class="nv-recaptcha-compact"><div id="{RECAPTCHA_ELEMENT}" data-toggle="recaptcha"></div></div><!-- END: compact -->
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
<!-- BEGIN: smallbtn -->size: "compact",<!-- END: smallbtn -->
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent()),
pnum: 4,
btnselector: '[type="submit"]'
})
</script>
</div>
</div>
<!-- END: recaptcha -->
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 -->
Mở themes/ten-giao-dien/modules/users/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 -->
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 -->
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 -->
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.
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}', '{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}');" />
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" value="{VOTING.langresult}" type="button" onclick="nv_sendvoting(this.form, '{VOTING.vid}', 0, '{VOTING.checkss}', '', '{VOTING.active_captcha}','');" />
Tìm đoạn bắt đầu bằng:
<!-- BEGIN: captcha -->
Kết thúc bằng:
<!-- END: captcha -->
Thay đoạn đó thành:
<!-- 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 -->
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 đoạn bắt đầu bằng:
<!-- BEGIN: captcha -->
Kết thúc bằng:
<!-- END: captcha -->
Thay đoạn đó thành:
<!-- 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}','{LINKURL}');"/>
</div>
</div>
<!-- END: has_captcha -->