指定用户名阅读

Home Home
引用 | 编辑 达人村惟禄
2006-05-17 09:06
楼主
推文 x0
【插件名称】指定用户名阅读
【适用版本】4.32
【插件来源】转贴
【插件类型】加强
【是否升级资料库】
【插件介绍】

[此文章售价 5 雅币已有 13 人购买]
若发现会员采用欺骗的方法获取财富,请立刻举报,我们会对会员处以2-N倍的罚金,严重者封掉ID!



献花 x0
引用 | 编辑 chris710908
2006-05-19 12:47
1楼
  
表情 这功能好屌阿~~3.01版的适用吗?
感谢版大分享

献花 x0
引用 | 编辑 达人村惟禄
2006-05-19 17:24
2楼
  
下面是引用chris710908于2006-05-19 12:47发表的 :
表情 这功能好屌阿~~3.01版的适用吗?
感谢版大分享
纯转贴 没用过 所以不晓得

献花 x0
引用 | 编辑 chris710908
2006-06-02 00:40
3楼
  
可以另外请教板大一个问题吗?就是我到官方找到资料.它的资料我改成3.01版可以用的方式后
可以指定用户名.性别以及级别.但是在发帖.精华与支持度的限制方面却没有效果.关键BBSCODE.php程式码如下


复制程式
function towhom($whom,$code){
  global $SYSTEM,$admincheck,$attachper,$windid,$tpc_author,$tpc_buy,$fid,$tid,$pid,$i_table,$manager,$groupid,$code_num,$code_htm,$lang,$db_credits,$db_bbsurl,$gender,$ltitle,$userrvrc,$read,$winddb;
  $whomarray=explode(',',$whom);
  $whomarray1=explode(':',$whom);
  if($whom=='男生'){$gendercheck=1;}elseif($whom=='女生'){$gendercheck=2;}else{$gendercheck=3;}
  if($whomarray1[0]=='发帖'){$limit=$read[postnum];}elseif($whomarray1[0]=='精华'){$limit=$read[digests];}elseif($whomarray1[0]=='支持度'){$limit=$read[credit];}else{$limit=''}
  if(($whomarray && @in_array($windid,$whomarray)) || $windid==$tpc_author || $windid==$manager || $gender==$gendercheck || $whom==$ltitle[$groupid] || $limit >= $whomarray1[1]){
    $attachper=1;
    return '<br><font color=blue>您是被作者指定的人,可以阅读:</font><br><div class=quote>'.$code.'</div>'
  }else{$attachper=0;return '<div class=quote><font color=red>这个帖子指定由'.$whom.'阅读</font></div>'}
}

其中判别发帖.精华.支持度的变数是$whomarray1[0],$whomarray1[0]为文字,但是在判别的时候使用
$limit >= $whomarray1[1]者才能浏览.$limit是数值儿$whomarray1[1]是文字.这样要怎么作判断?
我的部份就是发帖.精华.支持度都没有作用.加密后还是看的到.请问这地方有办法改吗?
让有设定发帖.精华.支持度的加密可以有效果?

献花 x0
引用 | 编辑 0951020223
2007-03-21 19:51
4楼
  
我是用432的
以上有一部分错误....

if(strpos($message,"[to") !== false && strpos($message,"[/to]") !== false){
  $message=preg_replace("/[to=(.+?)](.+?)[/to]/eis","towhom('\1','\2')",$message);
}

应改成

if(strpos($message,"[to") !== false && strpos($message,"[/to]") !== false){
                $message=preg_replace("/\[to=(.+?)\](.+?)\[\/to\]/eis","towhom('\\1','\\2')",$message);
           }


能告诉我这是舍嚜原因吗??
表情

献花 x0
引用 | 编辑 rugawa
2007-04-11 23:30
5楼
  
下面是引用chris710908于2006-06-02 00:40发表的 :
可以另外请教板大一个问题吗?就是我到官方找到资料.它的资料我改成3.01版可以用的方式后
可以指定用户名.性别以及级别.但是在发帖.精华与支持度的限制方面却没有效果.关键BBSCODE.php程式码如下


[code]function towhom($whom,$code){
.......
$whomarray1[0]是以 : 作为区隔取得的第0个字串,也就是 精华、发帖....等文字
$whomarray1[1]是第1个字串也就是指定的数值

献花 x0
引用 | 编辑 rugawa
2007-04-11 23:31
6楼
  
下面是引用0951020223于2007-03-21 19:51发表的 :
我是用432的
以上有一部分错误....

if(strpos($message,"[to") !== false && strpos($message,"[/to]") !== false){
  $message=preg_replace("/[to=(.+?)](.+?)[/to]/eis","towhom('\1','\2')",$message);
.......
本来就应该是这样,可能是转帖的时候 \ 被PW或者转帖工具给滤掉了

献花 x0