日志文章


2006-09-25

flash|wmv|rm等多媒体标签限制不同级别的会员使用 for 4.X 5.X

flash、wmv、rm、mp等多媒体标签限制不同级别的会员使用,无须后台设置!

PW 4.3.2的安装方法见:http://bbs.laxjyj.com/read.php?tid=35453

功能:使用url链接替换多媒体标签,限制低级别会员发表多媒体主题。

演示:http://bbs.laxjyj.com/thread-htm-fid-60-type-3.html

1、requirepostreply.php和requirepostmodify.php
查找:

Copy code
$atc_content=trim($atc_content);

在它上面加上:
Copy code
  //加入限制级别使用标签的功能 by 隆安教育论坛·东升
  if ($groupid<>'3' && $groupid<>'4' && $groupid<>'5'){//在这里限制级别,这里为斑竹以上级别可以使用flash标签
    $atc_content = preg_replace("/([flash=)(d+?)(,)(d+?)(])(.+?)([/flash])/is","[url]\6[/url]",$atc_content,$db_cvtimes);
  }
  if ($groupid<>'3' && $groupid<>'4' && $groupid<>'5' && $winddb['postnum']<100){//发贴量大于一定数量可以使用其他多媒体标签
    $atc_content = preg_replace("/([mp=)([0-1]{1,1})(])(.+?)([/mp])/is","[url]\4[/url]",$atc_content,$db_cvtimes);
    $atc_content = preg_replace("/[mp](.+?)[/mp]/eis","[url]\2[/url]",$atc_content,$db_cvtimes);
    $atc_content = preg_replace("/([wmv=)([0-9]{1,3})(,)([0-9]{1,3})(,)([0-1]{1,1})(])(.+?)([/wmv])/is","[url]\8[/url]",$atc_content,$db_cvtimes);
    $atc_content = preg_replace("/[wmv](.+?)[/wmv]/is","[url]\2[/url]",$atc_content,$db_cvtimes);
    $atc_content =
preg_replace("/([rm=)([0-9]{1,3})(,)([0-9]{1,3})(,)([0-1]{1,1})(])(.+?)([/rm])/is","[url]\8[/url]",$atc_content,$db_cvtimes);
    $atc_content = preg_replace("/[rm](.+?)[/rm]/is","[url]\2[/url]",$atc_content,$db_cvtimes);
  }
  //以上加入限制级别使用标签的功能 by 隆安教育论坛·东升


2、查找requirepostnew.php
Copy code
if (($foruminfo['f_check'] == 1 || $foruminfo['f_check'] == 3) && $_G['atccheck'] && !$admincheck){

在它上面加上:
Copy code
  //加入限制级别使用标签的功能 by 隆安教育论坛·东升
  if ($groupid<>'3' && $groupid<>'4' && $groupid<>'5'){//在这里限制级别,这里为斑竹以上级别可以使用flash标签
    $atc_content = preg_replace("/([flash=)(d+?)(,)(d+?)(])(.+?)([/flash])/is","[url]\6[/url]",$atc_content,$db_cvtimes);
  }
  if ($groupid<>'3' && $groupid<>'4' && $groupid<>'5' && $winddb['postnum']<100){//发贴量大于一定数量可以使用其他多媒体标签
    $atc_content = preg_replace("/([mp=)([0-1]{1,1})(])(.+?)([/mp])/is","[url]\4[/url]",$atc_content,$db_cvtimes);
    $atc_content = preg_replace("/[mp](.+?)[/mp]/eis","[url]\2[/url]",$atc_content,$db_cvtimes);
    $atc_content = preg_replace("/([wmv=)([0-9]{1,3})(,)([0-9]{1,3})(,)([0-1]{1,1})(])(.+?)([/wmv])/is","[url]\8[/url]",$atc_content,$db_cvtimes);
    $atc_content = preg_replace("/[wmv](.+?)[/wmv]/is","[url]\2[/url]",$atc_content,$db_cvtimes);
    $atc_content =
preg_replace("/([rm=)([0-9]{1,3})(,)([0-9]{1,3})(,)([0-1]{1,1})(])(.+?)([/rm])/is","[url]\8[/url]",$atc_content,$db_cvtimes);
    $atc_content = preg_replace("/[rm](.+?)[/rm]/is","[url]\2[/url]",$atc_content,$db_cvtimes);
  }
  //以上加入限制级别使用标签的功能 by 隆安教育论坛·东升


PW 4.3.2 的安装方法与PW5,目前是一样的:)


类别: 无分类 |  评论(13) |  浏览(13485) |  收藏
一共有 13 条评论
adon 2006-09-25 12:29 Says:
不是不支持这些修改,问题是,修改后,PW更新,就不能用了,那样,又得等你更新。要是你没空,那一年半载都不知能不能帮,用着好好的,突然少一个功能,很不顺心的,像现在,我更新了文件后,那个贴子播放修改就不能用了,我还原了bbscode.php文件,WMV可以播放了,可是RM播不了,烦啊。。。。
汪大东 2006-09-25 12:23 Says:
相当好!
东升 2006-09-25 10:05 Says:
Quote:
引用第7楼cyqdesign2006-09-25 08:57发表的“”:
我测试了一下,“斑竹以上级别可以使用flash标签”没有限制住呀。发帖量限制也没有起作用,限制其它标签?

修正了
星宇蓝冰 2006-09-25 09:07 Says:
好东西,顶一下
cyqdesign 2006-09-25 08:57 Says:
我测试了一下,“斑竹以上级别可以使用flash标签”没有限制住呀。发帖量限制也没有起作用,限制其它标签?
蒙蒙的海 2006-09-25 08:45 Says:
先试验一下
然后回复楼主情况
cyqdesign 2006-09-25 08:38 Says:
支持,很有用!
man20 2006-09-25 08:13 Says:
无意中撞进来了.
2006-09-25 08:13 Says:
地板我不要啦
« 1 2» Pages: ( 1/2 total )