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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[已解决] 站外SWF视频无法播放

[复制链接]
netroby 发表于 2013-5-14 09:59:25 | 显示全部楼层 |阅读模式
升级X2.5 20130426之后, 站外的SWF调用就无法播放了,问题出在Discuzcode方法封装里面。
  1. git diff HEAD^..HEAD source/function/function_discuzcode.php
  2. diff --git a/source/function/function_discuzcode.php b/source/function/function_discuzcode.php
  3. index 0ec8d2f..1fbfa64 100755
  4. --- a/source/function/function_discuzcode.php
  5. +++ b/source/function/function_discuzcode.php
  6. @@ -4,7 +4,7 @@
  7.   *      [Discuz!] (C)2001-2099 Comsenz Inc.
  8.   *      This is NOT a freeware, use is subject to license terms
  9.   *
  10. - *      $Id: function_discuzcode.php 30926 2012-07-02 05:48:08Z chenmengshu $
  11. + *      $Id: function_discuzcode.php 33109 2013-04-26 03:59:30Z andyzheng $
  12.   */

  13. if(!defined('IN_DISCUZ')) {
  14. @@ -270,13 +270,13 @@ function parseurl($url, $text, $scheme) {
  15. function parseflash($w, $h, $url) {
  16.         $w = !$w ? 550 : $w;
  17.         $h = !$h ? 400 : $h;
  18. -       preg_match("/((https?){1}:\/\/|www\.)[^\["']+/i", $url, $matches);
  19. +       preg_match("/((https?){1}:\/\/|www\.)[^\["']+\.swf/i", $url, $matches);
复制代码
.swf之后的就被截掉了,导致优酷,土豆,乐视等站点的swf调用无法播放。

解决问题的办法,是改成:
  1. diff --git a/source/function/function_discuzcode.php b/source/function/function_discuzcode.php
  2. index 1fbfa64..a53b32b 100755
  3. --- a/source/function/function_discuzcode.php
  4. +++ b/source/function/function_discuzcode.php
  5. @@ -270,7 +270,7 @@ function parseurl($url, $text, $scheme) {
  6. function parseflash($w, $h, $url) {
  7.         $w = !$w ? 550 : $w;
  8.         $h = !$h ? 400 : $h;
  9. -       preg_match("/((https?){1}:\/\/|www\.)[^\["']+\.swf/i", $url, $matches);
  10. +       preg_match("/((https?){1}:\/\/|www\.)[^\["']+\.swf.*/i", $url, $matches);
  11.         $url = $matches[0];
  12.         $randomid = 'swf_'.random(3);
  13.         if(fileext($url) != 'flv') {
  14. @@ -650,4 +650,4 @@ function parsesmiles(&$message) {
  15.         return $message;
  16. }

  17. -?>
  18. \ No newline at end of file
  19. +?>
复制代码
菱长莱 发表于 2013-5-14 15:04:41 | 显示全部楼层
“.swf之后的就被截掉了,导致优酷,土豆,乐视等站点的swf调用无法播放。”——官方这样做的吗?若是,又为什么呢》
回复

使用道具 举报

无效楼层,该帖已经被删除
huyongjc 发表于 2013-5-21 20:32:15 | 显示全部楼层
没看到怎么改
回复

使用道具 举报

火舞狂龙 发表于 2013-5-22 10:29:46 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

guitar_bo 发表于 2013-5-27 11:36:45 | 显示全部楼层
是哪个文件啊
回复

使用道具 举报

shxiange2012 发表于 2013-6-13 09:38:01 | 显示全部楼层
在那个文件夹里啊
回复

使用道具 举报

 楼主| netroby 发表于 2013-7-18 14:52:27 | 显示全部楼层
source/function/function_discuzcode.php
这个文件
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-3-6 02:00 , Processed in 0.042146 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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