找回密码
 注册
查看: 2517|回复: 2
收起左侧

实现多媒体附件自动播放For DZ 6.0

[复制链接]

5342

主题

8363

帖子

1万

积分

管理员

出售国内外虚拟空间

Rank: 10Rank: 10Rank: 10

积分
14736
帖子
8363
精华
67
体力
14736 点
蓝豆
2391 点
注册时间
2007-6-8

终身成就奖LY官方团队会员身份ID卡

发表于 2007-10-21 18:29:42 | 显示全部楼层 |阅读模式

打开default/Discuz\">discuzcode.htm文件,查找:

复制内容到剪贴板
代码:
global $attachrefcheck, $extcredits, $creditstrans, $ftp, $thumbstatus;

有两处这个代码,在第一个的下面添加:

复制内容到剪贴板
代码:
$media = array(\'\', \'wma\', \'mp3\',\'wav\', \'mid\');
$rms = array(\'\', \'rm\', \'rmvb\');
$video = array(\'\', \'wmv\', \'avi\', \'mpg\', \'asx\', \'asf\',\'WMV\');
$divx = array(\'\', \'divx\');

上面的代码已经支持了绝大多数的媒体文件了。

2、查找:

复制内容到剪贴板
代码:



$attach[attachicon]
php?aid=$attach[aid]" target="_blank">$attach[filename]
($attach[attachsize])

上面添加:

复制内容到剪贴板
代码:



$attach[attachicon]
$attach[filename]
($attach[attachsize])



$attach[dateline], {lang downloads}: $attach[downloads]
, {lang readperm}: $attach[readperm]

, {lang price}: {$extcredits[$creditstrans][title]} $attach[price] {$extcredits[$creditstrans][unit]}[{lang pay_view}]

[{lang attachment_buy}]



{$attach[description]}








$attach[attachicon]
$attach[filename]
($attach[attachsize])



$attach[dateline], {lang downloads}: $attach[downloads]
, {lang readperm}: $attach[readperm]

, {lang price}: {$extcredits[$creditstrans][title]} $attach[price] {$extcredits[$creditstrans][unit]}[{lang pay_view}]

[{lang attachment_buy}]



{$attach[description]}








$attach[attachicon]
$attach[filename]
($attach[attachsize])



$attach[dateline], {lang downloads}: $attach[downloads]
, {lang readperm}: $attach[readperm]

, {lang price}: {$extcredits[$creditstrans][title]} $attach[price] {$extcredits[$creditstrans][unit]}[{lang pay_view}]

[{lang attachment_buy}]



{$attach[description]}









$attach[attachicon]
$attach[filename]
($attach[attachsize])



$attach[dateline], {lang downloads}: $attach[downloads]
, {lang readperm}: $attach[readperm]

, {lang price}: {$extcredits[$creditstrans][title]} $attach[price] {$extcredits[$creditstrans][unit]}[{lang pay_view}]

[{lang attachment_buy}]



{$attach[description]}







































$attach[attachicon]
$attach[filename]
($attach[attachsize])



$attach[dateline], {lang downloads}: $attach[downloads]
, {lang readperm}: $attach[readperm]

, {lang price}: {$extcredits[$creditstrans][title]} $attach[price] {$extcredits[$creditstrans][unit]}[{lang pay_view}]

[{lang attachment_buy}]



{$attach[description]}




codebase=\"http://download.divx.com/player/DivXBrowserPlugin.cab\" height=\"400\" width=\"690\" classid=\"clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616\">


tage6\" />





最终效果附件

注意:因为rm、rmvb格式的播放器需要最终的地址, 系统默认rm、rmvb格式上传扩展名会修改为.attach。要实现rm格式的附件在线播放需要修改如下:
打开:include\\post.func.php,查找:

复制内容到剪贴板
代码:
static $safeext= array(\'jpg\', \'jpeg\', \'gif\', \'png\', \'swf\', \'bmp\', \'txt\', \'zip\', \'rar\', \'doc\', \'mp3\');

修改为:

复制内容到剪贴板
代码:
static $safeext= array(\'jpg\', \'jpeg\', \'gif\', \'png\', \'swf\', \'bmp\', \'txt\', \'zip\', \'rar\', \'doc\', \'mp3\', \'rm\', \'rmvb\');

作用就是添加rm、rmvb为安全文件格式。保存!

懒得打字嘛,点击右侧快捷回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

网站公告上一条 /2 下一条

GMT+8, 2025-2-11 07:33 , Processed in 0.112619 second(s), 24 queries , Gzip On.

© 2006-2022 Powered by Discuz! X3.4

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