DataLife Engine 中文站 » 使用技巧 » Datalife Engine 评论中用到的标签
七月 05 2022年

Datalife Engine 评论中用到的标签

admin 2022-07-05, 23:23 使用技巧 577

Datalife Engine 评论中用到的标签

Datalife Engine 评论中用到的标签


本文主要介绍评论页面上用得到的标签和使用方法
使用到的模板是 comments.tpl
  1. {author}:评论者用户名

  2. {mail}:评论者的邮箱

  3. {date}:评论发布的日期,默认继承网站设置,也可自定义日期格式。

  4. {comment}:评论文本。

  5. {comment limit="X"}:评论长度限制,其中X为数值。

  6. {comment-id}:评论id

  7. {ip}:评论者的IP地址。只显示给网站管理员。

  8. [com-edit] and [/com-edit]:编辑评论的链接

  9. [com-del] and [/com-del]:删除评论的链接

  10. {news_title}:查看最新评论时,文章标题的链接。

  11. {news-title}:没有用到待更新

  12. {news-link}:用在最新评论中。

  13. {foto}:头像链接

  14. {fullname}:用户全名

  15. {land}:用户位置

  16. [signature] and [/signature]:用户签名

  17. {signature}:评论者用户签名

  18. {registration}:注册时间

  19. {lastdate}:最后到访时间

  20. [fast] 文本 [/fast]:快速引用评论

  21. {group-icon}:评论者用户组图标

  22. {group-name}:评论者用户组名称

  23. {news-num}:评论者文章数量

  24. {comm-num}:评论者评论总数

  25. {date=date fromat}:以指定的格式显示日期。它允许你同时显示完整的日期和它的独立部分。日期的格式是按照PHP的格式来设置的。例如,{date=d}标签显示文章或评论发表的日期,{date=F}标签显示月份的名称。{date=d-m-Y H:i}显示完整的日期和时间。

  26. {login}:用户名,没有任何链接和菜单。

  27. [profile] text [/profile]:以链接的形式显示所包围的文本,链接到留下评论的用户的资料。

  28. {mass-action}:批量操作

  29. [complaint]text[/complaint]:举报评论的链接和文字

  30. [xfgiven_x] [xfvalue_x] [/xfgiven_x]:自定义字段 "x "如果不是空的就会显示。

  31. [xfnotgiven_x]text[/xfnotgiven_x]:如果用户的自定义字段没有被设置,则显示预置的文本,其中X是用户配置文件的自定义字段名称。

  32. [xfvalue_x]:自定义字段 "x "的值,其中 "x "是自定义字段的名称。

  33. [fullname]text [/fullname]:如果用户已经设置了全名,则显示所附的文本。

  34. [not-fullname]text [/not-fullname]:只在用户没有设置全名的情况下显示预置的文本。

  35. [land] text [/land]:显示用户设置的位置。

  36. [not-land] text [/not-land]:当用户未设置位置时显示的预置文本。

  37. [news-num]text[/news-num]:当用户发布过文章时,显示的文本。

  38. [not-news-num]text[/not-news-num]:如果用户没有发布过文章,显示的文本。

  39. [comm-num]text [/comm-num]:显示用户总评论数。

  40. [not-comm-num]text [/not-comm-num]:如果用户没有发布过评论,显示的文本。

  41. [online] text [/online]:当用户在线时,显示的文本。

  42. [offline] text [/offline]:当用户离线时,显示的文本。

  43. [spam] Spammer [/spam]:将用户发布的评论标记为垃圾评论。

  44. [declination=X] text [/declination]:根据指定的数字改变词尾。X是一个数字,"text "是一个单词及其尾音。结尾由"|"符号分隔。这个标签可以和其他标签一起使用,比如显示文章的浏览量或评论的数量。例如,[declination={comments-num}]commen|t|ts[/declination]根据评论的数量,显示如下。"评论","评论"。

  45. [commentsgroup=1,2,3]text[/commentsgroup]:如果评论是由属于指定组的用户写的,则显示所附的文本。

  46. [not-commentsgroup=1,2,3]text[/not-commentsgroup]

    Displays the enclosed text if the comments was written by the user who did not belong to specified groups.



  47. [commentscount=x]text[/commentscount]

    Displays the enclosed text if comment number X is displayed, where X is the number of comment shown on the page. For example, [commentscount=1] text [/commentscount] will show the text when the first comment will be displayed on the page. This tag is useful if you want to choose the place to display ads between comments. For example, the code [commentscount=1,10] ad code [/commentscount] which is added to the end of the template will display ads after the first and the tenth comment.

  48. [not-commentscount=X]text[/not-commentscount]

    Displays the enclosed text when any comments are displayed except the comment number X. This tag is useful if you want to show some design elements in all the article annotations except the specified ones, for example, if you do not want something to be displayed in the first article annotation.

  49. [rating-type-1] text [/rating-type-1]

    Displays the enclosed text if the first 'Rating' type was enabled in script settings.

  50. [rating-type-2] text [/rating-type-2]

    Displays the enclosed text if the second rating type 'Likes only' was enabled in script settings.

  51. [rating-type-3] text [/rating-type-3]

    Displays the enclosed text if the third rating type 'Like' or 'Dislike' was enabled in script settings.

  52. [rating-type-4] text [/rating-type-4]

    Displays the enclosed text if the fourth rating type 'Like' and 'Dislike' was enabled in script settings.

  53. [rating-minus] text [/rating-minus]

    Displays the enclosed text as a link to dislike the article. This link is displayed if the third rating type is used.

  54. [rating-plus] text [/rating-plus]

    Displays the enclosed text as a link to like the article. This link is displayed if the third rating type is used.

  55. {rating}

    Displays the comment rating.

  56. {likes}

    Display number of likes

  57. {dislikes}

    Display number of dislikes

  58. {vote-num}

    Displays the number of users who rated this comment.

  59. {ratingscore}

    This tag displays average rating figure containing fractional part amounting from one to five. For example, it may be 1.6 or 4.2 depending on evaluation.

  60. [reply] text [/reply]

    Enclosed text is displayed as a link to a pop-up window for replying to a comment if tree-like comments are enabled. If they are disabled it inserts the given commentator's username to the new comment form.

  61. [treecomments]text[/treecomments]

    Enclosed text is displayed if tree-like comments are enabled in script settings.

  62. [not-treecomments]text[/not-treecomments]

    Enclosed text is displayed if tree-like comments are disabled in script settings.

  63. [rootcomments] text [/rootcomments]

    The enclosed text is displayed if the comment is the parent comment, rather than a response to any other comment

  64. [childrencomments] text [/childrencomments]

    Display the enclosed text if the comment is a reply to another comment

  65. {replycount}

    It displays the number of replies for this comment.

  66. [comments-author]text[/comments-author]

    Enclosed text is displayed if user who views the page is the author of the comment.

  67. [not-comments-author]text[/not-comments-author]

    Enclosed text is displayed if user who views the page is not the author of the comment.

  68. [news-author] text [/news-author]

    Enclosed text is displayed if comment belongs to the author of the given article.

  69. [not-news-author]text[/not-news-author]

    Enclosed text is displayed if comment does not belong to the author of the given article.

  70. [positive-comment]text[/positive-comment]

    Enclosed text is displayed if the comment has positive rating.

  71. [negative-comment]text[/negative-comment]

    Enclosed text is displayed if the comment has negative rating.

  72. [neutral-comment]text[/neutral-comment]

    Enclosed text is displayed if the comment has neutral rating.

  73. [catlist=1,2....] текст [/catlist]

    Displays the enclosed text if the article belongs to the specified categories.

  74. [not-catlist=1,2....] text [/not-catlist]

    Displays the enclosed text if the article does not belong to the specified categories.

  75. [if field = "value"] text [/if]



