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

Feedback needed regarding Discourse embedded versus Disqus

$
0
0

@Jesus1 wrote:

My community currently runs a Wordpress blog and for a variety of reasons we are unsatisfied with the built in commenting system provided. We've been looking at alternatives that could be embedded into Wordpress and a handful of static pages outside of the Wordpress framework.

We've narrowed it down to Disqus and Discourse. Both have a couple advantages over the other. The biggest reason I am in favor of Discourse is that we own and control the content. We aren't dependent on a third party. Additionally, the moderation feature set seems much better with Discourse.

The one problem I'm seeing, that seems to be a big hang up for other admins, is that with Discourse embedded you can't actually comment from the page, "users have to navigate to your forum to post replies." This breaks the existing flow of users that can start commenting immediately and a problem Disqus doesn't have.

So, with that background on my problem, I'm looking for feedback from users that have used either or better both, did you find users cared about the intermediate step of leaving the blog to go to a forum to comment? If so, and you still went with Discourse, how did the community adapt? Did it impact user engagement?

I realize I'm talking with a loyal fan base of Discourse, but I am hoping for some good feedback I can take back to my team.

Posts: 5

Participants: 3

Read full topic


Bulk deleting / mass modifying users

$
0
0

@lead4good wrote:

Recently we've been migrating our bbpress forums to discourse at purism (a company that builds security focused laptops by trying to free the hardware from binary blobs) . I've already wrote a tutorial on how to import a bbpress backup and now I will focus on another problem we've encountered.

After importing the backup we've discovered a substantial amount of users who haven't posted into the forums yet. This was due to the bbpress import script importing all wordpress users. We had to find a way to delete them, and we were sure as hell not going to do that one at a time!

How to bulk delete users or mass modify them in a specific way?

In this tutorial I will show how to bulk delete users which have not posted yet.

WARNING: Please be very careful using this script and be sure to backup your files before.

First open a command line on your discourse server and then open the file delete_users.rb in your favorite editor. Paste the following contents inside.

require_relative '../config/environment'

pm = 0
User.find_each do |u|
  if u.post_count == 0 && u.topic_count == 0
    puts "Deleting user #{u.id}, #{u.name}, #{u.username}, #{u.email} ..."
    u.destroy
    pm = pm +1
  end
end
puts "Delete a total of #{pm} users"

This code loops through all existing users

User.find_each do |u|

Finds those who haven't added a topic or post yet

if u.post_count == 0 && u.topic_count == 0

and deletes them

u.destroy

You can now copy the script inside your docker container app

$ docker cp delete_users.rb app:/var/www/discourse/script/

Enter the discourse container app

$ ./launcher enter app

And then execute the script

$ su discourse -c "bundle exec ruby script/delete_users.rb"

If you want to delete your users based on different information or if you want to only modify them I would start searching in the User class at app/models/user.rb in the discourse source code.

Posts: 1

Participants: 1

Read full topic

Backup discourse from the command line

$
0
0

@lead4good wrote:

These are some simple instructions on how to backup the persistent storage of the docker container. And then how to restore them.

Backing up

First find out where your container is configured to save your persistent storage, for this open the containers/app.yml file and look for a section that looks like this

## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

The volume which is mounted under /shared in guest is the one we want to backup. So now run

$ rsync -avzh /var/discourse/shared/standalone/ /var/discourse/shared/standalone.backup

to backup your files. Be aware, that your container is still running and the database might have changes which haven't been written to disk yet. Therefore we quickly stop the container.

$ ./launcher stop app

Rsync any changes made to the persistent storage

$ rsync -avzh /var/discourse/shared/standalone/ /var/discourse/shared/standalone.backup

And start it again

$ ./launcher start app

Restoring

Stop the container

$ ./launcher stop app

Delete current state

rm -r /var/discourse/shared/standalone/

Restore the backup

$ rsync -avzh /var/discourse/shared/standalone.backup/ /var/discourse/shared/standalone

And start the container again

$ ./launcher start app

Posts: 1

Participants: 1

Read full topic

Error with theme upload

$
0
0

@Brock_Busby wrote:

Hello - we are getting an error when using the Upload feature for our custom theme.

