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

With SSO my user still need to hit the login button

$
0
0

@Stackfish wrote:

I've implemented SSO for my discourse instance but I have one little glitch I'd like to resolve.

If a user is logged on my main site and thet click on a link to my discourse site, they are presented with the Login button. Once the hit the login button, they are then logged in without any further actions (entering password, etc).

Does anyone know how to configure the sites so my user's will not have to hit the Login button when they go to our discourse site?

Thanks

Posts: 4

Participants: 2

Read full topic


Email reply has quoted message wrapped in "details" tag

$
0
0

@downey wrote:

In the past several days, we've seen users that reply by email get the quoted message included in their post, but wrapped in the expandable [details] tag.

Example:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacus sapien,
mollis sit amet ex rhoncus, euismod mattis dui. Vestibulum tellus tellus,
volutpat ut hendrerit vel, gravida vitae lacus.

[details=...]
On Thu, Mar 10, 2016 at 11:03 PM, Example User <discourse+noreply@example.org> wrote:

> example <https://discourse.example.org/users/example> Example User
> <https://discourse.example.org/users/example> User Title
> March 10
>
> In aliquet urna vitae molestie ultricies. Etiam libero nulla, efficitur a dui
> vel, vehicula ornare justo. Nunc porttitor laoreet feugiat.

... etc. ...
[/details]

It strikes me that if it's possible to catch this and wrap it like that, it should also be possible to strip it out entirely, no? There's really no semantic value in including this that I can see.

I'm not sure if this is a bug or a feature decision that might not be so great (IMHO), but starting with the presumption of a bug.

Posts: 3

Participants: 2

Read full topic

Revert post to a specific revision

ScaleWay review?

Poste.IO mailserver, 535 PLAIN authentication failed for discourse.nixium.com - auth failure (100)

$
0
0

@chamunks wrote:

Where do I see the logs in Discourse to diagnose this issue further. This user works perfectly on my computers mail app so I don't understand why these settings are failing on Discourse.

  ## TODO: The mailserver this Discourse instance will use
  DISCOURSE_SMTP_ADDRESS: mail.nixium.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: discourse@nixium.com
  DISCOURSE_SMTP_PASSWORD: REDACTED
  DISCOURSE_SMTP_ENABLE_START_TLS: true

Posts: 1

Participants: 1

Read full topic

Can I turn off staged users?

$
0
0

@ryanwanger wrote:

When a person tries to email in a topic, and there is no user with that email address, it creates a staged user. Is there a way to turn off that feature?

It's causing problems for us at the moment. Example: user clicks over from our app to our discourse instance and their user is created via SSO. Then later, back in our app, they change their email address...but don't click over to discourse (so the change is not propagated). Then they email in from the new email address, and it bounces back saying they aren't a recognized user. If the were to then try and click over from our app to Discourse, then confusion would ensue because Discourse can't update the email address of the original (non-staged) user, because it has since been "taken" by the staged user.

At least, this is my best guess as to what is happening.

I believe that deleting the staged user, and then having the person click back into Discourse will appropriately update their original user to the new email address.

TL;DR: there is no benefit to staged users on our Discourse instance (which is private, and accessed via SSO from another app), and it can cause login/access problems in the case of an email change.

Posts: 2

Participants: 2

Read full topic

SSO provider log in doesn't return to consumer site when authenticating with Google

$
0
0

@ianmackinnon wrote:

When using Discourse as a single sign on provider, returning to the consumer site still doesn't seem to be working under some conditions. I've outlined these below step by step with the unexpected behaviour indicated by distressed emoji.

With the "login required" option unchecked:

  • currently logged out of SSO consumer and Discourse
  • click to log in via Discourse
    • redirect to Discourse
    • log in overlay automatically pops up
    • click to log in via Google
      • redirect to Google
      • authenticated by Google
      • return to Discourse
    • logged into Discourse
    • doesn't return to consumer :confused:
  • manual navigation to consumer :frowning:
  • not logged into consumer :anguished:

Also a slight annoyance when "login required" is checked. I think this could be quite confusing to some users.

  • currently logged out of SSO consumer and Discourse
  • click to log in via Discourse
    • redirect to Discourse (not yet logged in)
    • log in overlay does not pop up :neutral_face:
    • user must click "log in" again before they can enter credentials :grimacing:

