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

Possible 'Dismiss New' bug when new topics arrive

$
0
0

Kevin P. Fleming wrote:

Today I had about 90 threads in the 'New' tab. I was reading through the ones I found interesting, scrolling down the page to review the older ones.

During this time, another thread was posted in the forum, and the top of the page got the '1 New thread. Click here to show.' banner. I did not click it, but instead kept scrolling until I got to the bottom of the page. At that point, I clicked 'Dismiss New', partially to see what would happen, and the result was ungood: all New threads were marked to be ignored, including the one I had never seen... or at least I think so, because when the page refreshed there were no New threads at all.

Posts: 1

Participants: 1

Read full topic


Discourse api tutorial

$
0
0

da.fans.lu wrote:

Hi Everyone,
I want to use the discourse_api here: https://github.com/discourse/discourse_api to build a website that fetches the topics and other contents from another already hosted discourse forum. But it seems that there's not much documentation on how to get it done.
Does anyone has a detailed instruction or tutorial for accomplishing the goal?

Thanks

Posts: 2

Participants: 2

Read full topic

I can help you install Discourse for a cheap price

Discourse api key

$
0
0

da.fans.lu wrote:

Hi,
So i'm trying to use discourse api and in the examples here: https://github.com/discourse/discourse_api/blob/master/examples/example.rb shows:

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require File.expand_path('../../lib/discourse_api', __FILE__)
client = DiscourseApi::Client.new("http://localhost:3000")
client.api_key = "YOUR_API_KEY"
client.api_username = "YOUR_USERNAME"

So can anybody walk me through what is going on here. Where do i retreive the api_key and api_username?

I have a discourse instance running on my localhost:3000 and another rails instance running on localhost:3001 that implements the api

Posts: 2

Participants: 2

Read full topic

Meta.d logo cut off on right edge in Firefox 30

User more info - Cache results and render optimization

$
0
0

lid wrote:

When a user click on author avatar on a side of post, A small inline box will expand with additional user information.
most of the information in this box is pulled dynamically from the server (ajax).

what is the issue?

  1. every time the user click on the avatar a request will be issued to the server. you clicked on the same avatar and toggled it on 10 times.

the server will get 10 ajax requests to

AJAX GET https://meta.discourse.org/users/codinghorror.json

There are two losers here
1. user: the user will have a slower responses due to the content not being cached.
2. The server no cache mean the server will get more requests.

Possible solutions:

  1. Add Browser cache support
    I tested the following code in console, and for the life of it I don't understand why chrome/firefox does not cache the request

$.ajax({
url:"https://meta.discourse.org/users/codinghorror.json",
cache:true,
dataType: 'json',
//ifModified : true,
headers: {
      'Cache-Control': 'max-age=60'
    }
})

2 . Cache results in the app logic.

conclusions:

It will probably be ideal to have a proper caching on the browser level, with a reasonable expiry.
But having the app cache this type of requests temporarily is also a feasible solution.

Another possible optimization:

The info of that box is rendered in div#poster-expansion The div is being reused on the page for different users info.
When you close the box it is just hidden with css.
We can save some dom manipulation, by checking when you open the box if the request is for the same user just show the box. do not reload or re render the box with the json data.

Update - Why does the Ajax request doe not cache ( ssl ) :

In the test ajax request (see code above), I could not trigger the browser to cache the request.
There is no obvious header in the server response to should prevent the browser from caching.
I suspect that it is possible that the request is not cached due to the combination of an ajax request over SSL.
I couldn't find anything to back that up yet.

Posts: 4

Participants: 3

Read full topic

You may miss a notification if you are actively on a topic

$
0
0

lid wrote:

I could not test this behavior thoroughly. But I experienced it several times.

From my observation it may be possible that a user will miss a notification due to the fact that the user was
Viewing the topic the notification was initiated from.

I am refering the to notification counter in this area.

Consider the following scenario.

You are reading a topic,
You receive a like that will result in a +1 added to the top notification area ( you may not notice it at first)
because you are scrolling in the topic or you may be over that post. This may automatically dismiss the new notification for you. Consequently the notification will be considered acknowledged, without that actual user acknowledgment.

Is it possible that I may miss a reply notification , or a mention, with that behavior mentioned above? possibly. I don't have a way to fully test that easily.

Possible solution:

Certain notifications that are not acknowledged via the notification area, that notification active status could persist for longer. giving the user enough time to realize that there is a notification.

I believe that retaining the notification counter / status visible for longer. may prevent that.

share your ideas.

Posts: 7