We uploaded our fonts, we do not see our file on AWS S3 and we get the below when we open the link.
However, we DO NOT have any issue uploading assets to a topic or site assets topic. Those upload fine to S3.
The font file type is ttf, and that is permitted as a theme extension.
Is there something we are missing?

<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>
original/1X/d1cb477de57480e4b15a279ba0a1cbdccc8510a3.ttf
</Key>
<RequestId>B1B7EF003F1304D5</RequestId>
<HostId>
mhJuey6OMrpx0OeF3nyFurejBHXV6IpWFouQ5Vlm1E7evlmS0q7hCYXCFXb1iFIv77z7gS5mmUI=
</HostId>
</Error>

Thanks in advance

Posts: 1

Participants: 1

Read full topic

[PAID] Installation and Configuration architecture support

$
0
0

@norrismarkw wrote:

What would you like done?
We have a custom installation of Discourse running on AWS. Our instance is providing community discussion for our website based on Laravel / PHP which is hosting all identity services. We are in a relative stable position to launch our site but have a few engineering support tasks we need help to ensure we have long term stability.

Tasks needed
• Assess our current infrastructure and provide recommendations/best practices
• Provide best practice recommendation for backup, restore, maintenance and disaster recovery.
• Provide best practice recommendation for Load Balancing / Auto Scaling solution as site grows

Our setup:
• Hosted on AWS EC2 server running Ubuntu 16.04 with 30GB of Storage
• Build created with Docker
• DB hosted on AWS RDS Postgres Server
• Using AWS Elasticache Redis Server
• CDN AWS S3 bucket for Theme and uploads
• SSO with separate PHP Laravel Site (no direct login on the discourse side)
• Cloudflare protection/caching required
• SSL certs purchased from http://www.ssls.com
• Ad plugin installed: https://github.com/discourse/discourse-adplugin.git

When do you need it done? ASAP

What is your budget, in $ USD that you can offer for this task?
$1,000 but negotiable

Posts: 1

Participants: 1

Read full topic

How to render template when adding custom route in discourse

$
0
0

@net_deamon wrote:

I am trying to add a custom route (non-admin route) discourse.

Required route http://discourse.org/customroute

I am able to add the route, but the problem is that instead of rendering the template, it just outputs the json text.

My json data in plugin.rb is

render json: {title:"custom route"}

My customroute-map.js.es6 contains

export default function() {
  this.resource('customroute', { path: '/customroute' })
}

In the route/customroute.js.es6

