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

Single letter italics in composer

0
0

@JagWaugh wrote:

Putting a single letter within a word in italics doesn’t work (at least not in preview). Bold does.

Example:

Exa_m_ple

Example

I’m not sure if this is a problem in markdown itself, or specific to Discourse.

Posts: 4

Participants: 3

Read full topic


Discourse think it is still updating but its not

Forum shows "Try Again" message

Change username through API?

0
0

@Raphael_Haase_NL wrote:

I would like to automatically change usernames through the API so they match the email address.
Our community has the policy that the username must be firstname.infix.lastname for a user with the email address firstname.infix.lastname@company.com.
So far I have been changing people’s usernames shortly after registration if they did not match the rule manually through the admin interface and would like to automate that through the API or similar.
I did not find the call in the Discourse API docs - is it hidden somewhere how to rename a user?
Is there an alternate way, i.e. could I somehow enforce that rule already at signup time?

Posts: 1

Participants: 1

Read full topic

Assign Nickname to slot, possible?

0
0

@Madin wrote:

Hi.

Im searching for solution for my problem. I Have forum on Discourse for my “Arma 3” game clan, and we have system for reserving game slot.

Is it possible for do it automatically? Something like click on
"Soldier 1 - "
And then changes to
“Soldier 1 - Nickname”
or similar?

Beacuse right now i have to manually assign every one by editing.

I tried to do it with poll system, but it was clunky and not very intuitive.

Thanks for help!

Posts: 2

Participants: 2

Read full topic

[discourse-saml] Generated metadata has lost

0
0

@jonathon wrote:

Somewhere in the recent flurry of updates (Comparing 975adc6...master · discourse/discourse-saml · GitHub) the metadata generation (/auth/saml/metadata) has changed and it’s no longer producing the <md:KeyDescriptor use="encryption"> attribute. I assume this is due to a change in the ruby-saml gem version.

It would be very useful to have this back. :wink:

(I would have reported this on the GitHub page but the Issue Tracker isn’t enabled.)

Posts: 1

Participants: 1

Read full topic

[discourse-saml] Generated metadata EntityDescriptor ID is not consistent

0
0

@jonathon wrote:

The ID attribute in the generated metadata is not consistent and changes on a page reload. I’ve been told that any metadata installed on an IdP needs to be updated if the ID changes, so that would mean any IdP which refers to the metadata URL (/auth/saml/metadata) may break authentication?

<md:EntityDescriptor ID='_2196727b-a2a5-4e0c-8a3f-a307babd24ad' entityID='https://discourse.example.com' xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata' xmlns:saml='urn:oasis:names:tc:SAML:2.0:assertion'>

I’m not sure if this is correct but it might make sense that the ID attribute remains consistent, e.g. generated from a hash on the entityID.

(I would have reported this on the GitHub page but the Issue Tracker isn’t enabled)

Posts: 1

Participants: 1

Read full topic

404 when loading more messages for a user with period in username


Help, do not send the email

0
0

@Mecanicos_Argentinos wrote:

Hello friends, good day.

First I want to clarify that I do not speak or write English. I speak and write Spanish. That’s why I’m using the google translator. Know apologize.

My experience is with shared hosting, use of emails with Gmail, that is, I have no experience in the use of this type of systems.

My problem is that I can not install the system. It is impossible to send the activation email.

I detail the steps and actions that I have carried out:

1 - I contracted the Digital Ocean service with the Discourse application installed.
2 - Active domain.
3 - Mailgun configuration. Creating subdomains to handle email.

Now I will try to explain step by step what I did:

1 - I get a Doplet in digitalocean with Ubuntu and discourse pre installed.

2 - The domain is configured with their respective dns provided by digitalocean.

3 - In mailgun I made the creation of the domain and two subdomains. In the Discourse installation I only use a single subdomain.

4 - Mailgun configuration was done with the dns in digitalocean.

5 - Each subdomain and domain is correctly active, according to mailgun.

6 - According to the guide on github and the discourse installation:

* Hostname for your Discourse? [discourse.example.com]:
      * ---- At this point can you place the root domain?
 * Email address for admin account (s)? [me @ example.com, you @ example.com]:
       * ----- In this section I put my email address, in this case gmail.
  • SMTP server address? [smtp.example.com]:
    SMTP port? [587]:
    SMTP user name? [user@example.com]:
    SMTP password? [pa $$ word]:
    Let’s Encrypt account email? (ENTER to skip) [me@example.com]:

  • ------ In these steps go the data provided by mailgun.

This is the true one:

DISCOURSE_HOSTNAME: ‘discourse.mecanicosargentinos.com

DISCOURSE_DEVELOPER_EMAILS: ‘xxxxxxxxx@gmail.com’

DISCOURSE_SMTP_ADDRESS: smtp.mailgun.org # required
DISCOURSE_SMTP_PORT: 587 # (optional, default 587)
DISCOURSE_SMTP_USER_NAME: postmaster@discourse.mecanicosargentinos.com # required
DISCOURSE_SMTP_PASSWORD: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # required, WARNING the char ‘#’ in pw can cause problems!
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

Below is a subdomain log, keep in mind that the attempts are from Outlook.

7 - Following this guide:

If I write this command

telnet smtp.mailgun.org 587

I get this result:

Captura2

There’s something I’m doing wrong. Can you help me? Thank you so much!!!

Posts: 13

Participants: 5

Read full topic

Centering an google maps iframe

0
0

@Timothy_Vail wrote:

Hello, simple question. How do you center a google maps iframe? I tried align=center / middle, I’ve tried div align center etc. There must be an easy answer.

Posts: 1

Participants: 1

Read full topic

What words do you auto-link?

0
0

@McBlu wrote:

Continuing the discussion from

May I ask people using this theme what sort of words do they tend to like to auto link?

Posts: 2

Participants: 2

Read full topic

Query of replies made by staff includes actions like opening and closing threads

0
0

@jerdog wrote:

I am building queries for my community to be able to fulfill some metrics, and what I am seeing is something I can’t seem to get around. The following query essentially just pulls back all posts made by staff members during a time period, but also includes activities like opening/closing a topic, etc.

-- [params]
-- string :start = 2018-03-04 00:00:00
-- string :end = 2018-03-10 23:59:59.999999

SELECT p.user_id, count(p.id) as Replies
    FROM posts p
    WHERE p.created_at between :start and :end AND
        p.user_id IN 
        (select u.id 
            from users u
            where u.primary_group_id = 41) AND
        p.user_id not in ('-1', '-2') AND
        p.topic_id not in ('4','24','26','32','33','34','35','36','37','38','39','40')
GROUP BY p.user_id
ORDER BY Replies DESC

I see a post_action_types table but it has things like Likes, Bookmarks, etc… I am trying to get to where I am displaying actual replies by my staff and not just things like “likes” and such

Posts: 3

Participants: 2

Read full topic

After upgrade, unable to load categories.json with error

0
0

@Magnetidog wrote:

We upgraded to the latest Discourse build; no major plugin installed, other than the fact we have a subdirectory install.

The error I am seeing in the logs is the following:

failed to handle exception in exception app middleware : PG::UndefinedColumn: ERROR: column categories.suppress_from_homepage does not exist

Is there some known issue?

(Edited this as before I thought it was a subdir error)

Posts: 5

Participants: 3

Read full topic

Site went down after taking backup

0
0

@Gulshan_Kumar wrote:

Hello,

I took backup, now my site down. What may be possible reason?

Cloudflare said - Connection timed out. So, I disabled Cloudflare.

Now, Browser says - This site can’t be reached

Thanks & Regards,
Gulshan

Posts: 13

Participants: 3

Read full topic

Account suspended flash message not shown for Facebook login

0
0

@Simon_Cossar wrote:

I’ve tested this on try.discourse.org by creating a user with Facebook login, then suspending the user, then trying to login through Facebook. Login is unsuccessful, but there is no notice shown to the user to indicate why. I would expect the login.suspended_with_reason message to be shown.

From another report that I have seen, it seems that a similar issue is affecting SAML login for suspended users. I think this is a recent regression.

Posts: 1

Participants: 1

Read full topic


Post title is going on 2 lines after the update

0
0

@Jay91 wrote:

Hello friends,

i notice that the post tittle is going on 2 lines after the update although still there is a space but as i said is going on 2 line, see the picture below:
2lines

see the space in red but the tittle is not using it, instead is going on another line.

Posts: 1

Participants: 1

Read full topic

Native audio player

Automate invitation system

0
0

@outofthebox wrote:

Hi,

Our organization regularly hosts conferences that people can purchase to watch via livestream.

We plan to have anyone who buys a livestream to access their video content within our Discourse community.

We will take the email address we receive from their purchase and send them an invite to join our Discourse community. That invitation will add them to a Group (“LivestreamGroup”) that has access to the Category where the video content lives (“LivestreamConference”).

Has anyone done something similar? Are there any suggestions for a way this process could be automated? I welcome any other perspectives and suggestions on how to improve this workflow. The main challenge will be sustaining the manual work to go into our registration system, download the email addresses, customize the Excel file, and use the bulk invite tool on a daily basis.

In advance, thank you!

Posts: 10

Participants: 6

Read full topic

Changes introduced in postgresql 9.5.12 and 10.3 cause backup-related failures

0
0

@supermathie wrote:

Today I’ve been investigating issues related to the new “Avoid use of insecure search_path settings in pg_dump and other client programs” behaviour introduced into postgresql 9.5.12 and postgresql 10.3.

There’s a couple items that impact Discourse users:

  • backups taken using pg_dump of 9.5.12+ or 10.3+ are unable to be restored

    • this is due to the public schema now being explicitly referenced inside the restore script
      Discourse currently does a restore into the restore schema then switches that to the public schema - this now breaks
  • pg_dump pointed at pgbouncer can cause a full or partial site outage

    • an unintended side effect occurs that results in a null schema search_path being applied to anyone sharing the actual connection
    • this will cause the site to go down as the app servers can no longer implicitly see the public schema (i.e. all the data) until the connection is recycled

Posts: 4

Participants: 3

Read full topic

How to add settings to your Discourse theme

0
0

@Osama wrote:

Discourse now has the ability for themes to have “settings” that can be added by theme developers to allow site owners to customize themes through UI without having to change any line of code and worry about losing their changes with future updates for the theme.

Table of Content

  1. Adding settings to your theme
  2. Supported types
  3. Setting description and localization
  4. Min and max attributes
  5. Access to settings in your JS and CSS code

1) Adding settings to your theme

If you’re on Discourse version 2.0.0 beta 4 or higher, you’ll see there is a new “Settings” tab where you’ll be using the YAML language to define your theme settings. (if you don’t see the setting tab, make sure you’re not trying to edit an imported/remote theme).

image

Now if you’re familiar with plugin development, this shouldn’t be a new thing to you - it mostly works the same way as adding site settings to your plugin. Just dump some valid YAML under the settings tab and you’ll be good to go.

A valid theme setting must have a name and default value, that’s the bare minimum and it looks like this:

simple_setting: true

As you can probably tell, that will create a setting with the name simple_setting and it’ll have true as its default value.

Similarly, you can add something like this:

site_name: My Forums
max_avatars: 7

And you’ll have two more settings, site_name which will be a string setting with “My Forums” as the default value, and max_avatars as an integer setting with default value of 7.

So until this point we’ve covered the simplest way to define settings. In the next section we’ll dive a bit deeper into the various types of settings and how you can use them.

2) Supported types

There are 6 types of settings:

  1. integer
  2. float
  3. string
  4. bool (for boolean)
  5. list
  6. enum

And you can specify type by adding a type attribute to your setting like this:

float_setting:
  type: float
  default: 3.14

I should say that you don’t always have to explicitly set a type attribute because Discourse is smart enough to work out the setting type from the setting’s default value. So you can reduce the above example to this:

