帖子菜单

求教下,这段另外一个程序的代码怎么修改

vobdjkaryoxv 2017-8-23

这是一个XN的插件代码,怎么修改成HB适合用的。。。

HB的机制还没研究透。。。.


$CNTV = preg_match_all('/\[CNTV\](.*?)\[\/CNTV\]/i',$first['message_fmt'],$array);

if($CNTV){

for($i=0;$i<count($array[0]);$i++){

$a = $array[0][$i];

$b = $array[1][$i];

$c = '<div id="embed_playerid" style="text-align:center"></div><script type="text/javascript" src="http://js.player.cntv.cn/innerShare.js"></script><script type="text/javascript" src="http://js.player.cntv.cn/creator/swfobject.js"></script><script type="text/javascript">var fo = createPlayer("v_player",640,480);fo.addVariable("videoId","vid");fo.addVariable("videoCenterId","';

$d = '");fo.addVariable("videoType","0");fo.addVariable("videoEditMode","1");fo.addVariable("isAutoPlay","false");fo.addParam("wmode","opaque");writePlayer(fo,"embed_playerid");</script>';

$e = "$c$b$d";

if($user){

$first['message_fmt'] = str_replace($a,$e,$first['message_fmt']);

}else{

$first['message_fmt'] = str_replace($a,$e,$first['message_fmt']);

}

}

}


vobdjkaryoxv

# 1楼 2017-8-23 点评

这个是帖子输出转义,使用Action\Thread.php 钩子,要用哪个钩子。。。

东头你真哥

# 2楼 2017-8-27 点评

 用编辑器的代码框发代码,,,现在这个完全乱着呢

踩 (0)
赞 (0)
查看 (4880)
登陆后才可发表内容