# 视频
- 目录
html/vod
- 所属模型
model('Vod')
- 模型mid
5
- 视频标签
{maccms:vod 参数1="值" 参数2="值" }...{/maccms:vod}
# 标签参数
order
排列顺序desc倒序,asc正序by
排序依据 id,time,time_add,score,hits,hits_day,hits_week,hits_month,up,down,level,rndstart
从第几条开始num
获取条数ids
指定1,2,3一组ID;not
不抱含id 多个逗号链接type
指定获取分类数据 all所有;1,2,3指定;class
指定某扩展分类 支持多个 动作,喜剧tag
指定tag 支持多个 aaa,xxxlevel
指定推荐值 支持多个 1,2area
指定地区 支持多个 大陆,香港lang
指定语言 支持多个 国语,粤语year
指定年代 支持多个 2002,2003state
资源类别 支持多个 高清版,剧场版,抢先版version
资源版本 支持多个 正片,预告片weekday
更新周期 支持多个 一,二,三rel
指定关联数据 1,2,3 或 变形金刚timeadd
添加时间 一天前 -1 day,一周前-1 week,一月前-1 month,一小时前-1 hourtimehits
点击时间 一天前 -1 day,一周前-1 week,一月前-1 month,一小时前-1 hourtime
更新时间 一天前 -1 day,一周前-1 week,一月前-1 month,一小时前-1 hourhitsmonth
月点击量 大于一千 gt 1000, 小于一千 lt 1000,区间一千二千之间 between 1000,2000hitsweek
周点击量 大于一千 gt 1000, 小于一千 lt 1000,区间一千二千之间 between 1000,2000hitsday
日点击量 大于一千 gt 1000, 小于一千 lt 1000,区间一千二千之间 between 1000,2000hits
总点击量 大于一千 gt 1000, 小于一千 lt 1000,区间一千二千之间 between 1000,2000paging
是否分页yespageurl
分页地址cachetime
自定义缓存时间单位秒isend
是否连载完毕 0,1plot
是否包含分集剧情 0,1- 使用示例:
{maccms:vod type="all" by="time" num="10" order="desc"}
<img src="{$vo.vod_pic|mac_url_img}"/>
<h5>{$vo.vod_name}</h5>
<!-- 更多内部标签字段请参考视 视频字段 以$vo.开头即可 -->
{/maccms:vod}
1
2
3
4
5
2
3
4
5
# 视频字段
在使用maccms:vod
标签获取视频列表时可以使用 数据表mac_vod
里的全部字段,并且在视频详情 、视频播放 和 视频下载页 一样支持全字调用。
使用差异
- 在
maccms:vod
内部使用字段默认以$vo
开头, 如影片名称{$vo.vod_name}
- 在 详情页、播放页和下载页使用
$obj
开头,如影片名称{$obj.vod_name}
<!-- 视频字段 -->
{$obj.vod_id} 视频id
{$obj.type_id} 分类id
{$obj.type_id_1} 一级分类id
{$obj.type} 分类对象,二级属性可参考分类属性
{$obj.type.type_name} 分类名
{$obj.type.type_en} 分类拼音
{$obj.type_1} 一级分类对象,二级属性可参考分类属性
{$obj.type_1.type_name} 一级分类名
{$obj.type_1.type_en} 一级分类拼音
{$obj.group_id} 用户组id
{$obj.vod_name} 视频名
{$obj.vod_sub} 副标题
{$obj.vod_en} 别名
{$obj.vod_status} 状态0未审1已审
{$obj.vod_letter} 首字母
{$obj.vod_color} 颜色
{$obj.vod_tag} tags
{$obj.vod_class} 扩展分类
{$obj.vod_pic} 图片
{$obj.vod_pic_thumb} 缩略图
{$obj.vod_pic_slide} 幻灯图
{$obj.vod_pic_screenshot}截图多个图片用$$$连接
{$obj.vod_actor} 主演
{$obj.vod_director} 导演
{$obj.vod_writer}编剧
{$obj.vod_behind}幕后
{$obj.vod_blurb} 简介
{$obj.vod_remarks} 备注
{$obj.vod_pubdate}上映日期
{$obj.vod_total} 总集数
{$obj.vod_serial} 连载数
{$obj.vod_tv} 上映电视台
{$obj.vod_weekday} 节目周期
{$obj.vod_area} 地区
{$obj.vod_lang} 语言
{$obj.vod_year} 年代
{$obj.vod_version} 版本-dvd,hd,720p
{$obj.vod_state} 资源类别-正片,预告片,花絮
{$obj.vod_author} 编辑人员
{$obj.vod_jumpurl} 跳转url
{$obj.vod_tpl} 独立模板
{$obj.vod_tpl_play} 独立播放页模板
{$obj.vod_tpl_down} 独立下载页模板
{$obj.vod_isend} 是否完结
{$obj.vod_lock} 锁定1
{$obj.vod_level} 推荐级别
{$obj.vod_points} 访问整个视频所需积分
{$obj.vod_points_play} 每集点播付费
{$obj.vod_points_down} 每集下载付费
{$obj.vod_hits} 总点击量
{$obj.vod_hits_day} 日点击量
{$obj.vod_hits_week} 周点击量
{$obj.vod_hits_month} 月点击量
{$obj.vod_duration} 时长
{$obj.vod_up} 顶数
{$obj.vod_down} 踩数
{$obj.vod_douban_score} 豆瓣评分
{$obj.vod_douban_id} 豆瓣ID
{$obj.vod_score} 平均分
{$obj.vod_score_all} 总评分
{$obj.vod_score_num} 评分次数
{$obj.vod_time} 更新时间
{$obj.vod_time_add} 添加时间
{$obj.vod_time_hits} 点击时间
{$obj.vod_time_make} 生成时间
{$obj.vod_trysee} 试看时长分
{$obj.vod_reurl} 来源地址
{$obj.vod_rel_vod} 关联视频ids
{$obj.vod_rel_art} 关联文章ids
{$obj.vod_content} 详细介绍
{$obj.vod_pwd} 访问内容页密码
{$obj.vod_pwd_url} 获取密码链接
{$obj.vod_pwd_play} 访问播放页密码
{$obj.vod_pwd_play_url} 获取密码链接
{$obj.vod_pwd_down} 访问下载页密码
{$obj.vod_pwd_down_url} 获取密码链接
{$obj.vod_copyright} 是否开启版权提示
{$obj.vod_play_from} 播放组
{$obj.vod_play_server} 播放服务器组
{$obj.vod_play_note} 播放备注
{$obj.vod_play_url} 播放地址
{$obj.vod_down_from} 下载租
{$obj.vod_down_server} 下载服务器组
{$obj.vod_down_note} 下载备注
{$obj.vod_down_url} 下载地址
{$obj.vod_plot} 是否包含分集剧情
{$obj.vod_plot_name} 分集剧情名称
{$obj.vod_plot_detail} 分集剧情详情
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# 常用函数
{:mac_url_vod_detail($obj)} 视频详情页链接
{:mac_url_vod_play($obj,['sid'=>1,'nid'=>1])} 视频播放页链接
{:mac_url_vod_play($obj,'first')} 视频播放页第一条链接
{:mac_url_vod_down($obj,['sid'=>1,'nid'=>1])} 视频下载页链接
{:mac_url_vod_down($obj,'first')} 视频下载页第一条链接
{$obj.vod_content|mac_url_content_img} 影片详情介绍
1
2
3
4
5
6
7
2
3
4
5
6
7
# 视频首页
这个页面模板一般情况很少用到,只是为了满足个别大型站点需要分独立主页时用到。
- 文件目录
html/vod/index.html
- 页面aid值
10
# 视频分类
- 文件目录
html/vod/type.html
- 页面aid值
11
- 当前分类数组
$obj
, - 详细字段参考- 【分类字段】
# 获取当前分类列表示例
<!-- 列表 -->
{maccms:vod num="24" paging="yes" type="current" order="desc" by="time"}
<li><a href="{:mac_url_vod_detail($vo)}" title="{$vo.vod_name}">
<img src="{:mac_url_img($vo.vod_pic)}" alt="{$vo.vod_name}"/>
<h2>{$vo.vod_name}</h2>
<p>{$vo.vod_actor}</p>
<i>{$vo.vod_version}</i>
</a></li>
{/maccms:vod}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# 视频筛选
- 文件目录
html/vod/show.html
- 页面aid值
12
- 当前分类数组
$obj
- 详细字段参考- 【分类字段】
- 可传URL参数
参数 | 示例值 | 必有参数 | 参数说明 |
---|---|---|---|
id | 1 | 是 | 分类id |
area | 大陆 | 否 | 地区筛选 |
lang | 国语 | 否 | 语言筛选 |
year | 2019 | 否 | 年份筛选 |
level | 9 | 否 | 推荐值筛选 |
letter | A | 否 | 首字母筛选 |
state | 1 | 否 | 审核状态筛选 |
tag | 国产大片 | 否 | tag筛选 |
class | 科幻片 | 否 | 扩展分类,类型筛选 |
order | desc | 否 | 倒序正序筛选 |
by | time | 否 | 排序依据筛选:默认支持:id, time,time_add,score,hits,hits_day,hits_week,hits_month,up,down,level,rnd,in |
- 请求url带参数示例
/index.php/vodshow/1/area/大陆/by/time/class/科幻/lang/国语/letter/A/year/2020.html
1
- 接受参数
- 用
$param
数组,html 模板 标签为 {$param},例如:获取当前的筛选的地区{$param['area']}
。 - 常用筛选示例代码
<!-- 筛选条件 -->
<div class="ui-box filter-focus">
<div class="ui-title"><h3>{$obj.type_name} - 高级搜索</h3></div>
<div class="ui-cnt">
<div class="filter-list fn-clear">
<h5>类型:</h5>
<ul>
<li><a {if condition="$param['class'] eq ''"} class="current" {/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>'','order'=>$param['order'],'by'=>$param['by'] ],'show')}">全部</a></li>
{empty name="$obj.type_extend.area"}
{maccms:foreach name=":explode(',',$obj.parent.type_extend.class)" id="vo2" key="key2"}
<li><a {if condition="$param['class'] eq $vo2"} class="current" {/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$vo2,'order'=>$param['order'],'by'=>$param['by'] ],'show')}">{$vo2}</a></li>
{/maccms:foreach}
{else /}
{maccms:foreach name=":explode(',',$obj.type_extend.class)" id="vo2" key="key2"}
<li><a {if condition="$param['class'] eq $vo2"} class="current" {/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$vo2,'order'=>$param['order'],'by'=>$param['by'] ],'show')}">{$vo2}</a></li>
{/maccms:foreach}
{/empty}
</ul>
</div>
<div class="filter-list fn-clear">
<h5>地区:</h5>
<ul>
<li><a {if condition="$param['area'] eq ''"} class="current" {/if} href="{:mac_url_type($obj,['area'=>'','lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">全部</a></li>
{empty name="$obj.type_extend.area"}
{maccms:foreach name=":explode(',',$obj.parent.type_extend.area)" id="vo2" key="key2"}
<li><a {if condition="$param['area'] eq $vo2"} class="current" {/if} href="{:mac_url_type($obj,['area'=>$vo2,'lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">{$vo2}</a></li>
{/maccms:foreach}
{else /}
{maccms:foreach name=":explode(',',$obj.type_extend.area)" id="vo2" key="key2"}
<li><a {if condition="$param['area'] eq $vo2"} class="current" {/if} href="{:mac_url_type($obj,['area'=>$vo2,'lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">{$vo2}</a></li>
{/maccms:foreach}
{/empty}
</ul>
</div>
<div class="filter-list fn-clear">
<h5>语言:</h5>
<ul>
<li><a {if condition="$param['lang'] eq ''"} class="current" {/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>'','year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">全部</a></li>
{empty name="$obj.type_extend.lang"}
{maccms:foreach name=":explode(',',$obj.parent.type_extend.lang)" id="vo2" key="key2"}
<li><a {if condition="$param['area'] eq $vo2"} class="current" {/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$vo2,'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">{$vo2}</a></li>
{/maccms:foreach}
{else /}
{maccms:foreach name=":explode(',',$obj.type_extend.lang)" id="vo2" key="key2"}
<li><a {if condition="$param['lang'] eq $vo2"} class="current" {/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$vo2,'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">{$vo2}</a></li>
{/maccms:foreach}
{/empty}
</ul>
</div>
<div class="filter-list fn-clear">
<h5>年代:</h5>
<ul>
<li><a {if condition="$param['year'] eq ''"} class="current"{/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>'','level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">全部</a></li>
{empty name="$obj.type_extend.year"}
{maccms:foreach name=":explode(',',$obj.parent.type_extend.year)" id="vo2" key="key2"}
<li><a {if condition="$param['area'] eq $vo2"} class="current" {/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>$vo2,'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">{$vo2}</a></li>
{/maccms:foreach}
{else /}
{maccms:foreach name=":explode(',',$obj.type_extend.year)" id="vo2" key="key2"}
<li><a {if condition="$param['year'] eq $vo2"} class="current" {/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>$vo2,'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">{$vo2}</a></li>
{/maccms:foreach}
{/empty}
</ul>
</div>
<div class="filter-list filter-list-letter fn-clear">
<h5>字母:</h5>
<ul>
<li><a {if condition="$param['letter'] eq ''"} class="current"{/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>'','state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">全部</a></li>
{maccms:foreach name=":explode(',','A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0~9')" id="vo2" key="key2"}
<li><a {if condition="$param['letter'] eq $vo2"} class="current"{/if} {/if} href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>$vo2,'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>$param['by'] ],'show')}">{$vo2}</a><li>
{/maccms:foreach}
</ul>
</div>
</div>
</div>
<!-- 排序方式 -->
<div class=" fn-clear">
<div class="view-filter">
<a href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>'time' ],'show')}" class="order {if condition="$param.by eq '' || $param.by eq 'time'"}current{/if}">按时间</a>
<a href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>'hits' ],'show')}" class="order {if condition="$param.by eq 'hits'"}current{/if}">按人气</a>
<a href="{:mac_url_type($obj,['area'=>$param['area'],'lang'=>$param['lang'],'year'=>$param['year'],'level'=>$param['level'],'letter'=>$param['letter'],'state'=>$param['state'],'tag'=>$param['tag'],'class'=>$param['class'],'order'=>$param['order'],'by'=>'score' ],'show')}" class="order {if condition="$param.by eq 'score'"}current{/if}">按评分</a>
</div>
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
- 当前筛选结果列表获取
<!-- 筛选结果列表 -->
{maccms:vod num="20" paging="yes" pageurl="vod/show" type="current" order="desc" by="time"}
<li><a href="{:mac_url_vod_detail($vo)}" title="{$vo.vod_name}">
<img src="{:mac_url_img($vo.vod_pic)}" alt="{$vo.vod_name}"/>
<h2>{$vo.vod_name}</h2>
<p>{$vo.vod_actor}</p>
<i>{$vo.vod_remarks}</i>
</a></li>
{/maccms:vod}
<!-- 通用分页代码 -->
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# 视频搜索
- 文件目录
html/vod/search.html
- 页面aid值
13
- 可调用变量
无
参数 | 示例值 | 必有参数 | 参数说明 |
---|---|---|---|
wd | 1 | 是 | 关键词 |
area | 大陆 | 否 | 搜索地区 |
lang | 国语 | 否 | 搜索语言 |
year | 2019 | 否 | 搜索年代 |
tag | 国产大片 | 否 | 搜索标签 |
class | 科幻片 | 否 | 搜搜类型 |
- 搜索url带参数示例
index.php/vodsearch/变形金刚-------------.html
1
- 接受参数
- 用
$param
数组,html 模板 标签为{$param}
,例如:获取当前的搜索关键词{$param['wd']}
。 - 搜索表单示例
<!-- 表单 -->
<form id="search" name="search" method="get" action="{:mac_url('vod/search')}" onSubmit="return qrsearch();">
<input type="text" name="wd" class="mac_wd" value="{$param.wd}" placeholder="请在此处输入影片名或演员名称" />
<input type="submit" class="mac_search" value="搜索影片" />
</form>
<!-- 后台预设关键词 -->
<div class="hotkeys">热搜:
{maccms:foreach name=":explode(',',$maccms.search_hot)" id="vo2" key="key2"}
<a href="{:mac_url('vod/search',['wd'=>$vo2])}">{$vo2}</a>
{/maccms:foreach}
</div>
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# 视频详情
- 文件目录
html/vod/detail.html
- 页面aid值
14
- 当前影片数组
$obj
- 必带参
id
提示
影片数据在详情页全字段输出 到 {$obj}
数组,如下查询全部字段 可以参考 视频字段,或者在模板用{:print_r($obj)}
打印当前影片全部数据,其他如播放地址或剧情等等需要用函数处理并且遍历处相列表。
# 详情常用示例
- 多个截图获取调用例子
{notempty name="$obj.vod_pic_screenshot"}
{volist name=":explode('$$$',$obj.vod_pic_screenshot);" id="vo2"}
<img src="{:mac_url_img($vo2)}" >
{/volist}
{/notempty}
1
2
3
4
5
2
3
4
5
- 视频播放地址和下载地址标签
<!-- 播放 -->
{maccms:foreach name="obj.vod_play_list" id="vo"}
<div class="ui-box marg" id="playlist_1">
<div class="down-title">
<h2>{$vo.from}-在线播放</h2><span>[{$vo.player_info.tip}]</span>
</div>
<div class="video_list fn-clear">
{maccms:foreach name="vo.urls" id="vo2"}
<a href="{:mac_url_vod_play($obj,['sid'=>$vo.sid,'nid'=>$vo2.nid])}" >{$vo2.name}</a>
{/maccms:foreach}
</div>
</div>
{/maccms:foreach}
<!-- 下载 -->
{maccms:foreach name="obj.vod_down_list" id="vo"}
<div class="ui-box marg" id="downlist_1">
<div class="down-title">
<h2>{$vo.from}-下载</h2><span>[{$vo.player_info.tip}]</span>
</div>
<div class="video_list fn-clear">
{maccms:foreach name="vo.urls" id="vo2"}
<a href="{:mac_url_vod_down($obj,['sid'=>$vo.sid,'nid'=>$vo2.nid])}" >{$vo2.name}</a>
{/maccms:foreach}
</div>
</div>
{/maccms:foreach}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 视频播放
- 文件目录
html/vod/play.html
- 页面aid值
15
- 当前影片数组
$obj
- 必带参
id
提示
播放页和详情页一样数有当前影片的 {$obj}
数组,如下查询全部字段 可以参考 视频字段,或者在模板用{:print_r($obj)}
打印当前影片全部数据,其他如播放地址或剧情等等需要用函数处理并且遍历处相列表。
参数 | 示例值 | 必有参数 | 参数说明 |
---|---|---|---|
id | 1 | 是 | 影片id |
nid | 1 | 是 | 当前播放组id |
aid | 1 | 是 | 当前集数id |
# 播放页独有标签
=======视频播放页独有标签=======
{$param.sid} 当前播放组序号
{$param.nid} 当前集数序号
{$obj.player_info.link_next} 下一页地址,最后一页时此链接将当前页链接
{$obj.player_info.link_pre} 上一页地址,第一页时此链接将当前页链接
{$obj['vod_play_list'][$param['sid']]} 获取当前播放组数据
{$obj['vod_play_list'][$param['sid']]['player_info']} 播放器信息
{$obj['vod_play_list'][$param['sid']]['server_info']} 服务器组信息
{$obj['vod_play_list'][$param['sid']]['url_count']} 总集数
{$obj['vod_play_list'][$param['sid']]['urls']} 集数信息
{$obj['vod_play_list'][$param['sid']]['urls'][$param['nid']]} 当前集数信息
{$obj['vod_play_list'][$param['sid']]['urls'][$param['nid']]['name']} 当前集数名称
{$obj['vod_play_list'][$param['sid']]['urls'][$param['nid']]['url']} 当前集数url
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- 下载页获取以上信息,请把
vod_play_list
改为vod_down_list
,其他参数不变
# 调出播放器
- 需要下面两个标签缺一不可
{$player_data} 播放数据
{$player_js} 加载播放器
1
2
2
# 获取与当前视频相关联视频和关联文章数据
<h2>与<strong>“{$obj.vod_name}”</strong>关联的视频</h2>
<ul class="img-list dis">
{maccms:vod num="6" ids="'.$obj['vod_rel_vod'].'" order="desc" by="time"}
<li><a href="{:mac_url_vod_detail($vo)}" title="{$vo.vod_name}"><img src="{:mac_url_img($vo.vod_pic)}" alt="{$vo.vod_name}"/><h2>{$vo.vod_name}</h2><p></p><i>{$vo.vod_version}</i><em></em></a></li>
{/maccms:vod}
</ul>
<h2>与<strong>“{$obj.vod_name}”</strong>关联的文章</h2>
<ul class="img-list dis">
{maccms:art num="6" ids="'.$obj['vod_rel_art'].'" order="desc" by="time"}
<li><a href="{:mac_url_art_detail($vo)}" title="{$vo.art_name}"><img src="{:mac_url_img($vo.art_pic)}" alt="{$vo.art_name}"/><h2>{$vo.art_name}</h2><p></p><i>{$vo.vod_from}</i><em></em></a></li>
{/maccms:art}
</ul>
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# 版权跳转
- 配合后台提供的跳转url字段,在内容页播放页通用。
<script>
{if condition="$obj.vod_jumpurl neq ''"}
location.href='{$obj.vod_jumpurl}';
{/if}
</script>
1
2
3
4
5
2
3
4
5
- 如果想判断每集是否跳转,可把要跳转的集数地址写成固定的格式,方便读取和操作。
- 比如火影忍者有10集, 第2集版权跳转,地址写为
jump://baidu.com
- 在播放页加入代码 只跳转这一集
<script>
{if condition="strpos($obj['vod_play_list'][$param['sid']]['urls'][$param['nid']]['url'],'jump:')!==false "}
location.href='{$obj['vod_play_list'][$param['sid']]['urls'][$param['nid']]['url']|str_replace="jump:","http:",###}';
{/if}
</script>
1
2
3
4
5
2
3
4
5
# iframe播放器
这个嵌入iframe
播放器页面只会在后台开启收费
或试看
模式才会启用.
- 文件目录
html/vod/player.html
- 页面aid值
无
- 支持当前影片数组
- 参数基本上和播放页一致,同样需要
{$player_data}
和{$player_js}
两个标签来输出播放器。 - 代码实例
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>iframe播放器</title>
<style>*{word-wrap:break-word;outline:none} html,body{width:100%;height:100%;background:#000;color:#fff;}
.player_popeom{ width:500px;height:150px; position:absolute;text-align:center; top:50%;left:50%;margin:-75px 0 0 -250px; }
.player_popeom a{ padding: 10px 16px;
font-size: 18px;
line-height: 1.3333333;
border-radius: 6px; color: #fff; background-color: #5cb85c; border-color: #4cae4c; }
</style>
<script src="{$maccms.path}static/js/jquery.js"></script>
<script>var maccms={"path":"__ROOT__","mid":"{$maccms['mid']}","url":"{$maccms['site_url']}","wapurl":"{$maccms['site_wapurl']}","mob_status":"{$maccms['mob_status']}"};</script>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
{$player_data}
{$player_js}
{if condition="$popedom.code gt 1"/}
<div class="player_showtry" style="display:none;">
<div class="player_box">
<div class="player_popeom">
{if condition="$obj.vod_points_play eq 0"}
<p>试看{$popedom.trysee}分钟结束,完整观看本影片需要升级会员组,请升级后观看。</p>
<small>提示:购买VIP会员组,享受超级权限,谢谢支持。</small>
<p><a href="{:url('user/index')}" target="_blank">会员中心</a> <a href="{:url('user/upgrade')}" target="_blank">马上升级</a></p>
{else/}
<p>试看{$popedom.trysee}分钟结束,完整观看本影片需要花费{$obj.vod_points_play}积分,请支付后观看。</p>
<small>提示:一次支付,永久观看,不重复扣费,谢谢支持。</small>
{if condition="$user.group.group_id eq 1"}
<p><a href="{:url('user/login')}" target="_blank">马上登录</a></p>
{else/}
<p><a href="{:url('user/buy')}" target="_blank">马上充值</a> <a href="javascript:;" onclick="window.parent.MAC.User.BuyPopedom(this)" data-id="{$obj.vod_id}" data-sid="{$param.sid}" data-nid="{$param.nid}" data-type="4" data-mid="1">确认购买</a></p>
{/if}
{/if}
</div>
</div>
</div>
<script>
//方式一本页面计算
window.setTimeout(function(){
$('.MacPlayer').html( $('.player_showtry').html() );
},1000*60*{$popedom.trysee});
//方式二调用父页面公共函数库
//window.parent.MAC.User.PopedomCallBack({$popedom.trysee},$('.player_showtry').html() );
</script>
{/if}
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 视频下载
- 文件目录
html/vod/play.html
- 页面aid值
16
- 后端输出数组
$obj
- 必带参
id
提示
和播放页参数完全一致,仅仅为了劈开一个页面作为下载而已,只是这个页面对 vod_down_list
数组进行单独处理,其他参数不变。
# iframe下载器
- 用法和
iframe播放器
完全一致,只是对下载付费配置单独处理。 - 代码实例
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>iframe下载器</title>
<style>*{word-wrap:break-word;outline:none} html,body{width:100%;height:100%;background:#000;color:#fff;}
.player_popeom{ width:500px;height:150px; position:absolute;text-align:center; top:50%;left:50%;margin:-75px 0 0 -250px; }
.player_popeom a{ padding: 10px 16px;
font-size: 18px;
line-height: 1.3333333;
border-radius: 6px; color: #fff; background-color: #5cb85c; border-color: #4cae4c; }
</style>
<script src="{$maccms.path}static/js/jquery.js"></script>
<script>var maccms={"path":"__ROOT__","mid":"{$maccms['mid']}","url":"{$maccms['site_url']}","wapurl":"{$maccms['site_wapurl']}","mob_status":"{$maccms['mob_status']}"};</script>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
{$player_data}
{$player_js}
{if condition="$popedom.code gt 1"/}
<div class="player_showtry" style="display:none;">
<div class="player_box">
<div class="player_popeom">
{if condition="$obj.vod_points_down eq 0"}
<p>试看{$popedom.trysee}分钟结束,完整观看本影片需要升级会员组,请升级后观看。</p>
<small>提示:购买VIP会员组,享受超级权限,谢谢支持。</small>
<p><a href="{:url('user/index')}" target="_blank">会员中心</a> <a href="{:url('user/upgrade')}" target="_blank">马上升级</a></p>
{else/}
<p>试看{$popedom.trysee}分钟结束,完整观看本影片需要花费{$obj.vod_points_down}积分,请支付后观看。</p>
<small>提示:一次支付,永久观看,不重复扣费,谢谢支持。</small>
{if condition="$user.group.group_id eq 1"}
<p><a href="{:url('user/login')}" target="_blank">马上登录</a></p>
{else/}
<p><a href="{:url('user/buy')}" target="_blank">马上充值</a> <a href="javascript:;" onclick="window.parent.MAC.User.BuyPopedom(this)" data-id="{$obj.vod_id}" data-sid="{$param.sid}" data-nid="{$param.nid}" data-type="5">确认购买</a></p>
{/if}
{/if}
</div>
</div>
</div>
<script>
//方式一本页面计算
window.setTimeout(function(){
$('.MacPlayer').html( $('.player_showtry').html() );
},1000*60*{$popedom.trysee});
//方式二调用父页面公共函数库
//window.parent.MAC.User.PopedomCallBack({$popedom.trysee},$('.player_showtry').html() );
</script>
{/if}
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 分集剧情
- 文件目录
html/vod/plot.html
- 页面aid值
16
- 后端输出数组
$obj
- 必带参
id
# 影片角色
- 文件目录
html/vod/role.html
- 页面aid值
16
- 后端输出数组
$obj
- 必带参
id
# 相关提示
- 购买权限提示
html/vod/confirm.html
- 示例
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>使用积分购买权限</title>
<link rel="stylesheet" href="__STATIC__/css/home.css">
<style>
body{background:#F9FAFD;color:#818181;}
.text a{ padding: 10px 16px;
font-size: 18px;
line-height: 1.3333333;
border-radius: 6px; color: #fff; background-color: #5cb85c; border-color: #4cae4c; }
</style>
<script src="{$maccms.path}static/js/jquery.js"></script>
<script>var maccms={"path":"__ROOT__","mid":"{$maccms['mid']}","url":"{$maccms['site_url']}","wapurl":"{$maccms['site_wapurl']}","mob_status":"{$maccms['mob_status']}"};</script>
<script src="{$maccms.path}static/js/home.js"></script>
</head>
<body>
<div class="mac_msg_jump">
<div class="msg_jump_tit">系统提示:</div>
<div class="title">亲爱的用户:</div>
<div class="text">
{$popedom.msg}
<p>提示:一次支付,永久观看,不重复扣费,谢谢支持。</p>
<p>
{if condition="$user.group.group_id eq 1"}
<a href="javascript:;" class="mac_user" target="_blank">马上登录</a>
{else/}
<a href="{:url('user/buy')}" target="_blank">马上充值</a>
<a href="javascript:;" onclick="MAC.User.BuyPopedom(this)" data-id="{$obj.vod_id}" data-sid="{$param.sid}" data-nid="{$param.nid}" data-mid="1" data-type="{if condition="$obj.player_info.flag eq 'play'"}4{else/}5{/if}" data-mid="1">确认购买</a>
{/if}
</p>
</div>
</div>
<script type="text/javascript">
</script>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
- 版权提示
html/vod/copyright.html
- 示例
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>系统提示【{$obj['vod_name']}】因为版权问题,本站不提供在线播放</title>
<link rel="stylesheet" href="__STATIC__/css/home.css">
<style>
body{background:#F9FAFD;color:#818181;}
</style>
</head>
<body>
<div class="mac_msg_jump">
<div class="msg_jump_tit">系统提示...</div>
<div class="title">亲爱的用户:</div>
<div class="text">【{$obj['vod_name']}】{$GLOBALS['config']['app']['copyright_notice']}</div>
<div class="jump">
{if condition="$obj['vod_jumpurl'] neq ''"}
页面自动 <a id="href" href="<?php echo($obj['vod_jumpurl']);?>">跳转</a> 等待时间: <b id="wait">3</b>
{/if}
</div>
<!-- 可自定义该页面的显示方式,可加入广告 -->
</div>
<script type="text/javascript">
{if condition="$obj['vod_jumpurl'] neq ''"}
(function(){
var wait = document.getElementById('wait'),
href = document.getElementById('href').href;
var interval = setInterval(function(){
var time = --wait.innerHTML;
if(time <= 0) {
top.location.href = href;
clearInterval(interval);
};
}, 1000);
})();
{/if}
</script>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
- 详情页访问密码提示
html/vod/detail_pwd.html
- 示例
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>系统提示......</title>
<link rel="stylesheet" href="__STATIC__/css/home.css">
<style>
body{background:#F9FAFD;color:#818181}
input{border:1px solid #ccc;padding:7px 0;border-radius:3px;padding-left:5px}
.item{line-height:50px}
.submit_btn{width:70px;height:40px;border-width:0;padding:10px;display:border-radius: 3px;background:#1E90FF;cursor:pointer;font-family:Microsoft YaHei;color:#fff;font-size:17px}
</style>
<script src="{$maccms.path}static/js/jquery.js"></script>
<script>var maccms={"path":"__ROOT__","mid":"{$maccms['mid']}","url":"{$maccms['site_url']}","wapurl":"{$maccms['site_wapurl']}","mob_status":"{$maccms['mob_status']}"};</script>
<script src="{$maccms.path}static/js/home.js"></script>
</head>
<body>
<div class="mac_msg_jump">
<div class="msg_jump_tit">系统提示...</div>
<div class="title">亲爱的访问此数据需要密码哦~~~</div>
<div class="text">
<form id="form1" name="form1" action="" style="margin:0;width:400px;text-align: center;" method="post">
<div class="item">
<label>密码:</label>
<input type="password" name="pwd" placeholder="请在此输入访问密码..."/>
{if condition="$obj.vod_pwd_url neq ''"}
<a href="{$obj.vod_pwd_url}" target="_blank">点击获取密码</a>
{else/}
<span>密码:{$obj.vod_pwd}</span>
{/if}
</div>
<div class="item">
<a class="submit_btn" href="javascript:;" onclick="MAC.Pwd.Check(this)" data-mid="1" data-id="{$obj.vod_id}" data-type="1" />点击确认</a>
</div>
</form>
</div>
</div>
</div>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
- 播放页访问密码提示
html/vod/player_pwd.html
- 示例
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>系统提示......</title>
<link rel="stylesheet" href="__STATIC__/css/home.css">
<style>
body{background:#000000;color:#818181}
input{border:1px solid #ccc;padding:7px 0;border-radius:3px;padding-left:5px}
.item{line-height:50px}
.submit_btn{width:70px;height:40px;border-width:0;padding:10px;display:border-radius: 3px;background:#1E90FF;cursor:pointer;font-family:Microsoft YaHei;color:#fff;font-size:17px}
</style>
<script src="{$maccms.path}static/js/jquery.js"></script>
<script>var maccms={"path":"__ROOT__","mid":"{$maccms['mid']}","url":"{$maccms['site_url']}","wapurl":"{$maccms['site_wapurl']}","mob_status":"{$maccms['mob_status']}"};</script>
<script src="{$maccms.path}static/js/home.js"></script>
</head>
<body>
<div class="mac_msg_jump">
<div class="msg_jump_tit">系统提示...</div>
<div class="title">亲爱的访问此数据需要密码哦~~~</div>
<div class="text">
<form id="form1" name="form1" action="" style="margin:0;width:400px;text-align: center;" method="post">
<div class="item">
<label>密码:</label>
<input type="password" name="pwd" placeholder="请在此输入访问密码..."/>
{if condition="$obj.vod_pwd_play_url neq ''"}
<a href="{$obj.vod_pwd_url}" target="_blank">点击获取密码</a>
{else/}
<span>密码:{$obj.vod_pwd_play}</span>
{/if}
</div>
<div class="item">
<a class="submit_btn" href="javascript:;" onclick="MAC.Pwd.Check(this)" data-mid="1" data-id="{$obj.vod_id}" data-type="4" />点击确认</a>
</div>
</form>
</div>
</div>
</div>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
- 下载页访问密码提示
html/vod/downer_pwd.html
- 示例
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>系统提示......</title>
<link rel="stylesheet" href="__STATIC__/css/home.css">
<style>
body{background:#000000;color:#818181}
input{border:1px solid #ccc;padding:7px 0;border-radius:3px;padding-left:5px}
.item{line-height:50px}
.submit_btn{width:70px;height:40px;border-width:0;padding:10px;display:border-radius: 3px;background:#1E90FF;cursor:pointer;font-family:Microsoft YaHei;color:#fff;font-size:17px}
</style>
<script src="{$maccms.path}static/js/jquery.js"></script>
<script>var maccms={"path":"__ROOT__","mid":"{$maccms['mid']}","url":"{$maccms['site_url']}","wapurl":"{$maccms['site_wapurl']}","mob_status":"{$maccms['mob_status']}"};</script>
<script src="{$maccms.path}static/js/home.js"></script>
</head>
<body>
<div class="mac_msg_jump">
<div class="msg_jump_tit">系统提示...</div>
<div class="title">亲爱的访问此数据需要密码哦~~~</div>
<div class="text">
<form id="form1" name="form1" action="" style="margin:0;width:400px;text-align: center;" method="post">
<div class="item">
<label>密码:</label>
<input type="password" name="pwd" placeholder="请在此输入访问密码..."/>
{if condition="$obj.vod_pwd_down_url neq ''"}
<a href="{$obj.vod_pwd_url}" target="_blank">点击获取密码</a>
{else/}
<span>密码:{$obj.vod_pwd_down}</span>
{/if}
</div>
<div class="item">
<a class="submit_btn" href="javascript:;" onclick="MAC.Pwd.Check(this)" data-mid="1" data-id="{$obj.vod_id}" data-type="5" />点击确认</a>
</div>
</form>
</div>
</div>
</div>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
- rss
html/vod/rss.html