# Development

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

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

**Page:** 96

---

## [Widget's user awareness](https://meta.discourse.org/t/widgets-user-awareness/146275)

<div class="topic-metadata">

**Author:** [@Fausto\_Dassenno](https://meta.discourse.org/u/Fausto_Dassenno)\
**Replies:** 1\
**Last updated:** [March 31, 2020, 4:35pm UTC](https://meta.discourse.org/t/widgets-user-awareness/146275 "2020-03-31T16:35:21Z")

</div>

What is the best way to get the user object inside a widget? api.createWidget("login-button", { tagName: "button.btn.btn-primary", html(arg) { {{IF USER IS LOGGED IN}} return username; }, click(arg) …

---

## [Problems with hitting your API using Node.js](https://meta.discourse.org/t/problems-with-hitting-your-api-using-node-js/146242)

<div class="topic-metadata">

**Author:** [@Konrad\_Sopala](https://meta.discourse.org/u/Konrad_Sopala)\
**Replies:** 1\
**Last updated:** [March 31, 2020, 11:59am UTC](https://meta.discourse.org/t/problems-with-hitting-your-api-using-node-js/146242 "2020-03-31T11:59:43Z")

</div>

Hey everyone! Not sure what category is right for it, feel free to re-categorize it. To begin with thanks for help with the Python script doing the same thing as the script in Node that I’m currently writing :clap:t3:. …

---

## [Authentication Protocol re: App Integration](https://meta.discourse.org/t/authentication-protocol-re-app-integration/114788)

<div class="topic-metadata">

**Author:** [@justin.noom](https://meta.discourse.org/u/justin.noom)\
**Replies:** 16\
**Last updated:** [March 31, 2020, 10:18am UTC](https://meta.discourse.org/t/authentication-protocol-re-app-integration/114788 "2020-03-31T10:18:41Z")

</div>

Hey all! My team and I have been looking into possible ways to integrate our \[future\] Discourse instance into our mobile application - Noom. Our iOS app is written in Objective-C with some Swift, and our Android applica…

---

## [Unable to modify slider colour](https://meta.discourse.org/t/unable-to-modify-slider-colour/146218)

<div class="topic-metadata">

**Author:** [@meetdilip](https://meta.discourse.org/u/meetdilip)\
**Replies:** 0\
**Last updated:** [March 31, 2020, 3:20am UTC](https://meta.discourse.org/t/unable-to-modify-slider-colour/146218 "2020-03-31T03:20:27Z")

</div>

I was trying to do a dark theme through theme creator and I finished the colour scheme. Now when I try the preview, the slider colour is a little bright shade of blue and I have no defined that colour anywhere. I would l…

---

## [Using both API and Webview in mobile app, can you prevent logging in twice?](https://meta.discourse.org/t/using-both-api-and-webview-in-mobile-app-can-you-prevent-logging-in-twice/146189)

<div class="topic-metadata">

**Author:** [@xceph](https://meta.discourse.org/u/xceph)\
**Replies:** 0\
**Last updated:** [March 30, 2020, 7:38pm UTC](https://meta.discourse.org/t/using-both-api-and-webview-in-mobile-app-can-you-prevent-logging-in-twice/146189 "2020-03-30T19:38:48Z")

</div>

I’m currently working to integrate Discourse into an existing iOS and Android app. The plan was to utilize the existing Discourse website for browsing, but use the API for for post creation, since I have a number of app …

---

## [Creating a topic via the API using Node.js](https://meta.discourse.org/t/creating-a-topic-via-the-api-using-node-js/117160)

<div class="topic-metadata">

**Author:** [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)\
**Replies:** 12\
**Last updated:** [March 30, 2020, 12:44pm UTC](https://meta.discourse.org/t/creating-a-topic-via-the-api-using-node-js/117160 "2020-03-30T12:44:43Z")

</div>

I am trying to create a new topic via Node.js API by sending the following payload : { title: 'topic:329201', raw: 'topic-description:32920111948', created\_at: '2019-05-08', api\_key: '2371b6549b0c3aeb1f12e49c2…

---

## [How do I register a public asset in a plugin?](https://meta.discourse.org/t/how-do-i-register-a-public-asset-in-a-plugin/68660)

<div class="topic-metadata">

**Author:** [@featheredtoast](https://meta.discourse.org/u/featheredtoast)\
**Replies:** 3\
**Last updated:** [March 26, 2020, 2:55pm UTC](https://meta.discourse.org/t/how-do-i-register-a-public-asset-in-a-plugin/68660 "2020-03-26T14:55:58Z")

</div>

Forgive me if this has been asked before, but I am unable to find a previous topic on this. I’m wondering how to register an asset as public (such as an image) through a discourse plugin - it seems currently after regis…

---

## [How to log out user if I don't know them?](https://meta.discourse.org/t/how-to-log-out-user-if-i-dont-know-them/145273)

<div class="topic-metadata">

**Author:** [@pnoeric](https://meta.discourse.org/u/pnoeric)\
**Replies:** 6\
**Last updated:** [March 26, 2020, 9:15am UTC](https://meta.discourse.org/t/how-to-log-out-user-if-i-dont-know-them/145273 "2020-03-26T09:15:04Z")

</div>

Ok-- imagine this simple scenario: User A logs into my site and then clicks ‘Forums’ on the site. They are redirected to Discourse, which calls back to my site via SSO and they’re authenticated and automatically logge…

---

## [Display name of forum](https://meta.discourse.org/t/display-name-of-forum/145455)

<div class="topic-metadata">

**Author:** [@rachel\_england](https://meta.discourse.org/u/rachel_england)\
**Replies:** 4\
**Last updated:** [March 25, 2020, 2:56am UTC](https://meta.discourse.org/t/display-name-of-forum/145455 "2020-03-25T02:56:23Z")

</div>

I’d like to display the name of the forum in the header, but now only see the logo. How can I add text to the header so that our audience knows what the site is?

---

## [Stumped on API update of topic](https://meta.discourse.org/t/stumped-on-api-update-of-topic/145330)

<div class="topic-metadata">

**Author:** [@izzy](https://meta.discourse.org/u/izzy)\
**Replies:** 0\
**Last updated:** [March 24, 2020, 1:38am UTC](https://meta.discourse.org/t/stumped-on-api-update-of-topic/145330 "2020-03-24T01:38:02Z")

</div>

I feel like I’ve read every post out there about the discourse API and how to reverse engineer it-- But I’m baffled by the behavior I’m seeing right now and can’t seem to find a post out there that already addresses it. …

---

## [Rewriting method from a plugin - "Self" context](https://meta.discourse.org/t/rewriting-method-from-a-plugin-self-context/145215)

<div class="topic-metadata">

**Author:** [@Overgrow](https://meta.discourse.org/u/Overgrow)\
**Replies:** 1\
**Last updated:** [March 23, 2020, 5:07pm UTC](https://meta.discourse.org/t/rewriting-method-from-a-plugin-self-context/145215 "2020-03-23T17:07:58Z")

</div>

Hello, I’m trying to modify upload instructions from a plugin. Can I use add\_to\_class to rewrite a class method that is in “self” context? e.g. to take original method in OptimizedImage class def self.resize\_instruct…

---

## [How we can have same values for username and email](https://meta.discourse.org/t/how-we-can-have-same-values-for-username-and-email/145207)

<div class="topic-metadata">

**Author:** [@saurabhmasc](https://meta.discourse.org/u/saurabhmasc)\
**Replies:** 2\
**Last updated:** [March 23, 2020, 10:59am UTC](https://meta.discourse.org/t/how-we-can-have-same-values-for-username-and-email/145207 "2020-03-23T10:59:37Z")

</div>

Hello All, I want the same values for the username and email field. So how can we allow special characters in username while registering new User? Is there any property related to username regex validation?

---

## [What is Discourse's opinion on React](https://meta.discourse.org/t/what-is-discourses-opinion-on-react/87936)

<div class="topic-metadata">

**Author:** [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)\
**Replies:** 10\
**Last updated:** [March 23, 2020, 12:31am UTC](https://meta.discourse.org/t/what-is-discourses-opinion-on-react/87936 "2020-03-23T00:31:43Z")

</div>

If I am saying stupid stuff, please correct me as i don’t know how to “web” stuff. I posted this so that i can hear the opinions of more experienced developers, along with some examples if there are any. I know that Di…

---

## [GPL license for modified discourse for own website](https://meta.discourse.org/t/gpl-license-for-modified-discourse-for-own-website/145148)

<div class="topic-metadata">

**Author:** [@hbm](https://meta.discourse.org/u/hbm)\
**Replies:** 9\
**Last updated:** [March 22, 2020, 10:37pm UTC](https://meta.discourse.org/t/gpl-license-for-modified-discourse-for-own-website/145148 "2020-03-22T22:37:27Z")

</div>

I consider use discourse in my future website (thanks for making the great software). In case I make some modifications (not necessarily as a plugin), does that require my modifications be GPL ? the modification is on…

---

## [Discourse running very slow on local machine](https://meta.discourse.org/t/discourse-running-very-slow-on-local-machine/145112)

<div class="topic-metadata">

**Author:** [@hbm](https://meta.discourse.org/u/hbm)\
**Replies:** 6\
**Last updated:** [March 22, 2020, 5:15pm UTC](https://meta.discourse.org/t/discourse-running-very-slow-on-local-machine/145112 "2020-03-22T17:15:05Z")

</div>

I installed a discourse instance in my local ubuntu laptop with MongoDB to try it out. I took the steps in https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727 Each page req…

---

## [Apply background to a Category page](https://meta.discourse.org/t/apply-background-to-a-category-page/144851)

<div class="topic-metadata">

**Author:** [@ElForoViajero](https://meta.discourse.org/u/ElForoViajero)\
**Replies:** 3\
**Last updated:** [March 20, 2020, 9:55am UTC](https://meta.discourse.org/t/apply-background-to-a-category-page/144851 "2020-03-20T09:55:47Z")

</div>

Hi all! Is it possible to add a background image to a category page only? So the topics on the category still have a white background? Thanks!

---

## [Running my own discourse image](https://meta.discourse.org/t/running-my-own-discourse-image/144555)

<div class="topic-metadata">

**Author:** [@Lona\_Lee](https://meta.discourse.org/u/Lona_Lee)\
**Replies:** 12\
**Last updated:** [March 19, 2020, 6:32am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555 "2020-03-19T06:32:43Z")

</div>

Hello there. I’m trying to get discourse working on my EC2 instance. the default setup on the EC2 is done. Nothing seems to be wrong with it. However, I modified the discourse source which is cloned from GitHub - disc…

---

## [Adding group members vs adding owners: data format is different](https://meta.discourse.org/t/adding-group-members-vs-adding-owners-data-format-is-different/144477)

<div class="topic-metadata">

**Author:** [@bennett](https://meta.discourse.org/u/bennett)\
**Replies:** 1\
**Last updated:** [March 18, 2020, 9:57pm UTC](https://meta.discourse.org/t/adding-group-members-vs-adding-owners-data-format-is-different/144477 "2020-03-18T21:57:26Z")

</div>

When using the API to add members and owners to a group, it looks like the required data format is different. This may be intentional but I’d like to know why (it’s breaking pydiscourse, the best library I can find for i…

---

## [Steps for creating custom small-actions to use in plugin?](https://meta.discourse.org/t/steps-for-creating-custom-small-actions-to-use-in-plugin/144599)

<div class="topic-metadata">

**Author:** [@Hooksmith](https://meta.discourse.org/u/Hooksmith)\
**Replies:** 2\
**Last updated:** [March 18, 2020, 5:05pm UTC](https://meta.discourse.org/t/steps-for-creating-custom-small-actions-to-use-in-plugin/144599 "2020-03-18T17:05:10Z")

</div>

I’m working on some domain-specific plugins for our forum and we would like to create custom small actions similar to these: In particular I just need to be able to put notices like these on the topic but being able …

---

## [Rate limits for API users](https://meta.discourse.org/t/rate-limits-for-api-users/63328)

<div class="topic-metadata">

**Author:** [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Replies:** 11\
**Last updated:** [March 17, 2020, 8:14pm UTC](https://meta.discourse.org/t/rate-limits-for-api-users/63328 "2020-03-17T20:14:04Z")

</div>

I want to create a sister app at some point that will post topics on to the forum via an API user account - is there any info available on rate limits for this? Can we ‘trust’ certain accounts so that rate limits do not …

---

## [How to get a category name with the ID via API](https://meta.discourse.org/t/how-to-get-a-category-name-with-the-id-via-api/65926)

<div class="topic-metadata">

**Author:** [@anon89120937](https://meta.discourse.org/u/anon89120937)\
**Replies:** 8\
**Last updated:** [March 17, 2020, 12:14am UTC](https://meta.discourse.org/t/how-to-get-a-category-name-with-the-id-via-api/65926 "2020-03-17T00:14:27Z")

</div>

I use Discourse API client for PHP (by @michaeld I guess) and I can’t find how to get a category name/slug with only with an ID. I need it to display (slug and id) of all our categories and their sub-categories. But wh…

---

## [Adding user attributes to the directory item serializer](https://meta.discourse.org/t/adding-user-attributes-to-the-directory-item-serializer/130927)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**Replies:** 16\
**Last updated:** [March 16, 2020, 2:26pm UTC](https://meta.discourse.org/t/adding-user-attributes-to-the-directory-item-serializer/130927 "2020-03-16T14:26:37Z")

</div>

A client approached me with a request to create a card-based user directory. As he’s hosted on discourse.org, I initially said this would not be possible (aside from any performance issues), as the attributes required t…

---

## [Add logout button to top menu](https://meta.discourse.org/t/add-logout-button-to-top-menu/143250)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 6\
**Last updated:** [March 16, 2020, 11:04am UTC](https://meta.discourse.org/t/add-logout-button-to-top-menu/143250 "2020-03-16T11:04:22Z")

</div>

I have a client with a community whose members often use public access computers; in their testing they are finding that many users have a hard time finding the logout link on the hamburger menu. Sadly, I don’t think the…

---

## [Custom javascript in \<head\> disappear](https://meta.discourse.org/t/custom-javascript-in-head-disappear/144356)

<div class="topic-metadata">

**Author:** [@Ares-X](https://meta.discourse.org/u/Ares-X)\
**Replies:** 3\
**Last updated:** [March 15, 2020, 5:47am UTC](https://meta.discourse.org/t/custom-javascript-in-head-disappear/144356 "2020-03-15T05:47:10Z")

</div>

Discourse Version: 2.4.1 i updated discourse to the latest version，then i found some javascript added in \<head\> doesn’t show in html source for example,the google analytics script was added in edit CSS/HTLM Why doe…

---

## [How to get accurate reply count through API?](https://meta.discourse.org/t/how-to-get-accurate-reply-count-through-api/144267)

<div class="topic-metadata">

**Author:** [@nedbat](https://meta.discourse.org/u/nedbat)\
**Replies:** 1\
**Last updated:** [March 13, 2020, 10:10pm UTC](https://meta.discourse.org/t/how-to-get-accurate-reply-count-through-api/144267 "2020-03-13T22:10:57Z")

</div>

I pulled the topics from a specific category in my forum. Each topic has a reply\_count, but it often seems to have no relationship to the user-experienced replies. For example, this topic: Error 404 after installing a …

---

## [Hide full name if not logged in](https://meta.discourse.org/t/hide-full-name-if-not-logged-in/114789)

<div class="topic-metadata">

**Author:** [@DubZ](https://meta.discourse.org/u/DubZ)\
**Replies:** 10\
**Last updated:** [March 13, 2020, 5:16pm UTC](https://meta.discourse.org/t/hide-full-name-if-not-logged-in/114789 "2020-03-13T17:16:47Z")

</div>

Hi, my current configuration is, that discourse is readable if you are not logged in. Also I set “enable names” to see the full name right near the nick name. But what I DONT want is, that not logged in users can see t…

---

## [Perform backend customisations with themes](https://meta.discourse.org/t/perform-backend-customisations-with-themes/144212)

<div class="topic-metadata">

**Author:** [@duranmla](https://meta.discourse.org/u/duranmla)\
**Replies:** 2\
**Last updated:** [March 13, 2020, 1:35pm UTC](https://meta.discourse.org/t/perform-backend-customisations-with-themes/144212 "2020-03-13T13:35:47Z")

</div>

Hi community, I just wanted to know if someone have information about possibility of doing customisations like this ones https://github.com/discourse/discourse-tooltips/blob/master/app/controllers/discourse\_tooltips/too…

---

## [Install on macOS – Failure: Scheduler::Defer can pause and resume](https://meta.discourse.org/t/install-on-macos-failure-scheduler-defer-can-pause-and-resume/144130)

<div class="topic-metadata">

**Author:** [@Jeremias\_Volker](https://meta.discourse.org/u/Jeremias_Volker)\
**Replies:** 8\
**Last updated:** [March 13, 2020, 12:23pm UTC](https://meta.discourse.org/t/install-on-macos-failure-scheduler-defer-can-pause-and-resume/144130 "2020-03-13T12:23:02Z")

</div>

I’ve been following the Install Discourse on macOS for development. Unfortunately, I run into a failure running the specs using: bundle exec rake autospec Failures: 1) Scheduler::Defer can pause and resume Fail…

---

## [Creating a "Featured Categories" homepage banner](https://meta.discourse.org/t/creating-a-featured-categories-homepage-banner/143930)

<div class="topic-metadata">

**Author:** [@edL](https://meta.discourse.org/u/edL)\
**Replies:** 9\
**Last updated:** [March 12, 2020, 7:37pm UTC](https://meta.discourse.org/t/creating-a-featured-categories-homepage-banner/143930 "2020-03-12T19:37:34Z")

</div>

I’d like to create a banner section that sits below the header on the homepage and features some glammed-up category boxes. Eg: I understand I can use the “below-site-header” outlet and the instructions from How to a…

---

## [How do you pull in data from the DB for your theme components?](https://meta.discourse.org/t/how-do-you-pull-in-data-from-the-db-for-your-theme-components/143995)

<div class="topic-metadata">

**Author:** [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Replies:** 5\
**Last updated:** [March 12, 2020, 6:11pm UTC](https://meta.discourse.org/t/how-do-you-pull-in-data-from-the-db-for-your-theme-components/143995 "2020-03-12T18:11:25Z")

</div>

Anybody know if there is a guide or example for this anywhere please? Let’s say for example I use a theme component to create a side column, how can I list the latest 20 publicly visible topics (or if it’s easier, from …

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

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