Template/FeaturedContent:修订间差异

来自Age Of History 2 Chinese Wiki
跳转至:导航、​搜索
无编辑摘要
标签已被回退
无编辑摘要
标签手工回退
 
(未显示同一用户的3个中间版本)
第1行: 第1行:
<div class="featured-content-container">
<div class="featured-content-container">
 
  <!-- 精选人物区域 -->
   <div class="feature-item person">
   <div class="feature-item person">
     <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 = 精选人物
         randomcount=1
         randomcount = 1
        allowcachedresults=true
 
         dplcache=featuredperson
         # --- Metadata Inclusion ---
         dplcacheperiod=86400
         # !! 关键:确保此行存在且正确,以使 %AUTHOR% 工作 !!
         addauthor=true
         addauthor = true
         addeditdate=true
        # !! 关键:确保此行存在且正确,以使 %DATE% 工作 !!
         ordermethod=firstedit
         addeditdate = true
         mode=gallery
         # 可选:自定义日期格式,例如 'Y年m月d日 H:i'
         imagewidth=120
        # userdateformat =
         imageheight=120
 
         galleryshowfilename=true
         # --- Content Inclusion ---
         galleryshowfilesize=false
        # 包含页面的第一段内容作为节选
         imagesperrow=3
        # 如果页面结构不同,可尝试 include = {模板名} 或 include = #段落标题
         gallerycaption=精选人物
         include = {Page}:1
         escapelinks=false
 
        # --- 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>
       </dpl>
     </div>
     </div>
第59行: 第28行:
   </div>
   </div>


  <!-- 精选团体区域 -->
   <div class="feature-item group">
   <div class="feature-item group">
     <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 = 精选团体
         randomcount=1
         randomcount = 1
         allowcachedresults=true
         # --- Metadata Inclusion ---
         dplcache=featuredgroup
        addauthor = true # !! 必须确保存在 !!
         dplcacheperiod=86400
         addeditdate = true
         addauthor=true
         # userdateformat =
         addeditdate=true
         # --- Content Inclusion ---
         ordermethod=firstedit
        include = {Page}:1
         mode=gallery
         # --- Caching ---
         imagewidth=120
        allowcachedresults = true
         imageheight=120
         dplcache = featuredgroup_dpl3_v2
         galleryshowfilename=true
         dplcacheperiod = 86400
         galleryshowfilesize=false
         # --- Ordering & Selection ---
         imagesperrow=3
         ordermethod = firstedit
        gallerycaption=精选团体
         # --- Output Formatting ---
         escapelinks=false
         noresultsheader = <p style="text-align: center; color: #777;">目前没有精选团体。</p>
         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
        # DPL Parameters End -----
       </dpl>
       </dpl>
     </div>
     </div>
第101行: 第55行:
     </div>
     </div>
   </div>
   </div>
</div>
</div>

2025年5月2日 (五) 21:08的最新版本