User Portfolio

:discourse2: Summary User Portfolio adds a new “Portfolio” tab to the user profile. It can be configured to show the user’s topics from a specific category and/or tag. It also works great alongside the Topic List Thumbnails
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-user-portfolio
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Features

A portfolio button can optionally be added to user cards:

Screenshot 2020-07-03 at 10.02.07

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

:discourse2: 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 documentPerform check on document:
46 Likes

This is terrific! :partying_face:

4 Likes

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 Likes

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 Likes

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 Likes

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 :slightly_smiling_face:

1 Like

Great component.

I don’t understand which you mean by Category ID. Is the internal ID number of the category from which to take the posts of the user into account?

It should be much useful to be able to select several categories by its name, like in topic thumbnails TC.

It would be great to let each user to select from which categories he wants to show messages in his portfolio, overriding general default (if the admin allows it).

Another great improvement would be to add an option to let the admins select in the Component config which user groups can have a portfolio (based in level, or whatever admins stimate).

Another great addition It will be a great way to create a personal gallery not just from posts in has published in a category.
To get that, some kind of per user private category should be implemented, where users can create their posts and show them in the profile.

3 Likes

Hey! Loving the plugin, it’s been integral to our website for years.

One issue however, normally we’re able to filter through posts on the website by sorting them via creation date instead of reply date, utilizing the parameters for it: ?order=created

The portfolio seems unable to replicate this behavior, though I’m sure under the hood uses a simple query that should have access to this feature. Is this something you would be able to add?

3 Likes

Amazing component, thank you!

I think it can also be much more than just a user portfolio tab, it can be repurposed as almost anything you want to associate with users within the forum. The community I host is based on a policy/resource library and I’m using this component to show everyone which policies/resources were created by each user. I guess in a way that is a portfolio, but somehow the word implies something visual (especially given the integration with the topic thumbnail plugin/component and the image at the top of this thread).

With that flexibility in mind, it would be amazing to be able to change the URL slug (I’ve edited the title to Policies but the slug stays as u/user/activity/portfolio

It would also be great if the user_card_portfolio_link was hidden if the portfolio is empty.

3 Likes

Agree on having category names to select from, it took me a little while to hunt down the ID of a subcategory.

1 Like

Bug report: The .portfolio-link in the .user-nav needs to be wrapped in a <span>, so that the label text is hidden for tablet/mobile along with the other user-nav entries, otherwise it just sits there like a :lemon:

2 Likes

Thanks for the feedback everyone !I’ve just made some updates to address some issues and add some features:

More than 1 category isn’t easily possible at the moment (though we’re working on some features for this in Discourse in general so maybe someday) — but I did notice that it was only working for 1 tag (despite the setting input allowing multiple)… so this update allows multiple tags to be used to populate the portfolio.

I’ve added a setting for this called portfolio_order so now you can choose created as an option as well.

I’ve added a setting called portfolio_route_name that will allow for this. Note that unless you know what you’re doing with URL encoding, it’s best to stick with a single word for this and avoid spaces and special characters.

I looked into implementing this, but there’s not a great way to do it. To know if it’s empty we’d have to fetch topics whenever someone’s usercard is opened, which is a little bit of a heavy request for a usercard (a plugin could do this in a much more efficient way by adding a field to the user data server-side with a simple count of portfolio topics)

this has been fixed

3 Likes

First of all, thank you so much for taking the time to implement it. This would be such a hugely requested feature for our site. I just pulled the latest commit and changed the setting, but it doesn’t seem to be working. Is there anything I’m missing? Does Discourse need to be restarted?

2 Likes

Hmm you shouldn’t need to restart (though you’d need to refresh the page if it’s already open)

It works for me on my test site…

For example, ordered by latest activity:

ordered by most recently created:

2 Likes

Yes! Sorry, my bad, you’re absolutely correct. I’m using another plugin under the name of Topic List Thumbnails that unfortunately sometimes doesn’t wrap properly, making it seem out of order. But it’s working perfectly. Thanks so much again!

2 Likes

Thank you for all these fixes, amazing!

What are the options for making such a plugin, is this something that would be considered by Discourse or should I just post a marketplace topic, or something else?

3 Likes

Is it possible to add a second category at this point?

Also, how could we implement “multiple” portfolios? For example, we would like to have a general portfolio tab for all users. But for our B2B users, we would like to add a “Products” tab instead.

We might be interested in funding those features if the implementation is not too complex.

1 Like

It would be interesting if this covered another use case:

This great but poorly marketed plugin gives people control over topics they create, so they can track content like DIY projects and so on. Other users can comment on the threads but their comments are reduced in scope so its folded beneath each entry.

It would be cool if your plugin could pull from multiple entries in the same thread, not just a top level image. In other words, to build the portfolio, it might use all of the images from one thread, or only the first and last entries, and so on.

4 Likes

We are actually using a custom-made plugin which uses the latest image posted by the topic author as thumbnail. We mainly use it with topic list thumbnails, but the user portfolio tc should be affected the same way.

@RGJ can we open the plugin for public use?

3 Likes

It’s here GitHub - communiteq/discourse-topic-thumbnail-recent-post
Please note that it only works for journal topics.

3 Likes