您当前的位置: 主页 > 优化教程
1:列表分页英文设置教程 
用arc.listview.class.php覆盖include/arc.listview.class.php 
调用方法: 
 {dede:pagelist listsize='5'/} 
{dede:pagelist pagelang='en' listsize='5'/}   
pagelang:en为英文,cn为中文,默认语言中文 
 
扩展阅读: 
/** 
     *  获取静态的分页列表 
     * 
     * @access    public 
     * @param     string  $list_len  列表宽度 
     * @param     string  $list_len  列表样式 
     * @return    string 
     */ 
    function GetPageListST($list_len,$listitem="index,end,pre,next,pageno",$pagelang) 
    { 
                    /*****************************************************************************************/ 
                      if($pagelang='cn'){ 
                                $uahome="首页"; 
                               $uaprevious="上一页"; 
                               $uanext="下一页"; 
                               $ualastpage="末页"; 
                               $uapage="页"; 
                               $uatotal="共"; 
                               $uarecords="条记录"; 
                            }else{ 
                              $uahome=" Home "; 
                               $uaprevious=" Previous "; 
                               $uanext=" Next "; 
                               $ualastpage=" Last Page "; 
                               $uapage=" Page "; 
                               $uatotal=" Total "; 
                               $uarecords=" Records. "; 
                          } 
                     
        $prepage = $nextpage = ''; 
        $prepagenum = $this->PageNo-1; 
        $nextpagenum = $this->PageNo+1; 
        if($list_len=='' || ereg("[^0-9]",$list_len)) 
        { 
            $list_len=3; 
        } 
        $totalpage = ceil($this->TotalResult/$this->PageSize); 
        if($totalpage<=1 && $this->TotalResult>0) 
        { 
           return "<li><span class=\"pageinfo\">".$uatotal." <strong>1</strong> ".$uapage." <strong>".$this->TotalResult."</strong> ".$uarecords."</span></li>\r\n"; 
        } 
        if($this->TotalResult == 0) 
        { 
        return "<li><span class=\"pageinfo\">".$uatotal." <strong>0</strong> ".$uapage." <strong>".$this->TotalResult."</strong> ".$uarecords."</span></li>\r\n"; 
   
        } 
        $purl = $this->GetCurUrl(); 
              $maininfo = "<li><span class=\"pageinfo\">".$uatotal." <strong>{$totalpage}</strong> ".$uapage." <strong>".$this->TotalResult."</strong> ".$uarecords."</span></li>\r\n"; 
           
        $tnamerule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields 
 
['namerule2']); 
        $tnamerule = ereg_replace('^(.*)/','',$tnamerule); 
 
        //获得上一页和主页的链接 
        if($this->PageNo != 1) 
        { 
            $prepage.="<li><a href="&quot;.str_replace(&quot;{page}&quot;,$prepagenum,$tnamerule).&quot;">".$uaprevious."</a></li>\r\n"; 
            $indexpage="<li><a href="&quot;.str_replace(&quot;{page}&quot;,1,$tnamerule).&quot;">".$uahome."</a></li>\r\n"; 
        } 
        else 
        { 
            $indexpage="<li>".$uahome."</li>\r\n"; 
        } 
 
        //下一页,未页的链接 
        if($this->PageNo!=$totalpage && $totalpage>1) 
        { 
            $nextpage.="<li><a href="&quot;.str_replace(&quot;{page}&quot;,$nextpagenum,$tnamerule).&quot;">".$uanext."</a></li>\r\n"; 
            $endpage="<li><a href="&quot;.str_replace(&quot;{page}&quot;,$totalpage,$tnamerule).&quot;">".$ualastpage."</a></li>\r\n"; 
        } 
        else 
        { 
            $endpage="<li>".$ualastpage."</li>\r\n"; 
        } 
 
        //option链接 
        $optionlist = ''; 
 
        $optionlen = strlen($totalpage); 
        $optionlen = $optionlen*12 + 18; 
        if($optionlen < 36) $optionlen = 36; 
        if($optionlen > 100) $optionlen = 100; 
        $optionlist = "<li><select name="sldd" style="width:{$optionlen}px;" onchange="location.href=this.options[this.selectedIndex].value;">\r\n"; 
        for($mjj=1;$mjj<=$totalpage;$mjj++) 
        { 
            if($mjj==$this->PageNo) 
            { 
                $optionlist .= "<option value="&quot;.str_replace(&quot;{page}&quot;,$mjj,$tnamerule).&quot;" selected="selected">$mjj</option>\r\n"; 
            } 
            else 
            { 
                $optionlist .= "<option value="&quot;.str_replace(&quot;{page}&quot;,$mjj,$tnamerule).&quot;">$mjj</option>\r\n"; 
            } 
        } 
        $optionlist .= "</select></li>\r\n"; 
 
        //获得数字链接 
        $listdd=""; 
        $total_list = $list_len * 2 + 1; 
        if($this->PageNo >= $total_list) 
        { 
            $j = $this->PageNo-$list_len; 
            $total_list = $this->PageNo+$list_len; 
            if($total_list>$totalpage) 
            { 
                $total_list=$totalpage; 
            } 
        } 
        else 
        { 
            $j=1; 
            if($total_list>$totalpage) 
            { 
                $total_list=$totalpage; 
            } 
        } 
        for($j;$j<=$total_list;$j++) 
        { 
            if($j==$this->PageNo) 
            { 
                $listdd.= "<li class=\"thisclass\">$j</li>\r\n"; 
            } 
            else 
            { 
                $listdd.="<li><a href="&quot;.str_replace(&quot;{page}&quot;,$j,$tnamerule).&quot;">".$j."</a></li>\r\n"; 
            } 
        } 
        $plist = ''; 
        if(preg_match('/index/i', $listitem)) $plist .= $indexpage; 
        if(preg_match('/pre/i', $listitem)) $plist .= $prepage; 
        if(preg_match('/pageno/i', $listitem)) $plist .= $listdd; 
        if(preg_match('/next/i', $listitem)) $plist .= $nextpage; 
        if(preg_match('/end/i', $listitem)) $plist .= $endpage; 
        if(preg_match('/option/i', $listitem)) $plist .= $optionlist; 
        if(preg_match('/info/i', $listitem)) $plist .= $maininfo; 
         
        return $plist; 
    } 
 
