# Development

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

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

**Page:** 47

---

## [User post\_count is zero in webhook for a user that has posts](https://meta.discourse.org/t/user-post-count-is-zero-in-webhook-for-a-user-that-has-posts/267574)

<div class="topic-metadata">

**Author:** [@dpb](https://meta.discourse.org/u/dpb)\
**Replies:** 6\
**Last updated:** [June 8, 2023, 5:21pm UTC](https://meta.discourse.org/t/user-post-count-is-zero-in-webhook-for-a-user-that-has-posts/267574 "2023-06-08T17:21:02Z")

</div>

We have a webhook on the event “user\_logged\_in”. The Payload contains the property post\_count for the user that just logged in. Although the user did write 2 posts, the payload reads post\_count: 0. This looks like a bug …

---

## [Scheduling jobs from a plugin](https://meta.discourse.org/t/scheduling-jobs-from-a-plugin/40238)

<div class="topic-metadata">

**Author:** [@gsch](https://meta.discourse.org/u/gsch)\
**Replies:** 11\
**Last updated:** [June 7, 2023, 7:50pm UTC](https://meta.discourse.org/t/scheduling-jobs-from-a-plugin/40238 "2023-06-07T19:50:47Z")

</div>

I am trying to set up a job that runs on a scheduled interval from within a plugin. In my plugin.rb I have after\_initialize do module ::Jobs module\_function def count; @count end …

---

## [How can I hide the add button from sidebar](https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390)

<div class="topic-metadata">

**Author:** [@Jm\_Jm](https://meta.discourse.org/u/Jm_Jm)\
**Replies:** 4\
**Last updated:** [June 7, 2023, 4:47am UTC](https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390 "2023-06-07T04:47:01Z")

</div>

I would love to hide the create topic button from the bar menu, because it confuses people, is there is a way?

---

## [How to make the CSS apply to ONLY the modified forum homepage?](https://meta.discourse.org/t/how-to-make-the-css-apply-to-only-the-modified-forum-homepage/267299)

<div class="topic-metadata">

**Author:** [@danielabc](https://meta.discourse.org/u/danielabc)\
**Replies:** 1\
**Last updated:** [June 5, 2023, 8:11pm UTC](https://meta.discourse.org/t/how-to-make-the-css-apply-to-only-the-modified-forum-homepage/267299 "2023-06-05T20:11:21Z")

</div>

I’m making a modification and I want this modification to only work on the HOME, but it’s taking all the pages, how can I leave it only on the home? i used this #main-outlet-wrapper { margin-top: -38px; }

---

## [Hi, There I need help with discours plugin development](https://meta.discourse.org/t/hi-there-i-need-help-with-discours-plugin-development/267351)

<div class="topic-metadata">

**Author:** [@Yogesh\_Kbizsoft](https://meta.discourse.org/u/Yogesh_Kbizsoft)\
**Replies:** 0\
**Last updated:** [June 6, 2023, 5:58am UTC](https://meta.discourse.org/t/hi-there-i-need-help-with-discours-plugin-development/267351 "2023-06-06T05:58:09Z")

</div>

In my plugin, I need something like, Whenever a Ajax request is sent to “/admin/plugins/delete\_all\_posts” I want to schedule a cron job on the server that runs every two minutes until the task is finished. Below is the c…

---

## [Getting error ActionController::RoutingError (uninitialized constant )](https://meta.discourse.org/t/getting-error-actioncontroller-routingerror-uninitialized-constant/267366)

<div class="topic-metadata">

**Author:** [@Yogesh\_Kbizsoft](https://meta.discourse.org/u/Yogesh_Kbizsoft)\
**Replies:** 0\
**Last updated:** [June 6, 2023, 8:28am UTC](https://meta.discourse.org/t/getting-error-actioncontroller-routingerror-uninitialized-constant/267366 "2023-06-06T08:28:24Z")

</div>

Getting errorActionController::RoutingError (uninitialized constant DeleteUserPostsController) lib/middleware/omniauth\_bypass\_middleware.rb:74:in \`call' lib/content\_security\_policy/middleware.rb:12:in \`call' lib/middlew…

---

## [Change the name of form and buttons in one Category](https://meta.discourse.org/t/change-the-name-of-form-and-buttons-in-one-category/267253)

<div class="topic-metadata">

**Author:** [@Dante\_Dante](https://meta.discourse.org/u/Dante_Dante)\
**Replies:** 4\
**Last updated:** [June 5, 2023, 2:30pm UTC](https://meta.discourse.org/t/change-the-name-of-form-and-buttons-in-one-category/267253 "2023-06-05T14:30:52Z")

</div>

Hey community is it possible to change the button and place holders of only one category. As the category I have is about new ideas, I would love to replace Add new topic with add new Idea, same for the placeholder An …

---

## [Hide a section of the sidebar for anon](https://meta.discourse.org/t/hide-a-section-of-the-sidebar-for-anon/267019)

<div class="topic-metadata">

**Author:** [@Ayelen\_Rives](https://meta.discourse.org/u/Ayelen_Rives)\
**Replies:** 13\
**Last updated:** [June 2, 2023, 3:23pm UTC](https://meta.discourse.org/t/hide-a-section-of-the-sidebar-for-anon/267019 "2023-06-02T15:23:37Z")

</div>

Hi! I’m not really sure if this is the place to ask, but I need to hide a section from sidebar to anon users and the code in CSS is not working for that. I put this in CSS in order to hide Community section for anonymou…

---

## [Email Notification Webhook or alternative to SMTP](https://meta.discourse.org/t/email-notification-webhook-or-alternative-to-smtp/266787)

<div class="topic-metadata">

**Author:** [@NotAnonymous](https://meta.discourse.org/u/NotAnonymous)\
**Replies:** 1\
**Last updated:** [May 31, 2023, 8:37pm UTC](https://meta.discourse.org/t/email-notification-webhook-or-alternative-to-smtp/266787 "2023-05-31T20:37:29Z")

</div>

I’m wanting to change our Discourse email notifications to be sent via a service that only supports sending via an API rather than a standard SMTP relay. I’m not finding any current settings or plugins or obvious way of…

---

## [How can I check in my website if the user is logged in to my Discourse?](https://meta.discourse.org/t/how-can-i-check-in-my-website-if-the-user-is-logged-in-to-my-discourse/266765)

<div class="topic-metadata">

**Author:** [@ygramoel](https://meta.discourse.org/u/ygramoel)\
**Replies:** 3\
**Last updated:** [May 31, 2023, 6:55pm UTC](https://meta.discourse.org/t/how-can-i-check-in-my-website-if-the-user-is-logged-in-to-my-discourse/266765 "2023-05-31T18:55:05Z")

</div>

I am building a desktop application, with accompanying forum (running Discourse, of course) and website. On our website, I would like to show some extra information if the website visitor is also logged in to the foru…

---

## [How to manually add contents to pluginOutlet after ajax call? And how to rerender or refresh a pluginOutlet?](https://meta.discourse.org/t/how-to-manually-add-contents-to-pluginoutlet-after-ajax-call-and-how-to-rerender-or-refresh-a-pluginoutlet/266640)

<div class="topic-metadata">

**Author:** [@Pixl8\_Nick](https://meta.discourse.org/u/Pixl8_Nick)\
**Replies:** 3\
**Last updated:** [May 31, 2023, 3:23pm UTC](https://meta.discourse.org/t/how-to-manually-add-contents-to-pluginoutlet-after-ajax-call-and-how-to-rerender-or-refresh-a-pluginoutlet/266640 "2023-05-31T15:23:42Z")

</div>

Hi, :wave: I am new to Discourse theming and emberjs, and currently working on a theme that has navigation items from the main website. The nav items json is coming from an ajax request and I need to display it on 2 lo…

---

## [Allow cross origin requests only for message bus](https://meta.discourse.org/t/allow-cross-origin-requests-only-for-message-bus/266324)

<div class="topic-metadata">

**Author:** [@AhmedLoud](https://meta.discourse.org/u/AhmedLoud)\
**Replies:** 4\
**Last updated:** [May 31, 2023, 12:00pm UTC](https://meta.discourse.org/t/allow-cross-origin-requests-only-for-message-bus/266324 "2023-05-31T12:00:45Z")

</div>

I am trying to implement a chat widget that can be embedded in any website and for that I decided to use MessageBus to communicate between the widget and my Rails backend. Since it can be embedded in any origin I needed …

---

## [Using "custom" ruby gems](https://meta.discourse.org/t/using-custom-ruby-gems/225274)

<div class="topic-metadata">

**Author:** [@FerrariFlunker](https://meta.discourse.org/u/FerrariFlunker)\
**Replies:** 5\
**Last updated:** [April 28, 2022, 5:15am UTC](https://meta.discourse.org/t/using-custom-ruby-gems/225274 "2022-04-28T05:15:17Z")

</div>

Hello! I’ve been struggling with this for a few days, so any help is appreciated! I’m developing a fork of a plugin that requires the discordrb ruby gem. For whatever reason, the most up to date version on discordrb |…

---

## [How do I hide the new topic button next to Community in the Header Drop down menu?](https://meta.discourse.org/t/how-do-i-hide-the-new-topic-button-next-to-community-in-the-header-drop-down-menu/265772)

<div class="topic-metadata">

**Author:** [@Tris20](https://meta.discourse.org/u/Tris20)\
**Replies:** 2\
**Last updated:** [May 30, 2023, 7:36am UTC](https://meta.discourse.org/t/how-do-i-hide-the-new-topic-button-next-to-community-in-the-header-drop-down-menu/265772 "2023-05-30T07:36:36Z")

</div>

I want to hide the button next to Community which creates new topics. This is in the Drop Down menu. When I try the following it hides the new topic button, but it also hides the edit pencil next to Categories(whic…

---

## [Extend Existing Controller?](https://meta.discourse.org/t/extend-existing-controller/266411)

<div class="topic-metadata">

**Author:** [@petermarkley](https://meta.discourse.org/u/petermarkley)\
**Replies:** 29\
**Last updated:** [May 30, 2023, 1:22am UTC](https://meta.discourse.org/t/extend-existing-controller/266411 "2023-05-30T01:22:22Z")

</div>

Hey all, I hope I’m posting this in the right place. I’m trying to develop a plugin for my new Discourse website. I forked the example repo here, got a Plugin Outlet working, then hit a wall and started to feel pretty l…

---

## [Rerender on new route or transition](https://meta.discourse.org/t/rerender-on-new-route-or-transition/68253)

<div class="topic-metadata">

**Author:** [@codechef](https://meta.discourse.org/u/codechef)\
**Replies:** 8\
**Last updated:** [May 27, 2023, 11:46am UTC](https://meta.discourse.org/t/rerender-on-new-route-or-transition/68253 "2023-05-27T11:46:02Z")

</div>

I’m building a banner ad plug-in. I have a section of the DOM that I need to re-render each time the page transitions. I have attempted (unsuccessfully) both a Widget and Ember Component, but neither are updating. I load…

---

## [Join / leave group CTA](https://meta.discourse.org/t/join-leave-group-cta/266156)

<div class="topic-metadata">

**Author:** [@Don](https://meta.discourse.org/u/Don)\
**Replies:** 2\
**Last updated:** [May 25, 2023, 11:53am UTC](https://meta.discourse.org/t/join-leave-group-cta/266156 "2023-05-25T11:53:37Z")

</div>

Hello, I would like to divide the forum into three parts. The page has a main subject, subjectA, which I created another off-category subjectB next to. For this, I thought that a three-way switch should be made in the…

---

## [Widget Helper stripping attributes?](https://meta.discourse.org/t/widget-helper-stripping-attributes/68014)

<div class="topic-metadata">

**Author:** [@Bas](https://meta.discourse.org/u/Bas)\
**Replies:** 6\
**Last updated:** [May 25, 2023, 7:40am UTC](https://meta.discourse.org/t/widget-helper-stripping-attributes/68014 "2023-05-25T07:40:58Z")

</div>

I was trying my hand at my first plugin, and to a certain extent it worked quite OK :slight\_smile: However, I’m having trouble with the helper class. The class seems to strip out certain attributes and I have no idea wh…

---

## [How to inject content into \`before-script-load\`?](https://meta.discourse.org/t/how-to-inject-content-into-before-script-load/265989)

<div class="topic-metadata">

**Author:** [@gormus](https://meta.discourse.org/u/gormus)\
**Replies:** 4\
**Last updated:** [May 24, 2023, 4:23pm UTC](https://meta.discourse.org/t/how-to-inject-content-into-before-script-load/265989 "2023-05-24T16:23:32Z")

</div>

I’d like to inject some javascript into the before-script-load region. Is it possible to achieve this via a theme, or theme-component?

---

## [How to create a dynamic header link?](https://meta.discourse.org/t/how-to-create-a-dynamic-header-link/266019)

<div class="topic-metadata">

**Author:** [@chien.wu](https://meta.discourse.org/u/chien.wu)\
**Replies:** 2\
**Last updated:** [May 24, 2023, 12:10am UTC](https://meta.discourse.org/t/how-to-create-a-dynamic-header-link/266019 "2023-05-24T00:10:01Z")

</div>

My question is specifically about Custom Header Links (icons). What should I do if the URL is not fixed, is there a way to link to javascript to perform actions?

---

## [Uploads location on dev instance?](https://meta.discourse.org/t/uploads-location-on-dev-instance/265829)

<div class="topic-metadata">

**Author:** [@Overgrow](https://meta.discourse.org/u/Overgrow)\
**Replies:** 1\
**Last updated:** [May 22, 2023, 6:15pm UTC](https://meta.discourse.org/t/uploads-location-on-dev-instance/265829 "2023-05-22T18:15:00Z")

</div>

I’m back to developing plugins after hiatus. I’ve followed the basic guide Install Discourse on Ubuntu or Debian for Development to install a dev instance. Dev instance hostname is set correctly in /discourse/config/dis…

---

## [How to add unique text below each category image?](https://meta.discourse.org/t/how-to-add-unique-text-below-each-category-image/265792)

<div class="topic-metadata">

**Author:** [@pinder99](https://meta.discourse.org/u/pinder99)\
**Replies:** 7\
**Last updated:** [May 22, 2023, 3:41pm UTC](https://meta.discourse.org/t/how-to-add-unique-text-below-each-category-image/265792 "2023-05-22T15:41:16Z")

</div>

How to add custom text when class for each category is same , like if i want to add some text below .category-logo.aspect-image img it will add custom text to all categories , how to add unique text below each category …

---

## [Discourse implementation in create react app](https://meta.discourse.org/t/discourse-implementation-in-create-react-app/265666)

<div class="topic-metadata">

**Author:** [@khemrajneupane](https://meta.discourse.org/u/khemrajneupane)\
**Replies:** 2\
**Last updated:** [May 20, 2023, 10:23pm UTC](https://meta.discourse.org/t/discourse-implementation-in-create-react-app/265666 "2023-05-20T22:23:19Z")

</div>

I am a new user to Discourse. I am trying to implement Discourse commenting into my React app but looks very complex to me. Is there a simple public API call that I can make with axios of fetch? I want to start with this…

---

## [Some issues configuring a theme component to integrate with pretix](https://meta.discourse.org/t/some-issues-configuring-a-theme-component-to-integrate-with-pretix/265586)

<div class="topic-metadata">

**Author:** [@vai](https://meta.discourse.org/u/vai)\
**Replies:** 2\
**Last updated:** [May 20, 2023, 3:35pm UTC](https://meta.discourse.org/t/some-issues-configuring-a-theme-component-to-integrate-with-pretix/265586 "2023-05-20T15:35:49Z")

</div>

Hi - I’ve yet to get this to work via any of the means I can find, and I’d like to know if it’s just my expectations that are awry. I’m integrating with my pretix install (for selling event tickets). This should consis…

---

## [Topic-timeline api.decorateWidget call has stopped working](https://meta.discourse.org/t/topic-timeline-api-decoratewidget-call-has-stopped-working/261573)

<div class="topic-metadata">

**Author:** [@bartv](https://meta.discourse.org/u/bartv)\
**Replies:** 6\
**Last updated:** [May 19, 2023, 8:08pm UTC](https://meta.discourse.org/t/topic-timeline-api-decoratewidget-call-has-stopped-working/261573 "2023-05-19T20:08:40Z")

</div>

Hey friends! I can’t pinpoint exactly when, but somewhere this year the following code has stopped working. It’s not throwing any errors, just doesn’t do anything anymore - I suspect this might be related to this change,…

---

## [Which editor is used currently in Discourse?](https://meta.discourse.org/t/which-editor-is-used-currently-in-discourse/265542)

<div class="topic-metadata">

**Author:** [@OnkelTem](https://meta.discourse.org/u/OnkelTem)\
**Replies:** 1\
**Last updated:** [May 19, 2023, 10:35am UTC](https://meta.discourse.org/t/which-editor-is-used-currently-in-discourse/265542 "2023-05-19T10:35:40Z")

</div>

Hi! I really love this editor and I wonder if I can get use it on my website. Is it distributed separately? I mean this one:

---

## [Vulnerabilities in the official Docker image](https://meta.discourse.org/t/vulnerabilities-in-the-official-docker-image/265214)

<div class="topic-metadata">

**Author:** [@jcarmona](https://meta.discourse.org/u/jcarmona)\
**Replies:** 1\
**Last updated:** [May 19, 2023, 10:10am UTC](https://meta.discourse.org/t/vulnerabilities-in-the-official-docker-image/265214 "2023-05-19T10:10:47Z")

</div>

Hi! I have recently pulled the official Discourse docker image and analysed it with Trivy (a security and vulnerability scanner). The result shows several vulnerabilities: $ trivy image --vuln-type library discourse/bas…

---

## [API to get composer settings?](https://meta.discourse.org/t/api-to-get-composer-settings/265344)

<div class="topic-metadata">

**Author:** [@chrisbai2021](https://meta.discourse.org/u/chrisbai2021)\
**Replies:** 2\
**Last updated:** [May 17, 2023, 6:45pm UTC](https://meta.discourse.org/t/api-to-get-composer-settings/265344 "2023-05-17T18:45:23Z")

</div>

Hello friends, I am building a mobile forum app using Discourse API and I’d like to implement client-side minimum character enforcement for topics/posts so that we don’t have to fire an API request to validate whether t…

---

## [Change username through API?](https://meta.discourse.org/t/change-username-through-api/82500)

<div class="topic-metadata">

**Author:** [@Raphael\_Haase\_NL](https://meta.discourse.org/u/Raphael_Haase_NL)\
**Replies:** 3\
**Last updated:** [May 17, 2023, 4:44pm UTC](https://meta.discourse.org/t/change-username-through-api/82500 "2023-05-17T16:44:28Z")

</div>

I would like to automatically change usernames through the API so they match the email address. Our community has the policy that the username must be firstname.infix.lastname for a user with the email address firstname…

---

## [Unable to ignore user using API](https://meta.discourse.org/t/unable-to-ignore-user-using-api/265343)

<div class="topic-metadata">

**Author:** [@chrisbai2021](https://meta.discourse.org/u/chrisbai2021)\
**Replies:** 9\
**Last updated:** [May 17, 2023, 4:02pm UTC](https://meta.discourse.org/t/unable-to-ignore-user-using-api/265343 "2023-05-17T16:02:12Z")

</div>

Hello friends, I am building a mobile forum app using Discourse API, and Google requires all apps with UGC to have a blocking feature. I’ve done some research and it looks like Discourse lets a user ignore another user…

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

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