关于帝国CMS使用的一些零散东东

 

本文内容很零散,是在具体使用中总结的,待整理:

 

1、会员列表分页位置:/e/member/list

2、栏目ID表:前缀_enewsclass

3、单独调用一个栏目链接:

4、单独调用一个栏目名称:

5、内容页收藏夹地址:[!--news.url--]e/member/fava/add?classid=[!--classid--]&id=[!--id--]

6、内容页调用会员的用户名和空间链接:[!--username--]

7、内容页显示会员收藏数:gettotal("selectcount(*)astotalfromphome_enewsfavawhereid='$navinfor[id]'andclassid='$navinfor[classid]'");?>

8、统计当前栏目的文章数:[totaldata]$GLOBALS[navclassid],0[/totaldata]

9、统计159栏目的文章数:[totaldata]'159',0,0[/totaldata]

10、关于帝国CMS会将“\”自动替换为空的说明,请用到“\”的地方用“\\\\”四个反斜杠代替

11、内容页简介字数的控制:

12、对灵动标签的内容进行排序:

 [e:loop={'select*fromhao_sd_aboutwhereclassid=1orderbytitleasclimit10',20,24,0}]

  • "target="_self"title="">
  • [/e:loop]

    解释:

    hao_sd_about是要查询字段所在的表名;

    classid=1是要查询的栏目ID是1;

    orderbytitleasc是查询title这个字段的//升序排列

    orderbytitledesc是查询title这个字段的//降序排列

    limit10是取10条,可以去掉去全部!

    13、灵动标签的时间输出

    14、调用栏目图片(一般在内容页):

    [e:loop={"selectclassimgfromphome_enewsclasswhereclassid='$GLOBALS[navclassid]'",1,24,0}]

    [/e:loop]

    解释:phome_enewsclass是您要调用的表的名称;

    $GLOBALS[navclassid]是当前栏目的ID;如果是调用固定栏目就填写固定的ID。

    比如:[e:loop={"selectclassimgfromXXX_enewsclasswhereclassid='8'",1,24,0}]

    ">

    [/e:loop]

    15、栏目列表页调用一篇文章的内容: [e:loop={={4,1,12,0}]

      

            [/e:loop]

    注意:newstext字段的属性设置,不然不能显示



    16、调用栏目图片:

    [e:loop={"selectclassimgfrom数据库前缀_enewsclasswhereclassid='要调用的栏目ID'",1,24,0}]

    ">

    [/e:loop]

     

    17、上传图片存放的原始表:“表前缀_enewsfile”,这个主要是便于修改上传的内容!

     

    18、全局网站名称调用:

     

    19、当前位置[--[!--newsnav--]修改“首页”两个字:修改位置:e\data\language\gb\pub\fun.php

    'index'=>'首页',这两个字可以随意更改成您想用的字;

     

    20、分页分为:[!--show.page--](下拉式);[!--show.listpage--](列表式)------注意:动态页面只支持列表式(PS:[!--show.listpage--]的分页样式在:e/class/t_functions.php下修改;文字在语言包:e/data/language/fun.php下修改)


     

    /**随即调用phome_ecms_news表中id为3标题有南京文章内容有南京
    [ecmsinfo]"select*fromphome_ecms_newswhereclassidin(3)and(titlelike'%南京%'ornewstextlike'%南京%')orderbyrand()desclimit10",10,28,0,24,9,0[/ecmsinfo]

    /**调用phome_ecms_news表id为2,关键字为阿弥陀经的文章

    [ecmsinfo]"select*fromphome_ecms_newswherechecked=1andclassid=2andkeyboard='$navinfor[阿弥陀经]'limit10",50,32,0,24,14,0[/ecmsinfo]