# How to create a custom activity tab in user profile?

**URL:** https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047
**Category:** Development
**Created:** [April 9, 2025, 10:29am UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047 "2025-04-09T10:29:41Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![SubStrider](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/substrider/32/512604_2.png) [@SubStrider](https://meta.discourse.org/u/SubStrider)
#### Post date: [April 9, 2025, 10:29am UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047/1 "2025-04-09T10:29:41Z")

</div>

I was dabbling with plugin development and while I have been able to make the plugin settings appear on the admin settings page, I am not quite sure how to make the UI elements to appear on the discourse UI.

If someone can point me to the direction of relevant documentation or which files to look at in any existing plugin as reference, then that would be really great.

PS:  
I am trying to modify these sections overall.

1. add a custom string in the (topic meta data) userbit area under the username in the post.
2. add a button in the posts control area to open a form
3. add a custom tab on the user profile activity page
4. add some custom summary information on the user card and user summary stats

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [April 9, 2025, 11:36am UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047/2 "2025-04-09T11:36:39Z")

</div>

I would recommend using [Introducing Discourse developer toolbar](https://meta.discourse.org/t/introducing-discourse-developer-toolbar/346215) .

Then, look for a plugin outlet where you can insert a component:

![image](https://global.discourse-cdn.com/meta/original/4X/6/5/1/651e7e207ed54b75670b503bb61da41c0be17bc3.png)

Then you can see for example:

 ![The image shows a navigation bar on a website or application with tabs for Summary, Activity, Notifications, Messages, Invites, and Badges, including a highlighted tab labeled "user-main-nav" in green. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/1/0/b/10b899268003a68ab65f86a71231b6c4366e34a8.png)

Here is a guide about it:

> [@Theme Developer Tutorial: 4. Using Outlets to insert and replace content](https://meta.discourse.org/t/theme-developer-tutorial-4-using-outlets-to-insert-and-replace-content/357799?silent=true):
>
> Discourse uses the [Ember JS Framework](https://emberjs.com/) for its user interface. On top of Ember, Discourse provides a number of APIs to allow themes to customize the user interface. The most commonly-used API is Plugin Outlets. These outlets are positioned throughout Discourse core, and allow themes to render Ember Components inside them. Those components are given access to some contextual information called “outlet args”. Some outlets also “wrap” part of the core user interface, which allows themes to add the…

---

<div class="post-metadata">

### Author: ![SubStrider](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/substrider/32/512604_2.png) [@SubStrider](https://meta.discourse.org/u/SubStrider)
#### Post date: [April 9, 2025, 6:13pm UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047/3 "2025-04-09T18:13:48Z")

</div>

Is it possible to request plugin outlets?

I am hoping to insert user reputation rating under their username. Or based on experience what would be a good place to insert it. topic-map-expanded-after?

 ![Screenshot 2025-04-09 at 11.40.29 PM](https://global.discourse-cdn.com/meta/original/4X/5/3/d/53dca607bf21be1f3409f8c4e0d1b0599c96e24d.jpeg)

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [April 9, 2025, 6:30pm UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047/4 "2025-04-09T18:30:17Z")

</div>

> [@SubStrider](#):
>
> Is it possible to request plugin outlets?

Sure! You can make #Development topic.

> [@SubStrider](#):
>
> I am hoping to insert user reputation rating under their username

It doesn’t show for some reason, but you do have outlets around the post name:

> **old answer**
>
> [https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/post/meta-data/poster-name.gjs#L119](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/post/meta-data/poster-name.gjs#L119)

It requires you enable the glimmer post stream mode:

 ![The image shows a settings menu for enabling a new 'glimmer' post stream implementation in 'auto' mode, currently in active development and not intended for production use. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/e/8/c/e8ce4fb8ce6e0124f46f959403302d566f47da33.png)

Then, they appears:

 ![The image shows HTML code where a element displays the name "John Doe" between its opening and closing tags. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/6/1/4/6144848bc763d57c903f928c579059467e23209e.png)

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [April 9, 2025, 10:56pm UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047/5 "2025-04-09T22:56:20Z")

</div>

So this outlet would be `post-metadata__after`, or use `renderAfterWrapperOutlet("post-metadata")`?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [April 9, 2025, 11:10pm UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047/6 "2025-04-09T23:10:23Z")

</div>

> [@NateDhaliwal](#):
>
> renderAfterWrapperOutlet(“post-metadata”, …)

That would be a good option to try, yes.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [April 10, 2025, 11:06am UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047/7 "2025-04-10T11:06:34Z")

</div>

> [@Arkshine](#):
>
> It requires you enable the glimmer post stream mode:

It’s fine to play with this, but please make sure to read the disclaimer in the setting description. This mode is not yet ready for production use. We aren’t even using it on Meta.

For the current post-stream implementation, you’d need to use the old `decorateWidget` API, or the `addPosterIcon` API:

> <https://github.com/discourse/discourse/blob/80e6d3d8c5799794b419ae01dad15626898edf16/app/assets/javascripts/discourse/app/lib/plugin-api.gjs#L700C3-L732C7>

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [April 10, 2025, 11:22am UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047/8 "2025-04-10T11:22:32Z")

</div>

Sorry, David, I got too excited with the new stuff that I completely disregarded the warning that it’s still under active development. 😅 I will be careful next time.

---

<div class="post-metadata">

### Author: ![SubStrider](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/substrider/32/512604_2.png) [@SubStrider](https://meta.discourse.org/u/SubStrider)
#### Post date: [April 17, 2025, 7:33am UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047/9 "2025-04-17T07:33:06Z")

</div>

> [@SubStrider](#):
>
> add a button in the posts control area to open a form

For this I used the following to render the button.

```plaintext
api.registerValueTransformer("post-menu-buttons", ({ value: dag, context })

```

Now I am stuck where I am not able to open the modal without errors when using other components.

> [@GJS component fails with "undefined helper" error when shown via modal service (Discourse 3.5.0](https://meta.discourse.org/t/gjs-component-fails-with-undefined-helper-error-when-shown-via-modal-service-discourse-3-5-0/362272):
>
> encountering a persistent rendering error when trying to display a Glimmer component (.gjs) as a modal using this.modal.show(). The modal is triggered from another GJS component added to the post menu via the post-menu-buttons value transformer. I’m running Discourse v3.5.0.beta3-dev I am trying to Add a button to the post menu using api.registerValueTransformer("post-menu-buttons", ...). Clicking this button should open a modal defined by a separate GJS component (FeedbackFormModal) using this…

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 17, 2025, 7:33am UTC](https://meta.discourse.org/t/how-to-create-a-custom-activity-tab-in-user-profile/361047/10 "2025-05-17T07:33:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
