Install this theme component
Features
A portfolio button can optionally be added to user cards:
Settings
Name
Description
portfolio category
Portfolio category ID. Set to 0 for all categories
portfolio tags
Portfolio tags
portfolio icon
Icon for portfolio tab and user-card-button
portfolio thumbnail style
Thumbnail style for portfolio page (requires discourse-topic-thumbnails to be installed and added to the active theme)
user card portfolio link
Display a portfolio link on user cards
portfolio order
portfolio route name
name of the portfolio page in the URL, for example /u/username/activity/porfolio
Translation
Default
portfolio
Portfolio
empty_portfolio
This portfolio is waiting to be filled
empty_portfolio_link
Get started by adding topics to
Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.
Last edited by @JammyDodger 2024-06-16T13:35:05Z
Check document Perform check on document:
46 个赞
tomtjes
(Thomas Reintjes)
2020 年7 月 5 日 13:41
3
Fantastic component! I’ve long looked for something to make profiles more expressive.
However, thinking about implementing it, one thing is holding me back: I think it would be necessary for users to have more control over what appears on their portfolio. With edits and deletions of posts limited, that’s difficult.
Any idea how to solve this? (Making all posts in the portfolio category wikis could be a solution, though not ideal.)
2 个赞
david
(David Taylor)
2020 年7 月 6 日 08:18
4
One option to give users more control is a ‘portfolio’ tag which they can apply to their posts. But you’re right, they can’t remove it later without edit privileges. Wikis are a good workaround.
Any changes to editing permissions wouldn’t be possible in a theme component, so we’d have to explore a core change or a plugin to make it possible.
6 个赞
Actually this feature has been in the Topic List Previews plugin since Oct 2019 and was carried over into the TLP Theme Component:
https://meta.discourse.org/t/topic-list-previews/101646/660?u=merefield
8 个赞
Don
2021 年10 月 8 日 10:22
7
Hi David,
Is that possible somehow to add more category to filter the portfolio? I try to add more tags but it not work for me. If I set up category: 0 and add more tags the portfolio gone empty.
Thank you
1 个赞
ariznaf
(fernando)
2022 年1 月 11 日 17:52
8
很棒的组件。
我不明白你说的“分类 ID”是什么意思。是指要考虑用户帖子的分类的内部 ID 号吗?
如果能像主题缩略图 TC 那样,通过名称选择多个分类,那将非常有帮助。
如果能让每个用户选择他们想在个人作品集中显示哪些分类的消息,并覆盖通用的默认设置(如果管理员允许的话),那就太好了。
另一个很棒的改进是添加一个选项,让管理员在组件配置中选择哪些用户组可以拥有个人作品集(基于级别或其他管理员认为合适的内容)。
另一个很棒的补充是,这将是一种创建个人画廊的好方法,而不仅仅是发布在某个分类中的帖子。
要实现这一点,应该实现某种每位用户私有分类,用户可以在其中创建自己的帖子并在个人资料中显示。
3 个赞
嘿!很喜欢这个插件,它多年来一直是Мы веб网站不可或缺的一部分。
但是,有一个问题,通常我们可以通过按创建日期而不是回复日期对网站上的帖子进行排序来过滤帖子,利用它的参数:?order=created
然而,作品集似乎无法复制此行为,尽管我敢肯定,在底层它使用了应该能够访问此功能的简单查询。您是否能够添加此功能?
3 个赞
carbonrich
(Richard Hawkins)
2022 年10 月 12 日 14:59
14
太棒的组件了,谢谢!
我认为它还可以远不止是一个用户作品集标签,它可以被重新利用为论坛中几乎任何你想与用户关联的东西。我托管的社区基于一个政策/资源库,我正在使用这个组件来展示每个用户创建了哪些政策/资源。我想在某种程度上,这确实 是一个作品集,但不知何故,“作品集”这个词暗示着视觉上的东西(特别是考虑到与主题缩略图插件/组件的集成以及本帖顶部的图片)。
考虑到这种灵活性,能够更改 URL 伪标签将是惊人的 (我已经将标题编辑为“Policies”,但伪标签仍然是 u/user/activity/portfolio)。
如果作品集为空,隐藏 user_card_portfolio_link 也会很棒。
3 个赞
carbonrich
(Richard Hawkins)
2022 年10 月 12 日 15:01
15
同意提供可供选择的类别名称,我花了一些时间才找到子类别的 ID。
1 个赞
carbonrich
(Richard Hawkins)
2023 年5 月 11 日 14:29
16
Bug 报告:.user-nav 中的 .portfolio-link 需要包装在 <span> 中,以便标签文本与其他的 user-nav 条目一起在平板电脑/移动设备上隐藏,否则它会像 一样孤零零地待在那里
2 个赞
感谢大家的反馈!我刚刚进行了一些更新,以解决一些问题并添加一些功能:
main ← fixes-features
opened 10:19PM - 11 May 23 UTC
Adds a `span` for the new user menu, so the text can be hidden in this situation…

