苹果cms视频筛选调用教程

日期: 栏目:使用教程 浏览:33 评论:0

视频筛选:

文件目录 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

排序依据筛选:默认支持:id, time, time_add, score, hits, hits_day, hits_week, hits_month, up, down, level, rnd, in

请求url带参数示例:

1 /index.php/vodshow/1/area/大陆/by/time/ class /科幻/lang/国语/letter/A/year/2020.html

接受参数:

用 $param 数组,html 模板 标签为 {$param},例如:获取当前的筛选的地区 {$param['area']}。

常用筛选示例代码:

<!-- 筛选条件 -->

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 <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>

<!-- 排序方式 -->

1 2 3 4 5 6 7 <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   {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} <!-- 通用分页代码 -->