Quantcast
Channel: Discourse Meta - Latest topics
Viewing all 60581 articles
Browse latest View live

[WIP] List of all the hooks in Discourse

$
0
0

Régis Hanol wrote:

Here's the up-to-date list of all the hooks available in Discourse:

Client-side (javascript)

addCustomIcon

Event triggered by the TopicStatusComponent when rendering the icons representing the status of a topic.

How to use it?

Discourse.TopicStatusComponent.reopen({
  onAddCustomIcon: function(buffer) {
    if (this.get('topic.archetype') === 'poll') {
      this.renderIcon(buffer, 'square-o', 'poll');
    }
  }.on("addCustomIcon")
});

additionalButtons

Event triggered by the TopicFooterButtonsView when rendering the buttons at the bottom of a topic.

How to use it? Read the How to add a button at the end of a topic? tutorial.

appendMapInformation

Event triggered by the TopicMapContainerView when rendering the topic map and any relevant information underneath the first post of a topic.

How to use it?

Discourse.TopicMapContainerView.reopen({
 onAppendMapInformation: function(container) {
   // your code
 }.on("appendMapInformation")
});

postViewInserted

Event triggered by the PostView when a post is inserted into the DOM.

previewRefreshed

Event triggered by the ComposerView when the composer's preview renders.

setupTopicController

Event triggered by the TopicRoute when a topic is being loaded.

How to use it?

Discourse.TopicRoute.on("setupTopicController", function(event) {
  // Access the controller via: event.controller
  // Access the model via: event.currentModel
});

Dialect

parseNode

register

Server-side (ruby)

before_create_post

Event triggered by the PostCreator when a post is about to be created.

How to use it?

class Plugin < DiscoursePlugin
  def setup
    listen_for(:before_create_post)
  end

  def before_create_post(post)
    # your code...
  end
end

Posts: 1

Participants: 1

Read full topic


Plugin i18n setup weirdness

$
0
0

Thomas Smyth wrote:

Continuing the discussion from Plugin i18n setup:

I just set this up and ran into a peculiar issue. Even after restarting my dev server and clearing the tmp/cache directory, the /assets/locales/en.js?body=1 was not getting updated to reflect the new translations. I even deleted the whole JsLocaleHelper file and restarted the server and still the same en.js kept getting returned. If I put some dummy text in locales/en.js.erb, it showed up immediately. WEIRD.

What solved it was to stop the server, start the rails console and enter JsLocaleHelper.output_locale(:en), which was able to see the changed JsLocaleHelper. I then started the server again and it's working now.

The GOOD news is that I don't require a server restart to change my plugin's client.en.yml now that it's recognized.

I can't for the life of me figure out what happened here, but thought I'd pass it on in case anyone else encounters this.

Posts: 1

Participants: 1

Read full topic

"Mark all read" button on all New and Unread topics

$
0
0

André Mestre wrote:

Really need this button, i actively use forums.inovaestudios.com and when i go check for New or Unread topics i get dozens of topics i already read or know/visited that i have no way to get rid off that list.

So when i click on Unread i get more than 30 topics, i need to have a "Mark all read" button to mark them all as read so next time i click Unread it will show up as "Unread (0)" and have no unread topics (unless new topics are added since).

Right now i can't use that forum and have no way of finding the topics i am interested to participate in.

Posts: 12

Participants: 5

Read full topic

How to get this into a plugin?

$
0
0

Kasper Peulen wrote:

I'm trying to extend the mathjax plugin a little bit so that one is able to get the raw math source if someone wants to quote some math content. I've changed the discourse code in such a way that it works now:

I'm now trying to add this to the plugin. I'm not sure if it possible to do this in the plugin framework. This is all what I've changed to let this work:

kasperpeulen

quote raw latex

changed 1 files with 9 additions and 1 deletions.

As there are no hooks here, I'm wondering if there is maybe some other way to do this ? Could I maybe rewrite some file using a plugin? Something like that I can say, instead of the orginal utilities.js use this utlities.js ? Or instead of the original selectedText from Discourse.Utilities use this selectedText function.

Or should I request for a new hook there ?

Posts: 2

Participants: 1

Read full topic

Discourse as Your First Rails App

$
0
0

Jeff Atwood wrote:

If you’re a developer, but have never touched Ruby on Rails, we understand how you feel. We were there once! Sometimes diving into a new language and codebase can make you feel like this: The good news is that Discourse has a wonderfully supportive community and we’re here to help. Here’s our first guide on…


