Welcome Guest [Log In] [Register]
Hiện thời Webstie của chúng tôi đang tạm đóng dể sửa chữa nhằm mục đích phục vụ tốt hơn cho nhu cầu của các bạn. Khi mọi công việc sữa chữa hoàn thành chúng tôi sẽ gửi email thông báo đến tất cả các bạn. Mong các bạn vui ḷng ghé lại sau. Thành thật xin lỗi v́ sự cố này.


>> Bạn đă có tài khoản chưa, click vào đây để đăng kư !


Nếu bạn đă là thành viên của L'@mour ™, vui ḷng đăng nhập để tham gia thảo luận. Cảm ơn !

Username:   Password:
Add Reply
Hide Tag !; Mod cực hiếm và cực cool...
Topic Started: May 26 2006, 05:08 PM (986 Views)
Jimmy
Member Avatar
__Love__

...Cũng giống như thẻ "HIDE" của IPB2.x, thành viên phải có ít nhất 1 bài trả lời mới có thể xem phần được làm ẩn đi. Mă chạy ổn định và không có những ảnh hưởng đáng kể khi load page.

Mẫu here:

http://z4.invisionfree.com/OLL/index.php?showtopic=5

...Cách gài vào th́ nhanh lắm, t́m Board Wrappers > Footer, đặt mă này:

Quote:
 

<style>
.hidetag { display:none; }
</style>
<script>
function Request() {
if (window.XMLHttpRequest ) { return new XMLHttpRequest(); }
else if (window.ActiveXObject) {
try {
return new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
return false;
}
}
}
}
function ShowHides(tid) {
tid=tid;
ulnk=document.all?document.all.userlinks:document.getElementById("userlinks");
if (ulnk.innerHTML.match(/showuser=([0-9]+)/ig)!=null) {
unum=RegExp.$1;
req=Request();
main=document.location.href.split("/index.php")[0];
req.open("GET",main+"/index.php?s=&act=Stats&CODE=who&t="+tid);
req.onreadystatechange=function() {
if (req.readyState==4) {
txt=req.responseText;
okay=txt.match(new RegExp("showuser="+unum,"ig"));
if (okay) {
divs=document.getElementsByTagName("div");
for (p=0; p<divs.length; p++) {
if (divs[p].className=="hidetag") { divs[p].className="";
divs[p].style.display="inline"; }
}
}
}
}
req.send(null);
}
}
function ReplaceHides(tid) {
tid=tid;
ulnk=document.all?document.all.userlinks:document.getElementById("userlinks");
if (ulnk.innerHTML.match(/showuser=([0-9]+)/ig)!=null) {
unum=RegExp.$1;
divs=document.getElementsByTagName("div");
for (p=0; p<divs.length; p++) {
if (divs[p].className=="pformstrip" && divs[p].innerHTML.match(/Last 10 Posts/ig)!=null) {
divs[p].parentNode.innerHTML=divs[p].parentNode.innerHTML.replace(/\[hide\]([\s\S]*?)\[\/hide\]/ig,"<div class='hidetag'>$1</div>");
}
}
document.REPLIER.Post.value=document.REPLIER.Post.value.replace(/\[hide\].*?\[\/hide\]/ig,"");
document.REPLIER.QPost.value=document.REPLIER.QPost.value.replace(/\[hide\].*?\[\/hide\]/ig,"");
req=Request();
main=document.location.href.split("/index.php")[0];
req.open("GET",main+"/index.php?s=&act=Stats&CODE=who&t="+tid);
req.onreadystatechange=function() {
if (req.readyState==4) {
txt=req.responseText;
okay=txt.match(new RegExp("showuser="+unum,"ig"));
if (okay) {
divs=document.getElementsByTagName("div");
for (p=0; p<divs.length; p++) {
if (divs[p].className=="hidetag") { divs[p].className="";
divs[p].style.display="inline"; }
}
}
}
}
req.send(null);
}
}
tds=document.getElementsByTagName("td");
for (p=0; p<tds.length; p++) {
spans=tds[p].getElementsByTagName("span");
as=tds[p].getElementsByTagName("a");
if (as.length>0 && spans.length>0 && spans[0].className=="normalname" && as[0].href.match(/showuser=[0-9]+/ig)!=null) {
p+=3;
tds[p].innerHTML=tds[p].innerHTML.replace(/\[hide\]([\s\S]*?)\[\/hide\]/ig,"<div class='hidetag'>$1</div>");
}
}
if (document.location.href.match(/showtopic=([0-9]+)/ig)!=null) { ShowHides(RegExp.$1); }
if (document.location.href.match(/act=Post.*?&CODE=0[826]/ig)!=null && document.location.href.match(/t=([0-9]+)/ig)!=null) {
ReplaceHides(RegExp.$1);
}
</script>



...Không cần sửa đổi ǵ cả, bạn làm ngay được rồi và dùng tag này để ẩn đi một mục tùy ư khi viết bài:

Quote:
 

[HIDE] CHỮ VÀ H̀NH ẢNH [/HIDE]


Enjoy! :ngoaymui:
Posted Image
Offline Profile Quote Post Goto Top
 
yuta
No Avatar


Công nhận là cái mă này của kenshin rất hay!!
Offline Profile Quote Post Goto Top
 
bigbangs
No Avatar


ḿnh vẫn ko hiểu lắm bạn ạ
Offline Profile Quote Post Goto Top
 
Jimmy
Member Avatar
__Love__

...Đơn giản thui, bigbangs, hăy đăng kí một nick trong demo trên, rùi reply cho Topic post của Nekon, sẽ hỉu ngay, rất tuyệt ! :ngoaymui:
Posted Image
Offline Profile Quote Post Goto Top
 
ghost_boy1412
No Avatar


Quote:
 
thành viên phải có ít nhất 1 bài trả lời mới có thể xem phần được làm ẩn đi

Vậy th́ muốn phải post ít nhất 10 bài th́ làm sao! :leyle:
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · ..: CODES :.. · Next Topic »
Add Reply