||||\n-|-|-|\n:discourse2: | 摘要 | 右侧边栏区块 (Right Sidebar Blocks) 在主题列表的右侧显示一个侧边栏,其中包含一组可配置的区块。\n|
| 预览 | 在 Discourse 主题创作者上预览\n:hammer_and_wrench: | 仓库链接 | \u003chttps://github.com/discourse/discourse-right-sidebar-blocks\u003e\n:open_book:|初次接触 Discourse 主题?| Discourse 主题使用入门指南\n\n[wrap=theme-install-button repoUrl="https://github.com/discourse/discourse-right-sidebar-blocks\" repoName="Right Sidebar Blocks"]\n安装此主题组件\n[/wrap]\n\n[quote]\n\n:discourse2: 由于这是由 Discourse 团队维护的 official 主题组件,#support、#bug、UX 和 Feature 请求可以在 Meta 上的相应版块中提出,并使用适当的主题组件标签进行标记。点击下面的链接即可开始。
\n\n\u003ckbd\u003e [
\u0026nbsp;支持](Discourse Meta "在 Meta 上就 Right Sidebar Blocks 的配置和使用寻求支持") \u003c/kbd\u003e \u003ckbd\u003e [
\u0026nbsp;Bug](Discourse Meta "Bug 报告意味着有东西坏了,阻止了主题组件的正常/典型使用") \u003c/kbd\u003e \u003ckbd\u003e [
\u0026nbsp;用户体验 (UX)](Discourse Meta "讨论 Right Sidebar Blocks 的用户界面,以及功能(包括语言和 UI 元素)的呈现方式") \u003c/kbd\u003e \u003ckbd\u003e [
\u0026nbsp;功能](Discourse Meta "讨论如何改进或增强现有的 Right Sidebar Blocks 功能,以及提议的新功能如何运作")\u003c/kbd\u003e\n\n[/quote]\n\n### 功能\n\n该组件包含几个可以显示在侧边栏中的区块:\n\n* popular-tags (热门标签)\n* top-contributors (顶级贡献者)\n* recent-replies (最近回复)\n* category-topics (分类主题)\n* custom-html (自定义 HTML)\n* category-list (分类列表)\n* subcategory-list (子分类列表)\n* upcoming-events-list* (即将发生的事件列表*)\n* minimal-gamification-leaderboard** (极简游戏化排行榜**)\n\n\u003e:information_source: 必须启用用户目录 (user directory) 才能填充“顶级贡献者”列表。如果您的列表为空,请在您的管理员设置中搜索 enable user directory 以确保它已启用。\n\n\* 仅在使用 Calendar 插件时可用。\n** 仅在使用 Gamification 插件时可用。\n\n您也可以使用其他 Ember 组件作为区块,只需使用正确的名称即可。例如,核心组件包含一个 signup-cta Ember 组件,您可以像使用其他组件一样在侧边栏中使用它。请注意,您不能使用需要一组参数的组件,但您_可以_在单独的主题中构建自己的 Ember 组件,并在侧边栏的 blocks 设置中仅通过其名称引用它。\n\n您可以通过参数控制所提供区块的某些功能。\n\n| 名称 | 描述 | 默认值 | 值 | 可用于 |\n|—|—|—|—|—|\n| count | 限制结果数量 | 不一 | 数字 | 除 custom-html 外的所有 |\n| excerptLimit | 限制每个回复摘录的长度 | 150 | 数字 | recent-replies |\n| id | 分类 ID | | 分类 ID (category-list 使用逗号分隔) | category-topics, category-list |\n| content | 要显示的内容 | | HTML | custom-html |\n| scopeToCategory | 仅在分类 X 或子分类 X 中显示 | | 分类 ID | popular-tags |\n| excludedTags | 要排除的标签列表 | | 标签名称 | popular-tags |\n| displayInSpecificCategories | 要显示该小部件的分类列表 | all (全部) | 逗号分隔的数字 | popular-tags |\n| id | 排行榜 ID | | 数字 | minimal-gamification-leaderboard |\n| tag | 要显示的标签 | | 标签名称 | tag-topics |\n| period | 热门主题的时间周期 | weekly (每周) | all, yearly, quarterly, monthly, weekly, daily | top-topics |\n| title | 区块的标题 | 不一 | 字符串 | tag-topics, category-list, top-contributors |\n| excludedGroupNames | 排除指定的群组 | | 群组名称 | top-contributors |\n| order | 贡献者的排序方式 | | 字符串 (likes_received 或 likes_given) | top-contributors |\n| period | 顶级贡献者的时间周期 | yearly (每年) | all, yearly, quarterly, monthly, weekly, daily | top-contributors |\n| upcomingDays | 在提供值之前开始的事件 | 180 | 数字 | upcoming-events-list |\n| timeFormat | 事件日期/时间格式 | LT | momentjs 格式 | upcoming-events-list |\n\n### 设置\n\n| 名称 | 描述\n|-|-|\n| blocks | \n| show in routes | 仅限高级用户:将侧边栏限制在所选的路由中。\u003cbr\u003e示例: discovery.latest, discovery.unread, discovery.new, discovery.top, tag.show, "c/category-slug" (用于分类), "tag/sample-tag" (用于标签)。\u003cbr\u003e留空时,侧边栏将显示在所有列表路由上。\n\nblocks: 选择要显示的区块并调整它们的顺序\n\nshow_in_routes: 决定在哪些主题列表路由上显示侧边栏。默认情况下,它将显示在所有发现路由上,但会排除 /categories。\n\n| 翻译 | 默认值\n|-|-|\n| top_contributors.heading | 顶级贡献者\n| top_contributors.view_all | 查看全部\n| popular_tags.heading | 热门标签\n| popular_tags.view_all | 查看全部\n| recent_replies.heading | 最近回复\n| subcategory_list.heading | 子分类\n| top_topics.heading | 热门主题\n| category_list.heading | 分类\n\n### 截图\n\n
upcoming-events-list,日期格式可以遵循此语法(例如,MMMM D, YYYY)。\n\n\n\n\n\n\u003cbr\u003e\n\n\n\u003e:discourse2: 由我们托管? 标准版 (Standard)、商业版 (Business) 和企业版 (Enterprise) 计划均可使用主题组件。