This topic is for comments on the original blog entry, at http://blog.discourse.org/2013/04/discourse-as-your-first-rails-app/

Posts: 62

Participants: 27

Read full topic

Embedding polls in posts

$
0
0

MilleniX wrote:

Many existing forums have features that let users post a 'poll' at the start of a topic, to ask things like "what's the best version of X?", or "which of these sentiments describes how you feel about Y?". Some offer both pick-one-of-N-answers questions and a multi-choice list of checkboxes. I'm sure there are other structures that might evolve in a more forward-looking discussion setting as well. At the very least, though Discourse should probably grow to include those. I don't see any reason it should be limited to the initial post in a topic, but maybe others do.

Posts: 21

Participants: 16

Read full topic

Performance on Windows Server 2008 R2

$
0
0

npruehs wrote:

"You've replied too many times to his topic." - Really...?

I'm totally fine with a production version. We'd like to use Discourse instead of public forums on our company page, which unfortunately runs on a Virtual Windows server alongside with our Jenkins, Confluence, and stuff.

It's nice to see it running on my local machine now, but I don't think that running a VirtualBox with Ubuntu inside our Virtual windows Server would show the performance characteristics we're looking for...

Are there any plans on making Discourse available in any way on Windows systems? :/

Posts: 3

Participants: 2

Read full topic

Embedded video overflows sticky navbar

$
0
0

swanson wrote:

If you are playing an embedded video (youtube) in this example and you scroll the page down, the video clips the sticky top navbar as shown below.

Browser: Chrome Version 29.0.1547.76 m
OS: Windows 8 (64 bit)

PS: I am still marked as a "new user" so it will not let me create a link to the image frowning

Posts: 3

Participants: 3

Read full topic


Apache 2 config file suggestions

$
0
0

Alexander Webster wrote:

Does anyone have some apache config files that work for them with discourse? I've been trying a modified version of the default file but it doesn't seem to work for me.

Posts: 1

Participants: 1

Read full topic

"Watch New Topics" by default?

$
0
0

canadaduane wrote:

So one of the great features of Discourse is the ability to set per-topic notification preferences, e.g. Watching, Tracking, Regular, Muted.

For our site, we'd like to notify people of new topics, almost like they have set "Watching" to the entire forum. Is this currently possible? Ideally, it would be a Discourse setting, with opt-out possible by individuals.

It's a half-step toward a mailing list type configuration, as envisioned at http://meta.discourse.org/t/mailing-list-and-nntp-bridge/3453/41

Posts: 4

Participants: 4

Read full topic

Error in sidekiq.log

$
0
0

Alexander Webster wrote:

Hello, whenever I start discourse, I get the following errors in my sidekiq log:

