MAXCMS按地区调用视频的方法(需修改文件)

By | 2012 年 05 月 24 日

需修改的文件:/inc/MainClass.asp

1、增加变量vpublisharea

在487行

dim vnum,vorder,vtype,vtopic,vtime,vstart,vstate,vcommend,vletter,vid

后面添加 ,vpublisharea

502行

vnum=attr("num"):vorder=attr("order"):vletter=attr("letter"):vtype=attr("type"):vtopic=attr("topic"):vtime=attr("time"):vstart=attr("start"):vstate=attr("state"):vcommend=attr("commend"):vid=attr("id")

后面添加 :vpublisharea=attr("publisharea")

2、增加变量wherePublisharea

在491行

dim m,sql,orderStr,whereType,whereLetter,whereTopic,whereTime,whereStr,rsary,whereState,whereCommend,whereId,vtypeArray,vtypeI,vtypeStr,vtypeArrayLen,playlink_str

后面添加 ,wherePublisharea

在599行

whereStr=Replace(" where m_recycle=0"&whereType&whereLetter&whereTopic&whereTime&whereState&whereCommend&whereId,"where  and ","where ")

修改为:whereStr=Replace(" where m_recycle=0"&whereType&whereLetter&whereTopic&whereTime&whereState&wherePublisharea&whereCommend&whereId,"where  and ","where ")

3、查找if not isNul(vcommend) then

在这一行前面添加:

if not isNul(vpublisharea) then
wherePublisharea=" and m_publisharea like '%"&vpublisharea&"%'"
else
wherePublisharea=""
end if

然后即可在videolist标签中使用publisharea=日本 查找日本地区的视频

{maxcms:videolist num=10 publisharea=日本}<li><span></span><a href=”[videolist:link]” i=”[videolist:pic]”>[videolist:name]</a></li>{/maxcms:videolist}

发表评论

电子邮件地址不会被公开。 必填项已用*标注