Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[插件] [原创]签名的终极折叠 for 4.1.0 by lu5266[更新:06/06/07/16:47]

[复制链接]
 楼主| lu5266 发表于 2006-5-3 20:03:56 | 显示全部楼层
原帖由 终结者4 于 2006-5-3 19:49 发表
可惜又是一个升级数据库的插件咯


????

那有???
回复

使用道具 举报

 楼主| lu5266 发表于 2006-5-3 20:04:40 | 显示全部楼层
整理完毕!!!!!!!!!!!!
回复

使用道具 举报

诺维兹基 发表于 2006-5-3 20:06:57 | 显示全部楼层
老大 我要向你学习这个:
<script language="javascript">
//wondful signature collapse for discuz 4.1.0
//http://www.discuzplus.com
//power by lu5266(www.5466.ik8.com)
function write_cookie(cookie_name,style_display,sign_uid){

   collapsed    = getcookie("dpt_sign_collapse");
   cookie_start = collapsed ? collapsed.indexOf(cookie_name) : -1;
   cookie_end   = cookie_start + cookie_name.length + 1;
   
   if(style_display == "none" && sign_uid != "-1"  || sign_uid == "-2") {
          if(cookie_start != -1) {
                 collapsed = collapsed.substring(0, cookie_start) + collapsed.substring(cookie_end, collapsed.length);
          }
   }else{
          if(cookie_start == -1){
                 collapsed = collapsed + cookie_name + " ";
          }
   }

   expires = new Date();
   expires.setTime(expires.getTime() + (collapsed ? 86400 * 1000 * 30 * 12 : -(86400 * 30 * 1000)));
   document.cookie = "dpt_sign_collapse=" + escape(collapsed) + "; expires=" + expires.toGMTString() + "; path=/";   

}

function dpt_sign_collapse(sign_uid,hide_all){
   
   authorobj    = document.getElementsByTagName("tbody");
   autimgobj    = document.getElementsByTagName("img");

   for(var AI=0; AI < autimgobj.length; AI++){
       if(typeof(autimgobj[AI].name) != "undefined"){
          issign = hide_all ? (autimgobj[AI].name.indexOf('ignature_img_') > 0  ? 1 : 0 ) : (autimgobj[AI].name == 'signature_img_'+ sign_uid ? 1 : 0);
          if(issign){
             if((autimgobj[AI].src.toString().indexOf("_yes.gif") > 0 && sign_uid !="-1" ) || sign_uid =="-2" ){
                autimg_re = new RegExp("_yes\\.gif$");         
                        autimgobj[AI].src = autimgobj[AI].src.replace(autimg_re, '_no.gif');
                     }else{
                        autimg_re = new RegExp("_no\\.gif$");         
                        autimgobj[AI].src = autimgobj[AI].src.replace(autimg_re, '_yes.gif');
                     }                     
          }
       }
   }
      
   for(AI=0; AI < authorobj.length; AI++){
   
       if(typeof(authorobj[AI].name) != "undefined"){
          issign = hide_all ? (authorobj[AI].name.indexOf('ignature_') > 0 ? 1 : 0) : (authorobj[AI].name == 'signature_'+ sign_uid ? 1 : 0);
          if(issign){
             write_cookie(authorobj[AI].name,authorobj[AI].style.display,sign_uid);
             authorobj[AI].style.display = authorobj[AI].style.display == "" || sign_uid =="-1" ? "none" : "";
          }
       }      
   }
}

</script>
回复

使用道具 举报

 楼主| lu5266 发表于 2006-5-3 20:09:27 | 显示全部楼层
原帖由 诺维兹基 于 2006-5-3 20:06 发表
老大 我要向你学习这个:


呵呵


写了N(>10)个小时

我晕的要命

昨天晚上
回复

使用道具 举报

魔面浪子 发表于 2006-5-3 20:09:39 | 显示全部楼层
演示看不到,网站打不开!
回复

使用道具 举报

 楼主| lu5266 发表于 2006-5-3 20:11:08 | 显示全部楼层

回复 #14 诺维兹基 的帖子

其实论坛本身的许多函数是可以直接使用的

或者参考/修改使用
回复

使用道具 举报

 楼主| lu5266 发表于 2006-5-3 20:12:50 | 显示全部楼层

回复 #16 魔面浪子 的帖子

其实我那里根本就没安装

我是在本地弄的


由于我的空间问题
回复

使用道具 举报

孤情一刀 发表于 2006-5-3 20:14:00 | 显示全部楼层
顶!
回复

使用道具 举报

 楼主| lu5266 发表于 2006-5-3 20:15:30 | 显示全部楼层
原帖由 孤情一刀 于 2006-5-3 20:14 发表
顶!

回复

使用道具 举报

linsie 发表于 2006-5-3 20:16:59 | 显示全部楼层
lulu的东西不顶就是mjj
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-4-28 04:13 , Processed in 0.097921 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表