Template/FeaturedContent:修订间差异

来自Age Of History 2 Chinese Wiki
跳转至:导航、​搜索
无编辑摘要
标签已被回退
无编辑摘要
标签已被回退
第4行: 第4行:
     <div class="section-title">精选人物</div>
     <div class="section-title">精选人物</div>
     <div class="feature-content">
     <div class="feature-content">
      <dpl>
    <dpl>
        # DPL Parameters Start -----
  category = 精选人物
        category = 精选人物
  count = 1
        randomcount = 1
  addauthor = true
 
  format = , [[%PAGE%]] 的作者是 %AUTHOR%,
        # --- Metadata Inclusion ---
</dpl>
        # !! 关键:确保此行存在且正确,以使 %AUTHOR% 工作 !!
        addauthor = true
        # !! 关键:确保此行存在且正确,以使 %DATE% 工作 !!
        addeditdate = true
        # 可选:自定义日期格式,例如 'Y年m月d日 H:i'
        # userdateformat =
 
        # --- Content Inclusion ---
        # 包含页面的第一段内容作为节选
        # 如果页面结构不同,可尝试 include = {模板名} 或 include = #段落标题
        include = {Page}:1
 
        # --- Caching ---
        # 测试时可临时设为 false: allowcachedresults = false
        allowcachedresults = true
        dplcache = featuredperson_dpl3_v2
        dplcacheperiod = 86400 # 缓存一天 (单位:秒)
 
        # --- Ordering & Selection ---
        ordermethod = firstedit # 按首次编辑排序(对 randomcount=1 影响不大)
 
        # --- Output Formatting ---
        # 如果没有找到页面时的提示信息
        noresultsheader = <p style="text-align: center; color: #777;">目前没有精选人物。</p>
        # 使用 format 定义输出结构 (三部分:列表开始, 单项格式, 列表结束)
        # 假设你已将 CSS 类添加到 MediaWiki:Common.css
        format = <div class="dpl-results-list">, <div class="dpl-item">
                  <div class="dpl-image">
                    [[File:%IMAGE%|120x120px|link=%PAGE%]]
                  </div>
                  <div class="dpl-content">
                    <div class="dpl-title">[[%PAGE%]]</div>
                    <div class="dpl-meta">作者: %AUTHOR% | 日期: %DATE%</div>
                    <div class="dpl-excerpt">%SECTION%</div>
                  </div>
                </div>,
                </div>
 
        # --- Other Parameters ---
        escapelinks = false # 通常设为 false 以正确显示链接
 
        # DPL Parameters End -----
      </dpl>
     </div>
     </div>
     <div class="see-more">
     <div class="see-more">

2025年5月2日 (五) 21:01的版本