Participants: 4

Read full topic

I just did a "./launcher rebuild" and now everything is broken!

$
0
0

Sam Saffron wrote:

The fix:

cd /var/docker
git pull
./launcher rebuild app

What happened?

I needed to add an extra directory to the bootstrap for the NGINX config (so we cache avatars in NGINX). Without this new directory NGINX will not start.

Will this happen again?

I just amended the rebuild to always do a git pull first, so you should not need to remember to git pull anymore.

Context:

Posts: 6

Participants: 3

Read full topic


Possible bug: with composer long text does not scroll all the way up with keyboard

$
0
0

lid wrote:

So this is a bug with chrome, what a surprise. It is not worth a fix on discourse side at a moment as this is minor inconvenience , unless chrome is not going to fix this for another year.

Then we can avoid using the top-border trick and just move the textarea below the controls.
The only functionality that we lose by doing that is that the native focus outline will not be around the controls and textarea as one.

nothing that can not be workaround using javascript .focus/blur event and apply shadow to container.

small experiment

This is just a small experiment I did with CSS only ( not perfect, but I just checked if it is possible to get the same effect without js)

http://jsfiddle.net/lid0/e943k/embedded/result/
http://jsfiddle.net/lid0/e943k/embedded/


The Issue

Browser: Chrome

  1. open composer (create topic / reply to a post)
  2. paste the following block in the composer.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.


Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  1. scroll all the way down in the composer put the caret at the last line. and now user the keyboard ( UP-Arrow) to go up the lines.

try to go to the first line using the UP-Arrow on the keyboard.

The result will be

about 3 lines will not be visible including the current line the caret is on.

Posts: 3

Participants: 2

Read full topic

Smoothly integrating Discourse with an existing social site

$
0
0

Michael Jonathan wrote:

Hey all,

I am a developer for a website with social-network like behavior, and we'd like to integrate Discourse into our site. We love how Discourse works and we want to have a Discourse-powered discussion platform on the site. We want to create a seamless experience for users, where Discourse naturally becomes like part of our main site. We maintain our own user database (which should override all user management in Discourse).

We created an instance of Discourse and we attempted to use Discourse SSO. The SSO bit works fine, but the experience is nowhere near seamless. By default the logged-in/out states becomes out-of-sync:

  • If a user logs in on our own site login, they don't become logged in to Discourse. When they visit our Discourse instance, they're still logged out. They must click one of Discourse's sign in buttons, where they'll get redirected to our SSO handler etc. and then back to Discourse where they'll finally be in a logged-in state.
  • If a user logs out on either our site or Discourse, they don't automatically become logged out on the other.

We want to have no user-accessible user management features in Discourse (no login/logout buttons, no change of password/usernames); instead our main site sends all user info to Discourse so that Discourse truly becomes a natural part of the site.

What can we do to achieve this? I've been browsing through many posts in meta.discourse but there doesn't seem to be an elegant solution.

  • We'd love it if login/logout endpoints can all be defined within the Discourse admin settings.
  • One thought is that maybe, every time a user opens our Discourse instance, an SSO-like behavior automatically executes, redirecting the user to our own handlers, securely passing in user info via encrypted URL parameters, and then back to Discourse in the proper logged-in/logged-out state.
  • Alternatively we can pass around info using cookies.
  • Other ideas?

We don't use ROR for our main site at the moment, in fact we have no previous Ruby experience. We're looking for a natural built-in solution in Discourse, not requiring us to modify/override the Discourse source code.


Also, regarding the user data passed around during SSO login, we see from https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045 that we can send over their externalID, username, email, etc.; in fact we currently do. How can we also pass in the user's avatar as a URL (as a path to our CDN file) and have Discourse natively use that value to display that user's avatar across the site?

We appreciate the help.

Posts: 2

Participants: 2

Read full topic

Using Discourse API

$
0
0

Arpit Jalan wrote:

So you want to use Discourse API? Great! Let's get started!

Install Discourse API Gem

If you already have Ruby installed on your system, you can install Discourse API by running following command from console:

gem install discourse_api

Generate Master API Key

Generate Master API Key for your Discourse instance by visiting /admin/api, to interact with Discourse API.

Provide API Credentials

Now that you have installed Discourse API gem and generated master API key, let's start using it!

Open the discourse_api/examples/example.rb file, and modify following information:

client = DiscourseApi::Client.new("http://localhost:3000")
client.api_key = "YOUR_API_KEY"
client.api_username = "YOUR_USERNAME"

Replace http://localhost:3000 with the url of your discourse instance, eg: http://discourse.example.com

