# Development

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

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

**Page:** 78

---

## [CSS selector to separate posts by current user](https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267)

<div class="topic-metadata">

**Author:** [@meriksson](https://meta.discourse.org/u/meriksson)\
**Replies:** 9\
**Last updated:** [April 20, 2021, 8:39pm UTC](https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267 "2021-04-20T20:39:54Z")

</div>

I am looking for a simple way for a CSS selector to match posts made by the current user (but not posts by other users). As far as I can tell, there is no CSS class added to such posts which I can use. But perhaps I am m…

---

## [Use {{image-uploader}} tag in plugin , and I hope use image in server-side](https://meta.discourse.org/t/use-image-uploader-tag-in-plugin-and-i-hope-use-image-in-server-side/187461)

<div class="topic-metadata">

**Author:** [@Programer-D](https://meta.discourse.org/u/Programer-D)\
**Replies:** 0\
**Last updated:** [April 20, 2021, 9:53am UTC](https://meta.discourse.org/t/use-image-uploader-tag-in-plugin-and-i-hope-use-image-in-server-side/187461 "2021-04-20T09:53:49Z")

</div>

I want to use {{image-uploader}} in my plugin. like in profile.hbs {{image-uploader imageUrl=model.card\_background\_upload\_url type="card\_background"}} I don’t know how to get the image set for this image-uploder. \<fo…

---

## [How to set blank title when create topic by API](https://meta.discourse.org/t/how-to-set-blank-title-when-create-topic-by-api/147023)

<div class="topic-metadata">

**Author:** [@Zhang\_Frank](https://meta.discourse.org/u/Zhang_Frank)\
**Replies:** 18\
**Last updated:** [April 20, 2021, 1:23am UTC](https://meta.discourse.org/t/how-to-set-blank-title-when-create-topic-by-api/147023 "2021-04-20T01:23:59Z")

</div>

How to set blank title when create topic by API

---

## [Custom css inside a post / adding custom classes](https://meta.discourse.org/t/custom-css-inside-a-post-adding-custom-classes/143072)

<div class="topic-metadata">

**Author:** [@Chris\_McLaughlin](https://meta.discourse.org/u/Chris_McLaughlin)\
**Replies:** 9\
**Last updated:** [April 17, 2021, 12:08pm UTC](https://meta.discourse.org/t/custom-css-inside-a-post-adding-custom-classes/143072 "2021-04-17T12:08:33Z")

</div>

Is it possible to give a \<div\> inside a post some custom styling? I’ve seen that any non-whitelisted classes are stripped out, and I’ve tried addingstyle= to my divs and spans to no avail , so does anyone know if there’…

---

## [Proper way to conditionally render text in a template--or modified VALUE twice in a single render](https://meta.discourse.org/t/proper-way-to-conditionally-render-text-in-a-template-or-modified-value-twice-in-a-single-render/187006)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 1\
**Last updated:** [April 16, 2021, 6:31pm UTC](https://meta.discourse.org/t/proper-way-to-conditionally-render-text-in-a-template-or-modified-value-twice-in-a-single-render/187006 "2021-04-16T18:31:52Z")

</div>

I have a plugin that (almost) creates Digital Ocean Droplets and installs Discourse. I have a page with a template that renders stuff about the Rails Model, the droplet that it creates, and the Discourse instance that g…

---

## [The message port closed before a response was received](https://meta.discourse.org/t/the-message-port-closed-before-a-response-was-received/187022)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 0\
**Last updated:** [April 15, 2021, 9:23pm UTC](https://meta.discourse.org/t/the-message-port-closed-before-a-response-was-received/187022 "2021-04-15T21:23:29Z")

</div>

I’m getting The message port closed before a response was received. and also handling response: TypeError: Cannot read property 'loggedOut' of undefined in both a plugin I’m working on and now in this: https://github.co…

---

## [How to get all posts from Discourse (Any API available?)](https://meta.discourse.org/t/how-to-get-all-posts-from-discourse-any-api-available/186953)

<div class="topic-metadata">

**Author:** [@Nareshh\_Raja](https://meta.discourse.org/u/Nareshh_Raja)\
**Replies:** 1\
**Last updated:** [April 15, 2021, 3:53pm UTC](https://meta.discourse.org/t/how-to-get-all-posts-from-discourse-any-api-available/186953 "2021-04-15T15:53:09Z")

</div>

How to get all posts from Discourse. We have to crawl data from Discourse to our site for showing links to posts in search results. We tried the following two api calls. But its giving us only the latest post. /posts.js…

---

## [How to add unique CSS identifiers for plan buttons in Discourse Subscriptions plugin](https://meta.discourse.org/t/how-to-add-unique-css-identifiers-for-plan-buttons-in-discourse-subscriptions-plugin/186647)

<div class="topic-metadata">

**Author:** [@MrDavis97](https://meta.discourse.org/u/MrDavis97)\
**Replies:** 1\
**Last updated:** [April 13, 2021, 6:50pm UTC](https://meta.discourse.org/t/how-to-add-unique-css-identifiers-for-plan-buttons-in-discourse-subscriptions-plugin/186647 "2021-04-13T18:50:51Z")

</div>

I want to modify this template so that each payment option also has a class that I could use to modify the buttons separately. Currently, it doesn’t seem that there is a way to target the plan buttons separately. Let me …

---

## [Replace tag-chooser on mini-tag-chooser in search-advanced-options.hbs](https://meta.discourse.org/t/replace-tag-chooser-on-mini-tag-chooser-in-search-advanced-options-hbs/186681)

<div class="topic-metadata">

**Author:** [@Mikhail\_Tyuftyaev](https://meta.discourse.org/u/Mikhail_Tyuftyaev)\
**Replies:** 0\
**Last updated:** [April 13, 2021, 2:37pm UTC](https://meta.discourse.org/t/replace-tag-chooser-on-mini-tag-chooser-in-search-advanced-options-hbs/186681 "2021-04-13T14:37:35Z")

</div>

Hello everyone. I want to replace tag-chooser on mini-tag-chooser in template search-advanced-options.hbs I change the lines {{tag-chooser id=“search-with-tags” tags=searchedTerms.tags allowCreate=false everyTag=t…

---

## [Filtering topics by categories with a custom field, or their descendants](https://meta.discourse.org/t/filtering-topics-by-categories-with-a-custom-field-or-their-descendants/186668)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**Replies:** 0\
**Last updated:** [April 13, 2021, 12:42pm UTC](https://meta.discourse.org/t/filtering-topics-by-categories-with-a-custom-field-or-their-descendants/186668 "2021-04-13T12:42:04Z")

</div>

Today I was looking at adding a TopicQuery custom filter that included any topic in a category with a certain custom field enabled, or any descendants (max\_depth of 3) of an “enabled” category, even if the descendants di…

---

## [Suggestion: enable \`eol-last\` rule for eslint and ember-template-lint](https://meta.discourse.org/t/suggestion-enable-eol-last-rule-for-eslint-and-ember-template-lint/186471)

<div class="topic-metadata">

**Author:** [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Replies:** 2\
**Last updated:** [April 12, 2021, 6:45pm UTC](https://meta.discourse.org/t/suggestion-enable-eol-last-rule-for-eslint-and-ember-template-lint/186471 "2021-04-12T18:45:36Z")

</div>

Its a general dev practice to add a newline at the end of the file as github always complains about it. My suggestion is to enable the eol-last rule for eslint and ember-template-lint. I see this code here which has it u…

---

## [Can I use API keys for this?](https://meta.discourse.org/t/can-i-use-api-keys-for-this/186353)

<div class="topic-metadata">

**Author:** [@Krunnie](https://meta.discourse.org/u/Krunnie)\
**Replies:** 2\
**Last updated:** [April 12, 2021, 4:14pm UTC](https://meta.discourse.org/t/can-i-use-api-keys-for-this/186353 "2021-04-12T16:14:48Z")

</div>

Hey there everyone! I am working on a forum dedicated to Roblox development and I have quite a particular question that I can’t seem to find the answer for in regarding API keys. My issue here is simple: Roblox doesn’t…

---

## [Running CI Tests Locally](https://meta.discourse.org/t/running-ci-tests-locally/186505)

<div class="topic-metadata">

**Author:** [@Grayden\_Shand](https://meta.discourse.org/u/Grayden_Shand)\
**Replies:** 3\
**Last updated:** [April 12, 2021, 3:05pm UTC](https://meta.discourse.org/t/running-ci-tests-locally/186505 "2021-04-12T15:05:18Z")

</div>

I just opened my first PR (:tada:) https://github.com/discourse/discourse/pull/12674 And unfortunately it failed one of the CI checks, specifically: core backend \> Core RSpec. And the particular test it failed on is: T…

---

## [API returns 404 on OPTIONS CORS preflight](https://meta.discourse.org/t/api-returns-404-on-options-cors-preflight/186249)

<div class="topic-metadata">

**Author:** [@soroushtah](https://meta.discourse.org/u/soroushtah)\
**Replies:** 0\
**Last updated:** [April 9, 2021, 6:38pm UTC](https://meta.discourse.org/t/api-returns-404-on-options-cors-preflight/186249 "2021-04-09T18:38:57Z")

</div>

When attempting to make a cross origin request (in my case, creating a new post via /posts.json) the API returns ‘404 Not Found’ for some reason and therefore, OPTIONS preflight request fails. Response headers: HTTP/2 …

---

## [How to add route to root path](https://meta.discourse.org/t/how-to-add-route-to-root-path/186141)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 3\
**Last updated:** [April 8, 2021, 10:42pm UTC](https://meta.discourse.org/t/how-to-add-route-to-root-path/186141 "2021-04-08T22:42:58Z")

</div>

In my plugin, I have a route like this in config/routes.rb: Pfaffmanager::Engine.routes.draw do get "/ssh-key/:hostname" =\> "serverkeys#get\_pub\_key\_by\_hostname", constraints: { end And I can do curl https://www.pf…

---

## [Podman - base fails VS \_dev works](https://meta.discourse.org/t/podman-base-fails-vs-dev-works/185973)

<div class="topic-metadata">

**Author:** [@lejeczek](https://meta.discourse.org/u/lejeczek)\
**Replies:** 4\
**Last updated:** [April 8, 2021, 4:12pm UTC](https://meta.discourse.org/t/podman-base-fails-vs-dev-works/185973 "2021-04-08T16:12:00Z")

</div>

Hi guys. I was not sure whether that would be something to pursue at Podman’s end or here and thought I try first here. ‘podman’ is happy with ‘discourse\_dev’ but opposite is true when trying ‘base’ -\> $ podman image …

---

## [Hide +New Topic on Top Level Categories](https://meta.discourse.org/t/hide-new-topic-on-top-level-categories/95513)

<div class="topic-metadata">

**Author:** [@Edward\_D\_Avignon](https://meta.discourse.org/u/Edward_D_Avignon)\
**Replies:** 2\
**Last updated:** [August 24, 2018, 3:25am UTC](https://meta.discourse.org/t/hide-new-topic-on-top-level-categories/95513 "2018-08-24T03:25:54Z")

</div>

We would like to hide the +New Topic button on top level categories when sub-categories are present. I found a post that showed how to hide the +New Topic button on the main category screen but it is still present on th…

---

## [Hide 'Create Topic' on home page?](https://meta.discourse.org/t/hide-create-topic-on-home-page/51732)

<div class="topic-metadata">

**Author:** [@GSeven](https://meta.discourse.org/u/GSeven)\
**Replies:** 11\
**Last updated:** [April 7, 2021, 5:23pm UTC](https://meta.discourse.org/t/hide-create-topic-on-home-page/51732 "2021-04-07T17:23:23Z")

</div>

Is it possible to hide the ‘create topic’ button on the home page? i would like my users to navigate to the appropriate category/subcategory before posting a topic, because then the correct category option is automatica…

---

## [How do I make unread notifications more noticeable?](https://meta.discourse.org/t/how-do-i-make-unread-notifications-more-noticeable/185905)

<div class="topic-metadata">

**Author:** [@rodypl](https://meta.discourse.org/u/rodypl)\
**Replies:** 1\
**Last updated:** [April 7, 2021, 4:12pm UTC](https://meta.discourse.org/t/how-do-i-make-unread-notifications-more-noticeable/185905 "2021-04-07T16:12:34Z")

</div>

I’ve been editing a lot of the CSS of my forum, but I can’t for the life of me figure out what to target in order to change the appearance of new/unread notifications. You can see in the picture below that by default the…

---

## [Anyway to render category in two places?](https://meta.discourse.org/t/anyway-to-render-category-in-two-places/185713)

<div class="topic-metadata">

**Author:** [@plosprawrs](https://meta.discourse.org/u/plosprawrs)\
**Replies:** 7\
**Last updated:** [April 6, 2021, 5:40pm UTC](https://meta.discourse.org/t/anyway-to-render-category-in-two-places/185713 "2021-04-06T17:40:14Z")

</div>

The reason for this is because of the marketing strategy for the client. They have the same exact category/label, and want the content rendered exactly: “Wireless Acess Points” \<— parent category, child category --…

---

## [Mailcatcher gem installation issue on MacOS Catalina and its solution](https://meta.discourse.org/t/mailcatcher-gem-installation-issue-on-macos-catalina-and-its-solution/168606)

<div class="topic-metadata">

**Author:** [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Replies:** 3\
**Last updated:** [April 6, 2021, 2:41am UTC](https://meta.discourse.org/t/mailcatcher-gem-installation-issue-on-macos-catalina-and-its-solution/168606 "2021-04-06T02:41:29Z")

</div>

I faced this issue a few weeks back and was able to resolve it in the following manner. The mailcatcher gem as of writing this depends on thin-1.5.1 which doesn’t install correctly. Now, if you face the issue, uninstal…

---

## [Display blocks only on the home page](https://meta.discourse.org/t/display-blocks-only-on-the-home-page/185645)

<div class="topic-metadata">

**Author:** [@Mikhail\_Tyuftyaev](https://meta.discourse.org/u/Mikhail_Tyuftyaev)\
**Replies:** 2\
**Last updated:** [April 5, 2021, 6:24pm UTC](https://meta.discourse.org/t/display-blocks-only-on-the-home-page/185645 "2021-04-05T18:24:45Z")

</div>

I have blocks in a tab “After Header” Tell me please. How do I display them only on the home page?

---

## [How to change the button type](https://meta.discourse.org/t/how-to-change-the-button-type/185638)

<div class="topic-metadata">

**Author:** [@Mikhail\_Tyuftyaev](https://meta.discourse.org/u/Mikhail_Tyuftyaev)\
**Replies:** 0\
**Last updated:** [April 5, 2021, 12:17pm UTC](https://meta.discourse.org/t/how-to-change-the-button-type/185638 "2021-04-05T12:17:30Z")

</div>

Hello everyone. I changed the templates full-page-search.hbs and search-advanced-options.hbs I want to change the icon in the button \<div class="control-group pull-left"\> \<label class="control-label" for="search-in-cat…

---

## [How can I link to a user profile by their user ID?](https://meta.discourse.org/t/how-can-i-link-to-a-user-profile-by-their-user-id/183196)

<div class="topic-metadata">

**Author:** [@wilson29thid](https://meta.discourse.org/u/wilson29thid)\
**Replies:** 5\
**Last updated:** [April 3, 2021, 6:55pm UTC](https://meta.discourse.org/t/how-can-i-link-to-a-user-profile-by-their-user-id/183196 "2021-04-03T18:55:34Z")

</div>

I have a members table in my application’s database, where I store application-specific information about a subset of members. One of the columns is discourse\_user\_id. I’d like to render a link to the member’s discourse …

---

## [Can't access element defined in plugin outlet with DOM interface](https://meta.discourse.org/t/cant-access-element-defined-in-plugin-outlet-with-dom-interface/185213)

<div class="topic-metadata">

**Author:** [@MrDavis97](https://meta.discourse.org/u/MrDavis97)\
**Replies:** 3\
**Last updated:** [April 3, 2021, 12:00am UTC](https://meta.discourse.org/t/cant-access-element-defined-in-plugin-outlet-with-dom-interface/185213 "2021-04-03T00:00:24Z")

</div>

I used the following plug-in outlet to make a button below the header. \<script type="text/x-handlebars" data-template-name="/connectors/below-site-header/vic-button"\> \<a id="vic-button" href="http://mathbymiles.com/…

---

## [What is the proper way to extend categories route and filter topics?](https://meta.discourse.org/t/what-is-the-proper-way-to-extend-categories-route-and-filter-topics/185043)

<div class="topic-metadata">

**Author:** [@frank.manuel](https://meta.discourse.org/u/frank.manuel)\
**Replies:** 1\
**Last updated:** [April 1, 2021, 12:41pm UTC](https://meta.discourse.org/t/what-is-the-proper-way-to-extend-categories-route-and-filter-topics/185043 "2021-04-01T12:41:23Z")

</div>

Hello, The setup, implemented as a plugin and theme: We have multiple tabs for every category, each with a different destination. “About” links to a specific auto-generated topic that is invisible in the Topic li…

---

## [Create Custom APIs](https://meta.discourse.org/t/create-custom-apis/184054)

<div class="topic-metadata">

**Author:** [@Ravi\_Teja\_Varma](https://meta.discourse.org/u/Ravi_Teja_Varma)\
**Replies:** 7\
**Last updated:** [April 1, 2021, 12:00pm UTC](https://meta.discourse.org/t/create-custom-apis/184054 "2021-04-01T12:00:47Z")

</div>

What is the best method to create custom APIs on the discourse forum. Eg: I want to create a get request which gives me users.count, topics.count, categories.count How do I add this API into forum ?

---

## [Modify "New Topic" button default behavior](https://meta.discourse.org/t/modify-new-topic-button-default-behavior/184415)

<div class="topic-metadata">

**Author:** [@jotamartos](https://meta.discourse.org/u/jotamartos)\
**Replies:** 6\
**Last updated:** [March 31, 2021, 12:13pm UTC](https://meta.discourse.org/t/modify-new-topic-button-default-behavior/184415 "2021-03-31T12:13:53Z")

</div>

Hi everyone, I’m trying to modify the default behavior of the “New Topic” button in Discourse 2.6.1. I have a custom plugin that modifies the default Ember actions to run my function. It worked properly when using a pre…

---

## [How to add a super basic topic custom field](https://meta.discourse.org/t/how-to-add-a-super-basic-topic-custom-field/184229)

<div class="topic-metadata">

**Author:** [@JQ331](https://meta.discourse.org/u/JQ331)\
**Replies:** 11\
**Last updated:** [March 26, 2021, 11:40am UTC](https://meta.discourse.org/t/how-to-add-a-super-basic-topic-custom-field/184229 "2021-03-26T11:40:02Z")

</div>

I’m trying to understand how to add a custom field to topics, and working through a very basic example. Goal: Add a custom field called “sample\_field” to each topic created, with a simple string value. I’ve reviewed var…

---

## [Show topics in tabs within a category](https://meta.discourse.org/t/show-topics-in-tabs-within-a-category/184738)

<div class="topic-metadata">

**Author:** [@uffehe](https://meta.discourse.org/u/uffehe)\
**Replies:** 0\
**Last updated:** [March 29, 2021, 11:50am UTC](https://meta.discourse.org/t/show-topics-in-tabs-within-a-category/184738 "2021-03-29T11:50:23Z")

</div>

We are building a site where we would like to have the topics in a category divided into separate tabs in order to make it easier for users to navigate e.g. all event topics would be listed under the ‘Events’ tab etc. S…

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

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