# Logfile created on 2013-12-16 21:25:54 -0600 by logger.rb/41954
2013-12-17T03:25:55Z 14733 TID-ap1mw INFO: [Sidetiq] Sidetiq v0.4.3 - Copyright (c) 2012-2013, Tobias Svensson 
2013-12-17T03:25:55Z 14733 TID-ap1mw INFO: [Sidetiq] Sidetiq is covered by the 3-clause BSD license.
2013-12-17T03:25:55Z 14733 TID-ap1mw INFO: [Sidetiq] See LICENSE and link to bsd-3 clause for licensing details.
2013-12-17T03:25:55Z 14733 TID-ap1mw INFO: [Sidetiq] Sidetiq::Supervisor start
2013-12-17T03:25:55Z 14733 TID-khefo INFO: [Sidetiq] Sidetiq::Actor::Clock id: 34405560 initialize
2013-12-17T03:25:55Z 14733 TID-kfj5g INFO: [Sidetiq] Sidetiq::Actor::Handler id: 34318440 initialize
2013-12-17T03:25:55Z 14733 TID-kfcj4 INFO: [Sidetiq] Sidetiq::Actor::Handler id: 34309960 initialize
2013-12-17T03:25:55Z 14733 TID-ke308 INFO: [Sidetiq] Sidetiq::Actor::Handler id: 34249440 initialize
2013-12-17T03:25:55Z 14733 TID-kdr2s INFO: [Sidetiq] Sidetiq::Actor::Handler id: 34243160 initialize
2013-12-17T03:25:55Z 14733 TID-kda20 INFO: [Sidetiq] Sidetiq::Actor::Handler id: 34227300 initialize
2013-12-17T03:25:55Z 14733 TID-kd8j0 INFO: [Sidetiq] Sidetiq::Actor::Handler id: 34211320 initialize
2013-12-17T03:25:55Z 14733 TID-kcj8g INFO: [Sidetiq] Sidetiq::Actor::Handler id: 34179140 initialize
2013-12-17T03:25:55Z 14733 TID-kbmmk INFO: [Sidetiq] Sidetiq::Actor::Handler id: 34161920 initialize
2013-12-17T03:25:55Z 14733 TID-khefo WARN: [Sidetiq] Can't link Sidetiq::Actor::Clock. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:25:55Z 14733 TID-kfj5g WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:25:55Z 14733 TID-kfcj4 WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:25:55Z 14733 TID-kdr2s WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:25:55Z 14733 TID-kda20 WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:25:55Z 14733 TID-kd8j0 WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:25:55Z 14733 TID-kcj8g WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:25:55Z 14733 TID-kbmmk WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:25:55Z 14733 TID-ke308 WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:41:01Z 15139 TID-78k28 INFO: [Sidetiq] Sidetiq v0.4.3 - Copyright (c) 2012-2013, Tobias Svensson <tob@tobiassvensson.co.uk>
2013-12-17T03:41:01Z 15139 TID-78k28 INFO: [Sidetiq] Sidetiq is covered by the 3-clause BSD license.
2013-12-17T03:41:01Z 15139 TID-78k28 INFO: [Sidetiq] See LICENSE and link to bsd-3 clause details.
2013-12-17T03:41:01Z 15139 TID-78k28 INFO: [Sidetiq] Sidetiq::Supervisor start
2013-12-17T03:41:01Z 15139 TID-m2k24 INFO: [Sidetiq] Sidetiq::Actor::Clock id: 37072020 initialize
2013-12-17T03:41:01Z 15139 TID-m0ip0 INFO: [Sidetiq] Sidetiq::Actor::Handler id: 36977140 initialize
2013-12-17T03:41:01Z 15139 TID-lzh1g INFO: [Sidetiq] Sidetiq::Actor::Handler id: 36928340 initialize
2013-12-17T03:41:01Z 15139 TID-lyxos INFO: [Sidetiq] Sidetiq::Actor::Handler id: 36903880 initialize
2013-12-17T03:41:01Z 15139 TID-lxbkk INFO: [Sidetiq] Sidetiq::Actor::Handler id: 36829040 initialize
2013-12-17T03:41:01Z 15139 TID-lwyj4 INFO: [Sidetiq] Sidetiq::Actor::Handler id: 36810840 initialize
2013-12-17T03:41:01Z 15139 TID-lwtf8 INFO: [Sidetiq] Sidetiq::Actor::Handler id: 36804240 initialize
2013-12-17T03:41:01Z 15139 TID-lwo4o INFO: [Sidetiq] Sidetiq::Actor::Handler id: 36797380 initialize
2013-12-17T03:41:01Z 15139 TID-lwch8 INFO: [Sidetiq] Sidetiq::Actor::Handler id: 36790500 initialize
2013-12-17T03:41:01Z 15139 TID-m2k24 WARN: [Sidetiq] Can't link Sidetiq::Actor::Clock. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:41:01Z 15139 TID-m0ip0 WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:41:01Z 15139 TID-lzh1g WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:41:01Z 15139 TID-lyxos WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:41:01Z 15139 TID-lxbkk WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:41:01Z 15139 TID-lwtf8 WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:41:01Z 15139 TID-lwch8 WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:41:01Z 15139 TID-lwyj4 WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...
2013-12-17T03:41:01Z 15139 TID-lwo4o WARN: [Sidetiq] Can't link Sidetiq::Actor::Handler. Sidekiq::Manager not running. Retrying in 5 seconds ...

Posts: 3

Participants: 3

Read full topic

Better international character mapping to slug URLs

$
0
0

Tudor wrote:

Romanian letters "ș/Ș" (s with comma below) and "ț/Ț" (t with comma below) from the topic titles are lost when the title is converted to slug. For example, if the title is "Șurubelnița deșurubează șuruburi înțepenite", the slug is something like

/urubelnia-deurubeaza-uruburi-inepenite

It should be:

/surubelnita-desurubeaza-suruburi-intepenite

Posts: 4

Participants: 2

Read full topic

Why is there a topic reply limit for new users?

$
0
0

npruehs wrote:

Okay, thank you for pointing me there!

Anyway, I'd suggest removing the limit for new users - it's very frustrating to find yourself in the middle of a discussion, being asked a question by Jeff Atwood, and not being able to answer. The message says: "You could edit an existing post." - but not even that is possible, with the same error message. Just an idea!