For reference, this is related to some previous bug reports and a fix. These fixed redirection to the consumer site for authentication by Discourse itself, but not for authentication via Google.

Posts: 3

Participants: 2

Read full topic

How would I do this?


S3 migration issues- some images got pointed to S3, but with the wrong URL format

$
0
0

@ckshen wrote:

Hi,
I ran an migration of system images to an S3 bucket using the rake task here:
# ./var/discourse/launcher enter app
# rake uploads:migrate_to_s3

Two issues:
- Some images' link didn't get rewritten to the S3 image URL
- for those that did get rewritten, the rewritten URL, instead of the correct URL:
https:// hungryonionstatic.s3-us-west-1.amazonaws.com/original/2X/5/54e7f74106b4b007b90ace5bbe9d432b87c5e80a.png

It gets rewritten as
https:// www.hungryonion.org//hungryonionstatic.s3-us-west-1.amazonaws.com/original/2X/5/54e7f74106b4b007b90ace5bbe9d432b87c5e80a.png

Is there a way for me to rewrite all URLs in the DB that has the wrong URL back to the original URL? One thought is permalink but I'd rather correct the URL than redirect.

Alternatively I tried restoring the backup just before the rake task. But it failed.

Any pointers of what went wrong and how to fix it would be much appreciated! I'd rather not go through 2.4k topics to change the URLs manually if possible! Thank you in advance!

Also, any idea why some URLs got left alone after the rake task i.e. still pointing to the original location vs the S3 location while some was modified?

Here's the restore log:

