External Links not opening in new tab

Yes I did. For members, it works but not for non-members…

1 Like

Right, it doesn’t work for non-members because non-members do not have settings.

2 Likes

Oh. Sorry. I guess that’s right for the reasons that I (and now @cpradio) explained.

Could the not-logged-in setting be changed with CSS?

Not with CSS. You’d likely have to write a plugin that overrides the default setting. I thought that was discussed here somewhere, but I couldn’t find it.

3 Likes

If you want both users and guests to always open links in a new tab, you have to completely override trackClick in discourse/lib/click-track in an intializer (in a plugin). Specifically this: https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/lib/click-track.js.es6#L137. I wouldn’t advise it.

1 Like

Agree. But some-time ethics have to take back seat in the world, when small inconvenience of our users might bring some unexpected positive results for us.

Push Notifs also fall into the same category. Not all users want all push notifs. But still websites configure them (facebook is particularly notorious) to bombard some non-useful notif than to miss some legit one.

Note: Even though I’ve configured external links to open in new tab, as here:


But they are opening in the same tab, even for me, admin.
What should I check?

This are defaults for new users. You should check your profile settings.

I’m not talking about the implementation of this feature (i.e. links opening into new tabs).

I’m talking as to how can I set my disco site so as to whenever any user on my forums clicks an external link, the link should open in a new tab. And I don’t expect users to go into their preferences first and change this option.
I myself can change that option before hand, if that’s possible.

The site settings that you show above set the setting for new users. To see how it works, create a new account.

Having links open in a new tab is an accessibility problem. If you can’t see, it’s confusing to click a link and not be able to tell what happened. That’s why the default is off.

If you want to change the setting for existing users you can search here for a rails command that will change the value for all existing users.

6 Likes

That settles it for me.

(Not) sorry, I couldn’t resist.

5 Likes

If there is a disco bot.
Then there is possibility of a disco site.

:stuck_out_tongue_winking_eye: