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

Custom 'people emoji' since last update


How to create helper?

$
0
0

@sevenmaxis wrote:

I want to create eq helper. It already exists in ember-truth-helpers addon, but I need only eq so I decided create it by myself in my plugin.
I've created file assets/javascripts/discourse/helpers/eq.js.es6 with such content:

import { registerHelper } from 'discourse/lib/helpers';

registerHelper('eq', function(params) {
  return params[0] === params[1];
});

and use it in template in this way:

{{#if (eq param1 param2)}} <h1>hello</h1> {{/if}}

But eq is not defined.

What is the right way to create helper?

Posts: 1

Participants: 1

Read full topic

Stand alone signup form/link?

$
0
0

@Karthik wrote:

Hey Guys,

Is there a feature available or in development that would enable me to embed a sign up form or a sign up direct link from an external source? Say, a blog/website inviting people to join the community?

Posts: 4

Participants: 3

Read full topic

Reply via email breaks with plus addressing as Discourse email

$
0
0

@jomaxro wrote:

Not sure if this is #bug, #feature, or #support - please recategorize as needed.

Just got a report from a user at Stonehearth that he is unable to reply to emails received from Discourse. When attempting to do so, he receives the following email in response:

We're sorry, but your email message to ["stonehearth+f870fd2aed1be08accc32bf6e670eaa1@discoursemail.com"] (titled Re: [Stonehearth Discourse] [Modding] Way to not break compatibility with Mods?) didn't work.

Your reply was sent from a different email address than the one we expected, so we're not sure if this is the same person. Try sending from another email address, or contact a staff member.

The email he uses on the site is in the form foo+bar@gmail.com. He thinks the issue is that when he tries to reply from Gmail, he is sending as foo@gmail.com, with no way to send with the plus address.

Is this what is going in, or is there something else. I asked an admin to review the email logs, and she said there is nothing for this user. I'm happy to provide more details (username, email, etc.) via PM to devs if needed.

Posts: 6

Participants: 4

Read full topic

Creating Groups/categories automatically

$
0
0

@mikechristopher wrote:

I would like a plugin of which would do the following and interested to know if or how much it would cost to develop it and see if it's viable for us to be able to raise the money.

In short -
- Create group with a name from a list
- Create private sub category with only the group created above having access to it.
- Add people into group
- post a few standard topics into the category

It would also be good to have configurable amount of groups and number of people in it. For example if I had a list of 70 people - I could set it to create 10 groups/categories and split those 70 into groups of 7 across the 10 groups.

Use case: we have private weightless groups which last for 30 days with 7 guys in each group. Creating constant turnover. Would be good to have an automated solution rather than the manual process we have at the moment. I know that most of it if not all could be done via api but don't know where to start with putting it all together.

Thanks
Mike

Posts: 6

Participants: 2

Read full topic

Can't view user cards on Meta - cakeday error

$
0
0

@watchmanmonitor wrote:

When I go to view a user card today, I get just a white box, and this error in my google chrome browser:

Uncaught Error: Could not find module discourse/helpers/fa-icon imported from discourse/plugins/discourse-cakeday/discourse/components/emoji-images

I tried first on a user with a cake and got just the white box, then got the error again on a user without a cake.

Posts: 1

Participants: 1

Read full topic

Viewing a private category while logged out should prompt for login

$
0
0

@watchmanmonitor wrote:

As it stands, if I send a user a link to a topic in a category which cannot be seen without group membership, they are prompted to login. Upon doing so, they can see the content. It's great!

If I send the same user a link to the category itself, they are denied entrance with

Oops! That page doesn’t exist or is private.

Is it possible to have the link to a category prompt for login as well?

Posts: 1

Participants: 1

Read full topic

Discourse mailing list mode outgoing e-mails drop line breaks in text/html

$
0
0

@RChesley wrote:

Using latest version of Discourse, issue happened on previous version too.

Topics appear normally in some e-mail clients while others show text/html content that does not show the line breaks. One example is Yahoo Mail. It displays text/html content with no line breaks visible (versus what is displayed in the forum and in the text/plain content of the raw message.

I was able to see that the messages Discourse sends out are multipart/alternative and include:

text/plain -- shows blank lines between paragraphs
text/html -- no blank lines between paragraphs

It would be nice if the text/html version faithfully reproduced the blank line spacing as this improves readability and users do not like it when their content is modified.

Sample as it would appear in the e-mail Discourse sends out:

text/plain:
This is a line of text.

There is one blank line immediately above this line.

text/html:
<p style="margin-top:0; border: 0;">This This is a line of text.</p>

<p style="margin-top:0; border: 0;">There is one blank line immediately above this line.</p>

The result displayed by Yahoo Webmail is based on the text/html and shows:
This is a line of text.
There is one blank line immediately above this line.

Posts: 1

Participants: 1

Read full topic


New user ranking and posting restriction

$
0
0

@charleswalter wrote:

We have been torn about whether new users should be able to post or not without requiring moderation. Right now all users are set at level 0.

In certain categories, we dont see problematic posts. Its primarily a few controversial categories, or users who have other names associated with their IP, who try to agitate the community.

Just wondering if there could be ways to change the min user level for new topic by category. And/or be able to set a different user level (level 1) if no other previous accounts can be found for the newly registered user (based on ip or browser cookie)

Posts: 1

Participants: 1

Read full topic

Can I access template variables in the customize section?

$
0
0

@deltaskelta wrote:

Is it possible to access template variables in the customize section to do something like display a username? or is the template customization done after rendering?

Posts: 1

Participants: 1

Read full topic

Can I change the user locale through the API or sync_sso

$
0
0

@deltaskelta wrote:

Unofrtunately, I don't know enough ruby to add a PR myself and I have been looking through the api code to see if I could find anything.

I need to be able to change the user locale based on the locale in my main site. so as far as I can see this is the process that needs to happen.

User changes locale on the main site:

option 1: Send an API request (if the API is capable) to change the user in discourse. I don't think the API can do that but I might be mistaken.

option 2: Run an sso_sync and send the data to the discourse, but unfortunately I do not know the whole user data structure and I don't know how discourse interprets what it receives. I have tried adding "locale": "en" to my payload that gets urlencoded in python but that does not work.

Any ideas on how to do this?

on a side note

Shouldn't there be an api endpoint that would let admins change whatever they want in the users from the API? basically be able to GET and see the whole user data structure and then PUT or DELETE to modify it? I wish I could code this up myself and submit a PR but it will be a while before I can learn enough ruby in practice to make it happen

Posts: 5

Participants: 2

Read full topic

Is it safe to raise max post length?

$
0
0

@bek wrote:

Hey!

I'm gonna raise my max post length from 32000 to 65000. Is it safe? I'm asking because I experienced in some forum softwares that when we change max post lenght from forum settings, sometimes database become corruptted (i.e post text overgrow text area in db) . Is there any known problem about this?

Posts: 3

Participants: 3

Read full topic

Need help regarding login API discourse

$
0
0

@ErHarinderSingh wrote:

Can anyone tell me how I can use Login rest api for discourse?

How I can authenticate without API_KEY?

Means user will login using username and password parameters. Please help anyone?

I have found this one : - curl http://localhost:3000/c/test/sub-test.json?api_key=test_d7fd0429940&api_username=test_user

What is the purpose of username and password?

I need it really like this , User will login by entering username and password and get something like token or api_key.

Help Anyone please.

Posts: 5

Participants: 2

Read full topic

Personal Profile - Any way to disable URL option?

$
0
0

@BCHK wrote:

Is there any way to easily turn off the option for users to enter a URL in their personal profile. Its causing problems in our forum both due to people accidentally revealing their real names Iwe're a healthcare blog and its not good to reveal your real name with a health condition) and also from a spam standpoint.

Posts: 2

Participants: 2

Read full topic

Change Name Field as Admin

$
0
0

@Cdoug wrote:

I wanted to check if there is a way as an admin to change the full name field (name) of a user.

Thanks for the help! Love the software!! Best forum software I have seen.

Thanks,
CDoug

Posts: 4

Participants: 2

Read full topic


Waiting for available socket while loading JS scripts

$
0
0

@meglio wrote:

People report that sometimes our form won't load - after a few minutes, a white screen will show and that's it.

When looking at the "Network" tab in Google Chrome, I noticed that many JS scripts won't load. When trying to open any of them in a separate tab, e.g. this, it won't open, and the status bar says "Waiting for available socket...".

Does it mean my DigitalOcean server can't stand the load?
The instance I use is 2GB RAM / 40GB disk.

Posts: 1

Participants: 1

Read full topic

Custom header from remote site

$
0
0

@deltaskelta wrote:

I have a custom header on my remote django site that renders some information so I decided to make a view for it and use an ajax request to load it into my discourse header when the page loads and it renders everything I need...

It worked beautifully except that since the request is coming from discourse and not the browser os the user, it is not showing that I am logged in in my custom header. (I am using sso, working fine, discourse avatar showing, and logged in, only my custom header links are showing as if I am not logged in on my main site)

How could I fix this? Is there a way I can make the ajax request come from the browser so it would be the actual request user and my site would show them as logged in?

or should I go a different route and send some of the user info along with the request to authenticate them?

for an example here is the jquery that gets the header menu:

<script>

    $(document).ready(function() {
        $.get( "https://my-domain.com/discourse/get-menu", function( data ) {
            $("#LLmenu").html( data );
        });
    })
</script>

Posts: 3

Participants: 1

Read full topic

Embed comments : TypeError: Attempting to register an unknown factory: `site-settings:main`

$
0
0

@Chopper wrote:

I try to embed comments into an external website but i always get this error :

And in the log i get this two errors :

Uncaught TypeError: Attempting to register an unknown factory: `site-settings:main`
Url:     https://forum.teambac.fr/assets/ember_jquery94d39baf2b7a346571d3472782c3994e23b7cf8c4e2c645075bc11f7a82cdccf.js
Line: 4
Column: 5819
Window Location: https://forum.teambac.fr/embed/comments?embed_url=https%3A%2F%2Fwww.teambac.fr%2Fevent%2F518

I can see in the log Job exception: 404 Not Found

And backtrace log :

/usr/local/lib/ruby/2.3.0/open-uri.rb:359:in `open_http'
/usr/local/lib/ruby/2.3.0/open-uri.rb:737:in `buffer_open'
/usr/local/lib/ruby/2.3.0/open-uri.rb:212:in `block in open_loop'
/usr/local/lib/ruby/2.3.0/open-uri.rb:210:in `catch'
/usr/local/lib/ruby/2.3.0/open-uri.rb:210:in `open_loop'
/usr/local/lib/ruby/2.3.0/open-uri.rb:151:in `open_uri'
/var/www/discourse/lib/freedom_patches/open_uri_redirections.rb:70:in `open_uri'
/usr/local/lib/ruby/2.3.0/open-uri.rb:717:in `open'
/usr/local/lib/ruby/2.3.0/open-uri.rb:35:in `open'
/var/www/discourse/app/models/topic_embed.rb:84:in `find_remote'
/var/www/discourse/app/models/topic_embed.rb:138:in `import_remote'
/var/www/discourse/lib/topic_retriever.rb:56:in `fetch_http'
/var/www/discourse/lib/topic_retriever.rb:43:in `perform_retrieve'
/var/www/discourse/lib/topic_retriever.rb:10:in `retrieve'
/var/www/discourse/app/jobs/regular/retrieve_topic.rb:16:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'

And the env log :

hostname	vps-app
process_id	[94, 93]
application_version	[fa6b10cf3ce84d21861a50519f5d5ffa7201bcc4, 999f52954f698841cd02f012557d101783143efa]
current_db	default
current_hostname	forum.teambac.fr
job	Jobs::RetrieveTopic
problem_db	default
opts	null
user_id	[2, 329]
embed_url	[https://www.teambac.fr/event/518, https://www.teambac.fr/event/486]
referer	[https://www.teambac.fr/event/518, https://www.teambac.fr/event/486]
current_site_id	default

And this is the code used to embed :

    <div id='discourse-comments'></div>

    <script type="text/javascript">
      DiscourseEmbed = { discourseUrl: 'https://forum.teambac.fr/',
                         discourseEmbedUrl: window.location };

      (function() {
        var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
        d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
      })();
    </script>

Posts: 1

Participants: 1

Read full topic

Any Good Opensource Crowdsourcing Platform?

$
0
0

@xiasummer wrote:

We want to make a task doing platform. You know in discourse, when you post a task, people who answer would be seen by all users, and we cannot pay through discourse. So such platform is not suitable for people to make a good answer by great effort.

Any advice?

Posts: 1

Participants: 1

Read full topic

Really long titles can break the layout

Viewing all 60739 articles
Browse latest View live




Latest Images