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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

连续回帖自动改为在上面一楼追加【实用·长帖自动不追加·版块黑白名单】

[复制链接]
 楼主| wxyuan90 发表于 2008-8-17 22:20:30 | 显示全部楼层
是的,追加的话就和编辑差不多,没有分的
回复

使用道具 举报

小小新 发表于 2008-8-18 00:39:27 | 显示全部楼层
怎么***补充以下内容 的f字体加不黑了
回帖表情不能被解析
回复

使用道具 举报

小小新 发表于 2008-8-18 00:51:36 | 显示全部楼层
第一个已经解决了
  1. $_insertword = "\n\n[b]$discuz_userss 于 ".date("$dateformat $timeformat",

  2. $timestamp)." 补充以下内容[/b]\n\n";//追加内容前缀
复制代码
用百度快照找到的,哈哈

回帖的表情能不能弄成可以解析的呢?
回复

使用道具 举报

古月.清风 发表于 2008-8-18 01:02:50 | 显示全部楼层
(::17::) 还好我就等着大雾改成长贴不加的。
回复

使用道具 举报

小小新 发表于 2008-8-18 01:16:14 | 显示全部楼层
举一反三,再加点颜色
  1. $_insertword = "\n\n[b][color=Red]$discuz_userss 于 ".date("$dateformat $timeformat", $timestamp)." 补充以下内容[/color][/b]\n\n";//追加内容前缀
复制代码
表情问题测试发现是后台设置表情解析数的问题,与楼主无关

明天就用上这个,哈哈
回复

使用道具 举报