2:{dede:field name='position'}中英文双语 
替换前面的“首页”两成“Home”就行了,后台的栏目用英文就行 
标签:{dede:field name='position'  function='str_replace("首页","Home",Html2Text("@me"))'/}
 

关键词:织梦,dedecms,做,英文,站,分页,、,当前,位置,    标签:
    更多资讯请收藏关注 网站模板(www.1yc.cn)

织梦实现全文输入rss的操作方法之前小编写过关于rss的文章,但是没有写入到怎么进行操作以及改装他们,... 2021-08-14
Dedecms教程:批量替换文章中的超链接AB模板网在自己php空间中的一个网站由以前采集里面有很多连接没有过滤... 2021-08-14
织梦自身的友情链接插件会是竖直排列如何使其横向排列如果仿站之中,希望利用到织梦自身的友情链接插件,得到的友链排版将会是竖... 2021-07-27
dedecms提示:Fatal error: Call to a member function GetInnerTex我们做网站时经常能用到自定义模型,但是今天再在后台完成新建自定义模型之... 2021-08-09
织梦列表页list标签weight权重排序方法织梦列表页list标签weight权重排序方法:(注:红色标记部分就是... 2021-07-22
织梦底层友情链接模块样式的代码修改最近在接到一个新的网站时遇到了一些问题,该网站要的是把友情链接的模块进... 2021-08-14
dede:pagebreak文章内容页面分页显示数量控制{dede:pagebreak/}这个标签,好无疑问这是个文章内容分页... 2021-07-22
织梦dedeCMS列表页随机调用多张缩略图DEDECMS列表页面调用缩略图,可以用系统自带的脚本调用第一张图片,... 2021-07-27
织梦的标签云如何生成不同大小、不同颜色的tag标签在dedecms的标签云如何生成不同大小、不同颜色的tag标签呢 1、... 2021-08-14
Dedecms留言板留言后刷新会重复提交解决方法织梦CMS(dedecms)这款程序很好用,模板种类不仅多而且齐全,可... 2021-08-14
织梦dedecms文章页面显示同分类栏目下的其它文章在文章页面通过{dede:field.aid runphp=yes}{... 2021-07-30
DEDECMS根据栏目ID调用不同的列表代码标签方法在DEDECMS中,在同一个列表中,如何根据不同的栏目ID号,返回不同... 2021-07-22
如何一次性删除DEDECMS中所有等待审核的文档织梦cms网站使用过程中,长遇到没有关闭会员中心,导致被大量提交待审核... 2021-07-30
DEDECMS教程:列表页缩略图随机调用如果用过DEDECMS的朋友应该都知道,有些模板列表页面需要用到缩略图... 2021-07-30
织梦DEDECMS首页列表页调用文章TAG标签的方法1.如果是dedecms v5.7版本直接使用标签 [field:id... 2021-07-27

线
咨询热线:
135-0038-3336
在线客服:
点击这里给我发消息
微信交流:
公司官网: www.1yc.cn