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

How to one-time "disable" replacing internal URLs with topic titles?

$
0
0

@Sujan wrote:

Is there a way to post links to internal URLs without them being replaced by the topic title?

For normal “website preview boxes” I can add a space in front of them, but for normal internal links this doesn’t help as the replacement also takes place in the flow of normal text.

Posts: 4

Participants: 2

Read full topic


Category description can create invalid html in summary emails

$
0
0

@dans wrote:

Using a text pattern like some text ' > some more text in a category description generates invalid html in “Since your last visit” summary emails. It closes the HTML title tag and the text that is supposed to be displayed in the title tag is rendered as text in the email.
To not use .html_safe in lib/category_badge line 77 seems to fix it. This works:
description = category.description_text ? "title='#{category.description_text}'" : ''

Posts: 1

Participants: 1

Read full topic

Install Discourse development environment on Windows?

$
0
0

@bekircem wrote:

Hi,

I want to move my forum Mybb to Discourse. @pfaffman suggest me install Discourse development environment for the import database. So, i installed VirtualBox, Vagrant and Github Desktop on my Windows machine. (from what I learned this tutorial)

I set up requirements but i don’t know what should i do. Should i install Discourse on the VirtualBox Ubuntu VM first? I have installed Discourse on VPS many times but i can’t install to my local machine. :frowning:

Posts: 4

Participants: 2

Read full topic

A domain that I don't own redirects to my website

$
0
0

@random1 wrote:

Hello

First, I apologize if I’ve posted this in the wrong category.

I accidentally found out that a domain that I do not own forwards to my Discourse website. I installed Discourse over a month ago. I am not sure if that has something to do with the way I installed Discourse.

Any help will be appreciated.

Posts: 6

Participants: 2

Read full topic

Badges disappearing

$
0
0

@pfaffman wrote:

A client is saying that

Sidekiq seems to be OK.

Posts: 3

Participants: 2

Read full topic

Is auto tagging possible?

$
0
0

@EddieOne wrote:

Hi!

Is there a way to link to a forum appending some query string to get a certain tag?

I ask because we have a lot of young users who often ask how to do blank and then they never mention what game it’s for. We have so many second posts that say “which game?”

Thanks in advance :slight_smile:

Posts: 3

Participants: 2

Read full topic

What's the best way to catch the login event in plugin on client side?

$
0
0

@a9udn9u wrote:

My Discourse site is set up as the SSO provider for my WordPress site. Since login / logout on Discourse doesn’t automatically sync to WordPress, I’m writing a Discourse plugin to do that. I found a way to catch the logout event from here: discourse/user.rb at b404a4b97c41953cfd35c51b38068338b918831d · discourse/discourse · GitHub, but the log_in method below doesn’t publish to message bus, is there a way to catch login event at all?

Another question, during /logout event, I can send an AJAX request to logout in WP, but the AJAX request gets canceled because logout causes a page refresh before the request is completed, is there a way to tell discourse to wait for a Promise/Deferred to complete before proceed?

Thanks!

Posts: 2

Participants: 1

Read full topic

Best way to store key-value pairs in plugin settings?

$
0
0

@john-lynch wrote:

I’m working on a very simple plugin to perform simple textual replacements in a Discourse post. Specifically, when a user types /keyword in a post, I want to replace that sequence with an arbitrary string (in this case, a kaomoji, so that I can map /shrug to ¯\_(ツ)_/¯). Yes, it’s very silly.

In any case, the plugin is mostly complete: I can detect the pattern and perform the replacement in my dev environment. However, the mapping from keyword to kaomoji is currently specified as a Javascript literal in the plugin’s discourse-markdown Javascript file. That’s not great.

