# Development

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

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

**Page:** 81

---

## [How to customize / override topic guardian through a plugin](https://meta.discourse.org/t/how-to-customize-override-topic-guardian-through-a-plugin/179739)

<div class="topic-metadata">

**Author:** [@hyd504](https://meta.discourse.org/u/hyd504)\
**Replies:** 4\
**Last updated:** [February 15, 2021, 10:00pm UTC](https://meta.discourse.org/t/how-to-customize-override-topic-guardian-through-a-plugin/179739 "2021-02-15T22:00:17Z")

</div>

I am getting a plugin developed that will add a boolean value based on some custom logic to the user\_custom\_fields table for each user who is not allowed to create a new topic. user.custom\_fields\['can\_create\_topic'\] = f…

---

## [api.onPageChange not working with endless scroll](https://meta.discourse.org/t/api-onpagechange-not-working-with-endless-scroll/179636)

<div class="topic-metadata">

**Author:** [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Replies:** 4\
**Last updated:** [February 15, 2021, 3:52pm UTC](https://meta.discourse.org/t/api-onpagechange-not-working-with-endless-scroll/179636 "2021-02-15T15:52:57Z")

</div>

I’m trying to change the tag links using the below and it seems to work on refreshing the page or going to a new page, but it does not work when you scroll down the page where endless scroll loads in new items: \<script …

---

## [Add to serializer only for staff and current user](https://meta.discourse.org/t/add-to-serializer-only-for-staff-and-current-user/155261)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 6\
**Last updated:** [February 13, 2021, 9:23pm UTC](https://meta.discourse.org/t/add-to-serializer-only-for-staff-and-current-user/155261 "2021-02-13T21:23:24Z")

</div>

I’m working on a plugin that needs to add stuff to the user serializer. It’s working! :tada: But I need to add it to the user serializer only for staff and the current user. But . . . backing up, perhaps, I really need…

---

## [Accessing variables in a connector](https://meta.discourse.org/t/accessing-variables-in-a-connector/141747)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 9\
**Last updated:** [February 11, 2021, 10:04pm UTC](https://meta.discourse.org/t/accessing-variables-in-a-connector/141747 "2021-02-11T22:04:13Z")

</div>

I’m great at system administration. I’m not bad at doing stuff in rails. With javascript, ember, and CSS,I am just a caveman. In a plugin that changes who can send PMs, I am trying to add a button to the profile page wh…

---

## [Best way to customise the formatting of the link text?](https://meta.discourse.org/t/best-way-to-customise-the-formatting-of-the-link-text/277619)

<div class="topic-metadata">

**Author:** [@alexs](https://meta.discourse.org/u/alexs)\
**Replies:** 6\
**Last updated:** [February 11, 2021, 5:23pm UTC](https://meta.discourse.org/t/best-way-to-customise-the-formatting-of-the-link-text/277619 "2021-02-11T17:23:26Z")

</div>

What’s the best way to customise the formatting of the link text? It looks like editing the CSS isn’t the best approach because the changes will be lost when the plugin’s updated. I’d like to make it bold & change th…

---

## [EmberCLI: Coming to a Discourse near you!](https://meta.discourse.org/t/embercli-coming-to-a-discourse-near-you/143528)

<div class="topic-metadata">

**Author:** [@eviltrout](https://meta.discourse.org/u/eviltrout)\
**Replies:** 10\
**Last updated:** [February 11, 2021, 1:25pm UTC](https://meta.discourse.org/t/embercli-coming-to-a-discourse-near-you/143528 "2021-02-11T13:25:08Z")

</div>

We’d like to migrate Discourse’s asset pipeline over to use EmberCLI. EmberCLI is the standard way to develop Ember applications and Discourse’s approach has long been a source of confusion for people approaching our pr…

---

## [Filter topics in category containing file attachments](https://meta.discourse.org/t/filter-topics-in-category-containing-file-attachments/178980)

<div class="topic-metadata">

**Author:** [@owengot](https://meta.discourse.org/u/owengot)\
**Replies:** 3\
**Last updated:** [February 10, 2021, 2:01pm UTC](https://meta.discourse.org/t/filter-topics-in-category-containing-file-attachments/178980 "2021-02-10T14:01:51Z")

</div>

Is this possible with the API? The purpose is to get a list of topics in a category that contain a PDF, or other media file attached.

---

## [Retrieving post.raw only works right after creating post](https://meta.discourse.org/t/retrieving-post-raw-only-works-right-after-creating-post/115267)

<div class="topic-metadata">

**Author:** [@Mathijs\_V](https://meta.discourse.org/u/Mathijs_V)\
**Replies:** 6\
**Last updated:** [February 9, 2021, 10:05pm UTC](https://meta.discourse.org/t/retrieving-post-raw-only-works-right-after-creating-post/115267 "2021-02-09T22:05:41Z")

</div>

Hi there, At the moment I am working on an extra PostMenuButton. Funny thing is that the Cooked post is always available but the Raw post is not! Running discourse version \[v2.3.0.beta8 +103\] \<script type = "text/disc…

---

## [Changing How Categories are Displayed](https://meta.discourse.org/t/changing-how-categories-are-displayed/116095)

<div class="topic-metadata">

**Author:** [@maniacalmorgan](https://meta.discourse.org/u/maniacalmorgan)\
**Replies:** 6\
**Last updated:** [February 9, 2021, 9:24pm UTC](https://meta.discourse.org/t/changing-how-categories-are-displayed/116095 "2021-02-09T21:24:26Z")

</div>

I’ve been doing a little bit of digging, but to no avail. I’ve toyed with a number of various options and haven’t found what I’m looking for. Ultimately, I’m trying to display our categories in a manner similar to the sc…

---

## [Ruby script to send automatic welcome message to new users](https://meta.discourse.org/t/ruby-script-to-send-automatic-welcome-message-to-new-users/178665)

<div class="topic-metadata">

**Author:** [@michaelhenderson](https://meta.discourse.org/u/michaelhenderson)\
**Replies:** 1\
**Last updated:** [February 9, 2021, 4:23pm UTC](https://meta.discourse.org/t/ruby-script-to-send-automatic-welcome-message-to-new-users/178665 "2021-02-09T16:23:23Z")

</div>

Hello, community! been a while since I posted but I hope everyone is doing well. I wanted to share with you a ruby script I created that automatically sends a welcome message to new users that join your discourse forum. …

---

## [Badge for posts created between 1 AM and 5 AM](https://meta.discourse.org/t/badge-for-posts-created-between-1-am-and-5-am/178826)

<div class="topic-metadata">

**Author:** [@cosdesign](https://meta.discourse.org/u/cosdesign)\
**Replies:** 10\
**Last updated:** [February 8, 2021, 7:46pm UTC](https://meta.discourse.org/t/badge-for-posts-created-between-1-am-and-5-am/178826 "2021-02-08T19:46:36Z")

</div>

I’m afraid I became addicted to these badges :smiling\_face\_with\_three\_hearts: So this one it will be granted to users who created posts between 1 AM and 5 AM, updated daily. But unfortunately, I have no idea how to sel…

---

## [Tips for uploading badge images](https://meta.discourse.org/t/tips-for-uploading-badge-images/178264)

<div class="topic-metadata">

**Author:** [@cosdesign](https://meta.discourse.org/u/cosdesign)\
**Replies:** 4\
**Last updated:** [February 8, 2021, 10:26am UTC](https://meta.discourse.org/t/tips-for-uploading-badge-images/178264 "2021-02-08T10:26:47Z")

</div>

Hello! I’m new to this awesome discourse world and I’ll appreciate any help. So I’ve installed discourse on digitaloccean. Now I would like to use sftp ( cause no option on Admin UI? ) to upload my badge images but I ha…

---

## [Decrypting user-api-key payload after login](https://meta.discourse.org/t/decrypting-user-api-key-payload-after-login/178567)

<div class="topic-metadata">

**Author:** [@a\_developer](https://meta.discourse.org/u/a_developer)\
**Replies:** 0\
**Last updated:** [February 5, 2021, 4:11pm UTC](https://meta.discourse.org/t/decrypting-user-api-key-payload-after-login/178567 "2021-02-05T16:11:27Z")

</div>

I have been trying to obtain the User-Api-Key for a third party login by decrypting the payload, after making the call to user-api-key/new on the iOS platform. The problem with that is the base64 decode goes fine, but t…

---

## [How to get user's badges number?](https://meta.discourse.org/t/how-to-get-users-badges-number/178550)

<div class="topic-metadata">

**Author:** [@cosdesign](https://meta.discourse.org/u/cosdesign)\
**Replies:** 0\
**Last updated:** [February 5, 2021, 2:06pm UTC](https://meta.discourse.org/t/how-to-get-users-badges-number/178550 "2021-02-05T14:06:40Z")

</div>

Hello! Is it possible to get in some js code or maybe an existing variable, the total number of badges a user has already collected? The code could fit perfectly inside .topic-avatar .poster-avatar-extra and I’m pretty s…

---

## [Is it possible to use theme component from local folder (as plugin) - for local development?](https://meta.discourse.org/t/is-it-possible-to-use-theme-component-from-local-folder-as-plugin-for-local-development/171983)

<div class="topic-metadata">

**Author:** [@4ong](https://meta.discourse.org/u/4ong)\
**Replies:** 5\
**Last updated:** [February 5, 2021, 8:32am UTC](https://meta.discourse.org/t/is-it-possible-to-use-theme-component-from-local-folder-as-plugin-for-local-development/171983 "2021-02-05T08:32:43Z")

</div>

To work on a custom theme component I want to reload it from the local folder without an installation process from git or .tar. Is it possible? Which path/folder should I use? Thanks!

---

## [Post\_created, post\_edited Webhooks enqueue issue](https://meta.discourse.org/t/post-created-post-edited-webhooks-enqueue-issue/177671)

<div class="topic-metadata">

**Author:** [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Replies:** 2\
**Last updated:** [February 4, 2021, 12:05pm UTC](https://meta.discourse.org/t/post-created-post-edited-webhooks-enqueue-issue/177671 "2021-02-04T12:05:58Z")

</div>

Recently, we faced an issue with the ratings plugin where stale/empty data was being passed to the webhooks. Turns out, the reason is that DiscourseEvents are being relied on for enqueing the hooks. This causes the webh…

---

## [Which table holds the post URL?](https://meta.discourse.org/t/which-table-holds-the-post-url/178333)

<div class="topic-metadata">

**Author:** [@rmoff](https://meta.discourse.org/u/rmoff)\
**Replies:** 2\
**Last updated:** [February 4, 2021, 10:00am UTC](https://meta.discourse.org/t/which-table-holds-the-post-url/178333 "2021-02-04T10:00:03Z")

</div>

I’m using the data explorer to build a query which shows a user’s posts - which table can I use to return the URL of the post? I assumed it would be on posts but I don’t see it. This is my query so far SELECT u.email,c…

---

## [How do I add topic posts nested under topic list items hosted on discourse.org? ie Topic list as feed](https://meta.discourse.org/t/how-do-i-add-topic-posts-nested-under-topic-list-items-hosted-on-discourse-org-ie-topic-list-as-feed/178361)

<div class="topic-metadata">

**Author:** [@Dan\_Lewis](https://meta.discourse.org/u/Dan_Lewis)\
**Replies:** 1\
**Last updated:** [February 4, 2021, 4:57am UTC](https://meta.discourse.org/t/how-do-i-add-topic-posts-nested-under-topic-list-items-hosted-on-discourse-org-ie-topic-list-as-feed/178361 "2021-02-04T04:57:03Z")

</div>

Hi all, So this week we started our first sprint on customising our discourse theme, we knew that we were going to be changing a fair number of files as the designs are quite different to the discourse themes. Our appr…

---

## [Is there a recommended way to get the current username from a post?](https://meta.discourse.org/t/is-there-a-recommended-way-to-get-the-current-username-from-a-post/178288)

<div class="topic-metadata">

**Author:** [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Replies:** 3\
**Last updated:** [February 3, 2021, 8:08pm UTC](https://meta.discourse.org/t/is-there-a-recommended-way-to-get-the-current-username-from-a-post/178288 "2021-02-03T20:08:03Z")

</div>

I was wondering if it’s possible to create a post that references the username of whoever is logged in? Sort of like the /my route but for the frontend. My use case would be to customize a URL pointing outside of Discou…

---

## [How to hide the "views" column?](https://meta.discourse.org/t/how-to-hide-the-views-column/128072)

<div class="topic-metadata">

**Author:** [@chi\_noti\_info](https://meta.discourse.org/u/chi_noti_info)\
**Replies:** 5\
**Last updated:** [February 3, 2021, 11:08am UTC](https://meta.discourse.org/t/how-to-hide-the-views-column/128072 "2021-02-03T11:08:03Z")

</div>

My forum is rather new and it is somewhat embarrassing to show the low amount of views in the “views” column. Is it possible to hide it (also hide from little information panel at the end of each OP? Thanks in advance,

---

## [Can a plugin auto-create a topic after\_create of a category?](https://meta.discourse.org/t/can-a-plugin-auto-create-a-topic-after-create-of-a-category/177698)

<div class="topic-metadata">

**Author:** [@frank.manuel](https://meta.discourse.org/u/frank.manuel)\
**Replies:** 3\
**Last updated:** [February 2, 2021, 8:14am UTC](https://meta.discourse.org/t/can-a-plugin-auto-create-a-topic-after-create-of-a-category/177698 "2021-02-02T08:14:04Z")

</div>

I want every category to have an auto-generated topic, much like default “About the \[catgegory name\] category” at the top of every category. Is there a way I can hitch on the after\_create event of Category? I can’t find …

---

## [Keyword or Semantic search queries](https://meta.discourse.org/t/keyword-or-semantic-search-queries/177469)

<div class="topic-metadata">

**Author:** [@edgarriba](https://meta.discourse.org/u/edgarriba)\
**Replies:** 2\
**Last updated:** [February 1, 2021, 9:49am UTC](https://meta.discourse.org/t/keyword-or-semantic-search-queries/177469 "2021-02-01T09:49:09Z")

</div>

Hi ! this are a generic question about the search engine used by Discourse. What are the rules used by the queries to the database - is it based on keyword or semantics ? Would be feasible to implement a plugin to cust…

---

## [A more efficient Redis lock](https://meta.discourse.org/t/a-more-efficient-redis-lock/177841)

<div class="topic-metadata">

**Author:** [@concerto](https://meta.discourse.org/u/concerto)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 11:22pm UTC](https://meta.discourse.org/t/a-more-efficient-redis-lock/177841 "2021-01-31T23:22:15Z")

</div>

Discourse use Redis lock widely as a way of synchronization. Discourse’s implementation of Redis lock(as show below) can be improved to use less Redis command, reducing round-trip time and cost for Redis to execute them. …

---

## [Using jQuery once it's removed from Ember/Discourse](https://meta.discourse.org/t/using-jquery-once-its-removed-from-ember-discourse/177875)

<div class="topic-metadata">

**Author:** [@smrtey](https://meta.discourse.org/u/smrtey)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 11:15pm UTC](https://meta.discourse.org/t/using-jquery-once-its-removed-from-ember-discourse/177875 "2021-01-31T23:15:44Z")

</div>

About a year ago Jeff mentioned jQuery will be removed from Discourse within the next couple of years When this happens will I be able to import jquery in a script tag in the \<head\> section and continue to use my exist…

---

## [Conserving unicorns by serving images with nginx?](https://meta.discourse.org/t/conserving-unicorns-by-serving-images-with-nginx/177775)

<div class="topic-metadata">

**Author:** [@mcdanlj](https://meta.discourse.org/u/mcdanlj)\
**Replies:** 4\
**Last updated:** [January 30, 2021, 4:29pm UTC](https://meta.discourse.org/t/conserving-unicorns-by-serving-images-with-nginx/177775 "2021-01-30T16:29:37Z")

</div>

I’ve been thinking of trying to conserve memory-heavy unicorn instances by configuring my external nginx (which I already have for serving 502 maintenance page and for correctly attributing IPv6 addresses) to also serve …

---

## [Hide post contents from search results](https://meta.discourse.org/t/hide-post-contents-from-search-results/176488)

<div class="topic-metadata">

**Author:** [@lpoolrob](https://meta.discourse.org/u/lpoolrob)\
**Replies:** 3\
**Last updated:** [January 29, 2021, 2:59pm UTC](https://meta.discourse.org/t/hide-post-contents-from-search-results/176488 "2021-01-29T14:59:36Z")

</div>

Is it possible on the search results page to hide the content of the posts and just leave topic titles? Use case - typically most topics on my community are about a subject with the first post containing nothing but upl…

---

## [Handle\_mail support for Postmark webhook](https://meta.discourse.org/t/handle-mail-support-for-postmark-webhook/173316)

<div class="topic-metadata">

**Author:** [@mcaruanagalizia](https://meta.discourse.org/u/mcaruanagalizia)\
**Replies:** 2\
**Last updated:** [January 29, 2021, 4:09am UTC](https://meta.discourse.org/t/handle-mail-support-for-postmark-webhook/173316 "2021-01-29T04:09:09Z")

</div>

First time Discourse user, impressed at how well made but at the same hackable the app is! In order to avoid running a mail server I want to get Postmark working with Discourse. They have a webhook for inbound mail, that…

---

## [Plugin tests fail with "undefined method \`test\_transaction='"](https://meta.discourse.org/t/plugin-tests-fail-with-undefined-method-test-transaction/176292)

<div class="topic-metadata">

**Author:** [@seanblue](https://meta.discourse.org/u/seanblue)\
**Replies:** 5\
**Last updated:** [January 28, 2021, 10:39pm UTC](https://meta.discourse.org/t/plugin-tests-fail-with-undefined-method-test-transaction/176292 "2021-01-28T22:39:07Z")

</div>

I built a plugin last year and wanted to verify that it still works on the latest version of Discourse. After reinitializing my dev environment (I had DB migration issues) I was able to manually verify that the plugin st…

---

## [Load test with Discourse](https://meta.discourse.org/t/load-test-with-discourse/77291)

<div class="topic-metadata">

**Author:** [@SimonWu](https://meta.discourse.org/u/SimonWu)\
**Replies:** 19\
**Last updated:** [August 15, 2018, 10:15am UTC](https://meta.discourse.org/t/load-test-with-discourse/77291 "2018-08-15T10:15:44Z")

</div>

Hi, I am doing a load test for Discourse. Here is my scenario: Take Discourse Meta for example. I append a api\_key (generated from admin portal) as a query string. So the url I test is: Discourse Meta; I remove the a…

---

## [How to have if "string === string" in template?](https://meta.discourse.org/t/how-to-have-if-string-string-in-template/158404)

<div class="topic-metadata">

**Author:** [@JQ331](https://meta.discourse.org/u/JQ331)\
**Replies:** 6\
**Last updated:** [January 25, 2021, 3:41pm UTC](https://meta.discourse.org/t/how-to-have-if-string-string-in-template/158404 "2021-01-25T15:41:36Z")

</div>

In my plugin, I want to have an if statement in a template, that evaluates whether a string matches a value. Like this: {{#each groups as |group|}} {{#if group.name === "AwesomeName"}} \<div\>There is a match!\</d…

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

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