export default Discourse.Route.extend({
   model:function() {
     return ajax('/customroute.json');
   }

By doing so, I only get the json data in the template. But the customroute.hbs - handlebar template is not rendered.

I tried using the renderTemplate,

 renderTemplate: function() {
      this.render('/customroute');
 }

But then I get the error "Assertion Failed: Cannot callEmber.getwith an empty string"

Posts: 1

Participants: 1

Read full topic

Settings screen too wide

Show latest PMs when searching in:private @usermention


Unable to update vagrant dev install on Windows

$
0
0

@jomaxro wrote:

I'm getting the following error when attempting to update my dev install on Windows. I first did a git pull, then vagrant up, vagrant ssh, and finally bundle install. The error occurs when trying to run bundle exec rake db:migrate

vagrant@discourse:/vagrant$ bundle exec rake db:migrate
rake aborted!
ln: failed to create symbolic link '/vagrant/public/plugins/discourse-narrative-bot': Protocol error
/vagrant/lib/discourse.rb:26:in `execute_command'
/vagrant/lib/plugin/instance.rb:368:in `activate!'
/vagrant/lib/discourse.rb:126:in `block in activate_plugins!'
/vagrant/lib/discourse.rb:123:in `each'
/vagrant/lib/discourse.rb:123:in `activate_plugins!'
/vagrant/config/application.rb:179:in `<class:Application>'
/vagrant/config/application.rb:27:in `<module:Discourse>'
/vagrant/config/application.rb:26:in `<top (required)>'
/vagrant/rakefile:5:in `require'
/vagrant/rakefile:5:in `<top (required)>'
/home/vagrant/.rvm/gems/ruby-2.3.1/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/vagrant/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
/home/vagrant/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

Posts: 6

Participants: 2

Read full topic

Is this secure? Concept for private info in replies

$
0
0

@rohmann wrote:

I really need a way for users to add sensitive data to a post without using private messages. I have this in a plugin:

require_dependency "plugin/filter"

  Plugin::Filter.register(:after_post_cook) do |post, cooked|
    index=0
    cooked.gsub(/\[secret\].*?\[\/secret\]/) { |a| index+=1; "<div class="secret-info" data-secret-post-id=\"#{post.id}\" data-secret-post-index=\"#{index}\">#{I18n.t('secret_replies.cooked_message')}</div>" }
  end

Effectively, it takes this content:

Anyone can see this.
[secret]but not this[/secret]
[secret]and DEFINITELY not this[/secret]

and cooks down to:

<p>Anyone can see this.</p>
<div class="secret-info" data-secret-post-id="42" data-secret-post-index="1">This content has been marked as secret. It is visible to staff and the original poster.</div>
<div class="secret-info" data-secret-post-id="42" data-secret-post-index="2">This content has been marked as secret. It is visible to staff and the original poster.</div>

Assuming this is safe to do, the rest of the plugin can be built around this concept. For example, there can be a protected endpoint for retrieving the raw content, and client modifications to add it back to the cooked content.

I do understand that if a user is given the ability to edit a post they will get raw content. I'm ok with this since those users are already staff, or are otherwise trustworthy with these secrets.

Main question: Is there any unguarded context where Discourse outputs raw post content instead of cooked content?

Any other security concerns? Thanks!

Posts: 5

Participants: 4

Read full topic

Problem Pre roll Adsense + swfobject script

$
0
0

@luizcrf wrote:

I added an adsense pre roll on I site for online games. The problem is that I use swfobject, but the "allowNetworking:" internal "function does not work when I use the" removeAdSwf "script that causes the" swf game "to be displayed when the adsense ad terminates.

<html>

<title>Title</style>
<link rel="stylesheet" type="text/css" media="all" href="/style.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" rel="nofollow"></script>
<script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
</head>

<body>

<style>
#preload{margin:0 auto;display:block;overflow:hidden;height:480px;width:640px;background-color:#000;}
#game{display:none;text-align:center;margin:0 auto;}
#area{text-align:center;}
</style>

<!-- SDK ADSENSE HTML5 ROLL CODE -->
<script type="text/javascript" src="http://imasdk.googleapis.com/js/sdkloader/ima3.js"></script>
    <script>
    function init(){preLoad=document.getElementById("area"),requestAds()}function createAdDisplayContainer(){google.ima.settings.setVpaidAllowed(!0),
    adDisplayContainer=new google.ima.AdDisplayContainer(document.getElementById("preload"))}function requestAds(){createAdDisplayContainer(),adDisplayContainer.initialize(),adsLoader=new google.ima.AdsLoader(adDisplayContainer),adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,onAdsManagerLoaded,!1),adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,Finalizar,!0);{var e=new google.ima.AdsRequest;window.location.href}e.adTagUrl="https://googleads.g.doubleclick.net/pagead/ads?ad_type=video_text_image&client=ca-games-pub-6247777970466238&description_url=http%3A%2F%2Fmysite123.com&videoad_start_delay=0&hl=pt&max_ad_duration=30000",e.linearAdSlotWidth=640,e.linearAdSlotHeight=480,e.nonLinearAdSlotWidth=400,e.nonLinearAdSlotHeight=300,adsLoader.requestAds(e)}function onAdsManagerLoaded(e){adsManager=e.getAdsManager(preLoad),adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,onAdError),adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,onContentPauseRequested),adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,onContentResumeRequested),adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,onAdEvent),adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,onAdEvent),adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,onAdEvent),adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,Finalizar),adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,Finalizar),adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,Finalizar);try{adsManager.init(640,480,google.ima.ViewMode.NORMAL),adsManager.start()}catch(a){Finalizar()}}function onAdEvent(e){var a=e.getAd();switch(e.type){case google.ima.AdEvent.Type.LOADED:a.isLinear()||(sec=15,i=setInterval(function(){--sec,0===sec&&(clearInterval(i),Finalizar())},1e3));break;case google.ima.AdEvent.Type.STARTED:a.isLinear()&&(intervalTimer=setInterval(function(){adsManager.getRemainingTime()},300));break;case google.ima.AdEvent.Type.COMPLETE:a.isLinear()&&clearInterval(intervalTimer)}}function onAdError(e){console.log(e.getError()),adsManager.destroy(),Finalizar()}function onContentPauseRequested(){}function onContentResumeRequested(){}function Finalizar(){removeAdSwf()}function adsenseAdComplete(){removeAdSwf()}function noAdsReturned(){removeAdSwf()}var adsManager,adsLoader,adDisplayContainer,intervalTimer,playButton,preLoad;countdownTimer=setInterval(function(){adsManager.getRemainingTime()},1e3),init();
    </script>
