Đăng nhập
Latest topics
» Tôi sẽ đỗ đại học!by nightWalker 9/2/2024, 7:00 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] Phân vùng js cho trang wall
2 posters
Trang 1 trong tổng số 1 trang
[Thắc mắc] Phân vùng js cho trang wall
css còn có value trong trang wall nhưng nếu can thiệp vào trang wall cá nhân bằng js thì bắt buộc phải để ở all page (footer and header), điều này nhiều lúc làm mình rất khó chịu vì xung đột những js khác.
Ai có giải pháp gì không?
Ai có giải pháp gì không?
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] Phân vùng js cho trang wall
thím lấy hộ 1 ví dụ được ko
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] Phân vùng js cho trang wall
- Code:
$(function () {
if (location.pathname.slice(0, 2) == '/u') {
//Script trang nhà thành viên
}
});
Re: [Thắc mắc] Phân vùng js cho trang wall
e có code này muốn phân vùng vào wall thì làm ntn? @@
- 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"), $("#pun-head > *, #pun-intro > *, #pun-foot, #pun-visit").remove(), $("#profile-advanced-add br").remove(), $("#profile-advanced-details .main-head").first().remove(), $("#pun-intro"), $("#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()">Mặc định</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>'
}
};
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!
Similar topics
» giúp: sửa chiều rộng trang wall
» [Thắc mắc] Làm sao viết tin nhắn lên wall[✔]
» [Thắc mắc] Ẩn chữ ký trên Wall (Tường nhà)
» [Thắc mắc] không được gửi thư lên wall của ng khác
» [Thắc mắc] Đường Links dẫn vào wall
» [Thắc mắc] Làm sao viết tin nhắn lên wall[✔]
» [Thắc mắc] Ẩn chữ ký trên Wall (Tường nhà)
» [Thắc mắc] không được gửi thư lên wall của ng khác
» [Thắc mắc] Đường Links dẫn vào wall
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
|
|