小小新 发表于 2008-8-18 01:46:26 | 显示全部楼层
再加一个管理组不受限制,嘿嘿~~~
  1.         //连续回复自动合并 by wxyuan90 add
  2.         if (!in_array($adminid, array(1,2,3))){//可以在这里设置不受此限制的管理组id(1管理员2超版3普版-1特殊)
  3.     $_insertword = "\n\n[b][color=Red]$discuz_userss 于 ".date("$dateformat $timeformat", $timestamp)." 补充以下内容[/color]

  4. [/b]\n\n";//追加内容前缀
  5.     $_maxlength = 10;//字符数大于此值则一律不合并,注意1中文=2字符(GBK)或3字符(UTF)
  6.     $_reducesmile = 1;//设为1=去除表情之后计算字数,0=否
  7.     $_reducequote = 1;//设为1=去除引用之后计算字数,0=否
  8.     $_reducespace = 1;//设为1=去除空白换行之后计算字数,0=否
  9.           //设置部分结束
  10.     $temp = $message;
  11.           if(is_array($smilies))if($_reducesmile) foreach($smilies as $sm) {
  12.                   $temp = str_replace($sm['code'], '', $temp);        
  13.           }
  14.           if($_reducequote) $temp = preg_replace("/\s*\[quote\][\n\r]*(.+?)[\n\r]*\[\/quote\]\s*/is", '', $temp);
  15.           if($_reducespace) $temp = preg_replace("/\s/is", '', $temp);
  16.           $temp = trim($temp);
  17.           $length = strlen($temp);
  18.           unset($temp);
  19.           if($length <= $_maxlength) {
  20.                   $q = $db->query("SELECT authorid, pid FROM {$tablepre}posts WHERE tid='$tid' ORDER BY pid DESC LIMIT 1");
  21.                   $q = $db->fetch_array($q);
  22.                   if($q['authorid'] == $discuz_uid && !$attachment && !$isanonymous) {
  23.                           $message = $_insertword . $message;
  24.                           $db->query("UPDATE {$tablepre}posts SET bbcodeoff = 0, message = CONCAT(message, '$message') WHERE

  25. pid='{$q['pid']}'");
  26.                           showmessage('post_reply_succeed', "viewthread.php?tid=$tid&pid={$q[pid]}&page=".(@ceil(($thread

  27. ['special'] ? $thread['replies'] : $thread['replies'] + 1) / $ppp))."&extra=$extra#pid{$q[pid]}");
  28.                   }
  29.           }
  30.   }
  31.   //连续回复自动合并 by wxyuan90 end       
复制代码

[ 本帖最后由 小小新 于 2008-8-18 02:39 编辑 ]
回复

使用道具 举报

 楼主| wxyuan90 发表于 2008-8-18 10:10:43 | 显示全部楼层
(::24::) 那个。。。管理组带头灌水啊
回复

使用道具 举报

Chienlin 发表于 2008-8-18 15:36:20 | 显示全部楼层
分享一下
稍微改一下顏色 同時加上了分隔線 供大家參考

  1.         //連續回復自動合併 by wxyuan90 & Fixed by Chienlin add
  2. //    if (!in_array($adminid, array(1))){//可以在这里设置不受此限制的管理组id(1管理员2超版3普版-1特殊)
  3.   $_lineword = "\n\n[color=Green]====================[/color]"; // 分隔線
  4.   $_insertword = $_lineword."\n\n$discuz_userss 於 ".date("$dateformat $timeformat", $timestamp)." 補充以下內容\n\n";//追加內容前綴
  5.   $_maxlength = 800;//字符數大於此值則一律不合並,注意1中文=2字符(GBK)或3字符(UTF)
  6.   $_reducesmile = 1;//設為1=去除表情之後計算字數,0=否
  7.   $_reducequote = 1;//設為1=去除引用之後計算字數,0=否
  8.   $_reducespace = 1;//設為1=去除空白換行之後計算字數,0=否
  9.         //設置部分結束
  10.   $temp = $message;
  11.         if(is_array($smilies))if($_reducesmile) foreach($smilies as $sm) {
  12.                 $temp = str_replace($sm['code'], '', $temp);        
  13.         }
  14.         if($_reducequote) $temp = preg_replace("/\s*\[quote\][\n\r]*(.+?)[\n\r]*\[\/quote\]\s*/is", '', $temp);
  15.         if($_reducespace) $temp = preg_replace("/\s/is", '', $temp);
  16.         $temp = trim($temp);
  17.         $length = strlen($temp);
  18.         unset($temp);
  19.         if($length <= $_maxlength) {
  20.                 $q = $db->query("SELECT authorid, pid FROM {$tablepre}posts WHERE tid='$tid' ORDER BY pid DESC LIMIT 1");
  21.                 $q = $db->fetch_array($q);
  22.                 if($q['authorid'] == $discuz_uid && !$attachment && !$isanonymous) {
  23.                         $message = "[color=red]".$_insertword ."[/color][color=Blue]". $message ."[/color]".$_lineword;
  24.                         $db->query("UPDATE {$tablepre}posts SET bbcodeoff = 0, message = CONCAT(message, '$message') WHERE pid='{$q['pid']}'");
  25.                         showmessage('post_reply_succeed', "viewthread.php?tid=$tid&pid={$q[pid]}&page=".(@ceil(($thread['special'] ? $thread['replies'] : $thread['replies'] + 1) / $ppp))."&extra=$extra#pid{$q[pid]}");
  26.                                 }
  27.         }
  28. //        }
  29.         //連續回復自動合併 by wxyuan90 & Fixed by Chienlin end
复制代码

[ 本帖最后由 Chienlin 于 2008-8-18 15:45 编辑 ]
回复

使用道具 举报

小小新 发表于 2008-8-18 20:36:32 | 显示全部楼层
原帖由 wxyuan90 于 2008-8-18 10:10 发表
(::24::) 那个。。。管理组带头灌水啊

哈哈哈,让我们一起把大雾的代码改的面目全非,嘿嘿~~
回复

使用道具 举报

 楼主| wxyuan90 发表于 2008-8-18 22:12:36 | 显示全部楼层
额……随便改(::24::) ,就是转载或者二次发布的话不要忘了标明原作者就行了
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-22 13:32 , Processed in 0.098799 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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