<!-- SDK ADSENSE HTML5 ROLL CODE -->


<!--START SCRIPT DESTROY PRELOADER -->
   <script type="text/javascript">
    function removeAdSwf() {
        noAdsReturned();
    }
    function noAdsReturned() {
        document.getElementById("game").innerHTML = my_container_html;
       document.getElementById("game").style.display = "block";
        document.getElementById("preload").style.display = "none";
    }
       var my_container_html = document.getElementById("game").innerHTML;
       document.getElementById("game").innerHTML = '';
   </script>
<!-- END SCRIPT DESTROY PRELOADER -->


 <div id="area">
<script type="text/javascript">
var flashvars, attributes = {};
var params = {
allowNetworking:"internal"
};
swfobject.embedSWF("http://mysite123.com/angrybirds.swf", "game", "640", "480", "9.0.0");    </script>

<div id="game">    </div>
<div id="preload"> </div>

</div>

</body>
</html>
Using the "inspect element" tool of the chorme, the swfobject result stayed this way:

<object type="application/x-shockwave-flash" data="http://mysite123.com.angrybirds.swf" width="640" height="480" id="game" style="visibility: visible; display: block; height: 480px; width: 640px;">
</object>

I've been trying to find the error for several days, but I can not. What can I be doing wrong?

Posts: 2

Participants: 2

Read full topic

Bookmarklet to extract the contents of the topmost visible post

$
0
0

@jmsachs wrote:

Just wanted to share my solution to major frustration in copying a Discourse post into an Outlook 2007 message (cue numerous sad trombone noises). Perhaps it has other applications. This essentially does the following:

  • figures out the post id
  • finds the relevant <article> node and clones it
  • removes the enclosing <a> link from each image
  • opens a new document (about:blank) with Calibri as the font-family
  • takes the cloned node and appends it to the new document

If I use it in Chrome I can then copy the resulting document, then Paste Special → as HTML Format into Outlook 2007 and it has a reasonable similarity to the original Discourse post.

Firefox creates the new about:blank page correctly but doesn't seem to get data into the Windows Clipboard in a way that Outlook understands formatting.

enjoy....

javascript:(function() {
  var url = window.location.href;
  var reply_id = window.location.pathname.match(/\/t\/[^/]*\/([0-9]+)(?:\/([0-9]+))?$/);
  if (reply_id)
  {
    reply_id = reply_id[2] || "1";
	var original_contents = document.querySelector('article#post_'+reply_id+' .topic-body .contents .cooked');

	var contents = original_contents.cloneNode(true);
	function unwrap(element) {
	  var fragment = document.createDocumentFragment();
      while (element.firstChild) {
        fragment.appendChild(element.firstChild);
      }
      element.parentNode.replaceChild(fragment, element);
	}
	contents.querySelectorAll('img').forEach(function(img){
	  unwrap(img.parentElement); /* remove containing <a> link */
	});

	var newdoc = window.open().document;
	newdoc.write("<!DOCTYPE html><html><head><style type='text/css'>.cooked { font-family: Calibri, sans-serif; }</style></head><body></body></html>");
	newdoc.close();
    newdoc.adoptNode(contents);
	newdoc.body.appendChild(contents);
  }
}());

Posts: 4

Participants: 2

Read full topic

Better flow for group membership requests

