ASPCMS如何在产品组图和相册中去除缩略图?

2017-03-23  本文已影响99人  您好小耗子

很多人在实用ASOCMS是时候遇到过这类的问题,就是为了提高网站的质量,缩略图都是用的小图,这样可以大大提升网站打开的速度,但在产品展示页面,这个小图还是会再次出现,从而形象页面的视觉效果,今天为了解决这个问题,遇见了3个版本,我这边本别说下解决方案:

版本1:最近有个单子,是装饰类的,然后我用ASPCMS自带的相册播放功能绑到了产品展示里面。 解决的时候也就是直接在此版本上解决的。

js文件下的 Album.js文件
第488行 for (var d = Number(this.Count), f = new Image, e = 0; e < d; e++) {
改成 for (var d = Number(this.Count)-1, f = new Image, e = 0; e < d; e++) {
然后把最后一张图片设置成缩略图即可。

版本2、自己写图片轮播特效,然后用cimages遍历读取图片。

inc文件夹下把 templatefun.asp文件的第497行+一个 iCount = 1
然后把第一张图设置为缩略图。

版本3、系统只带的产品多图轮播特效。
   <div class=jqzoom id=spec-n1 onClick="window.open('/')"><IMG height=350
        src="***" jqimg="[content:pic]" width=350>

***是展示的缩略图
因此页面不让写判断,我们可以把判断语句写到 templatefun.asp文件, 497行
for each img in imgs 下面、
添加IF判断

               if iCount<1 then   //(这里的1改成0就能把第一张也算进去)
                        else
                        if iCount < cint(m_maxcount) then
                                soutput = soutput & match.SubMatches(1)
                                'soutput = replace(soutput,"[aspcms:cimagesitem]","")
                                'soutput = replace(soutput,"[/aspcms:cimagesitem]","")
                                soutput =  replace(soutput,"[cimages:src]",img)
                                soutput = replace(soutput,"[cimages:i]",iCount+1)
                                'echo img & "<br>"
                        end if
                        end if

这样cimages遍历讲读取不到第一条的图片信息,从第二张开始。
然后返回

<div class=jqzoom id=spec-n1 onClick="window.open('/')">![](***)

, 让 ***读取第二张图片即可。

{aspcms:cimages count=1 contentid=[content:id]}
        <div class=jqzoom id=spec-n1 onClick="window.open('/')"><IMG height=350
        src="[cimages:src]" jqimg="[content:pic]" width=350>
{/aspcms:cimages}
上一篇下一篇

猜你喜欢

热点阅读