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

Box style category dropdown on Chrome always forces scrollbar

$
0
0

@Simon_Cossar wrote:

When the box-style category badge is used, it always forces a scrollbar in the category dropdown menu when using the latest Chrome browser. With Firefox .cat div is pushed down, producing a gap between categories, but it doesn't force a scrollbar. With Safari and iOS it displays properly (no gap between categories and no scrollbar.)

It seems to have something to do with the line-height. The css for making the badge is kind of complicated.

Posts: 2

Participants: 1

Read full topic


Yahoo account needs approval - is this a bug on v1.5.0.beta11 +202?

$
0
0

@mrdiscourse wrote:

I've tested my discourse with a test account using Yahoo social login. When posting it says the post needs moderation before being allowed. This does not happen with any other social login - is this a bug?

Discourse version: v1.5.0.beta11 +202

Posts: 3

Participants: 2

Read full topic

GCM이슈 해결 협의 - Google is blocked in China

$
0
0

@esummer9 wrote:

안드로이드 앱내 GCM 사용시 앱이 다운되는 현상!

http://stackoverflow.com/questions/17825121/android-push-notifications-in-china

Posts: 1

Participants: 1

Read full topic

How to add copyright trademark at the bottom?

Center align images

$
0
0

@shalintj wrote:

Hi,
I understand Markdown does not support center-aligning images. Having said that, on our forum we would like to center align images as and when required. I added the following css (via Admin >> Customise):

.centerimg
{
text-align:center;
display:block;
}

And then added the "centerimg" class to the images but the images didn't align to center. Where did I go wrong?

Posts: 3

Participants: 2

Read full topic

How to change topic colour?

$
0
0

@rslsrkr wrote:

How to change topic colour of the following?

The text colour of About the Meta Category should be like the New Top

pls suggest me how?

Posts: 2

Participants: 2

Read full topic

How to change view?

Annoying iPad mini split keyboard overlay

$
0
0

@Cortrah wrote:

One of the real strengths of discourse is theoretically working on devices and for reading it's great,but my iPad mini really makes entering in text rediculously difficult by throwing the text entry field to the top of the page and then overlaying a keypad over the text that you are trying to type or edit

I wonder if others know what I'm talking about here and if it might be worth trying to think of whether there could be a solution for this?

Offhand im stumped as to how this could be improved. (This odd interaction type happens on the native apps too) not at all clear what Apple is thinking with this interaction style.

Any thoughts appreciated. I can create a screenshot if it's not clear.

Posts: 6

Participants: 3

Read full topic


Discourse for business environment and closed source projects

$
0
0

@terraboss wrote:

Hi,
I'm looking for some ways to improve my workflows for working with new team members and 3rd parties inside Discourse. What are you thinking about the following features?

  1. Require Agreement
    All users and guests will be required to accept an agreement before accessing the specific Workspace (category, topic, conversations, user group). Templates could be saved at the admin area.

  2. Enable Document Watermarks
    Automatically add a watermark to all documents containing the user’s email address, the current date and the word “Confidential”.

  3. Automatically delete files after...
    One step further as just closing a topic. And I would prefer permanently deletion insted of just marking content as deleted.

  4. Enable Data Room mode
    Data Room mode prevents Workspace / category users from seeing each other and disables collaborative features including comments, dashboard and notifications, if needed. We also use multiple cloud and our own storage mangement but sometimes I wish, we could share files more centraly at Discourse.

These are just some thoughts about security improvements for internal business use cases. I'm glad to hear about all of your opinions. :slightly_smiling:

Posts: 1

Participants: 1

Read full topic

Couple of Questions

$
0
0

@mikechristopher wrote:

Hi All,
Just have a couple of questions please

  1. Is it possible to have a category where as a user can post a topic but them and admins are the only ones that can see it?

  2. Is it possible to have a sub-category prefilled with certain topics when it is created (We set up a large number of groups of which all have the same initial posts)

  3. We create a group of which has access to a particular sub category and then have to add a set number of users to this group. Is there any quicker way of setting this up or making it partially / fully automated?

Thanks,
Mike

Posts: 6

Participants: 3

Read full topic

Disallow anonymous users from viewing image & file URLs

$
0
0

@erlend_sh wrote:

This came up in an internal discussion. Putting it up here so we can track it.

Discourse image URLs on a invitation-only forum are still publicly viewable. Although these URLs are technically unguessable, e.g.

/uploads/default/original/2X/4/4150d682b0472888f0014f67f8c09852008067d4.jpg

... some internal communities deal in such sensitive information that outright disallowing any viewing of these images would be preferable. We do already have a setting for prevent anons from downloading files, so the suggestion is to have something similar, but as a global flag for all images & other uploads.