$
0
0

@tgxworld wrote:

Continuing the discussion from New members can't request to join a group:

Currently, a group membership requests is done via a PM but that requires a group owner to navigate to the group membership page and manually add the user in. I would like to add another tab in the group page that allows group owners/admins to manage those requests. I'll probably want to store group membership requests in the custom fields and expire those requests after 7 days for example. When a new request is received, we'll publish a notification to all group owners.

@tobiaseigen @ChrisBeach @scombs @jomaxro Let me know if there are any use cases that you'll like me to cover as well since you guys manage groups on a daily basis :slight_smile:

Related Topic: https://meta.discourse.org/t/group-owner-cannot-send-an-invite-to-a-group/60617?u=tgxworld

Posts: 11

Participants: 7

Read full topic

Why does discobot like certain posts?

Getting Discourse topics older than a certain date with curl

$
0
0

@Magnus1 wrote:

Hi,

I try to create a list of Discourse topics that are older than 5 days (created 5 days ago or before that) with "curl GET ..." command.
Currently I apply the following command to get a list of topics:
topiclist=$(curl -k -X GET "https://mydiscoursesite.com/search.json?q=tags:mytag+status:open")
...and then I parse the output (topiclist above) with jq for sorting out the old topics.

I wonder if it is possible to do this by adding the date info to the curl command and skip the parsing task (done with jq).

Posts: 4

Participants: 3

Read full topic


Activity All - doesn't show Likes Given

$
0
0

@Ahsan_Parwez wrote:

Hi,

Is it default behavior of discourse that Likes Given doesn't show under Activity - All ?

I want likes given to appear under All section, is there any way to do that?

  • Ahsan

Posts: 1

Participants: 1

Read full topic

How does one subscribe to ALL posts/categories?

$
0
0

@RBoy wrote:

Is there a way to subscribe to all posts/categories? I've noticed that if I subscribe to a parent category I only get notifications for posts in the parent category and not any of the sub categories. Is there a way to set it to that I would get notifications from all sub categories? Similarly is there a setting for the user to get notifications for all new categories automatically?

Posts: 17

Participants: 5

Read full topic

Inconsistent labels on accept invite page

$
0
0

@tophee wrote:

Just a minor thing but anyway: the location of the "optional" indicators for Real Name and Password is inconsisten on the accept invite page:

I think can see where the confusion comes from: if the rule is that the optional label is to be shown in the help text under the input field, then it doesn't work so well in the case of the password, which would then say "at least 10 characters (optional)" :stuck_out_tongue_closed_eyes:

So maybe it's better to put the optional flag after the field name (above the input field) in all cases?

And while we're at it, let's look at the sign-up page too:

Internal consistency is fine here, but only because the password is not optional. But I wonder why setting a password is optional on the invite page but not the sign-up page? Is there any security risk involved in leaving the password optional for all sign-ups?

Personally, I like sites that don't force me to set my password at sign-up because I use a password-manager which is not so good at creating new passwords on mobile, so I prefer doing that when I login on a desktop computer later on. (I know I can just enter any nonsense as a password, but that is sometimes thwarted by nonsense password building rules.)

So, even though I'm getting a bit off topic in the first post of my own topic (who would have deemed that possible...), I'd like to suggest to make password optional upon sign-up (or at least have a site-setting for that).

Posts: 2

Participants: 2

Read full topic

Searching for strings with @ returns 0 results

Discobot translation missing error

$
0
0

@jidetheblogger wrote:

New users seeing this :

 translation missing: en.discourse_narrative_bot.new_user_narrative.hello.message

If you’d like to learn more, select  below and bookmark this private message. If you do, there may be a :gift: in your future!

My current template is :

Thanks for joining %{site_name}, and welcome!

- I’m only a robot, but [our friendly staff](/about) are also here to help if you need to reach a person.

- For safety reasons, we temporarily limit what new users can do. You’ll gain new abilities (and [badges](/badges)) as we get to know you.

- We believe in [civilized community behavior](/guidelines) at all times.

Pls, how can i fix it?

Posts: 12

Participants: 5

Read full topic

Viewing all 60642 articles
Browse latest View live




Latest Images