Adds some features requested from Meta:
* Allows admins to change the route name so they can optionally use `/u/username/activity/foo` instead of `/u/username/activity/portfolio`
* Updates the filter so multiple tags can be used to populate the portfolio
* Adds a `portfolio_order` setting so the topic list can be ordered by latest or created
目前,一个以上类别并非易事(尽管我们正在为 Discourse 中的此功能进行一些工作,所以也许有一天可以实现)——但我注意到它仅适用于一个标签(尽管设置输入允许多个)……因此此更新允许使用多个标签来填充作品集。
我为此添加了一个名为 portfolio_order 的设置,因此现在您可以选择 created 作为选项。
我为此添加了一个名为 portfolio_route_name 的设置,它将允许这样做。请注意,除非您了解 URL 编码,否则最好坚持使用单个单词,并避免使用空格和特殊字符。
我研究了实现这一点的方法,但没有很好的方法。为了知道它是否为空,我们需要在每次打开用户卡片时获取主题,这对于用户卡片来说是一个相当大的请求(插件可以通过在服务器端向用户数据添加一个字段,其中包含作品集主题的简单计数,从而更有效地完成此操作)。
这已得到修复。
3 个赞
首先,非常感谢您花时间来实现它。这对于我们的网站来说将是一个非常受欢迎的功能。我刚刚拉取了最新的提交并更改了设置,但它似乎不起作用。我是否遗漏了什么?Discourse 需要重启吗?
2 个赞
是的!抱歉,我的错,你说得完全正确。我正在使用另一个名为 Topic List Thumbnails 的插件,它有时无法正确换行,导致看起来有点乱。但它运行得非常完美。再次非常感谢!
2 个赞
carbonrich
(Richard Hawkins)
2023 年5 月 13 日 10:30
23
太感谢您进行所有这些修复了,太棒了!
实现这样一个插件有哪些选项?这是 Discourse 会考虑的事情,还是我应该直接发布一个市场主题,或者其他什么?
3 个赞
jrgong
(jrgong)
2024 年4 月 28 日 13:07
24
目前是否可以添加第二个分类?
另外,我们该如何实现“多个”作品集?例如,我们希望为所有用户提供一个通用的作品集选项卡。但对于我们的 B2B 用户,我们希望改为添加一个“产品”选项卡。
如果实现起来不复杂,我们可能会考虑资助这些功能。
1 个赞
henvo
2024 年6 月 15 日 07:34
25
如果这能涵盖另一个用例,那将很有趣:
Create journals in discourse
这个很棒但营销不佳的插件让人们可以控制他们创建的主题,以便他们可以跟踪 DIY 项目等内容。其他用户可以评论帖子,但他们的评论范围会缩小,折叠在每个条目下方。
如果您的插件可以从同一主题中的多个条目(而不仅仅是顶层图像)中提取内容,那将很酷。换句话说,要构建作品集,它可以使用一个主题中的所有图像,或者只使用第一个和最后一个条目,等等。
4 个赞
jrgong
(jrgong)
2024 年6 月 15 日 16:17
26
我们实际上使用的是一个自定义插件,它使用主题作者发布的最新图片作为缩略图。我们主要将其用于主题列表缩略图,但用户作品集 tc 也应受到相同影响。
@RGJ ,我们可以公开使用该插件吗?
3 个赞
RGJ
(Richard - Communiteq)
2024 年6 月 15 日 16:35
27
3 个赞