标签 seacms 下的文章

SeaCMS控制台报错xyplay is not defined

问题:
1.jpg
原因是jq ajax默认使用异步加载导致的
2.jpg

解决:
编辑/js/player/dplayer/dplayer.html文件,在

success:function(data){    

上方插入

async: false,

关掉异步加载即可
3.jpg

SeaCMS播放地址中包含中文时解码错误导致无法播放

播放地址中包含中文时,正则获取到的内容可能是encodeURI编码后的,直接使用unescape解码会导致中文字符乱码而无法正常播放。
编辑/js/player/dplayer/dplayer.html文件,找到

if(r != null) return unescape(r[2]);

替换为:

if(r != null && r[2] !== undefined) return r[2].includes('%') ? decodeURI(r[2]) : unescape(r[2]);

根据播放地址字符串自动判断使用decodeURI或unescape解码。

设置SeaCMS支持WebP图片格式

1、允许后台下载WebP格式视频图片到本地
编辑 /include/image.class.php 文件第49行,将

if (strpos("|.jpg|.gif|.png|.bmp|.jpeg|",strtolower($fileext))===false){

修改为

if (strpos("|.jpg|.gif|.png|.bmp|.jpeg|.webp|",strtolower($fileext))===false){

编辑 /include/image.class.php 文件第127行,将

if ($fileext!="" && strpos("|.jpg|.gif|.png|.bmp|.jpeg|",strtolower($fileext))>0){

修改为

if ($fileext!="" && strpos("|.jpg|.gif|.png|.bmp|.jpeg|.webp|",strtolower($fileext))>0){

2、允许后台上传WebP格式视频图片
编辑 /admin/upload.php 文件第48行,将

var $allowExts = array('jpg', 'gif',  'png', 'rar', 'zip', 'bmp');

修改为

var $allowExts = array('jpg', 'gif',  'png', 'rar', 'zip', 'bmp', 'webp');

SeaCMS剧情分类按ID排序

1、前台

编辑/include/common.file.func.php文件第1876行,将

$sql="select tid,upid,tname,ishidden,-1 as tcount from sea_jqtype order by upid asc";

修改为

$sql="select tid,tname,ishidden,-1 as tcount from sea_jqtype";

编辑/include/common.redis.func.php文件第1883行,将

$sql="select tid,upid,tname,ishidden,-1 as tcount from sea_jqtype order by upid asc";

修改为

$sql="select tid,tname,ishidden,-1 as tcount from sea_jqtype";

2、后台

编辑文件/admin/admin_video.php文件第809行,将

$sql="select tid,upid,tname,ishidden,-1 as tcount from sea_jqtype group by tname order by upid asc";

修改为

$sql="select tid,tname,ishidden,-1 as tcount from sea_jqtype";

SeaCMS修改图片保存样式

1、采集影片图片保存目录样式
编辑/include/image.class.php文件,第48行,将

$picpath = '../'.$cfg_upload_dir.'/allimg/'.MyDate("ymd",time())."/";

修改为

$picpath = '../'.$cfg_upload_dir.'/allimg/'.MyDate("Ym",time())."/";

2、手动上传图片保存目录样式
编辑 /admin/upload.php 文件第47行

var $subDir = 'Ym';

修改为和采集图片一样即可。