关于if 的更多用法
  • [if field = "value"] text [/if]:如果该字段的值等于指定的值,则显示该字段所包含的文本,和php中的if用法相似。其中包含如下用法:

  • [if field = "value"] text [/if] -如果字段等于'value'参数,则显示该文本
  • [if field != "value"]text[/if] - 如果该字段不等于参数'value',则显示该文本
  • [if field > "1"] text [/if] - 如果字段大于'值'参数,则显示文本
  • [if field >= "2"] text [/if] - 如果字段大于或等于参数'value',则显示该文本
  • [if field < "3"] text [/if] - 如果该字段小于'value'参数,则显示该文本
  • [if field <= "4"] text [/if] - 如果字段小于或等于参数'value',则显示该文本
  • [if field ~ "value"] text [/if] - 如果字段中有'value'字样,则显示该文本
  • [if field !~ "value"] text [/if] - 如果 "值 "字不在该字段中,则显示该文本。

组合使用:
  • [if field > "3" AND field2 < "5"] text [/if]:如果 "field "字段大于3,且field2小于5,则显示文本。
  • [if field > "3" OR field2 < "5"] text [/if] :如果 "field "字段大于3或field2小于5,则显示文本,也就是说,如果任何条件匹配
    字段用到的名称:

    id - 文章的唯一ID号(数字)。

    autor -文章作者(文本)

    date - 文章日期(日期为英国格式,例如 "2020-09-01 "或 "2020年9月10日",或 "下周四",或 "+1天",或unix格式;如果使用等号,那么文章日期将被四舍五入到分钟。)

    short_story - 文章简介文本(文本)

    full_story - 文章全文

    title - 文章标题文本(文本)

    descr - 描述文章的元标签(文本)

    keywords - "关键词 "元标签(文本)

    category - 属于哪个类别的列表(文本,用逗号分隔)

    alt_name - 使用数控系统时,用拉丁字母表示的标题,形成页面地址。(文本)

    comm_num - 评论的数量(数字)

    allow_comm - 允许或不允许评论(数字,1或0)

    allow_main - 文章是否发布在主页上(数字,1或0)

    approve - 文章是否被发布在网站上或被审核中(数字,1或0)

    fixed - 文章是否被置顶(数字,1或0)

    symbol - 符号代码(文本)

    tags - 标签云中的标签列表(文本,用逗号分隔)

    news_read - 浏览次数(数字)

    allow_rate - 允许或不允许故事评级(数字,1或0)

    rating - 文章评分,所有数值的总和(数字)

    vote_num - 在评级中投票的人数(数字)

    votes - 文章中允许的投票(数字,1或0)

    view_edit - 显示编辑或不编辑的原因(数字,1或0)

    disable_index - 允许或不允许网络索引(数字,1或0)

    editdate - 文章编辑日期(日期为英国格式,例如 "2020-09-01 "或 "2020年9月10日",或 "下周四",或 "+1天",或unix格式;如果使用等号,则日期被四舍五入到分钟内)

    editor - 该文章的最后一位编辑的用户名(文本)

    reason - 编辑文章的原因(文本)

    user_id - 文章作者的ID(数字)

    xfield_x - 文章中附加字段的值,其中x是附加字段的名称。例如,xfield_test附加 "测试 "字段的值


信息提示

想要留言? 请 登录 您的账号。还没有? 你可以 免费创建账号

日历归档

«    五月 2024    »
 12345
6789101112
13141516171819
20212223242526
2728293031 

投票调查

您更喜欢哪方面的文章?
 

文章排行