# Development

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

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

**Page:** 144

---

## [Input validation](https://meta.discourse.org/t/input-validation/46126)

<div class="topic-metadata">

**Author:** [@piratdavid](https://meta.discourse.org/u/piratdavid)\
**Replies:** 2\
**Last updated:** [June 22, 2016, 7:44am UTC](https://meta.discourse.org/t/input-validation/46126 "2016-06-22T07:44:10Z")

</div>

Could someone point me in the right direction for input validation of fields in a plugin. Thanx in advance. I’d like to have the same popup-tip behavior as a missing required field in the post composer. /david

---

## [Geo-targeting banners on Discourse](https://meta.discourse.org/t/geo-targeting-banners-on-discourse/45689)

<div class="topic-metadata">

**Author:** [@HAWK](https://meta.discourse.org/u/HAWK)\
**Replies:** 4\
**Last updated:** [June 18, 2016, 3:41am UTC](https://meta.discourse.org/t/geo-targeting-banners-on-discourse/45689 "2016-06-18T03:41:32Z")

</div>

Is anyone using geo-targeted banners on their Discourse instance? Is it possible?

---

## [How to count how many open connections Discourse has?](https://meta.discourse.org/t/how-to-count-how-many-open-connections-discourse-has/45769)

<div class="topic-metadata">

**Author:** [@Falco](https://meta.discourse.org/u/Falco)\
**Replies:** 1\
**Last updated:** [June 16, 2016, 11:12pm UTC](https://meta.discourse.org/t/how-to-count-how-many-open-connections-discourse-has/45769 "2016-06-16T23:12:59Z")

</div>

I have used netstat/lsof to count the number of open message bus connections on high load events and better understand my users. Looks like that the docker image now doesn’t have either, any tips?

---

## [How to insert statistics of site in footer? It's possible?](https://meta.discourse.org/t/how-to-insert-statistics-of-site-in-footer-its-possible/45783)

<div class="topic-metadata">

**Author:** [@marcospreviato](https://meta.discourse.org/u/marcospreviato)\
**Replies:** 2\
**Last updated:** [June 16, 2016, 8:52pm UTC](https://meta.discourse.org/t/how-to-insert-statistics-of-site-in-footer-its-possible/45783 "2016-06-16T20:52:52Z")

</div>

i try inserting statistics of page in footer but i have too many problems, how to best way to make this? Thanks for help!

---

## [Why are integration specs written in QUnit?](https://meta.discourse.org/t/why-are-integration-specs-written-in-qunit/45638)

<div class="topic-metadata">

**Author:** [@rimian](https://meta.discourse.org/u/rimian)\
**Replies:** 10\
**Last updated:** [June 15, 2016, 6:57am UTC](https://meta.discourse.org/t/why-are-integration-specs-written-in-qunit/45638 "2016-06-15T06:57:25Z")

</div>

I’m wondering what was the reason behind writing integration tests in QUnit when RSpec is available? The advantages of RSpec would be: Runs the phantomjs driver directly rather than through a shell command Removes the…

---

## [Headless qunit integration tests?](https://meta.discourse.org/t/headless-qunit-integration-tests/45513)

<div class="topic-metadata">

**Author:** [@rimian](https://meta.discourse.org/u/rimian)\
**Replies:** 8\
**Last updated:** [June 14, 2016, 2:52pm UTC](https://meta.discourse.org/t/headless-qunit-integration-tests/45513 "2016-06-14T14:52:12Z")

</div>

I’d like to run my integration tests via the command line with support for running a subset of the entire test suite. I’m thinking about setting up gulp and phantomjs to run the tests. Something like: https://www.npmjs.c…

---

## [Ember Object Discrepancy between Initial Page-Load and Hard-Refresh](https://meta.discourse.org/t/ember-object-discrepancy-between-initial-page-load-and-hard-refresh/45394)

<div class="topic-metadata">

**Author:** [@ivanrlio](https://meta.discourse.org/u/ivanrlio)\
**Replies:** 1\
**Last updated:** [June 8, 2016, 1:18am UTC](https://meta.discourse.org/t/ember-object-discrepancy-between-initial-page-load-and-hard-refresh/45394 "2016-06-08T01:18:45Z")

</div>

On our site we’re generating a sidebar that will contain information about the topic such as posters, suggested discussions etc. An issue that I’ve noticed, at least for the attribute posters, is that upon initial page-…

---

## [Plugin repos missing license info](https://meta.discourse.org/t/plugin-repos-missing-license-info/45260)

<div class="topic-metadata">

**Author:** [@wolftune](https://meta.discourse.org/u/wolftune)\
**Replies:** 2\
**Last updated:** [June 6, 2016, 6:05pm UTC](https://meta.discourse.org/t/plugin-repos-missing-license-info/45260 "2016-06-06T18:05:01Z")

</div>

I’m not sure where to post this, as it seems Discourse doesn’t use GitHub issues. I’m sure it’s possible to track issues inside Discourse itself. Anyway, these repos should have a LICENSE file even though the README men…

---

## [A list of server-side functions for weekend/novice Discourse developers?](https://meta.discourse.org/t/a-list-of-server-side-functions-for-weekend-novice-discourse-developers/45259)

<div class="topic-metadata">

**Author:** [@tarek](https://meta.discourse.org/u/tarek)\
**Replies:** 7\
**Last updated:** [June 6, 2016, 11:53am UTC](https://meta.discourse.org/t/a-list-of-server-side-functions-for-weekend-novice-discourse-developers/45259 "2016-06-06T11:53:40Z")

</div>

Hello friends, This topic may belong in Development. Apologies if it is misplaced. I am trying to develop a patch to core that will allow for certain added functionality. I have found the relevant function in the relev…

---

## [Do categories scale?](https://meta.discourse.org/t/do-categories-scale/45223)

<div class="topic-metadata">

**Author:** [@cappslock](https://meta.discourse.org/u/cappslock)\
**Replies:** 3\
**Last updated:** [June 5, 2016, 8:12pm UTC](https://meta.discourse.org/t/do-categories-scale/45223 "2016-06-05T20:12:07Z")

</div>

Hi! I’m new to Discourse and evaluating it for a client who is interested in using it as the backend for a commenting system (we can’t use the front-end, because reasons). For our use case, we might want to generate a l…

---

## [User Reputation Next To Username (Junior Member, Senior Member, etc)](https://meta.discourse.org/t/user-reputation-next-to-username-junior-member-senior-member-etc/45101)

<div class="topic-metadata">

**Author:** [@P16](https://meta.discourse.org/u/P16)\
**Replies:** 3\
**Last updated:** [June 5, 2016, 4:19pm UTC](https://meta.discourse.org/t/user-reputation-next-to-username-junior-member-senior-member-etc/45101 "2016-06-05T16:19:13Z")

</div>

Hi Everyone, We were trying to build a plugin which would show the trust level of the user next to their name within topics. So that all users have a sort of reputation badge next to their name. Since there is already …

---

## [How to use application route actions in template/components?](https://meta.discourse.org/t/how-to-use-application-route-actions-in-template-components/45217)

<div class="topic-metadata">

**Author:** [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Replies:** 1\
**Last updated:** [June 3, 2016, 9:18pm UTC](https://meta.discourse.org/t/how-to-use-application-route-actions-in-template-components/45217 "2016-06-03T21:18:35Z")

</div>

:wave: In discourse/app/assets/javascripts/discourse/routes/application.js.es6 there is this action: composePrivateMessage is the action that triggers the composer to write a private message. I am trying to access thi…

---

## [Discourse reports user ips as the load balancer](https://meta.discourse.org/t/discourse-reports-user-ips-as-the-load-balancer/45049)

<div class="topic-metadata">

**Author:** [@nhumrich](https://meta.discourse.org/u/nhumrich)\
**Replies:** 8\
**Last updated:** [June 2, 2016, 12:13am UTC](https://meta.discourse.org/t/discourse-reports-user-ips-as-the-load-balancer/45049 "2016-06-02T00:13:13Z")

</div>

I have an external load balancer (aws ELB) directing traffic to my discourse server. I have verified the X-Forwarded-For headers are being sent, but for some reason all the user ips show up as the load balancer ip? Is t…

---

## [Will templates/user/summary.hbs ever be a widget?](https://meta.discourse.org/t/will-templates-user-summary-hbs-ever-be-a-widget/44744)

<div class="topic-metadata">

**Author:** [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Replies:** 1\
**Last updated:** [May 24, 2016, 5:28pm UTC](https://meta.discourse.org/t/will-templates-user-summary-hbs-ever-be-a-widget/44744 "2016-05-24T17:28:25Z")

</div>

I am planning on tweaking the user profiles on my Discourse and of course noticing profile, including the summary page, are still handlebars templates. Are there plans to rewrite these using the virtual-dom library (a.k.…

---

## [Code review request for \`slackdoor\` plugin](https://meta.discourse.org/t/code-review-request-for-slackdoor-plugin/44253)

<div class="topic-metadata">

**Author:** [@mcwumbly](https://meta.discourse.org/u/mcwumbly)\
**Replies:** 10\
**Last updated:** [May 22, 2016, 8:33pm UTC](https://meta.discourse.org/t/code-review-request-for-slackdoor-plugin/44253 "2016-05-22T20:33:49Z")

</div>

Hey there… I’m looking for some extra pairs of eyes on the plugin I’ve implemented for this feature: Allow Slack to unfurl/expand links to “login-required” Discourse instance Slack posts a request to yourdomain.com/sl…

---

## [Create user field with options](https://meta.discourse.org/t/create-user-field-with-options/44427)

<div class="topic-metadata">

**Author:** [@alexu](https://meta.discourse.org/u/alexu)\
**Replies:** 1\
**Last updated:** [May 18, 2016, 7:58pm UTC](https://meta.discourse.org/t/create-user-field-with-options/44427 "2016-05-18T19:58:57Z")

</div>

Hi I am playing around with the imports scripts and I want to create a drop down user field. The ning script has an example of creating a text field which I have working, and I am able to add a dropdown w/ no options, b…

---

## [Ember in debug mode at production](https://meta.discourse.org/t/ember-in-debug-mode-at-production/43912)

<div class="topic-metadata">

**Author:** [@Steve\_Ng](https://meta.discourse.org/u/Steve_Ng)\
**Replies:** 3\
**Last updated:** [May 17, 2016, 8:12am UTC](https://meta.discourse.org/t/ember-in-debug-mode-at-production/43912 "2016-05-17T08:12:31Z")

</div>

I’ve run the following command before RAILS\_ENV=production bundle exec rake assets:precompile bundle exec unicorn -p 3000 -E production -c config/unicorn.conf.rb However when I go to the site, I saw this in the consol…

---

## [Watching Categories based on on group in discourse](https://meta.discourse.org/t/watching-categories-based-on-on-group-in-discourse/41488)

<div class="topic-metadata">

**Author:** [@Jared\_Needell](https://meta.discourse.org/u/Jared_Needell)\
**Replies:** 23\
**Last updated:** [May 16, 2016, 7:14pm UTC](https://meta.discourse.org/t/watching-categories-based-on-on-group-in-discourse/41488 "2016-05-16T19:14:57Z")

</div>

I found this plugin Is this only hardcoded for one category and one group? I’d like to try and set this up on a larger scale. @tobiaseigen

---

## [“Easy” development environment creation](https://meta.discourse.org/t/easy-development-environment-creation/43306)

<div class="topic-metadata">

**Author:** [@jesus2099](https://meta.discourse.org/u/jesus2099)\
**Replies:** 3\
**Last updated:** [May 14, 2016, 10:15pm UTC](https://meta.discourse.org/t/easy-development-environment-creation/43306 "2016-05-14T22:15:47Z")

</div>

Hello, I wanted to try and fix a one row of JavaScript code in Discourse but could not dare submit a PR without making sure I did not break anything or making sure it did really fix the problem. So I found what was sai…

---

## [How to move topic-notifications-button and invite-reply-button from footer?](https://meta.discourse.org/t/how-to-move-topic-notifications-button-and-invite-reply-button-from-footer/44013)

<div class="topic-metadata">

**Author:** [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Replies:** 1\
**Last updated:** [May 10, 2016, 9:34pm UTC](https://meta.discourse.org/t/how-to-move-topic-notifications-button-and-invite-reply-button-from-footer/44013 "2016-05-10T21:34:29Z")

</div>

There are two special buttons in discourse/app/assets/javascripts/discourse/views/topic-footer-buttons.js.es6: topic-notifications-button and invite-reply-button. I am exploring the possibility of moving these button…

---

## [Auth provider custom URL?](https://meta.discourse.org/t/auth-provider-custom-url/43887)

<div class="topic-metadata">

**Author:** [@jesselperry](https://meta.discourse.org/u/jesselperry)\
**Replies:** 3\
**Last updated:** [May 9, 2016, 3:10pm UTC](https://meta.discourse.org/t/auth-provider-custom-url/43887 "2016-05-09T15:10:22Z")

</div>

Could someone help explain the new feature to allow auth providers to provide a custom URL? I tried to read through the code but didn’t really understand what was happening. Any insight would be great — thanks! https://…

---

## [Trouble adding Ember helper](https://meta.discourse.org/t/trouble-adding-ember-helper/43764)

<div class="topic-metadata">

**Author:** [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Replies:** 6\
**Last updated:** [May 6, 2016, 4:46pm UTC](https://meta.discourse.org/t/trouble-adding-ember-helper/43764 "2016-05-06T16:46:00Z")

</div>

Continuing the discussion from How to add an Ember js helper?: I am trying to add an Ember helper but having no luck. I get this error: Uncaught Error: Assertion Failed: A helper named 'color-shade' could not be found …

---

## [Add like\_count column to topic list](https://meta.discourse.org/t/add-like-count-column-to-topic-list/43376)

<div class="topic-metadata">

**Author:** [@Anthony\_Hopkins](https://meta.discourse.org/u/Anthony_Hopkins)\
**Replies:** 2\
**Last updated:** [May 6, 2016, 7:12am UTC](https://meta.discourse.org/t/add-like-count-column-to-topic-list/43376 "2016-05-06T07:12:27Z")

</div>

I need to display like\_count to topic list. I know I can add TopicViewSerializer.attributes\_from\_topic(:like\_count) to my plugin and use outlet “topic-list-tags” But perhaps there is a better way. Any idea how to turn…

---

## [Add data to Post query](https://meta.discourse.org/t/add-data-to-post-query/43715)

<div class="topic-metadata">

**Author:** [@Andrew\_Byrne](https://meta.discourse.org/u/Andrew_Byrne)\
**Replies:** 2\
**Last updated:** [May 6, 2016, 4:22am UTC](https://meta.discourse.org/t/add-data-to-post-query/43715 "2016-05-06T04:22:24Z")

</div>

ok so I got a lovely query from @tgxworld some time ago. posts = Post.where('user\_id IN (?) OR topic\_id IN (?) OR raw LIKE (?)', uid, tid, '%@everyone%' ) .order(created\_at: :desc) .limit(par…

---

## [RSpec search\_spec.rb RateLimiter LimitExceeded problems](https://meta.discourse.org/t/rspec-search-spec-rb-ratelimiter-limitexceeded-problems/43707)

<div class="topic-metadata">

**Author:** [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Replies:** 6\
**Last updated:** [May 5, 2016, 1:40pm UTC](https://meta.discourse.org/t/rspec-search-spec-rb-ratelimiter-limitexceeded-problems/43707 "2016-05-05T13:40:01Z")

</div>

Continuing the discussion from Search within topic is omitting results: I was getting things set up to do a PR - Pull Request - and figured it might be nice to include a test. So I ran bundle exec rspec spec/component…

---

## [Whereis routes.rb?](https://meta.discourse.org/t/whereis-routes-rb/43656)

<div class="topic-metadata">

**Author:** [@luisfpinto](https://meta.discourse.org/u/luisfpinto)\
**Replies:** 3\
**Last updated:** [May 5, 2016, 12:28am UTC](https://meta.discourse.org/t/whereis-routes-rb/43656 "2016-05-05T00:28:43Z")

</div>

Hello, I have installed discourse with docker and I have been looking for the routes.rb file to change the endpoint to email processing as It is said here https://meta.discourse.org/t/simple-plugin-that-offers-an-http-po…

---

## [How to access $(this) with api.attachWidgetAction?](https://meta.discourse.org/t/how-to-access-this-with-api-attachwidgetaction/43570)

<div class="topic-metadata">

**Author:** [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Replies:** 3\
**Last updated:** [May 3, 2016, 4:31pm UTC](https://meta.discourse.org/t/how-to-access-this-with-api-attachwidgetaction/43570 "2016-05-03T16:31:21Z")

</div>

I am adding a new post menu button with api.addPostMenuButton. I would like to access the data of this post-menu button on click using api.attachWidgetAction. Ideally, it would be the equivalent of: $(this).attr('data…

---

## [Emails not delivered in development unless queue jobs is unselected](https://meta.discourse.org/t/emails-not-delivered-in-development-unless-queue-jobs-is-unselected/43575)

<div class="topic-metadata">

**Author:** [@simon](https://meta.discourse.org/u/simon)\
**Replies:** 1\
**Last updated:** [May 3, 2016, 7:24am UTC](https://meta.discourse.org/t/emails-not-delivered-in-development-unless-queue-jobs-is-unselected/43575 "2016-05-03T07:24:46Z")

</div>

On the latest master branch, emails are not being delivered in my local development environment unless I deselect the ‘queue jobs’ site setting. If I execute the job from the console it still works as expected. If I chec…

---

## [Cross origin request from plugin](https://meta.discourse.org/t/cross-origin-request-from-plugin/43548)

<div class="topic-metadata">

**Author:** [@Andrew\_Byrne](https://meta.discourse.org/u/Andrew_Byrne)\
**Replies:** 2\
**Last updated:** [May 3, 2016, 1:22am UTC](https://meta.discourse.org/t/cross-origin-request-from-plugin/43548 "2016-05-03T01:22:05Z")

</div>

Hi all, my plugin: https://github.com/abyrnedesign/discourse-json-follow-list is working a treat in the local environment. But I have an issue when trying to request the same feed from another domain. It does not fail …

---

## [I want to move the Facebook and Twitter share buttons to post menu](https://meta.discourse.org/t/i-want-to-move-the-facebook-and-twitter-share-buttons-to-post-menu/43472)

<div class="topic-metadata">

**Author:** [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Replies:** 1\
**Last updated:** [May 2, 2016, 4:39pm UTC](https://meta.discourse.org/t/i-want-to-move-the-facebook-and-twitter-share-buttons-to-post-menu/43472 "2016-05-02T16:39:51Z")

</div>

Continuing the discussion from How can I custom share button?: I have added new post menu items for sharing to Facebook and Twitter. They do not have any functionality yet though. I was looking to hopefully piggy bac…

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

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