<sub id="fbnvt"></sub>

<sub id="fbnvt"></sub>

<address id="fbnvt"><address id="fbnvt"><menuitem id="fbnvt"></menuitem></address></address>

<address id="fbnvt"></address>

    <noframes id="fbnvt"><listing id="fbnvt"><listing id="fbnvt"></listing></listing>

            在線客服

            電話①:189 6508 9135(張先生)
            電話②:134 0599 8886(何小姐)
            電話③:0591-83489135

            技術文章


            織夢列表頁list標簽調用支持flag屬性方法


            織夢列表頁list標簽支持flag屬性方法:(注:紅色標記部分就是修改處)

            1、打開include/arc.listview.class.php

            2、找到 var $remoteDir;

            替換 var $remoteDir;

            var $flag;

            3、找到下方代碼并注釋

            //        if($this->TotalResult==-1)
            //        {
            //            $cquery = "SELECT COUNT(*) AS dd FROM `dede_arctiny` arc WHERE ".$this->addSql;
            //            $row = $this->dsql->GetOne($cquery);
            //            if(is_array($row))
            //            {
            //                $this->TotalResult = $row['dd'];
            //            }
            //            else
            //            {
            //                $this->TotalResult = 0;
            //            }
            //        }

            4、在253行左右找到$this->TotalPage = ceil($this->TotalResult/$this->PageSize);在前面添加如下代碼:

             if($this->TotalResult==-1)
                    {
            foreach($this->dtp->CTags as $tagid=>$ctag)
            {
            $flag = $ctag->GetAtt('flag');
            if($flag!='') {
            $this->addSql .=   " and (arc.flag like '%{$flag}%') ";
            }
            }
                        $cquery = "SELECT COUNT(*) AS dd FROM `dede_archives` arc WHERE ".$this->addSql;
                        $row = $this->dsql->GetOne($cquery);
                        if(is_array($row))
                        {
                            $this->TotalResult = $row['dd'];
                        }
                        else
                        {
                            $this->TotalResult = 0;
                        }
                    }
                 /* flag end */

            替換$ctag->GetAtt("orderway"),5、在637行左右找到$ctag->GetAtt("orderway")

            $ctag->GetAtt("flag")

            6、在712行左右function GetArcList($limitstart=0,$row=10,$col=1,$titlelen=30,$infolen=250,

            $imgwidth=120,$imgheight=90,$listtype="all",$orderby="default",$innertext="",$tablewidth="100",$ismake=1,$orderWay='desc',$flag='')中添加了$flag=''

            7、在745行左右也就是"http://排序方式"上面添加 :

            //添加flag標簽

            $whereFlag = "";

            if($flag!='') {

            $whereFlag = " and arc.flag like '%{$flag}%' ";

            }

            8、在799行左右 修改成 if(preg_match('/hot|click|lastpost|weight|flag/', $orderby))

            9、標簽調用:

            {dede:list flag='c' pagesize ='3'}

            {/dede:list}

            接下來{dede:list}標簽就支持了flag屬性的調用了。



            相關文章

            首頁  電話  在線咨詢  頂部
            jiZZ多毛妓女,无码国产一区二区三区,男人狂躁戳女人下面免费视频

            <sub id="fbnvt"></sub>

            <sub id="fbnvt"></sub>

            <address id="fbnvt"><address id="fbnvt"><menuitem id="fbnvt"></menuitem></address></address>

            <address id="fbnvt"></address>

              <noframes id="fbnvt"><listing id="fbnvt"><listing id="fbnvt"></listing></listing>