[2016-03-12 08:43:09] 'hungryonion' has started the restore!
[2016-03-12 08:43:09] Marking restore as running...
[2016-03-12 08:43:09] Making sure /var/www/discourse/tmp/restores/default/2016-03-12-084309 exists...
[2016-03-12 08:43:09] Copying archive to tmp directory...
[2016-03-12 08:43:16] Unzipping archive...
[2016-03-12 08:43:16] Extracting metadata file...
[2016-03-12 08:43:17] Validating metadata...
[2016-03-12 08:43:17]   Current version: 20160308193142
[2016-03-12 08:43:17] EXCEPTION: undefined method `[]' for nil:NilClass
[2016-03-12 08:43:17] /var/www/discourse/lib/backup_restore/restorer.rb:177:in `validate_metadata'
/var/www/discourse/lib/backup_restore/restorer.rb:38:in `run'
/var/www/discourse/lib/backup_restore/backup_restore.rb:161:in `block in start!'
/var/www/discourse/lib/backup_restore/backup_restore.rb:158:in `fork'
/var/www/discourse/lib/backup_restore/backup_restore.rb:158:in `start!'
/var/www/discourse/lib/backup_restore/backup_restore.rb:17:in `restore!'
/var/www/discourse/app/controllers/admin/backups_controller.rb:80:in `restore'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/abstract_controller/base.rb:198:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_controller/metal/rendering.rb:10:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:117:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:117:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:505:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:505:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/abstract_controller/callbacks.rb:19:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_controller/metal/rescue.rb:29:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/notifications.rb:164:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/notifications.rb:164:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.5.2/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/abstract_controller/base.rb:137:in `process'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionview-4.2.5.2/lib/action_view/rendering.rb:30:in `process'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.9.2/lib/mini_profiler/profiling_methods.rb:76:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_controller/metal.rb:196:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_controller/metal.rb:237:in `block in action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/routing/route_set.rb:74:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/routing/route_set.rb:43:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/routing/mapper.rb:49:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/journey/router.rb:30:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/journey/router.rb:30:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/routing/route_set.rb:815:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.3.1/lib/omniauth/builder.rb:63:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:129:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/flash.rb:260:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.5.2/lib/active_record/query_cache.rb:36:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/logster-1.1.1/lib/logster/middleware/reporter.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.5.2/lib/rails/rack/logger.rb:38:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.5.2/lib/rails/rack/logger.rb:22:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:10:in `call_with_quiet_assets'
/var/www/discourse/config/initializers/100-silence_logger.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.9.2/lib/mini_profiler/profiler.rb:167:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/message_bus-2.0.0.beta.4/lib/message_bus/rack/middleware.rb:60:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:73:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.5.2/lib/rails/engine.rb:518:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.5.2/lib/rails/application.rb:165:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.5.2/lib/rails/railtie.rb:194:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.5.2/lib/rails/railtie.rb:194:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:562:in `process_client'
/var/www/discourse/lib/scheduler/defer.rb:85:in `process_client'
/var/www/discourse/lib/middleware/unicorn_oobgc.rb:95:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:658:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:132:in `start'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/bin/unicorn:126:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/bin/unicorn:22:in `load'
/var/www/discourse/vendor/bundle/ruby/2.0.0/bin/unicorn:22:in `<main>'
[2016-03-12 08:43:17] Trying to rollback...
[2016-03-12 08:43:17] There was no need to rollback
[2016-03-12 08:43:17] Notifying 'hungryonion' of the end of the restore...
[2016-03-12 08:43:17] Cleaning stuff up...
[2016-03-12 08:43:17] Removing tmp '/var/www/discourse/tmp/restores/default/2016-03-12-084309' directory...
[2016-03-12 08:43:17] Unpausing sidekiq...
[2016-03-12 08:43:17] Marking restore as finished...
[2016-03-12 08:43:17] Finished!

Posts: 4

Participants: 2

Read full topic

Jumping Reply's via Arrows or more clickable Box

$
0
0

@Spirit wrote:

Hi there,

I wrote in another forum about the small up/down arrows in the bottom right whilst viewing forum reply's.... initially I thought these arrows would change up or down the reply number but instead it opens a command box requiring manual input of a user chosen number (there are button, but only for top and bottom post, not next or previous).... I felt this was a clear opportunity for the arrows to function as increment / decrement rather than a symbolise to pop-up a command box and require further manual input keys. Even after typing a number, say 6, one needs to delete the current digit in there prior to finishing otherwise you might get 61 instead!

I also think being able to click via a next button or arrow could be great in reading, as it focus the next one centre already by design.

See my description link below for more complete write-up and visual examples at the other Discourse forum I'm at:

...https://forum.fractalfuture.net/t/arrow-box-for-jumping-reply/1069

Posts: 3

Participants: 2

Read full topic

WordPress, Discourse and Local SMTP Server

Changes in digest.unsubscribe text is not applied

$
0
0

@Pad_Pors wrote:

when I change (translate) the text of "user_notifications.digest.unsubscribe", and change it to whatever, the message at the end of the email-digest doesn't change; neither on localhost nor on the main host.

any hint what i can do? (the main translation of this text is off the road!).

Posts: 5

Participants: 2

Read full topic

Import topics from third party RSS feeds?

$
0
0

@Arvi_Chan wrote:

I am wondering if there's a Discourse feature that lets automatic creation of topics from third party RSS feeds? I do see an 'embedding' feature but do not understand how it works. Can someone explain?

Posts: 3

Participants: 3

Read full topic

Draft not cleared properly when empty edit of post is saved

$
0
0

@angus wrote:

Continuing the discussion from Topic Ratings Plugin.

Original report in that topic was slightly incorrect, so here's a proper bug report.

Steps to reproduce:

  1. Edit a post.
  2. Trigger a draft to be saved (e.g. add a space or two and wait for the draft to be saved)
  3. Save the reply without any changes (e.g. remove the space(s)).
  4. Refresh the page.
  5. The composer will re-open when the page refreshes.

The method triggering the composer reopening in this scenario is here.

Posts: 6

Participants: 3

Read full topic

Topic sidebar referenced topics count and list off by one

$
0
0

@DeanMarkTaylor wrote:

You can see in the GIF below that the list clearly indicates "2 more..." whilst only one displays.

Realistically this one additional item could just be displayed without the need for the "2 more..." link

This happens on multiple topics.

An example of which - purposely not linked is this one:
https://meta.discourse.org/t/welcome-to-meta-discourse-org/1

Posts: 3

Participants: 3

Read full topic


Mobile device detection

$
0
0

@charleswalter wrote:

Has there been any thought on reviewing how Discourse detects mobile devices? I was checking in my Chrome developer tools, and it doesn't appear that LG devices are detected as mobile. I haven't tested on a Samsung S6 or Motorola devices.

What is the current logic? Could it be improved?

Posts: 2

Participants: 2

Read full topic

Temporary avatar/titles

$
0
0

@awole20 wrote:

EDIT: See @cpradio's post below for the implementation.

It might be nice to have the ability to set a temporary avatar or title. With April fools nearly upon us, I'm wanting for a way to decorate each member's avatar for the day. It's been the target of many internet April fools in the past, and I'm sure it could be re-used for other festivities.

An admin would be able to override a user's avatar or title with a temporary one on a per user basis, or across the entire system (could apply a random one from a list for variation). Once a specified time has passed, the original is restored.

While changing these per user is easy, being able to revert to non-shenanegans mode automatically would be awesome.

Posts: 4

Participants: 2

Read full topic

Notification for new topic by mail shows replied icon, a new icon would be more logical

$
0
0

@Sander78 wrote:

Case:

  • (not sure if this matters) TL0 user sends mail to category, creating a new topic
  • I am watching that category, so I get a notification

Expected:

  • The notification shows some kind of new topic icon

But result was:

  • The notification shows the replied icon

Posts: 5

Participants: 2

Read full topic

Best config for a discourse forum?

$
0
0

@djcyry wrote:

Hello ,
Which is the best configuration for discourse :
www or non www ?
Ssl or non ssl ?
I mean best way for your forum , google , robots , seo etc .

Posts: 2

Participants: 2

Read full topic

Making Plugin Templates Localization friendly

$
0
0

@Mittineague wrote:

If you are familiar with WordPress plugins, you may have noticed that the more popular ones take advantage of gettext so that their text can be translated.
It takes a little bit of effort to wrap text inside of functions instead of hard-coding it, but the effort is well worth it.

Fortunately, Discourse also provides a way for plugin text to be translatable.

For example, the Discourse Plugin Outlet Locations plugin currently has around 40 template files. All were similar to

{{#if siteSettings.mitt_plugin_outlet_locations_enabled}}
  {{#if siteSettings.mitt_show_header_after_home_logo_enabled}}
<div class="mitt-outlet-location">
  <i class="fa fa-plug"></i>
  header-after-home-logo plugin outlet
</div>
  {{/if}}
{{/if}}

Notice that the text string, "header-after-home-logo plugin outlet" is hard-coded into the template.

So if I, or anyone else, wanted to make changes, it would mean that around 40 lines of code in around 40 different files would need to be edited.
Even if tedium is not problem for you, the plugin author, it can get old fast, it is more likely errors will be made, and it just plain does not make it any easier for others to change or translate the text strings.

The first step is to put all of the text strings into the client.en.yml file.
There may still be around 40 lines of code, but making changes in one file is a lot easier than making changes in around 40 different files.
And if, for example, someone wanted a Spanish version, they could translate the text strings, change the yml file's "en:" token to "es:", rename the file client.es.yml, and be good to go.

For example, the above text is used by a unique token

en:
  js:
    mitt_dpol:
      header_after_home_logo_dpol: "header-after-home-logo plugin outlet"

and the template file is changed to

{{#if siteSettings.mitt_plugin_outlet_locations_enabled}}
  {{#if siteSettings.mitt_show_header_after_home_logo_enabled}}
<div class="mitt-outlet-location">
  <i class="fa fa-plug"></i>
  {{i18n "mitt_dpol.header_after_home_logo_dpol"}}
</div>
  {{/if}}
{{/if}}

Now, any changes made to the string in the yml file will be used by the template without needing to edit the template file directly.

OK, that works fine for simple text strings, but what if the string has HTML in it? eg.

en:
  js:
    plugin_outlet_locations:
      title: "Plugin Outlet Locations"
      show: "Show Purple Tentacle"
      hide: "Hide Purple Tentacle"
      first_para_dpol: "This page has nothing to do with this plugin for now.<br>Eventually I hope to move this plugin's settings here."
      second_para_dpol: "At present it's only here to provide a working example of <br><a href='https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-5-admin-interfaces/31761'>Beginner's Guide to Creating Discourse Plugins Part 5: Admin Interfaces</a>"

No problem, the template file only needs a couple more curly braces.

<div>
  <p>{{{i18n "plugin_outlet_locations.first_para_dpol"}}}</p>
  <p>{{{i18n "plugin_outlet_locations.second_para_dpol"}}}</p>
</div>

What HTML to have in the template file and what HTML to have in the yml file could be open to debate, my personal feeling is that keeping the yml file as "clean" of HTML as possible would be the better choice, but what you do is of course up to you.

May your plugin go global :smile:

Posts: 1

Participants: 1

Read full topic

Viewing all 60721 articles
Browse latest View live




Latest Images