Posts: 7

Participants: 6

Read full topic

Faster rebuilds?

$
0
0

@iamntz wrote:

Hey guys, I wonder if there is a way to run ./launcher rebuild app a bit faster. Right now it takes 6-9 minutes to do the whole stuff and i'd like to skip some stuff that looks a bit useless:

These three commands takes a lot of time (about 20-30-60 sec each)

  • cd /var/www/discourse && chown -R discourse /var/www/discourse
  • cd /var/www/discourse && su discourse -c 'bundle install --deployment --verbose --without test --without development'
  • cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'

Compiling assets for each locale is also take about a minute, uglifying js is also takes some time.

Aaaaanyhooow, I was hoping there is a way of semi-rebuilding (?!) the app a bit faster than that. I understand the need of running all of these when you're installing an update or a new plugin, but sometimes I only need a very quick „restart” for more... special cases:

  • update of a SSL cert
  • the other day i tried to make it play nice with other sites (following this article) and i had to rebuild couple of times.

PS: time ./launcher rebuild app --skip-prereqs is giving only negligible improvements:

real    5m27.461s
user    0m1.027s
sys     0m0.652s

Thanks!

Posts: 2

Participants: 2

Read full topic

Editing custom fields

$
0
0

@daniel.cuthbert wrote:

hello

is it possible to edit custom fields from admin accounts? we have a field for members membership numbers and i'm not able to see any way to edit this once they've added it, which makes it hard when they've made typos.

Posts: 2

Participants: 2

Read full topic

Downgrade Discourse

$
0
0

@stevenpslade wrote:

I recently upgraded from v1.4 to tests-passed. Many things broke as expected and I do not have the time yet to make the proper fixes. I wanted to downgrade my Discourse so I went to app.yml and changed tests-passed to the version I had been working on and rebuilt, but got this error during rebuild:

FAILED
--------------------
RuntimeError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 22877 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}

Posts: 4

Participants: 2

Read full topic

Comments not being embedded in wordpress plugin

$
0
0

@Alankrit_Choudh wrote:

First of all thanks for this awesome plugin.
Currently i have set my wp-discourse permission as follows

+

Still not being able to get the discourse comments embeded on the blog.

Posts: 8

Participants: 3

Read full topic


A tour of how the Widget (Virtual DOM) code in Discourse works

$
0
0

@eviltrout wrote:

The latest builds of Discourse are much faster at rendering topics thanks to our re-written post stream. I've written up our new plugin API but so far haven't explained how the code all fits together. The purpose of this topic is to allow Discourse developers to understand how the new code works.

What's a Virtual DOM?

A Virtual DOM is a data structure that enables browsers to re-render dynamic content very quickly. The technique was pioneered by React but has since been integrated into many other frameworks.

The basic idea is that updating the HTML content of a browser is slow, so it's much faster to update a data structure in memory, then figure out what changed (knowng as diffing), so you can instruct the browser to only update exactly what changed.

Discourse uses the virtual-dom library to perform all the hard work. However, that library is a bit too low level, so it's been abstracted in Discourse by a series of classes called Widgets.

Anatomy of a Widget

A Widget is a class with a function called html() that produces the virtual dom necessary to render itself. Here's an example of a simple Widget:

import { createWidget } from 'discourse/widgets/widget';

createWidget('my-widget', {
  tagName: 'div.hello',

  html() {
    return "hello world";
  }
});

The above code registers a widget called my-widget, which will be rendered in the browser as <div class='hello'>hello world</div>. It can be rendered in any of our Handlebars templates using the mount-widget helper:

{{mount-widget widget="my-widget"}}

If you wanted to return more HTML, you can include the h helper and use it to emit more formatting:

import { createWidget } from 'discourse/widgets/widget';
import { h } from 'virtual-dom';

createWidget('my-widget', {
  tagName: 'div.hello',

  html() {
    return h('span.greeting', h('b', "hello world"));
  }
});

The above would render:

<div class="hello"><span class="greeting"><b>hello world</b></span></div>

Rendering Attributes

So far our widget is 100% static, and in reality Discourse's code is quite dynamic. When a widget is rendered, it is passed a series of attributes. In our post stream, for example, these attributes are a plain Javascript object with the attributes of a post.

Aside: you might wonder why we don't render from our Post Ember object itself. This is done for performance reasons. In Ember, calling get on a property has overhead that, while small, adds up when you are rendering as fast as possible. In our old code we would be calling get repeatedly, frequently on the same property rather than caching it locally. In the new code, we transform a Post ember model into a plain javascript object that we don't have to call get on to retrieve attributes.

