# Development

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

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

**Page:** 51

---

## [I have added some js code to themes head-tag from backend. I want to delete the code but cant accees backend now](https://meta.discourse.org/t/i-have-added-some-js-code-to-themes-head-tag-from-backend-i-want-to-delete-the-code-but-cant-accees-backend-now/259662)

<div class="topic-metadata">

**Author:** [@Yogesh\_g](https://meta.discourse.org/u/Yogesh_g)\
**Replies:** 2\
**Last updated:** [March 28, 2023, 9:28am UTC](https://meta.discourse.org/t/i-have-added-some-js-code-to-themes-head-tag-from-backend-i-want-to-delete-the-code-but-cant-accees-backend-now/259662 "2023-03-28T09:28:10Z")

</div>

I have added some js code to theme head-tag from the backend. the code contains a loop that is running to infinite. when I load the page I can only see a blank page loading. I want to delete the code from the theme head…

---

## [Apply Trust Level Flair automatically](https://meta.discourse.org/t/apply-trust-level-flair-automatically/259411)

<div class="topic-metadata">

**Author:** [@merefield](https://meta.discourse.org/u/merefield)\
**Replies:** 7\
**Last updated:** [March 27, 2023, 7:57pm UTC](https://meta.discourse.org/t/apply-trust-level-flair-automatically/259411 "2023-03-27T19:57:06Z")

</div>

I’ve noticed that you can add flair by Trust Level (great!). I then noticed a User can select from those in their Flair selection in Preferences (marvellous!). Is there any way, out of the box, of forcing that for user…

---

## [Help building plugin that requires overriting ruby controller methods](https://meta.discourse.org/t/help-building-plugin-that-requires-overriting-ruby-controller-methods/259129)

<div class="topic-metadata">

**Author:** [@Pabs](https://meta.discourse.org/u/Pabs)\
**Replies:** 3\
**Last updated:** [March 27, 2023, 12:06pm UTC](https://meta.discourse.org/t/help-building-plugin-that-requires-overriting-ruby-controller-methods/259129 "2023-03-27T12:06:32Z")

</div>

Hi there, I’m trying to create a plugin that surfaces a checkbox when creating a topic on the UI, and that basically saves a new attribute in the topics table. Basically I need to get the attribute saved whehter the che…

---

## [Plugin Database Migrations](https://meta.discourse.org/t/plugin-database-migrations/259521)

<div class="topic-metadata">

**Author:** [@bstgmr02](https://meta.discourse.org/u/bstgmr02)\
**Replies:** 5\
**Last updated:** [March 27, 2023, 9:35am UTC](https://meta.discourse.org/t/plugin-database-migrations/259521 "2023-03-27T09:35:51Z")

</div>

Is there an automatic way of running the database migration for a custom plugin if it has not already been run? Instead of manually running a DB migration in a fresh Discourse installation?

---

## [Is it possible to make database changes using postgres rather than rake?](https://meta.discourse.org/t/is-it-possible-to-make-database-changes-using-postgres-rather-than-rake/259245)

<div class="topic-metadata">

**Author:** [@MikeNolan](https://meta.discourse.org/u/MikeNolan)\
**Replies:** 3\
**Last updated:** [March 24, 2023, 2:22pm UTC](https://meta.discourse.org/t/is-it-possible-to-make-database-changes-using-postgres-rather-than-rake/259245 "2023-03-24T14:22:06Z")

</div>

I’m just getting started learning ruby, but I’ve been a DBA for over 30 years, the last 20 of them on PostgreSQL. The data structure is complex, but I’ve seen (and probably written) worse. Is it possible to do things l…

---

## [Insert text into nginx.conf to partially anonymize IP logs](https://meta.discourse.org/t/insert-text-into-nginx-conf-to-partially-anonymize-ip-logs/259308)

<div class="topic-metadata">

**Author:** [@DMTryptamines](https://meta.discourse.org/u/DMTryptamines)\
**Replies:** 1\
**Last updated:** [March 24, 2023, 5:19pm UTC](https://meta.discourse.org/t/insert-text-into-nginx-conf-to-partially-anonymize-ip-logs/259308 "2023-03-24T17:19:42Z")

</div>

Essentially I want to modify nginx.conf to insert text at the end of the file from the below link: I understand I need to do this with a hook in app.yml but I’m having a hard time understanding exactly how this works.…

---

## [password\_hash & salt with facebook authentication](https://meta.discourse.org/t/password-hash-salt-with-facebook-authentication/42649)

<div class="topic-metadata">

**Author:** [@will\_io](https://meta.discourse.org/u/will_io)\
**Replies:** 5\
**Last updated:** [March 24, 2023, 2:17am UTC](https://meta.discourse.org/t/password-hash-salt-with-facebook-authentication/42649 "2023-03-24T02:17:10Z")

</div>

What in the facebook API becomes the password\_hash and salt when a user signs up and authenticates using facebook?

---

## [Modifying search results](https://meta.discourse.org/t/modifying-search-results/258897)

<div class="topic-metadata">

**Author:** [@RGJ](https://meta.discourse.org/u/RGJ)\
**Replies:** 4\
**Last updated:** [March 23, 2023, 11:38am UTC](https://meta.discourse.org/t/modifying-search-results/258897 "2023-03-23T11:38:17Z")

</div>

I want to be able to tweak some of the styling in the search results (dropdown from the magnifying class in the top right). Now that seems to generate components on the fly (in app/assets/javascripts/discourse/app/lib/se…

---

## [Custom header and css](https://meta.discourse.org/t/custom-header-and-css/258920)

<div class="topic-metadata">

**Author:** [@per\_coh](https://meta.discourse.org/u/per_coh)\
**Replies:** 5\
**Last updated:** [March 23, 2023, 8:44am UTC](https://meta.discourse.org/t/custom-header-and-css/258920 "2023-03-23T08:44:21Z")

</div>

Hi folks, trying to add a custom header at the top. It’s mostly working but some of the CSS, I think, is being overwritten by Discourse. Is there a trick to block Discourse’s CSS from affecting my header?

---

## [Improvements i want for my discourse for making it less overwhelming/noisy for newcomers](https://meta.discourse.org/t/improvements-i-want-for-my-discourse-for-making-it-less-overwhelming-noisy-for-newcomers/259030)

<div class="topic-metadata">

**Author:** [@albjeremias](https://meta.discourse.org/u/albjeremias)\
**Replies:** 2\
**Last updated:** [March 22, 2023, 4:02pm UTC](https://meta.discourse.org/t/improvements-i-want-for-my-discourse-for-making-it-less-overwhelming-noisy-for-newcomers/259030 "2023-03-22T16:02:51Z")

</div>

Hi I need help on doing a theme-component, or a component? What I want: 1- that the Activity page of a topic/group/user is more easier and direct to access User: on the avatar menu (on top right) be able to customize…

---

## [Get currently signed-in username on external site](https://meta.discourse.org/t/get-currently-signed-in-username-on-external-site/258768)

<div class="topic-metadata">

**Author:** [@Felixkruemel](https://meta.discourse.org/u/Felixkruemel)\
**Replies:** 2\
**Last updated:** [March 22, 2023, 6:34am UTC](https://meta.discourse.org/t/get-currently-signed-in-username-on-external-site/258768 "2023-03-22T06:34:58Z")

</div>

I’m trying to develop an external application at app.example.com which is linked on my discourse forum discourse.example.com. I would like to display the current signed-in username from my discourse instance on the exte…

---

## [Inserting Javascript yields 403 error](https://meta.discourse.org/t/inserting-javascript-yields-403-error/154738)

<div class="topic-metadata">

**Author:** [@Judith](https://meta.discourse.org/u/Judith)\
**Replies:** 9\
**Last updated:** [March 22, 2023, 4:18am UTC](https://meta.discourse.org/t/inserting-javascript-yields-403-error/154738 "2023-03-22T04:18:15Z")

</div>

According to previous posts in this forum, it should be possible to insert custom Javascript code into the or fields of the default theme, but whenever I try to do so, I get a popup saying “403 error”. Given that I am …

---

## [How to change user fields with API](https://meta.discourse.org/t/how-to-change-user-fields-with-api/147999)

<div class="topic-metadata">

**Author:** [@pnoeric](https://meta.discourse.org/u/pnoeric)\
**Replies:** 7\
**Last updated:** [March 22, 2023, 3:07am UTC](https://meta.discourse.org/t/how-to-change-user-fields-with-api/147999 "2023-03-22T03:07:12Z")

</div>

(Edit: see 2nd post for solution: how to change user fields with API) @sam, you mentioned (in a post in a topic now closed) with regards to someone who wanted to use the API to update a custom field in a user record: “th…

---

## [Flat view of both topics and posts?](https://meta.discourse.org/t/flat-view-of-both-topics-and-posts/258947)

<div class="topic-metadata">

**Author:** [@asc](https://meta.discourse.org/u/asc)\
**Replies:** 0\
**Last updated:** [March 21, 2023, 7:11pm UTC](https://meta.discourse.org/t/flat-view-of-both-topics-and-posts/258947 "2023-03-21T19:11:29Z")

</div>

I’m not sure if this is plugin territory or even possible so I thought I’d ask before I try to dig into it–in theory would it be possible to collect both topics and replies to present on a group’s activity page or in /la…

---

## [Category page layout in 2 columns](https://meta.discourse.org/t/category-page-layout-in-2-columns/258739)

<div class="topic-metadata">

**Author:** [@Joart](https://meta.discourse.org/u/Joart)\
**Replies:** 3\
**Last updated:** [March 21, 2023, 7:38am UTC](https://meta.discourse.org/t/category-page-layout-in-2-columns/258739 "2023-03-21T07:38:46Z")

</div>

Hello, I am trying to modify the layout of the category page. Each category is a table, so the category page is a list of tables. But, I would like to have a layout in 2 columns like that: Would you have any ide…

---

## [How to show user's name next to avatar in the navigation when logged in?](https://meta.discourse.org/t/how-to-show-users-name-next-to-avatar-in-the-navigation-when-logged-in/258668)

<div class="topic-metadata">

**Author:** [@asugar](https://meta.discourse.org/u/asugar)\
**Replies:** 2\
**Last updated:** [March 20, 2023, 9:11pm UTC](https://meta.discourse.org/t/how-to-show-users-name-next-to-avatar-in-the-navigation-when-logged-in/258668 "2023-03-20T21:11:13Z")

</div>

Hello All, Is there a way to show user’s name in the navigation bar next to avatar when user is logged in. See the screenshot below.

---

## [How to increase width of topic](https://meta.discourse.org/t/how-to-increase-width-of-topic/81885)

<div class="topic-metadata">

**Author:** [@Francois\_Douville](https://meta.discourse.org/u/Francois_Douville)\
**Replies:** 13\
**Last updated:** [March 20, 2023, 2:46pm UTC](https://meta.discourse.org/t/how-to-increase-width-of-topic/81885 "2023-03-20T14:46:34Z")

</div>

Normally, topic look like this. Not as large as I want. So, I wrote this code to increase the width : .topic-body { width: 830px; } To make it look like this : But when my screen is smaller, it looks like t…

---

## [How easy is it to port Discourse community to custom webapp later?](https://meta.discourse.org/t/how-easy-is-it-to-port-discourse-community-to-custom-webapp-later/257489)

<div class="topic-metadata">

**Author:** [@Paras\_Chopra](https://meta.discourse.org/u/Paras_Chopra)\
**Replies:** 15\
**Last updated:** [March 20, 2023, 2:34pm UTC](https://meta.discourse.org/t/how-easy-is-it-to-port-discourse-community-to-custom-webapp-later/257489 "2023-03-20T14:34:57Z")

</div>

I am building something community oriented and Discourse looks perfect for it. But my eventual plan is to port the community to a custom app later. Curious if anyone has done it before and how hard/easy would it be to d…

---

## [Get number of likes for a single post?](https://meta.discourse.org/t/get-number-of-likes-for-a-single-post/69017)

<div class="topic-metadata">

**Author:** [@mr8](https://meta.discourse.org/u/mr8)\
**Replies:** 6\
**Last updated:** [March 20, 2023, 2:27pm UTC](https://meta.discourse.org/t/get-number-of-likes-for-a-single-post/69017 "2023-03-20T14:27:49Z")

</div>

Hello, I’m trying to get the number of likes for a single post via the API, but can’t seem to find it… I see a like\_count for the entire topic, but can’t seem to find the individual like count for each post in either /…

---

## [Handlebars Error for 2.9.0.beta2 with above-site-header.hbs connector](https://meta.discourse.org/t/handlebars-error-for-2-9-0-beta2-with-above-site-header-hbs-connector/218978)

<div class="topic-metadata">

**Author:** [@HisashiQ](https://meta.discourse.org/u/HisashiQ)\
**Replies:** 13\
**Last updated:** [March 20, 2023, 12:59pm UTC](https://meta.discourse.org/t/handlebars-error-for-2-9-0-beta2-with-above-site-header-hbs-connector/218978 "2023-03-20T12:59:30Z")

</div>

Hi, We have two discourse apps. I upgraded both to 2.9.0beta2. The first went without a hitch but the second threw a console error saying Uncaught ReferenceError: Handlebars is not defined The only difference between t…

---

## [Discourse Chat Webhook Documentation](https://meta.discourse.org/t/discourse-chat-webhook-documentation/258667)

<div class="topic-metadata">

**Author:** [@Amit\_Ghosh](https://meta.discourse.org/u/Amit_Ghosh)\
**Replies:** 1\
**Last updated:** [March 20, 2023, 3:43am UTC](https://meta.discourse.org/t/discourse-chat-webhook-documentation/258667 "2023-03-20T03:43:52Z")

</div>

Continuing the discussion from Use the api to post to chat channel?: webhook\_url = 'https://forum.unofficed.com/chat/hooks/fff.json' payload = { 'text': 'Hello, world!', 'username' : 'dexter', 'avatar\_url': …

---

## [Plugin or template for discourse theme component](https://meta.discourse.org/t/plugin-or-template-for-discourse-theme-component/258324)

<div class="topic-metadata">

**Author:** [@Anil\_Tako](https://meta.discourse.org/u/Anil_Tako)\
**Replies:** 2\
**Last updated:** [March 19, 2023, 3:44pm UTC](https://meta.discourse.org/t/plugin-or-template-for-discourse-theme-component/258324 "2023-03-19T15:44:56Z")

</div>

Is there plugin or template for following discourse theme components in GitHub - discourse/discourse: A platform for community discussion. Free, open, simple. · GitHub

---

## [Does Discourse have support for PAT tokens?](https://meta.discourse.org/t/does-discourse-have-support-for-pat-tokens/258488)

<div class="topic-metadata">

**Author:** [@Gokul\_Ks](https://meta.discourse.org/u/Gokul_Ks)\
**Replies:** 5\
**Last updated:** [March 19, 2023, 1:15pm UTC](https://meta.discourse.org/t/does-discourse-have-support-for-pat-tokens/258488 "2023-03-19T13:15:49Z")

</div>

Is there support for PAT tokens in Discourse. There is a particular use-case we are working on that we might need PAT tokens. If yes, where can I find them?

---

## [How can I get post-id & user in showModal controller?](https://meta.discourse.org/t/how-can-i-get-post-id-user-in-showmodal-controller/258369)

<div class="topic-metadata">

**Author:** [@bstgmr02](https://meta.discourse.org/u/bstgmr02)\
**Replies:** 0\
**Last updated:** [March 16, 2023, 12:29pm UTC](https://meta.discourse.org/t/how-can-i-get-post-id-user-in-showmodal-controller/258369 "2023-03-16T12:29:03Z")

</div>

This is my initializer below: export default { name: 'customInit', initialize() { withPluginApi('0.8.7', api =\> { api.attachWidgetAction('post', 'showCustomModal', () =\> { …

---

## [Restricting users to join any one private group](https://meta.discourse.org/t/restricting-users-to-join-any-one-private-group/257859)

<div class="topic-metadata">

**Author:** [@Krsh](https://meta.discourse.org/u/Krsh)\
**Replies:** 7\
**Last updated:** [March 17, 2023, 3:37am UTC](https://meta.discourse.org/t/restricting-users-to-join-any-one-private-group/257859 "2023-03-17T03:37:39Z")

</div>

Hi, I am running a private forum for educational purpose, it is exclusively for the students enrolled with us. In the forum there are many private categories which are allowed to students based on their subject of enro…

---

## [Obtain User Details from JavaScript](https://meta.discourse.org/t/obtain-user-details-from-javascript/258411)

<div class="topic-metadata">

**Author:** [@PeakProsperity](https://meta.discourse.org/u/PeakProsperity)\
**Replies:** 0\
**Last updated:** [March 16, 2023, 6:46pm UTC](https://meta.discourse.org/t/obtain-user-details-from-javascript/258411 "2023-03-16T18:46:08Z")

</div>

Can anybody tell me if it’s possible to obtain the following information about a user via JavaScript? email address external\_id (their WordPress user ID) I need to be able to pass either of these to a UserGuiding Java…

---

## [Add a user to a group via API?](https://meta.discourse.org/t/add-a-user-to-a-group-via-api/45077)

<div class="topic-metadata">

**Author:** [@jefflau](https://meta.discourse.org/u/jefflau)\
**Replies:** 8\
**Last updated:** [March 16, 2023, 3:13pm UTC](https://meta.discourse.org/t/add-a-user-to-a-group-via-api/45077 "2023-03-16T15:13:44Z")

</div>

I’m trying to use the Discourse API to update a group with a particular user. In the docs that I have found, there wasn’t any information on this, only the ability to create a group. I also tried to watch the XHR reques…

---

## [How to leverage the "Open all external links in a new tab" setting in site customizations](https://meta.discourse.org/t/how-to-leverage-the-open-all-external-links-in-a-new-tab-setting-in-site-customizations/258174)

<div class="topic-metadata">

**Author:** [@seanblue](https://meta.discourse.org/u/seanblue)\
**Replies:** 8\
**Last updated:** [March 16, 2023, 12:54am UTC](https://meta.discourse.org/t/how-to-leverage-the-open-all-external-links-in-a-new-tab-setting-in-site-customizations/258174 "2023-03-16T00:54:08Z")

</div>

A site I frequent has a customization on the user card that includes a link to an external site specific to each user (a user profile basically). However, clicking this link opens the page in the current tab, despite me …

---

## [Category Ban is not supported but would it be possible with a plugin?](https://meta.discourse.org/t/category-ban-is-not-supported-but-would-it-be-possible-with-a-plugin/258025)

<div class="topic-metadata">

**Author:** [@Crius](https://meta.discourse.org/u/Crius)\
**Replies:** 14\
**Last updated:** [March 15, 2023, 1:43pm UTC](https://meta.discourse.org/t/category-ban-is-not-supported-but-would-it-be-possible-with-a-plugin/258025 "2023-03-15T13:43:57Z")

</div>

I’ve read this topic which basically state that it’s not a feature seen as needed so I’m not going to ask for it again. However, there are use cases for large communities like mine in which we have literally smaller for…

---

## [Is it possible to change the background color of (only) the home page?](https://meta.discourse.org/t/is-it-possible-to-change-the-background-color-of-only-the-home-page/257222)

<div class="topic-metadata">

**Author:** [@Tin\_Tin](https://meta.discourse.org/u/Tin_Tin)\
**Replies:** 1\
**Last updated:** [March 15, 2023, 9:39am UTC](https://meta.discourse.org/t/is-it-possible-to-change-the-background-color-of-only-the-home-page/257222 "2023-03-15T09:39:44Z")

</div>

We’d like to change the background color of only our home page to black (white font) while leaving all other pages “white” (with back font)–the standard style setting. Is there an easy CSS-way to do this? Many thank…

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

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