Đăng nhập
Latest topics
» Tôi sẽ đỗ đại học!by vi01239984564 26/8/2024, 7:41 pm
» Kỷ niệm xưa của chúng ta
by nightWalker 9/2/2024, 6:49 pm
» Bị lệch khung cần người giúp đỡ
by webhuy28 7/10/2021, 10:34 pm
» [HỎI ĐÁP] Danh sách bạn bè không thể hiển thị
by anhdaodaica1 2/10/2021, 10:04 pm
» [HỎI ĐÁP] Thông tin tài khoản không thể lưu thay đổi
by anhdaodaica1 2/10/2021, 6:05 am
» Phim bố già full
by huy.pc52 24/8/2021, 12:20 am
» Xin code Box HTML cho Forumvi
by Larva 1/7/2021, 12:57 pm
» Hello Anh Em Chinh phục
by HoàngTửNaivip5p 28/5/2021, 5:03 am
» Trang chủ tin tức cập nhật HOT 2016
by kenbi05 1/1/2020, 11:02 pm
» Không Dang9 bài viết = hình ảnh được
by huy.pc52 30/11/2019, 10:52 am
» CHÚC ANH EM NĂM MỚI VUI VẺ TRÀNG ĐẦY HẠNH PHÚC
by sps.kủn 12/2/2019, 1:16 pm
» Skin CNTT-K3 2015 (Full Mod)[✔]
by kenbi05 6/7/2018, 12:30 am
» baivong, handsome,....
by sps.kủn 29/6/2018, 1:54 pm
» [SHARE] SKIN ĐHFM.V7 @PUNBB
by tonyhoaivu 2/5/2018, 2:37 pm
» Share Skin Xanh Dương Cùi Bắp
by tonyhoaivu 28/4/2018, 5:57 pm
» Xin Skin http://v1.hotrofm.net/
by tonyhoaivu 28/4/2018, 5:45 pm
» Xin Skin Rao Vặt
by tonyhoaivu 15/4/2018, 12:07 pm
» Làm Sao Để Xóa Khung Này
by tonyhoaivu 14/4/2018, 7:18 pm
» [Lập nhóm]Lập nhóm fm
by vietkanpy 31/3/2018, 11:53 am
» [Help] về server úp ảnh của phutu [✔]
by baivong 17/3/2018, 10:18 pm
» Đừng khóc cho “tôi – Chinh Phục!”…
by AnHung 27/2/2018, 5:33 pm
» [Share] Skin Diendandaihoc.com [ Punbb ] [✔]
by Lu Mờ 13/2/2018, 7:28 pm
» Mời mấy thím vào groups Forumotion Việt Nam.
by dang02315 13/2/2018, 12:40 am
» Có thể làm các kiểu giao diện được không?
by Lu Mờ 9/2/2018, 3:40 pm
» ltns chinhphuc.info
by Shinichi Kudo 27/1/2018, 2:27 am
Top posting users this week
No user |
[Thắc mắc] Sửa script khỏi xung đột
5 posters
Trang 1 trong tổng số 1 trang
[Thắc mắc] Sửa script khỏi xung đột
Hình như đây là topic đầu tiên về vấn đề này
thấy mấy forum dizcus hay vbb có mấy topic yêu cầu như thế này mà fm chưa có
Vậy hôm nay lập topic mong mấy đấng anh hào ra tay trợ giúp
Mình có 3 đoạn js nhưng trong đó có 1 đoạn làm xung đột 2 đoạn kia:
Đoạn 1: zprofile
Đoạn 2: đóng mở box
Đoạn 3: SCEditor mặc định của fm
Đoạn 1 làm xung đột mất 2 đoạn kia (mất nút ẩn hiện box và thanh công cụ viết bài)
thấy mấy forum dizcus hay vbb có mấy topic yêu cầu như thế này mà fm chưa có
Vậy hôm nay lập topic mong mấy đấng anh hào ra tay trợ giúp
Mình có 3 đoạn js nhưng trong đó có 1 đoạn làm xung đột 2 đoạn kia:
Đoạn 1: zprofile
- Code:
var htmlID = '2';[color=#000000][/color]
var cssID = '1';[color=#000000][/color]
var guest = 'no'; // yes or no[color=#000000][/color]
var tag = ['<script>', '<html>', '<iframe>', '<body>', '<head>'];[color=#000000][/color]
var cssDefault = 'body{background-color:#F1F1F1;font-family:\'lucida grande\',tahoma,verdana,arial,sans-serif}#tabs li a,.main-head,#pun-intro{background-color:#312A1E!important;border:0!important}#tabs li a,.main-head,#pun-intro,#profile-advanced-add a{font:15px/20px\'Open Sans Condensed\',sans-serif;color:#F0F0F0!important;text-align:center;font-weight:bold!important}.main-content{padding:4px !important;background-color: #FBFBFB !important;border: 1px solid #DDDDDD !important;}#pun-intro a,#pun-head a{color:#F0F0F0!important;text-decoration:none}#profile-advanced-details textarea{resize:none;height:90px}#tabs li a{padding:10px!important;margin-left:-4px;background:url("http://2.bp.blogspot.com/-IfiIwt0iR5c/UL4zzUjtGyI/AAAAAAAABho/rlYYH1q2iCY/s1600/sec-sep.gif")no-repeat scroll left top transparent}#tabs{top:-32px}.pun{background-color:#FAFAFA;width:auto;padding:30px}#pun-intro{padding:5px;display:inline;border-bottom-right-radius:4px;left:0px;position:absolute;top:0px}#pun-head{background-color:#227264;margin:45px 0;padding:10px}#profile-advanced-details{margin-top:80px}#profile-advanced-right{margin-top:100px}#a:link,#profile-advanced-right.module.main a:link{color:#626262!important;text-decoration:none;transition:color 0.2s ease-in-out 0s}#profile-advanced-details a:hover,#profile-advanced-right.module.main a:hover{color:#8F8F8F!important}.field_uneditable{border:1px solid#DDDDDD;max-height:60px;overflow:auto;padding:5px}#copyright a{color:#000;text-decoration:none}#profile-advanced-add a{display:block;margin:auto;max-width:60%;padding:5px;text-decoration:none}#profile-advanced-add a:first-child{background-color:#459766;margin-bottom:5px}#profile-advanced-add a:last-child{background-color:#FF5959}#profile-loading{font-size:16px;font-weight:bold;margin:auto auto 5px;padding:10px;text-align:center;width:80px}#wall-reply{margin-bottom:10px}#wall-reply div input[name="subject"]{float:right;width:350px}#wall-reply div input[name="preview"],#wall-reply div input[name="post"]{background-color:#F4F4F4;border:1px solid#DDDDDD;cursor:pointer;margin-left:6px}#wall-reply div input[name="subject"]{float:right;width:350px}#wall-reply div input[name="preview"]:hover,#wall-reply div input[name="post"]:hover{box-shadow:inset 1px 1px 0 0 rgba(0,0,0,0.25)}#outter-wall{position:relative;margin-bottom:8px}#wall-preview{position:absolute;height:100%;width:100%;background-color:#F4F4F4;border:1px#ddd solid}';[color=#000000][/color]
[color=#000000][/color]
/////// KHÔNG CHỈNH SỬA MỌI THỨ DƯỚI DÒNG NÀY ///////[color=#000000][/color]
[color=#000000][/color]
$(function () {[color=#000000][/color]
var x = document.getElementById('unl');[color=#000000][/color]
uid = x.childNodes[0].href.substring(x.childNodes[0].href.indexOf('&u=') + 3);[color=#000000][/color]
uname = x.childNodes[0].innerHTML;[color=#000000][/color]
if (document.getElementById('tabs')) {[color=#000000][/color]
if (guest == 'yes' && uid == '-1') {[color=#000000][/color]
document.getElementsByTagName('head')[0].insertAdjacentHTML('afterend', '<style type="text/css">body{display:none}</style>');[color=#000000][/color]
alert('Please login to use this feature');[color=#000000][/color]
location.href = 'http://' + location.host[color=#000000][/color]
}[color=#000000][/color]
if (uid != '-1') {[color=#000000][/color]
$('#profile-advanced-right .module.main').has('noscript').remove();[color=#000000][/color]
$('#main-content div').first().remove();[color=#000000][/color]
}[color=#000000][/color]
if (uname != $('#profile-advanced-right .h3 span').first().text()) {[color=#000000][/color]
$('#field_id' + htmlID + ', #field_id' + cssID).hide().next().hide();[color=#000000][/color]
}[color=#000000][/color]
document.getElementById('profile-advanced-layout').insertAdjacentHTML('beforeend', '<div id="copyright"><b><a href="www.fmvi.vn/t880-">zProfile</a> © 2013 by <a href="mailto:mark.polo.nguyen@gmail.com">Zero</a>. All rights reserved</b></div>');[color=#000000][/color]
$('#pun-head > *, #pun-intro > *, #pun-foot, #pun-visit').remove();[color=#000000][/color]
$('#profile-advanced-add br').remove();[color=#000000][/color]
$('#profile-advanced-details .main-head').first().remove();[color=#000000][/color]
$('#pun-intro').html('<a href="http://' + location.host + '/forum">Back to forum</a>');[color=#000000][/color]
$('#profile-advanced-details textarea').attr({[color=#000000][/color]
'cols': '95',[color=#000000][/color]
'rows': '4'[color=#000000][/color]
});[color=#000000][/color]
}[color=#000000][/color]
setInterval("$(function () {$('#field_id'+cssID+' img.ajax-profil_valid').attr('onclick','zprofile.css()');$('#field_id'+htmlID+' img.ajax-profil_valid').attr('onclick','zprofile.html()')});", 1000);[color=#000000][/color]
$('head').append('<style>' + $("#field_id" + cssID + " .field_uneditable").text() + '</style>');[color=#000000][/color]
$('#profile_field_2_' + cssID).after('<a style="cursor:pointer" onclick="zprofile.back()">Default</a>');[color=#000000][/color]
$('#pun-head').append($('#field_id' + htmlID + ' .field_uneditable').text().replace('{USER[b][/b]NAME}', uname).replace('{USERID}', uid));[color=#000000][/color]
$('#profile-advanced-add a').click(function (a) {[color=#000000][/color]
$.get(this.href);[color=#000000][/color]
a.preventDefault();[color=#000000][/color]
$('#profile-advanced-add').hide();[color=#000000][/color]
alert('Added')[color=#000000][/color]
});[color=#000000][/color]
zprofile.start();[color=#000000][/color]
[color=#000000][/color]
});[color=#000000][/color]
$('#text_editor_textarea').keyup(function () {[color=#000000][/color]
var y = document.getElementById('profile_field_2_' + htmlID).value;[color=#000000][/color]
for (var i in tag) {[color=#000000][/color]
regex = new RegExp(tag[i], 'i');[color=#000000][/color]
if (regex.test(y)) {[color=#000000][/color]
alert('No script allowed');[color=#000000][/color]
document.getElementById('profile_field_2_' + htmlID).value = y.replace(regex, '');[color=#000000][/color]
}[color=#000000][/color]
}[color=#000000][/color]
});[color=#000000][/color]
var zprofile = {[color=#000000][/color]
start: function () {[color=#000000][/color]
zprofile.tabs();[color=#000000][/color]
},[color=#000000][/color]
tabs: function () {[color=#000000][/color]
a = document.getElementById('tabs').getElementsByTagName('li');[color=#000000][/color]
for (i = 0; i < a.length; i++) {[color=#000000][/color]
b = a[i].firstChild.getAttribute('href').replace(/\/u(\d+)/, '').replace('#', 'profile');[color=#000000][/color]
a[i].setAttribute('onclick', 'zprofile.load(this, "' + b + '");return false');[color=#000000][/color]
}[color=#000000][/color]
},[color=#000000][/color]
load: function (a, b) {[color=#000000][/color]
zprofile.loading(document.getElementById('profile-advanced-details'));[color=#000000][/color]
$('#profile-advanced-details').load(a.firstChild.href.replace('?mode=', '') + ' #profile-advanced-details > .main-content');[color=#000000][/color]
if (b == 'wall') {[color=#000000][/color]
zprofile.reply();[color=#000000][/color]
}[color=#000000][/color]
if (b == 'profile') {[color=#000000][/color]
setTimeout(zprofile.reload, 1500);[color=#000000][/color]
}[color=#000000][/color]
document.getElementsByClassName('activetab')[0].removeAttribute('class');[color=#000000][/color]
a.setAttribute('class', 'activetab');[color=#000000][/color]
},[color=#000000][/color]
reload: function () {[color=#000000][/color]
if (document.getElementById('wall-reload')) {[color=#000000][/color]
elem = document.getElementById('wall-reload');[color=#000000][/color]
elem.parentNode.removeChild(elem);[color=#000000][/color]
}[color=#000000][/color]
a = document.createElement('script');[color=#000000][/color]
a.id = 'wall-reload';[color=#000000][/color]
a.innerHTML = document.getElementById('main-content').getElementsByTagName('script')[2].innerHTML;[color=#000000][/color]
document.getElementsByTagName('head')[0].appendChild(a);[color=#000000][/color]
[color=#000000][/color]
},[color=#000000][/color]
reply: function () {[color=#000000][/color]
$.get('/privmsg?mode=post_profile&u=' + location.pathname.match(/\d+/), function (a) {[color=#000000][/color]
document.getElementById('profile-advanced-details').getElementsByClassName('main-content')[0].insertAdjacentHTML('beforebegin', '<div id="wall-reply" class="main-content"><form action="/privmsg?mode=post_profile" name="post" method="post"><div id="outter-wall"><div id="wall-preview" style="display:none" ondblclick="this.style.display = \'none\'" title="Double click to close this window"></div><textarea id="text_editor_textarea" cols="9" rows="3" name="message" placeholder="Message: ' + $(a).find('.frm-set dd').text().replace(/N/gi, 'N |').replace(/F/gi, 'F |') + '"></textarea></div>' + $('<div/>').append($(a).find('.frm-buttons input[type="hidden"]').clone()).html() + '<div><input type="submit" accesskey="s" tabindex="6" value="Send" name="post" onclick="zprofile.send();return false"><input type="submit" value="Preview" name="preview" onclick="zprofile.preview();return false"><input type="text" name="subject" id="subject" placeholder="Subject"></div></form></div>');[color=#000000][/color]
});[color=#000000][/color]
},[color=#000000][/color]
send: function () {[color=#000000][/color]
x = document.getElementById('text_editor_textarea');[color=#000000][/color]
y = document.getElementById('subject');[color=#000000][/color]
if (x.value != '') {[color=#000000][/color]
$.post('/privmsg?mode=post_profile', $('#wall-reply form[name="post"]').serialize() + '&post=1', function (b) {[color=#000000][/color]
if (b.indexOf('A new message') > 0) {[color=#000000][/color]
$.post('/privmsg', $(b).find("form[method='post']").serialize() + '&post=1');[color=#000000][/color]
}[color=#000000][/color]
x.value = '';[color=#000000][/color]
y.value = '';[color=#000000][/color]
$.get(window.location + 'wall #profile-advanced-details', function (a) {[color=#000000][/color]
$($(a).find('ol li.clearfix:first').html()).prependTo('#profile-advanced-details ol').hide().fadeIn('slow');[color=#000000][/color]
});[color=#000000][/color]
[color=#000000][/color]
});[color=#000000][/color]
} else {[color=#000000][/color]
alert('Vui lòng điền nội dung cho tin nhắn')[color=#000000][/color]
}[color=#000000][/color]
},[color=#000000][/color]
preview: function () {[color=#000000][/color]
$.post('/privmsg?mode=post_profile', $('#wall-reply form[name="post"]').serialize() + '&preview=1', function (b) {[color=#000000][/color]
$('#wall-preview').html($(b).find('.entry-content').html());[color=#000000][/color]
document.getElementById('wall-preview').style.display = '';[color=#000000][/color]
});[color=#000000][/color]
},[color=#000000][/color]
css: function () {[color=#000000][/color]
$('head style').html($('#profile_field_2_' + cssID).val())[color=#000000][/color]
},[color=#000000][/color]
html: function () {[color=#000000][/color]
$('#pun-head').html($('#profile_field_2_' + htmlID).val().replace('{USER[b][/b]NAME}', uname).replace('{USERID}', uid))[color=#000000][/color]
},[color=#000000][/color]
back: function () {[color=#000000][/color]
$('#profile_field_2_' + cssID).val(cssDefault)[color=#000000][/color]
},[color=#000000][/color]
loading: function (dom) {[color=#000000][/color]
dom.innerHTML = '<div id="profile-loading" class="main-content"><img src="http://i11.servimg.com/u/f11/16/80/27/29/ajax-l10.gif" /><br/>Loading...</div>';[color=#000000][/color]
},[color=#000000][/color]
}
Đoạn 2: đóng mở box
- Code:
$(function(){$(".main-head").prepend('<span class="collapse" style="padding: 0px; float:right;width: 13px;height: 13px;overflow: hidden;"><img src="http://i35.servimg.com/u/f35/16/18/15/10/collap10.png" alt="fmClose" /><img class="hide" src="http://i35.servimg.com/u/f35/16/18/15/10/collap11.png" alt="fmOpen" /></span>');$(".collapse").each(function(index){$(this).attr("id","fmvicollapse"+location.pathname+index);if(my_getcookie("fmvicollapse"+location.pathname+index)=="1"){$(this).children("img[alt='fmClose']").hide();$(this).children("img[alt='fmOpen']").show();$(this).parent().next().hide()}});$(".collapse img[alt='fmClose']").click(function(){my_setcookie($(this).parent().attr("id"),1,1,0);$(this).hide().next().show();$(this).parent().parent().next().hide()});$(".collapse img[alt='fmOpen']").click(function(){my_setcookie($(this).parent().attr("id"),0,1,0);$(this).hide().prev().show();$(this).parent().parent().next().show()})});
Đoạn 3: SCEditor mặc định của fm
Đoạn 1 làm xung đột mất 2 đoạn kia (mất nút ẩn hiện box và thanh công cụ viết bài)
Lowie- CPPurpleMember
-
Ngày đăng ký : 24/06/2011
Số bài : 1345
CPP : 231
Châm ngôn sống : Dẫu hiên ngang giữa đất trời, VỢ DÂM BẠN ĐỂU thì đời cũng xong!
Re: [Thắc mắc] Sửa script khỏi xung đột
ZFrofile? Tưởng chun dùng WallCSS của
Dùng WallCSS thì đỡ bị xung đột hơn
Dùng WallCSS thì đỡ bị xung đột hơn
Re: [Thắc mắc] Sửa script khỏi xung đột
nhưng zprofile có hỗ trợ html
Lowie- CPPurpleMember
-
Ngày đăng ký : 24/06/2011
Số bài : 1345
CPP : 231
Châm ngôn sống : Dẫu hiên ngang giữa đất trời, VỢ DÂM BẠN ĐỂU thì đời cũng xong!
Re: [Thắc mắc] Sửa script khỏi xung đột
Sửa zprofile:
- Code:
var htmlID = "2",
cssID = "1",
guest = "no",
tag = ["<script>", "<html>", "<iframe>", "<body>", "<head>"],
cssDefault = 'body{background-color:#F1F1F1;font-family:\'lucida grande\',tahoma,verdana,arial,sans-serif}#tabs li a,.main-head,#pun-intro{background-color:#312A1E!important;border:0!important}#tabs li a,.main-head,#pun-intro,#profile-advanced-add a{font:15px/20px\'Open Sans Condensed\',sans-serif;color:#F0F0F0!important;text-align:center;font-weight:bold!important}.main-content{padding:4px !important;background-color: #FBFBFB !important;border: 1px solid #DDDDDD !important;}#pun-intro a,#pun-head a{color:#F0F0F0!important;text-decoration:none}#profile-advanced-details textarea{resize:none;height:90px}#tabs li a{padding:10px!important;margin-left:-4px;background:url("http://2.bp.blogspot.com/-IfiIwt0iR5c/UL4zzUjtGyI/AAAAAAAABho/rlYYH1q2iCY/s1600/sec-sep.gif")no-repeat scroll left top transparent}#tabs{top:-32px}.pun{background-color:#FAFAFA;width:auto;padding:30px}#pun-intro{padding:5px;display:inline;border-bottom-right-radius:4px;left:0px;position:absolute;top:0px}#pun-head{background-color:#227264;margin:45px 0;padding:10px}#profile-advanced-details{margin-top:80px}#profile-advanced-right{margin-top:100px}#a:link,#profile-advanced-right.module.main a:link{color:#626262!important;text-decoration:none;transition:color 0.2s ease-in-out 0s}#profile-advanced-details a:hover,#profile-advanced-right.module.main a:hover{color:#8F8F8F!important}.field_uneditable{border:1px solid#DDDDDD;max-height:60px;overflow:auto;padding:5px}#copyright a{color:#000;text-decoration:none}#profile-advanced-add a{display:block;margin:auto;max-width:60%;padding:5px;text-decoration:none}#profile-advanced-add a:first-child{background-color:#459766;margin-bottom:5px}#profile-advanced-add a:last-child{background-color:#FF5959}#profile-loading{font-size:16px;font-weight:bold;margin:auto auto 5px;padding:10px;text-align:center;width:80px}#wall-reply{margin-bottom:10px}#wall-reply div input[name="subject"]{float:right;width:350px}#wall-reply div input[name="preview"],#wall-reply div input[name="post"]{background-color:#F4F4F4;border:1px solid#DDDDDD;cursor:pointer;margin-left:6px}#wall-reply div input[name="subject"]{float:right;width:350px}#wall-reply div input[name="preview"]:hover,#wall-reply div input[name="post"]:hover{box-shadow:inset 1px 1px 0 0 rgba(0,0,0,0.25)}#outter-wall{position:relative;margin-bottom:8px}#wall-preview{position:absolute;height:100%;width:100%;background-color:#F4F4F4;border:1px#ddd solid}';
$(function () {
var c = document.getElementById("unl");
uid = c.childNodes[0].href.substring(c.childNodes[0].href.indexOf("&u=") + 3);
uname = c.childNodes[0].innerHTML;
document.getElementById("tabs") && ("yes" == guest && "-1" == uid && (document.getElementsByTagName("head")[0].insertAdjacentHTML("afterend", '<style type="text/css">body{display:none}</style>'), alert("Please login to use this feature"), location.href = "http://" + location.host), "-1" != uid && ($("#profile-advanced-right .module.main").has("noscript").remove(), $("#main-content div").first().remove()), uname != $("#profile-advanced-right .h3 span").first().text() && $("#field_id" + htmlID + ", #field_id" + cssID).hide().next().hide(), document.getElementById("profile-advanced-layout").insertAdjacentHTML("beforeend", '<div id="copyright"><b><a href="www.fmvi.vn/t880-">zProfile</a> \u00a9 2013 by <a href="mailto:mark.polo.nguyen@gmail.com">Zero</a>. All rights reserved</b></div>'), $("#pun-head > *, #pun-intro > *, #pun-foot, #pun-visit").remove(), $("#profile-advanced-add br").remove(), $("#profile-advanced-details .main-head").first().remove(), $("#pun-intro").html('<a href="http://' + location.host + '/forum">Back to forum</a>'), $("#profile-advanced-details textarea").attr({
cols: "95",
rows: "4"
}));
setInterval("$(function () {$('#field_id'+cssID+' img.ajax-profil_valid').attr('onclick','zprofile.css()');$('#field_id'+htmlID+' img.ajax-profil_valid').attr('onclick','zprofile.html()')});", 1E3);
$("head").append("<style>" + $("#field_id" + cssID + " .field_uneditable").text() + "</style>");
$("#profile_field_2_" + cssID).after('<a style="cursor:pointer" onclick="zprofile.back()">Default</a>');
$("#pun-head").append($("#field_id" + htmlID + " .field_uneditable").text().replace("{USER[b][/b]NAME}", uname).replace("{USERID}", uid));
$("#profile-advanced-add a").click(function (c) {
$.get(this.href);
c.preventDefault();
$("#profile-advanced-add").hide();
alert("Added")
});
zprofile.start()
});
$("#text_editor_textarea").keyup(function () {
var c = document.getElementById("profile_field_2_" + htmlID).value,
d;
for (d in tag) regex = RegExp(tag[d], "i"), regex.test(c) && (alert("No script allowed"), document.getElementById("profile_field_2_" + htmlID).value = c.replace(regex, ""))
});
var zprofile = {
start: function () {
zprofile.tabs()
},
tabs: function () {
a = document.getElementById("tabs").getElementsByTagName("li");
for (i = 0; i < a.length; i++) b = a[i].firstChild.getAttribute("href").replace(/\/u(\d+)/, "").replace("#", "profile"), a[i].setAttribute("onclick", 'zprofile.load(this, "' + b + '");return false')
},
load: function (c, d) {
zprofile.loading(document.getElementById("profile-advanced-details"));
$("#profile-advanced-details").load(c.firstChild.href.replace("?mode=", "") + " #profile-advanced-details > .main-content");
"wall" == d && zprofile.reply();
"profile" == d && setTimeout(zprofile.reload, 1500);
document.getElementsByClassName("activetab")[0].removeAttribute("class");
c.setAttribute("class", "activetab")
},
reload: function () {
document.getElementById("wall-reload") && (elem = document.getElementById("wall-reload"), elem.parentNode.removeChild(elem));
a = document.createElement("script");
a.id = "wall-reload";
a.innerHTML = document.getElementById("main-content").getElementsByTagName("script")[2].innerHTML;
document.getElementsByTagName("head")[0].appendChild(a)
},
reply: function () {
$.get("/privmsg?mode=post_profile&u=" + location.pathname.match(/\d+/), function (c) {
document.getElementById("profile-advanced-details").getElementsByClassName("main-content")[0].insertAdjacentHTML("beforebegin", '<div id="wall-reply" class="main-content"><form action="/privmsg?mode=post_profile" name="post" method="post"><div id="outter-wall"><div id="wall-preview" style="display:none" ondblclick="this.style.display = \'none\'" title="Double click to close this window"></div><textarea id="text_editor_textarea" cols="9" rows="3" name="message" placeholder="Message: ' + $(c).find(".frm-set dd").text().replace(/N/gi, "N |").replace(/F/gi, "F |") + '"></textarea></div>' + $("<div/>").append($(c).find('.frm-buttons input[type="hidden"]').clone()).html() + '<div><input type="submit" accesskey="s" tabindex="6" value="Send" name="post" onclick="zprofile.send();return false"><input type="submit" value="Preview" name="preview" onclick="zprofile.preview();return false"><input type="text" name="subject" id="subject" placeholder="Subject"></div></form></div>')
})
},
send: function () {
x = document.getElementById("text_editor_textarea");
y = document.getElementById("subject");
"" != x.value ? $.post("/privmsg?mode=post_profile", $('#wall-reply form[name="post"]').serialize() + "&post=1", function (c) {
0 < c.indexOf("A new message") && $.post("/privmsg", $(c).find("form[method='post']").serialize() + "&post=1");
x.value = "";
y.value = "";
$.get(window.location + "wall #profile-advanced-details", function (c) {
$($(c).find("ol li.clearfix:first").html()).prependTo("#profile-advanced-details ol").hide().fadeIn("slow")
})
}) : alert("Vui l\u00f2ng \u0111i\u1ec1n n\u1ed9i dung cho tin nh\u1eafn")
},
preview: function () {
$.post("/privmsg?mode=post_profile", $('#wall-reply form[name="post"]').serialize() + "&preview=1", function (c) {
$("#wall-preview").html($(c).find(".entry-content").html());
document.getElementById("wall-preview").style.display = ""
})
},
css: function () {
$("head style").html($("#profile_field_2_" + cssID).val())
},
html: function () {
$("#pun-head").html($("#profile_field_2_" + htmlID).val().replace("{USER[b][/b]NAME}", uname).replace("{USERID}", uid))
},
back: function () {
$("#profile_field_2_" + cssID).val(cssDefault)
},
loading: function (c) {
c.innerHTML = '<div id="profile-loading" class="main-content"><img src="http://i11.servimg.com/u/f11/16/80/27/29/ajax-l10.gif" /><br/>Loading...</div>'
}
};
Re: [Thắc mắc] Sửa script khỏi xung đột
truongchun đã viết:nhưng zprofile có hỗ trợ html
dùng HTML trong profile của huynh Trường là ngon nhất, ko bị xung đột gì cả, code của huynh Zero chuyên dùng cho giao diện mặc định nên rất dễ xung đột
Re: [Thắc mắc] Sửa script khỏi xung đột
puoɯɐıp llǝɥ đã viết:truongchun đã viết:nhưng zprofile có hỗ trợ html
dùng HTML trong profile của huynh Trường là ngon nhất, ko bị xung đột gì cả, code của huynh Zero chuyên dùng cho giao diện mặc định nên rất dễ xung đột
Chưa thấy cái đó bao giờ xin cái link.
Lowie- CPPurpleMember
-
Ngày đăng ký : 24/06/2011
Số bài : 1345
CPP : 231
Châm ngôn sống : Dẫu hiên ngang giữa đất trời, VỢ DÂM BẠN ĐỂU thì đời cũng xong!
Re: [Thắc mắc] Sửa script khỏi xung đột
@Chùn: The0ne Team ấy Không biết cái team thần thánh ấy à Anh thái cũng nằm trong team ấy mà
K.-Kun- CPModerator
-
Ngày đăng ký : 22/11/2012
Số bài : 1511
CPP : 639
Châm ngôn sống : Không bao giời đi ngược lại với lời nói của mình! Đó chính là nhẫn đạo của tôi
Similar topics
» [Thắc mắc] Nơi tạo js khi bị xung đột
» Sửa giúp JS xung đột
» [Thắc mắc] Sửa js khỏi bị xung đột
» [Thắc mắc] Giúp em sửa lỗi khi bài viết toàn tiếng anh bao xung quanh
» [Help] Bị xung đột màu Title ?[✔]
» Sửa giúp JS xung đột
» [Thắc mắc] Sửa js khỏi bị xung đột
» [Thắc mắc] Giúp em sửa lỗi khi bài viết toàn tiếng anh bao xung quanh
» [Help] Bị xung đột màu Title ?[✔]
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
|
|