(I should add that this is one of the uglier aspects of the new post stream code, and I'm not 100% sure we need to do it. It may change.)

You can pass attributes to be rendered by a widget using the args property. Let's say you had a user object with {name: 'Robin'} in your template. You can pass it to be rendered in the widget like so:

{{mount-widget widget="display-name" args=user}}

Then your widget would be passed the user object as the first argument to html():

import { createWidget } from 'discourse/widgets/widget';
import { h } from 'virtual-dom';

createWidget('display-name', {
  tagName: 'div.name',

  html(attrs) {
    return h('b', attrs.name);
  }
});

The final HTML would be:

<div class="name"><b>Robin</b></div>

Widgets can also render other widgets. Use attach to render a widget in an html method:

html(attrs) {
  return this.attach('another-widget', attrs);
}

It's widgets all the way down!

State and Actions

Widgets can also contain state. You can think of state as data that you want to keep around the next time your widget is rendered. (For example, if you wanted to remember if a post is collapsed or expanded, it would make sense to store that state on the widget itself, and not the the post itself.)

To add state to your widget, create a defaultState method that returns an object that will represent its default state the first time the widget is rendered.

Your state is basically useless without a form of user interaction, so let's also implement a click() function. click is called whenever the user clicks on your widget. Let's look at it together:

import { createWidget } from 'discourse/widgets/widget';

createWidget('increment-button', {
  tagName: 'button',

  defaultState() {
    return { clicks: 0 };
  },

  html(attrs, state) {
    return `Click me! ${state.clicks} clicks`;
  },

  click() {
    this.state.clicks++;
  }
});

The above code will render a button that, when clicked, will increment a counter.

Widgets can also send actions up. This means that you can call any pre-existing Discourse action. Simply pass it into the widget the same way you would for an Ember component:

{{mount-widget widget="my-widget" deleteThing="deleteThing"}}

Then in your click handler you can call sendWidgetAction to call it:

click() {
  this.sendWidgetAction('deleteThing');
}

Bindings and Rerendering Content

If you've been working with Ember for a while, you might be wondering how the widgets know when they need to be rerendered since they aren't using Ember's bindings or observers system. In fact, this is one of the big trade offs widgets make: in Ember's view rendering this is handled transparently for you, but with Widgets we assume the widget only needs to be re-rendered when you interact with them.

Widgets are rerendered when:

  • A user clicks on them

  • After any actions are triggered

  • If an action returns a promise, after that promise has resolved

The above cases count for the vast majority of the times when Discourse needs to rerender a widget. However, if you have an edge case, a widget can rerender itself by calling this.queueRerender().

Render calls are coalesced on the Ember Run Loop, so don't be afraid to call this.queueRerender() multiple times in the same event loop -- the widget will only render one time for all the changes you've queued.

Where to go from here

If all of the above makes sense, you are probably ready to jump into the codebase! In Discourse, all Widgets used to render the post stream are in the widgets folder.

There are also quite a few tests that are worth looking through to get an idea of how different parts of the application were implemented as well as how they can be tested.

Of course, I'm also around here on meta for questions, so feel free to ask if something doesn't make sense. I probably missed something!

Posts: 1

Participants: 1

Read full topic

Discourse Sitemap Plugin

$
0
0

@RGJ wrote:

Ok, our Sitemap plugin is finished.

There has been some discussion over the need of a sitemap, and I think Discourse doesn't really need one, although I do believe that a forum might be indexed a bit faster with one.

Anyway, we created this plugin because of a customer that needed a sitemap for Google News, and this trick didn't work because they were using Amazon S3 to store their uploads (which broke the same domain requirement)

Your can find our plugin at https://github.com/discoursehosting/discourse-sitemap

Just enable it using the site setting in the Plugins menu, and you will get

  • /sitemap.xml
  • /newssitemap.xml
  • A Sitemap line in robots.txt

Ideas for improvements:

Let me know if you have any issues or ideas!

Posts: 1

Participants: 1

Read full topic

Is there a way to see hourly post data?

$
0
0

@Tang wrote:

Hi Discourse!

I'd like to see which hours are most popular for people posting to our community, is there something in Admin to see this? I can see total posts per day in the current dashboard.

Thanks

Posts: 1

Participants: 1

Read full topic

Top right buttons stopped working?

Move optional "Name" to the bottom of the signup form

$
0
0

@gerhard wrote:

Is there any particular reason for the current order of the input fields on the signup form?

Can we move the optional "Name" to the last position?
I think it's quite unusual that "Username" is followed by an optional field instead of "Password".

Out of habit I'm always entering the password in the "Name" field. Am I the only one who's making that mistake again and again?

Posts: 7

Participants: 3

Read full topic

Viewing all 60721 articles
Browse latest View live




Latest Images