# Development

**URL:** https://meta.discourse.org/c/dev/7.md?page=68

[Latest](https://meta.discourse.org/latest.md) · [Categories](https://meta.discourse.org/categories.md) · [Tags](https://meta.discourse.org/tags.md)

**Page:** 69

---

## [There are 2 IDs when I try to get API, in case of lack documentation](https://meta.discourse.org/t/there-are-2-ids-when-i-try-to-get-api-in-case-of-lack-documentation/214844)

<div class="topic-metadata">

**Author:** [@cmdntd](https://meta.discourse.org/u/cmdntd)\
**Replies:** 1\
**Last updated:** [January 14, 2022, 2:37pm UTC](https://meta.discourse.org/t/there-are-2-ids-when-i-try-to-get-api-in-case-of-lack-documentation/214844 "2022-01-14T14:37:27Z")

</div>

I try to do like Sam’s instruction at How to reverse engineer the Discourse API But it display 2 IDs, and it makes me do not know how to do next When I tried to update private message, it has different 2 IDs: ID of…

---

## [Run function after dom has loaded (didRender, didInsertElement, and decorateCooked are not working)](https://meta.discourse.org/t/run-function-after-dom-has-loaded-didrender-didinsertelement-and-decoratecooked-are-not-working/214802)

<div class="topic-metadata">

**Author:** [@JQ331](https://meta.discourse.org/u/JQ331)\
**Replies:** 2\
**Last updated:** [January 14, 2022, 12:52pm UTC](https://meta.discourse.org/t/run-function-after-dom-has-loaded-didrender-didinsertelement-and-decoratecooked-are-not-working/214802 "2022-01-14T12:52:31Z")

</div>

Hi. I am trying to evaluate a div on the topic show page. In order to do so, I need to run a function after the dom on the topic show page is done loading. In normal javascript, i’d run “window.onload = function()…” for…

---

## [How to update a private message by API?](https://meta.discourse.org/t/how-to-update-a-private-message-by-api/214290)

<div class="topic-metadata">

**Author:** [@cmdntd](https://meta.discourse.org/u/cmdntd)\
**Replies:** 3\
**Last updated:** [January 9, 2022, 12:06pm UTC](https://meta.discourse.org/t/how-to-update-a-private-message-by-api/214290 "2022-01-09T12:06:31Z")

</div>

It seems not have API to update private message I want to update a private message Could I use PUT topic to do it? Do you have any idea to update private message?

---

## [What Googlebot sees when crawling Discourse](https://meta.discourse.org/t/what-googlebot-sees-when-crawling-discourse/212726)

<div class="topic-metadata">

**Author:** [@networkaaron](https://meta.discourse.org/u/networkaaron)\
**Replies:** 5\
**Last updated:** [January 13, 2022, 9:13pm UTC](https://meta.discourse.org/t/what-googlebot-sees-when-crawling-discourse/212726 "2022-01-13T21:13:08Z")

</div>

TL:DR, it’s semi-humanly possible to replicate Googlebot crawling Discourse. Here’s how to start… Become one with Googlebot Open up an incognito window (always start fresh) Open up DevTools Open up Network Conditions …

---

## [Broken link in embed.js file](https://meta.discourse.org/t/broken-link-in-embed-js-file/214791)

<div class="topic-metadata">

**Author:** [@apitman](https://meta.discourse.org/u/apitman)\
**Replies:** 0\
**Last updated:** [January 13, 2022, 8:50pm UTC](https://meta.discourse.org/t/broken-link-in-embed-js-file/214791 "2022-01-13T20:50:45Z")

</div>

The link on this line is broken:

---

## [Work with discourse users on an SPA](https://meta.discourse.org/t/work-with-discourse-users-on-an-spa/214524)

<div class="topic-metadata">

**Author:** [@Marcel\_Koops](https://meta.discourse.org/u/Marcel_Koops)\
**Replies:** 2\
**Last updated:** [January 13, 2022, 8:30pm UTC](https://meta.discourse.org/t/work-with-discourse-users-on-an-spa/214524 "2022-01-13T20:30:42Z")

</div>

I am trying to find a way to get user specific data in an SPA from discourse. Rough setup SPA running at my-app.com Discourse running at community.my-app.com The SPA has no own user management, i would like to use di…

---

## [Call AdminDashboardGeneralData.refresh\_stats at boot?](https://meta.discourse.org/t/call-admindashboardgeneraldata-refresh-stats-at-boot/214667)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 2\
**Last updated:** [January 12, 2022, 6:21pm UTC](https://meta.discourse.org/t/call-admindashboardgeneraldata-refresh-stats-at-boot/214667 "2022-01-12T18:21:59Z")

</div>

https://www.pfaffmanager.com/ is pulling information from /admin/dashboard/general.json to get version information. It’s very cool to be able to get this from the UX. Unfortunately, it gets updated periodically, not when…

---

## [API: how to get all private messages that include a user (including sent messages)](https://meta.discourse.org/t/api-how-to-get-all-private-messages-that-include-a-user-including-sent-messages/214655)

<div class="topic-metadata">

**Author:** [@JQ331](https://meta.discourse.org/u/JQ331)\
**Replies:** 2\
**Last updated:** [January 12, 2022, 4:46pm UTC](https://meta.discourse.org/t/api-how-to-get-all-private-messages-that-include-a-user-including-sent-messages/214655 "2022-01-12T16:46:10Z")

</div>

Using the API, I want to return a list of all private messages that include a user (any private message with their username attached to it). This would include all private messages for a user and also all private message…

---

## [How to create a Handlebar helper function](https://meta.discourse.org/t/how-to-create-a-handlebar-helper-function/214407)

<div class="topic-metadata">

**Author:** [@Kumar\_Karuppaiah](https://meta.discourse.org/u/Kumar_Karuppaiah)\
**Replies:** 6\
**Last updated:** [January 12, 2022, 12:13pm UTC](https://meta.discourse.org/t/how-to-create-a-handlebar-helper-function/214407 "2022-01-12T12:13:49Z")

</div>

Hi, I want to create a new helper function which can be across the application. I am not sure how to create a helper function. Likewise, I tried myself to create a helper function, but it is not working. Please find m…

---

## [decorateCookedElement for each page change?](https://meta.discourse.org/t/decoratecookedelement-for-each-page-change/214218)

<div class="topic-metadata">

**Author:** [@jimkleiber](https://meta.discourse.org/u/jimkleiber)\
**Replies:** 5\
**Last updated:** [January 11, 2022, 10:15pm UTC](https://meta.discourse.org/t/decoratecookedelement-for-each-page-change/214218 "2022-01-11T22:15:12Z")

</div>

I’m trying to use the Mediaelement.js library to override the custom audio onebox, and I’ve got it working when the page is loaded/refreshed, however, when I navigate from one topic to another, it doesn’t seem to reload,…

---

## [Route alias for a topic via theme component?](https://meta.discourse.org/t/route-alias-for-a-topic-via-theme-component/214167)

<div class="topic-metadata">

**Author:** [@gale](https://meta.discourse.org/u/gale)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 7:08pm UTC](https://meta.discourse.org/t/route-alias-for-a-topic-via-theme-component/214167 "2022-01-07T19:08:55Z")

</div>

I’d like to add a route alias for a specific topic in Discourse. In my example, I’d like to have “/events” be an alias for “/t/events/42”. Is it possible to do this purely client side without having to define a backend r…

---

## [How does Discourse handle the Read/Unread for users?](https://meta.discourse.org/t/how-does-discourse-handle-the-read-unread-for-users/214048)

<div class="topic-metadata">

**Author:** [@nilox](https://meta.discourse.org/u/nilox)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 9:57am UTC](https://meta.discourse.org/t/how-does-discourse-handle-the-read-unread-for-users/214048 "2022-01-07T09:57:33Z")

</div>

Hey guys! I’m currently learning coding and I’m wondering what is the schema or technique for read / unread posts in Discourse? I’ve seen how SMF does it, through a combination of Mark Board Read, Mark All Read, and ma…

---

## [Username watermark on posts](https://meta.discourse.org/t/username-watermark-on-posts/190567)

<div class="topic-metadata">

**Author:** [@adambirds](https://meta.discourse.org/u/adambirds)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 4:15am UTC](https://meta.discourse.org/t/username-watermark-on-posts/190567 "2022-01-07T04:15:18Z")

</div>

Is there a way in which we can display the current users username on all posts to act as a watermark against people screenshotting private forum content to share on social media? I know it would have to be a plugin of s…

---

## [Checkout specific version of plugin?](https://meta.discourse.org/t/checkout-specific-version-of-plugin/167919)

<div class="topic-metadata">

**Author:** [@codechef](https://meta.discourse.org/u/codechef)\
**Replies:** 4\
**Last updated:** [January 6, 2022, 10:25pm UTC](https://meta.discourse.org/t/checkout-specific-version-of-plugin/167919 "2022-01-06T22:25:01Z")

</div>

Is there a way, inside of app.yml, to make rebuild checkout a specific version of a plugin? I’m working on an older branch than master. When I ./launcher rebuild app it pulls the latest version of a plugin that I don’t …

---

## [Optimizing FCP/LCP by caching raw-view module lookups](https://meta.discourse.org/t/optimizing-fcp-lcp-by-caching-raw-view-module-lookups/213759)

<div class="topic-metadata">

**Author:** [@rrit](https://meta.discourse.org/u/rrit)\
**Replies:** 10\
**Last updated:** [January 5, 2022, 10:23pm UTC](https://meta.discourse.org/t/optimizing-fcp-lcp-by-caching-raw-view-module-lookups/213759 "2022-01-05T22:23:43Z")

</div>

I’m trying to improve First Contentful Paint (FCP) and Largest Contentful Paint (LCP) with these two PRs: https://github.com/discourse/discourse/pull/15440 https://github.com/discourse/discourse/pull/15441 I’m really …

---

## [How discourse stays online (Message Bus, Faye, Long Polling)](https://meta.discourse.org/t/how-discourse-stays-online-message-bus-faye-long-polling/3238)

<div class="topic-metadata">

**Author:** [@oganer](https://meta.discourse.org/u/oganer)\
**Replies:** 25\
**Last updated:** [January 4, 2022, 10:52am UTC](https://meta.discourse.org/t/how-discourse-stays-online-message-bus-faye-long-polling/3238 "2022-01-04T10:52:40Z")

</div>

Hi, sorry for bad English. I looked at source, but it’s hard to read and understand in big project. But as i understood Discourse using own implementation of communication over (Long polling (only(?))) to represent most …

---

## [Create sub-topics?](https://meta.discourse.org/t/create-sub-topics/161946)

<div class="topic-metadata">

**Author:** [@JQ331](https://meta.discourse.org/u/JQ331)\
**Replies:** 5\
**Last updated:** [January 3, 2022, 7:45pm UTC](https://meta.discourse.org/t/create-sub-topics/161946 "2022-01-03T19:45:18Z")

</div>

I would like to make some topics sub-topics of others. Say I have “Topic A”. On the Topic A page, I will put a button to “create sub topic”. That will allow the user to create a new topic, “topic b”. topic b would be a …

---

## [Get external\_id by user for associated accounts?](https://meta.discourse.org/t/get-external-id-by-user-for-associated-accounts/213557)

<div class="topic-metadata">

**Author:** [@gale](https://meta.discourse.org/u/gale)\
**Replies:** 0\
**Last updated:** [December 31, 2021, 10:01pm UTC](https://meta.discourse.org/t/get-external-id-by-user-for-associated-accounts/213557 "2021-12-31T22:01:24Z")

</div>

I see that there is an endpoint for fetching a user id by their external id (Discourse API Docs) but there doesn’t seem to be any way to perform the inverse operation. The user information object contains associated acco…

---

## [Add users to a specific group via API](https://meta.discourse.org/t/add-users-to-a-specific-group-via-api/213278)

<div class="topic-metadata">

**Author:** [@Kumar\_Karuppaiah](https://meta.discourse.org/u/Kumar_Karuppaiah)\
**Replies:** 3\
**Last updated:** [December 30, 2021, 12:50pm UTC](https://meta.discourse.org/t/add-users-to-a-specific-group-via-api/213278 "2021-12-30T12:50:41Z")

</div>

Hi, I want to add the users to a specific group through create user API. Currently, we don’t have an option to pass the group name/ id. Can someone please suggest me how can I add the users to specific group? Than…

---

## [Message Bus - Last Seen](https://meta.discourse.org/t/message-bus-last-seen/213316)

<div class="topic-metadata">

**Author:** [@Roragok](https://meta.discourse.org/u/Roragok)\
**Replies:** 5\
**Last updated:** [December 28, 2021, 8:38pm UTC](https://meta.discourse.org/t/message-bus-last-seen/213316 "2021-12-28T20:38:12Z")

</div>

Hey everyone, haven’t been messing around with discourse in quite a while. I recently updated my site without testing locally. 2.8.0.beta8 - \> 2.8.0.beta10 I encountered an issue with Message Bus as it now does not pus…

---

## [Not able to place "Tag List" Component at the right position](https://meta.discourse.org/t/not-able-to-place-tag-list-component-at-the-right-position/213170)

<div class="topic-metadata">

**Author:** [@Kumar\_Karuppaiah](https://meta.discourse.org/u/Kumar_Karuppaiah)\
**Replies:** 0\
**Last updated:** [December 27, 2021, 10:40am UTC](https://meta.discourse.org/t/not-able-to-place-tag-list-component-at-the-right-position/213170 "2021-12-27T10:40:03Z")

</div>

Hi, I have created a new component for displaying the tag list. It is working fine. But I want to display if after the header. Currently, it is coming on the right side. I am not sure how to position the component at t…

---

## [Theme & Components](https://meta.discourse.org/t/theme-components/213158)

<div class="topic-metadata">

**Author:** [@Kumar\_Karuppaiah](https://meta.discourse.org/u/Kumar_Karuppaiah)\
**Replies:** 2\
**Last updated:** [December 27, 2021, 9:13am UTC](https://meta.discourse.org/t/theme-components/213158 "2021-12-27T09:13:51Z")

</div>

Hi, Can we keep the themes and components source code in the same repo? If yes, how can I add / invoke the component to the theme? Please give me the suggestions. Thanks Kumar

---

## [Customize Tag Search](https://meta.discourse.org/t/customize-tag-search/213154)

<div class="topic-metadata">

**Author:** [@Kumar\_Karuppaiah](https://meta.discourse.org/u/Kumar_Karuppaiah)\
**Replies:** 2\
**Last updated:** [December 27, 2021, 7:56am UTC](https://meta.discourse.org/t/customize-tag-search/213154 "2021-12-27T07:56:35Z")

</div>

Hi, As per the requirements, I have to display the tags similar to the attached screenshot below instead of showing it in the drop-down control. Existing Design: Proposed Design: Can someone please help me on t…

---

## [How do I get a list of all users from the API?](https://meta.discourse.org/t/how-do-i-get-a-list-of-all-users-from-the-api/24261)

<div class="topic-metadata">

**Author:** [@dirkcuys](https://meta.discourse.org/u/dirkcuys)\
**Replies:** 18\
**Last updated:** [December 24, 2021, 6:59pm UTC](https://meta.discourse.org/t/how-do-i-get-a-list-of-all-users-from-the-api/24261 "2021-12-24T18:59:51Z")

</div>

I see that I can get a list of users using the API using http://discourse.example.net/admin/users.json, but I get only 100 users and I don’t know how the paging for that works? The interface doesn’t seem to display more …

---

## [How do I include a javascript file into the header or footer?](https://meta.discourse.org/t/how-do-i-include-a-javascript-file-into-the-header-or-footer/79778)

<div class="topic-metadata">

**Author:** [@dottedquad](https://meta.discourse.org/u/dottedquad)\
**Replies:** 4\
**Last updated:** [December 23, 2021, 11:33am UTC](https://meta.discourse.org/t/how-do-i-include-a-javascript-file-into-the-header-or-footer/79778 "2021-12-23T11:33:45Z")

</div>

I would like to include: \<script async src="url-here" data-url="url-here"\>\</script\> Am I required to create a plugin or can I edit the source files to include the js file? Either way I am not sure how to achieve this. …

---

## [User avatar selection through API no longer working](https://meta.discourse.org/t/user-avatar-selection-through-api-no-longer-working/211661)

<div class="topic-metadata">

**Author:** [@Spac3Rat](https://meta.discourse.org/u/Spac3Rat)\
**Replies:** 16\
**Last updated:** [December 22, 2021, 3:21pm UTC](https://meta.discourse.org/t/user-avatar-selection-through-api-no-longer-working/211661 "2021-12-22T15:21:54Z")

</div>

Hi everyone. I am using SSO on my forum and avatars are controlled by my website. Until a few days ago, avatar upload/update from the website to the Discource, via API was working. I now get a 422 - Unprocessable Entity…

---

## [Convert the New Topic button to a have a sub menu](https://meta.discourse.org/t/convert-the-new-topic-button-to-a-have-a-sub-menu/212300)

<div class="topic-metadata">

**Author:** [@Fma965](https://meta.discourse.org/u/Fma965)\
**Replies:** 7\
**Last updated:** [December 16, 2021, 5:38pm UTC](https://meta.discourse.org/t/convert-the-new-topic-button-to-a-have-a-sub-menu/212300 "2021-12-16T17:38:13Z")

</div>

Hey guys, Does any one know how i can go about making the New Topic button have a sub menu on certain categories? Currently i have this But was hoping to get something like this when the “New Topic” button is click…

---

## [Assets only available to SCSS not JS](https://meta.discourse.org/t/assets-only-available-to-scss-not-js/148231)

<div class="topic-metadata">

**Author:** [@hakonbja](https://meta.discourse.org/u/hakonbja)\
**Replies:** 3\
**Last updated:** [December 16, 2021, 10:27am UTC](https://meta.discourse.org/t/assets-only-available-to-scss-not-js/148231 "2021-12-16T10:27:02Z")

</div>

Hello, For the last week or so I’ve been styling a Discourse setup for a brand which includes fixed fonts, logos and icons. To begin with I noticed that any assets I imported (place in assets folder and import under th…

---

## [Custom Markdown Content Missing](https://meta.discourse.org/t/custom-markdown-content-missing/150458)

<div class="topic-metadata">

**Author:** [@Ghan](https://meta.discourse.org/u/Ghan)\
**Replies:** 1\
**Last updated:** [December 15, 2021, 9:29pm UTC](https://meta.discourse.org/t/custom-markdown-content-missing/150458 "2021-12-15T21:29:19Z")

</div>

I’m trying to create a \[fieldset=\] bbcode where you can enter a title as the = option and the content inside the tag. So far, my rule creates the html tags properly, but the content and option are missing. This is the …

---

## [beforePageChange plugin API?](https://meta.discourse.org/t/beforepagechange-plugin-api/212246)

<div class="topic-metadata">

**Author:** [@hrayner](https://meta.discourse.org/u/hrayner)\
**Replies:** 1\
**Last updated:** [December 15, 2021, 9:26pm UTC](https://meta.discourse.org/t/beforepagechange-plugin-api/212246 "2021-12-15T21:26:58Z")

</div>

Is there a plugin-API for before a new page is loaded / while a page is loading? I have a problem where I’m changing styles on the navbar depending on the page by using the onPageChange API. Unfortunately this means tha…

[Previous page](https://meta.discourse.org/c/dev/7.md?page=67)

[Next page](https://meta.discourse.org/c/dev/7.md?page=69)