Again: Thanks for your help!

Posts: 8

Participants: 5

Read full topic

Want to add button to top right of topic view

$
0
0

Thomas Smyth wrote:

e.g.:

Currently this is just a hard coded {{view ..}} in the topic template. How should I go about adding a plugin hook for this? The existing plugin hooks use this.trigger inside a ContainerView class. Should I create one that does nothing except provide a hook for plugins, and then put that in the template? Or perhaps for cases like this there should be a generic ContainerView that takes the name of the plugin hook as an argument?

Thoughts? Thanks.

Posts: 2

Participants: 2

Read full topic

Discourse WordPress Plugin: Emoji's do not properly display


Topics created with WordPress plugin have incorrect avatars in topic list

$
0
0

Anthony Giovannetti wrote:

Hey guys, we just setup the WordPress plugin and it made one of our older posts post to the forum. The topic has 6 replies from various people but as you can see from the screenshot, the users are not being properly reported.

Thought I would point it out. Link to the forums: http://forum.stimhack.com/

Edit: Interesting, I edited the name of the post, and then submitted my own reply, and now it seems to work correctly. No idea.

Here it is fixed:

Posts: 4

Participants: 2

Read full topic

Quoted replies don't keep original formatting

$
0
0

Bill Ayakatubby wrote:

When using the (very cool!) highlight-and-reply feature, the formatting of the original post is lost. For example, below you can see that I quoted Jeff. In his post, he italicized the word "wrong" twice, but the italicization doesn't come through in my quote:

Posts: 11

Participants: 7

Read full topic

iPad, portrait mode: scrolling stops at the 19th post

$
0
0

Tudor wrote:

When reading a longer thread on iPad in portrait mode, the scrolling stops at the 19th post. I'm using an iPad 4 with iOS 7.0.4.

Posts: 5

Participants: 4

Read full topic

Broken icons in Firefox

$
0
0

Charlie_Shum wrote:

Some of the icons are broken when the forum is viewing on firefox
But it is normal in Chrome

it seems to be the problem of charcater encoding or font?

Posts: 8

Participants: 4

Read full topic

How to set up image uploads to S3?

$
0
0

Régis Hanol wrote:

So, you want to use S3 to handle image uploads? Here's the definitive guide:

S3 registration

Head over to http://aws.amazon.com/s3/ and click on .

During the create account process, make sure you provide payment information, otherwise you won't be able to use S3. There's no registration fee, you will only be charged for what you use, if you exceed the free usage tier.

User creation

Creating a user account

Sign in to AWS Management Console and click on to access the AWS Identity and Access Management (IAM) console which enables you to manage access to your AWS resources.

We need to create a user account, so click on the Users link on the left handside and then the button. Type in a descriptive user name and make sure the "Generate an access key for each User" checkbox is checked.

Here's the critical step: make sure you either download the credentials or you copy and paste somewhere safe both Access Key ID and Secret Access Key values. We will need them later.

Setting permissions

Once the user is created, we need to set him permission. Select the user you've just created in the upper panel, click on the Permissions tab in the lower panel and then click the button.

In the "Manage User Permissions" popup, select the radio button and click the select button to manually enter the permission.

Type in a descriptive name for the policy and use the following piece of code as a template for your policy document:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:*",
      "Resource": [
        "arn:aws:s3:::name-of-your-bucket",
        "arn:aws:s3:::name-of-your-bucket/*"
      ]
    }
  ]
}

Make sure you change both references to "name-of-your-bucket" with the name of the bucket you will use for your Discourse instance before applying the policy.

Discourse configuration

Now that you've properly set up S3, the final step is to configure your Discourse forum. Make sure you're logged in with an administrator account and go the Settings section in the admin panel.

Type in "S3" in the textbox on the right to display only the relevant settings:

You will need to:

  • Check the "enable_s3_uploads" checkbox to activate the feature
  • Paste in both "Access Key Id" and "Secret Access Key" in their respective text fields
  • Enter the name of the bucket you've authorized in the "s3_upload_bucket"

The "region" setting is optional and defaults to "us-east-1". You should enter the location (eg. eu-west-1, sa-east-1, etc...) that is nearest to your users for better performances.

Enjoy

That's it. From now on, all your images will be uploaded to and served from S3.

Note how you did not have to create your S3 bucket? That's because Discourse will automagically create it for you if it doesn't already exists. wink

Posts: 13

Participants: 5

Read full topic

Viewing all 60581 articles
Browse latest View live




Latest Images