Replace YOUR_API_KEY with the master API key of your discourse instance, eg: b1f3175cb682b3e9b6ca419db77772120b19af993cbc14ebed80fea08e3bbd66

Replace YOUR_USERNAME with the Admin username of your discourse instance, eg: codinghorror

Access Discourse API

Now in console, from discourse_api directory run:

ruby examples/example.rb

This command will print out latest topics from your Discourse instance.

That's it. Start using Discourse API today.

Posts: 1

Participants: 1

Read full topic

What should make the notification bubble go away?

$
0
0

Adam Capriola wrote:

Continuing the discussion from You may miss a notification if you are actively on a topic


This is somewhat related and I want to confirm whether this functionality is intended. I'm calling notifications.json through the API so that I can display if a user has any unread notifications on the non-Discourse portion of my website. I've noticed that when I get a new notification and click over to Discourse, the blue notification bubble doesn't appear (which is not ideal). The notifications are unread though when I do click to view them (they are highlighted blue).

I'm guessing that because notifications.json was accessed with an API call, that's why the bubble was cleared (it's as if I clicked to view the list of notifications).

Should the bubble clear just by clicking to view the list of notifications or should it remain until each notification is clicked on (acknowledged)? I'm uncertain how the major social networks are handling this functionality these days. I could see if a user had a lot of notifications that it would be annoying to have to click on all of them to make the bubble indicator go away, but on the other hand having to actually view all them would possibly keep users more engaged in discussions.

Posts: 6

Participants: 3

Read full topic

Javascripts not loading in development after upgrade

$
0
0

Pehrlich wrote:

Upgrading discourse from 0.9.9.4 to the latest - I've tried first 0.9.9.12 and then 0.9.9.8. When loading /, none of the javascript files are available, leaving a mostly-blank white index page.

Upgraded with:

git merge v0.9.9.12

E.g.:

GET: http://0.0.0.0:3000/cdn_asset/myapp/discourse/routes/user_activity_stream_route.js?body=1

EXCEPTION: Cannot read file /Users/me/leap/projects/myapp/public/assets/discourseroutesuser_activity_stream_route.js

, [2014-07-14T21:38:36.587962 #30593] DEBUG -- :
I, [2014-07-14T21:38:36.588121 #30593]  INFO -- : Started GET "/cdn_asset/myapp/discourse/views/search/search_results_type_view.js?body=1" for 127.0.0.1 at 2014-07-14 21:38:36 -0700
I, [2014-07-14T21:38:36.609368 #30593]  INFO -- : Processing by StaticController#cdn_asset as */*
I, [2014-07-14T21:38:36.610136 #30593]  INFO -- :   Parameters: {"body"=>"1", "site"=>"myapp", "path"=>"discourse/views/search/search_results_type_view.js"}
D, [2014-07-14T21:38:36.613684 #30593] DEBUG -- :    (1.4ms)  SELECT "groups"."name" FROM "groups"
D, [2014-07-14T21:38:36.616791 #30593] DEBUG -- :   Category Load (1.3ms)  SELECT "categories".* FROM "categories"  WHERE (NOT categories.read_restricted)  ORDER BY "categories"."position" ASC
D, [2014-07-14T21:38:36.620544 #30593] DEBUG -- :   Topic Load (1.5ms)  SELECT id, title, slug FROM "topics"  WHERE ("topics"."deleted_at" IS NULL) AND "topics"."id" IN (2)
D, [2014-07-14T21:38:36.623587 #30593] DEBUG -- :    (1.2ms)  SELECT "categories"."id" FROM "categories"  WHERE (1=0)
D, [2014-07-14T21:38:36.626761 #30593] DEBUG -- :   PostActionType Load (1.5ms)  SELECT "post_action_types".* FROM "post_action_types"   ORDER BY position asc
D, [2014-07-14T21:38:36.630791 #30593] DEBUG -- :   PostActionType Load (1.4ms)  SELECT "post_action_types".* FROM "post_action_types"  WHERE "post_action_types"."name_key" IN ('inappropriate', 'spam', 'notify_moderators')  ORDER BY position asc
D, [2014-07-14T21:38:36.636494 #30593] DEBUG -- :   SiteContent Load (1.4ms)  SELECT  "site_contents"."content" FROM "site_contents"  WHERE "site_contents"."content_type" = 'top' LIMIT 1
D, [2014-07-14T21:38:36.640544 #30593] DEBUG -- :   SiteContent Load (1.3ms)  SELECT  "site_contents"."content" FROM "site_contents"  WHERE "site_contents"."content_type" = 'bottom' LIMIT 1
I, [2014-07-14T21:38:36.642872 #30593]  INFO -- : Sent file /Users/pehrlich/leap/projects/community/public/assets/discourseviewssearchsearch_results_type_view.js (0.7ms)
I, [2014-07-14T21:38:36.643959 #30593]  INFO -- : Completed 500 Internal Server Error in 33ms
F, [2014-07-14T21:38:36.660558 #30593] FATAL -- :
ActionController::MissingFile - Cannot read file /Users/pehrlich/leap/projects/community/public/assets/discourseviewssearchsearch_results_type_view.js:
  actionpack (4.1.1) lib/action_controller/metal/data_streaming.rb:68:in `send_file'
  actionpack (4.1.1) lib/action_controller/metal/instrumentation.rb:49:in `block in send_file'

Any idea why this would be?

Posts: 2

Participants: 2

Read full topic

Is there a reason why sup sup,sub sup,sup sub,sub sub{top:0} get its own css file?

Have ./launcher ssh|enter app go straight to /var/www/discourse

$
0
0

Sander Datema wrote:

See title. As the only reason you might go into the container is to do something with Discourse, you might as well go there.

Of course this only applies to the standalone and web templates.

Posts: 1

Participants: 1

Read full topic


Badges mobile layout

[beta] Topic Permalinks

$
0
0

Benjamin Kampmann wrote:

Heyah,

Attention: first draft!

I just finished the first (working) version of my permalink plugin. From the Readme:

Details

Through this plugin a topic can now have a permalink-custom_field for lookup that it can be found it.

The plugin operates in two modes: redirect and legacy-mode. When the permalink_redirect setting is set to true (default) in the Administration interface, the plugin will match the permalink and when found redirect to the new URL – this is recommended behaviour. If disabled however, the topic will be only accessible through that permalink and use that instead of the generated links.

.Attention: This plugin requires discourse >= 0.9.9.7 . Please upgrade to master.


This is particularly handy to be set when importing older systems and not wanting to lose the "SEO juice" of their pretty URLS.

Posts: 1

Participants: 1

Read full topic

Handy Custom-Fields Editor

$
0
0

Benjamin Kampmann wrote:

Heyah,

while working on the topic permalinks plugin, I realised that there is no way for the Administrator to add, configure or edit our new awesome custom-fields other than going into the Shell or Database and do it manually. Which makes it a quite hidden feature.

I'd propose to build a general-purpose modal-dialog similar to the administration interface listing all existing custom_fields and allowing them to be edited (and maybe other fields added) by administrators. Here is an example sketch for what this could look like for a topic:

I'd propose to make this accessible through the topic wrench per topic, the administrator-wrench per post, make it part of the category-edit page and add a button for it on the user-profile-admin-page.

What do you think?

Posts: 3

Participants: 2

Read full topic

Font assets and plugins

$
0
0

Charles-Pierre wrote:

I have a plugin that transforms [smartass] tags to a custom font, which is served as an otf file.
Serving the otf file used to work perfectly using the code I quote below.

Unfortunately, this method doesn't work anymore (since when, I don't know, though). If I copy the files to public/assets, it works, but when I rake assets:precompile the font files are not moved to public/assets, although the .js and .css are correctly included.

What is the correct way to serve non-css (or scss) non-js assets in plugin?

Continuing the discussion from Assets and plugins:

Posts: 1

Participants: 1

Read full topic

Hosting other Ruby on Rails App Side by Side with Discourse

$
0
0

Victor Aprea wrote:

I get that discourse is a Ruby on Rails application. I set it up on a Digital Ocean droplet following these instructions. The instructions are awesome and it just works which is really great, but there's definitely an element of magic to it, as a relative novice like me.

I have the feeling that the meat of the installation is in the "Clone the Official Discourse Docker Image into this /var/docker" step and that's where I suspect the whole Ruby on Rails setup happens behind the scenes. I don't have a good grasp of Docker, but I at least went here and watched the video.

So anyway, now I have an interest in using this Digital Ocean droplet to develop and host an additional custom Ruby on Rails application on a different subdomain than my Discourse site (in principle this could even be another instance of Discourse right?). I just don't know where to begin though. If I ssh to my server rvm isn't a recognized command, rails isn't a recognized command. Can anyone offer advice/pointers on how to deploy my own rails app on the same server?

Posts: 3

Participants: 3

Read full topic

Viewing all 60642 articles
Browse latest View live




Latest Images