I’d like to be able to define the mapping of keywords to kaomoji (or whatever) in the plugin’s settings so that I don’t have to modify a server-side Javascript file every time I want to change what mappings are allowed. I cannot find a good way to do this. The closest I’ve come is using a “list” setting (with values like shrug:¯\_(ツ)_/¯, but that gives me back a string of | seperated strings, which is problematic when working with values like kaomoji that are highly likely to contain | in them.

I could hack around this by disallowing | in the mapping and splitting the list myself, but before I do, I thought I’d ask if there were a better way than “list” to do what I’m talking about. Is there any reasonable way to create and edit set of key-value pairs through a plugin’s settings? What’s the best way to approach this for both ease of editing and maximum permissiveness in the allowed characters?

Posts: 3

Participants: 2

Read full topic


URGENT: Upon manually updating Discourse via SSH, forum never restarts, left only with custom inserted markup

$
0
0

@Carl_V_Lewis wrote:

I just went to upgrade Discourse’s image for forum.opensavannah.org – of course, on a critical day in which Discourse cannot be broken–and while I didn’t receive any errors during the process, it’s been 30 min. and the forum still hasn’t rebooted.

All I see is some custom HTML I inserted in the header.

I’ve done this process many times with no problem. Of course, it happens on the worst possible day to happen. I’m very frustrated – has anyone else experienced similar issues with the latest release?

Here are my logs from iTerm:

`I, [2017-08-15T09:13:08.949567 #439] INFO -- : Writing /var/www/discourse/pub - Pastebin.com

Posts: 5

Participants: 3

Read full topic

Discourse is not usable with LibreJS active - Can you add license headers please?

$
0
0

@BugMeNotDotCom wrote:

As Discourse is used also by people that care about free licenses - and as far as I understood Discourse is free GPL2.0
software and only uses free Ruby/JS code it would be nice to not see everything blocked.

The following is the report from GNU LibreJS.

List of blocked JavaScript in https://meta.discourse.org/

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts

      window.EmberENV = window.EmberENV || {};
      window.EmberENV['FORCE_JQUERY'] = true;


Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts
Discourse._registerPluginCode('0.8', function (api) {

    var h = require('virtual-dom').h;
    var ajax = require('discourse/lib/ajax').ajax;

    var themeSelector = require('discourse/lib/theme-selector');

    api.createWidget("theme-selector", {

        click: function (event) {
            var $target = $(event.target);
            var key = $target.data('key');
            var user = undefined;
            if (user = Discourse.__container__.lookup('current-user:main')) {
                ajax('/u/' + user.username + ".json").then(function (r) {
                    themeSelector.setLocalTheme(key, r.user.user_option.theme_key_seq);
                    window.location.reload();
                });

                return false;
            } else {
                themeSelector.setLocalTheme(key, 0);
            }

            window.location.reload();
            return false;
        },

        themeHtml: function () {
            var themes = themeSelector.listThemes(this.sit…

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts

      (function() {
        var ps = require('preload-store').default;
          ps.store("site", {"default_archetype":"regular","notification_types":{"mentioned":1,"replied":2,"quoted":3,"edited":4,"liked":5,"private_message":6,"invited_to_private_message":7,"invitee_accepted":8,"posted":9,"moved_post":10,"linked":11,"granted_badge":12,"invited_to_topic":13,"custom":14,"group_mentioned":15,"group_message_summary":16,"watching_first_post":17,"topic_reminder":18},"post_types":{"regular":1,"moderator_action":2,"small_action":3,"whisper":4},"groups":[{"id":71,"name":"Discoursehosting"},{"id":1,"name":"admins"},{"id":62,"name":"codecademy"},{"id":58,"name":"coinbase"},{"id":55,"name":"envato"},{"id":0,"name":"everyone"},{"id":59,"name":"gaspedal"},{"id":69,"name":"laruchequiditoui"},{"id":49,"name":"mcneel"},{"id":75,"name":"migrators"},{"id":2,"name":"moderators"},{"id":46,"name":"newrelic"},{"id":72,"name":"ninjas"},{"id":76,"name":"pivotal"},{"id":48,"name":"plugin_authors"},{"id":63,"…

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts

  Ember.RSVP.configure('onerror', function(e) {
    // Ignore TransitionAborted exceptions that bubble up
    if (e && e.message === "TransitionAborted") { return; }

    window.onerror(e && e.message, null,null,null,e);
  });

Whitelist

This script is detected as inline, nonfree, defining functions or methods, and the rest of the page as loading external scripts


  (function() {
    var ps = require('preload-store').default;

    Discourse.CDN = 'https://cdn-enterprise.discourse.org/meta';
    Discourse.BaseUrl = 'meta.discourse.org'.replace(/:[\d]*$/,"");
    Discourse.BaseUri = '';
    Discourse.Environment = 'production';
    Discourse.SiteSettings = ps.get('siteSettings');
    Discourse.LetterAvatarVersion = '5_8cef00e6737b3b8d9d169fd97ec1c294';
    Discourse.MarkdownItURL = 'https://cdn-enterprise.discourse.org/meta/assets/markdown-it-bundle-95eab67cdea904c1edf468e5ed93ba3d0ed27da63e4428828e8a566506f74391.js';
    I18n.defaultLocale = 'en';
    Discourse.start();
    Discourse.set('assetVersion','630410e1f94c7298dedd7b1fc7bc33c1');
    Discourse.Session.currentProp("disableCustomCSS", false);
    Discourse.HighlightJSPath = "/highlight-js/meta.discourse.org/9062f6624f188fcca0d8d61479af537c8a70abb5.js";
    Discourse.S3CDN = 'https://meta-s3-cdn.global.ssl.fastly.net';
    Discourse.S3BaseUrl = '//discourse-meta.s3-us-west-1.amazonaws.com…

Whitelist

NONTRIVIAL: an open method similar to xhr.open is used


  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-33736483-2']);


  _gaq.push(['_setCustomVar', 1, 'Anonymous', true, 2]);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

WhitelistThis script is detected as nonfree, external, and as defining functions or methods
https://cdn-enterprise.discourse.org/meta/brotli_asset/preload-store-ec90ffab9d7a6d9e507dda7cf7343e9d50b8bce624f7f44486ac8fd6b9814309.js
Whitelisterror parsing: cd2896c3d74934ba453c45c163312fdaca1a7e54
https://cdn-enterprise.discourse.org/meta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js
WhitelistNONTRIVIAL: eval has been found in code
https://cdn-enterprise.discourse.org/meta/brotli_asset/locales/en-a08b6c43f4c6b0e5eb013af8e6fc990088a3d7d7c617bb2a4be6c40f3b148397.js
WhitelistNONTRIVIAL: eval has been found in code
https://cdn-enterprise.discourse.org/meta/brotli_asset/pretty-text-bundle-af6df9d7f414a6a33522de2bd6d2d517cd14e5b955c062d9f1b92f470977b17b.js
WhitelistNONTRIVIAL: innerHTML identifier
https://cdn-enterprise.discourse.org/meta/brotli_asset/browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js
WhitelistNONTRIVIAL: innerHTML identifier
https://cdn-enterprise.discourse.org/meta/brotli_asset/plugin-7f6112666e33fe786a149151c4d4f117aed46e983d564232c6eec5ce50f72cfd.js
WhitelistThis script is detected as nonfree, external, and as defining functions or methods
https://cdn-enterprise.discourse.org/meta/brotli_asset/plugin-third-party-bb2f0e23762c106247d01585881c8d39ccbbd7e0258bbf20cef6d4ac03012384.js
WhitelistNONTRIVIAL: an open method similar to xhr.open is used
https://cdn-enterprise.discourse.org/meta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js
WhitelistNONTRIVIAL: an open method similar to xhr.open is used
https://cdn-enterprise.discourse.org/meta/brotli_asset/application-60c231b7cea804312ae84d75984fd127c3f0c2aad8948fba67e40dd25ce89209.js

List of accepted JavaScript in httpx://meta.discourse.org/

LibreJS did not allow the execution of any scripts on this page: '
    The inline and on-page JavaScript code may not be free and/or may not have proper license information and external scripts (if present) may have been removed by default.
    External scripts may not be free and/or may not have proper licensing and are not part of the whitelist of free JavaScript libraries.

Is it possible that the JS shipped with Discourse gets the necessary license headers? This would be the first big part in allowing users of LibreJS to better view pages that use Discourse and take part in the discussions.

Thank you very much!

Posts: 2

Participants: 2

Read full topic

What's the easiest way to replace the * .erb file?

$
0
0

@Stranik wrote:

Hello!

for example

discourse/app/views/list/list.erb

I created this file in the plugin: text/app/views/list/list.erb (And I copied the contents of the original file there)
In the file: plugin.rb

Need to specify a connection?

enabled_site_setting :text_enabled
load File.expand_path('../app/views/list/list.erb', __FILE__)

Unfortunately, I did not find how to do it.

Posts: 2

Participants: 2

Read full topic

Is it possible to manually trigger a web hook for post_updated

$
0
0

@marcusleemitchell wrote:

I’m looking to make a change to the raw data for a bunch of my posts in a rake task and then re-cook the result.
When this happens I also want to trigger the webhook for post_updated

What’s the best practice way to achieve this?

Many thanks.

Posts: 1

Participants: 1

Read full topic

Looking for help with single sign on with PHP server

$
0
0

@hjalali wrote:

We have Discourse setup as a subdomain to our website on a separate server and our website is in CodeIgniter / PHP.
I wanted to see if anyone has been able to setup single sign on for such a scenario?

We basically want to turn off login and registration from Discourse and just have it on through the website.

Posts: 2

Participants: 2

Read full topic

Serving large amounts of static HTML using discourse?

$
0
0

@Bas wrote:

Hi,

Currently we have a few thousand pages of documentation in static HTML files. We need a place to store this and render them.
Our initial instinct was to use wordpress and use a mass-import; then link discourse and wordpress using the plugin etc.

But… we kind of had a brainwave… what if we used Discourse to serve these files?

We dump the HTML files in a folder and write a bit of Ruby to fetch the correct <div> from the html file and render it in a Handlebar template.

This would have several advantages:

  • No need for extensive SSO (some documents will only be visible to certain discourse-groups / TLs), we’ll have access to the Discourse users out of the box
  • Consistent look and feel, since we can render the Discourse menu on top etc. A single CSS file can be used.
  • A single URL, keeps everything nice and clean
  • It’s faster than Wordpress
  • one tech stack, just Ember/RoR; no added PHP knowledge required

Some downsides I can foresee:

  • prone to breaking, means we’ll have to properly test our solution with every Discourse release
  • bad for SEO, this is fine, we’re behind a login anyway

I’d love to hear if this is a terribly bad idea :slight_smile: Otherwise I’ll see if I can turn this into a plugin of sorts.

Something like this:

{{plugin-outlet name="above-site-header"}}
{{site-header canSignUp=canSignUp
              showCreateAccount=(route-action "showCreateAccount")
              showLogin=(route-action "showLogin")
              showKeyboard=(route-action "showKeyboardShortcutsHelp")
              toggleMobileView=(route-action "toggleMobileView")
              toggleAnonymous=(route-action "toggleAnonymous")
              logout=(route-action "logout")}}
{{plugin-outlet name="below-site-header"}}

<div id="main-outlet" class="wrap">
  <h1>html goes here</h1>
</div>

{{plugin-outlet name="above-footer" args=(hash showFooter=showFooter)}}
{{#if showFooter}}
  {{custom-html name="footer"}}
{{/if}}
{{plugin-outlet name="below-footer" args=(hash showFooter=showFooter)}}

{{outlet "modal"}}
{{topic-entrance}}
{{outlet "composer"}}

Posts: 4

Participants: 2

Read full topic

Intercom + Discourse


Looking for Production Discourse Instructions

$
0
0

@Dan_Healy wrote:

Hi,
I’m already running the following and need to understand how to configure a Discource container with a production environment:
-Postgres Server
-Nginx (reverse proxy for all sites)
-Redis
-Docker cluster

My intention is to run a Discourse container and scale as needed. However, I need to protect data as done in production.

Posts: 2

Participants: 2

Read full topic

Unable to undo "censoring a word"

$
0
0

@nixie wrote:

Hi,

Now we have a separate “watched words” section in the admin panel from where we can censor certain words and replace it with *****

But I censored a word before this section was implemented.
Now I want to undo my action and unblock those words.
I’m not finding a way to do that.

Please assist.

NOTE:
The first time I censored those words - I think I did it by going to admin -> settings - > (either posting or spam)
But now - I’m not finding that setting there anymore.
(I’m guessing its because of the newly implemented “watched words” section

@team
Please assist. I’m sure this will be of help to a wider audience.

Posts: 5

Participants: 3

Read full topic

Discourse-ldap-auth plugin

Discourse "reseller" type hosting?

$
0
0

@downey wrote:

Hi there. Had an interesting question come up today:

Does the Discourse Team (or anyone else) have any type of arrangements for what was formerly known in the web hosting world as “resellers”?

In other words, let’s say I want to set up & run several “standalone” Discourse sites for my clients. I’d like to be a site-level admin of each one for setup, admin, customization, moderating, etc., but I don’t want to actually run & maintain the servers, upgrades, etc. I’d also like to have centralized invoicing so I can pay for everything directly.

Does anyone offer such a service?

Posts: 2

Participants: 2

Read full topic

How to edit the "About Us" Page?

$
0
0

@nixie wrote:

Hi,

I’d like to edit the “About us” Page.

What I’ve tried:

  1. Searched the meta site using the search feature - I don’t think anyone has asked this question before. I couldn’t find any such question. I’m guessing I’m the first one to ask this.
  2. I’ve checked admin->settings - and couldn’t find anything there either.

Please assist.

Posts: 12

Participants: 3

Read full topic

Viewing all 60690 articles
Browse latest View live




Latest Images