float_setting:
  default: 3.14

That said, you need to set a type attribute when working with list and enum settings, otherwise Discourse will not recognize them correctly.

Example of list and enum settings:

whitelisted_fruits:
  default: apples|oranges
  type: list

favorite_fruit:
  default: orange
  type: enum
  choices:
    - apple
    - banana

image

In case the difference between list and enum settings is not clear to you: enum settings allow your theme users to select only one value from a set of values defined by you (see the choices attribute).

On the other hand, list settings allow your users to create their own list (i.e. an array) of values. They can add to or remove from the setting’s default list of values.
You can set the default list of values for the setting by joining the values with a vertical bar “|” character. See the list setting in the example above.

You can see a real-world use case for list settings here: Linkify words in post, theme component.

Note: pay attention to indentation when working with YAML because YAML is very picky about spaces and will throw a syntax error if your code indentation is incorrect

3) Setting description and localizations

You can add description text to your theme setting and it’ll be shown right under the setting. To do that simply add a description attribute to your setting like so:

whitelisted_fruits:
  default: apples|oranges
  type: list
  description: "This text will be displayed under this setting and it explains what the setting does!"

And you’ll get this:

image

Multiple languages support

If you know more than one language, and you’d like to add support for those languages to your theme, then you can totally do that provided that Discourse supports said languages.

First of all, make sure the language you want to support is in this list:

Languages list
Code Name
ar اللغة العربية
bs_BA bosanski jezik
ca català
cs čeština
da dansk
de Deutsch
el ελληνικά
en English
es Español
et eesti
fa_IR فارسی
fi suomi
fr Français
gl galego
he עברית
id Indonesian
it Italiano
ja 日本語
ko 한국어
lv latviešu valoda
nb_NO Norsk bokmål
nl Nederlands
pl_PL język polski
pt Português
pt_BR Português (BR)
ro limba română
ru Русский
sk slovenčina
sq Shqip
sr српски језик
sv svenska
te తెలుగు
th ไทย
tr_TR Türkçe
uk українська мова
ur اردو
vi Việt Nam
zh_CN 中文
zh_TW 中文 (TW)

(If you can’t see your language in the list then you might want to take a look at How to add a new language)

Then you’ll need find your language code from the above list and use the language code as a key under the description attribute and translation as a value for the key like so:

whitelisted_fruits:
  default: apples|oranges
  type: list
  description:
    en: English text
    ar: نص باللغة العربية
    fr: Texte français

And now you have support for 3 languages: English, Arabic and French.

4) Min and max attributes

Sometimes you may need to specify limits that a setting value can’t exceed to prevent your users from accidentally breaking the theme or possibly the whole site.

To specify limits, simply add a min or max or both attributes to your setting like so:

integer_setting:
  default: 10
  min: 5
  max: 100

You can specify limits to integer, float and string settings. For integer and float settings, the value of the setting itself is checked against the limits. And for string settings, the length of the value is checked against the specified limits.

If your user tries to enter a value that’s not within the allowed range, they’ll see an error telling them what the min and max values are.

5) Access to settings in your JS and CSS code

To have access to setting in your theme JS code, the script tag that wraps your code must have a type="text/discourse-plugin" attribute as well as version specified like so:

<script type="text/discourse-plugin" version="0.8.13">
  alert(settings.integer_setting + 1);
  console.log(settings.string_setting);
</script>

In CSS, you’ll get a variable created for every setting of your theme and each variable will have the same name as the setting it represents.

So if you had a float setting called global_font_size and a string setting called site_background, you could do something like this in your theme CSS:

html {
  font-size: #{$global-font-size}px;
  background: $site-background;
}

If you have a question about this or there is something unclear, feel free to ask - I’ll try to answer/clarify as much as I can. Also this is a wiki post, so contributions to improve this are greatly appreciated! :sunflower:

Posts: 8

Participants: 3

Read full topic

Viewing all 60279 articles
Browse latest View live




Latest Images