Default setting for external links [0.7.0 dev]



  • In the user profile is a setting to "open external links in new tabs". But this is just for the current user.

    Is there a default setting in the admin panel for this behaviour?



  • Don't believe so, It's pretty common practice to press Ctrl and click for open in new tab. Shift and click for open in new window. Seems counter intuitive to force it.



  • Don't conclude from your own behaviour to someone else. I can tell you the opposite experience with some of my users. 😞

    But especially in the case of NodeBB's composer it is necessary. When you open the help in the composer, and you click on the link, you'll be surprised that you've left the page you were writing on.



  • This is very confusing for the audience.

    Maybe i should better file a bug for that?



  • @Hägar said:

    Maybe i should better file a bug for that?

    Good idea.
    https://github.com/NodeBB/NodeBB/issues

    Please remember to add a note about Browsing Settings > Open outgoing links in new tab?


  • GNU/Linux

    I think default behaviour of all outgoing linkage should be "_blank"


  • Plugin & Theme Dev

    @Hägar said:

    Don't conclude from your own behaviour to someone else. I can tell you the opposite experience with some of my users. 😞

    But ain't you doing this too?
    I completely agree with @a_5mith in this case. I hate it when websites overwrite the default behavior without good reason.

    If you force opening within new tab you're limiting the possibilities for users since there is no simple/common way to open those links within the same window.

    Since NodeBB is saving your composer-content between sessions there shouldn't get any fatal mis-behavior out of this.
    The best solution would be marking external links with an external-link icon (which sadly isn't supported native by NodeBB (yet)) so users who want it getting opened within a new tab know what to do.

    Besides this setting I'd like to see default user settings implemented in a plugin (but would really hope that admins don't turn that specific setting on by default).


  • Plugin & Theme Dev

    Since NodeBB prevents me from submitting my ironic edit of that post above I have to send it within a lonely post:

    EDIT: Or the default-settings plugin may kill the whole server (or NodeBB instance if run without root-privileges) once the admin tries to enable this by default :trollface:

    ping @julian @baris @psychobunny : When trying to edit the post above I encounter "Title has to be longer than 3 char"-Alert...



  • @Codejet

    I think default behaviour of all outgoing linkage should be "_blank"

    I would agree your statement.



  • @frissdiegurke

    Since NodeBB is saving your composer-content between sessions there shouldn't get any fatal mis-behavior out of this.

    Except users in panic, which are flooding your inbox with support requests...

    The current behaviour is unpredictable.


  • Plugin & Theme Dev

    you may add an external-link icon using the following custom LESS:

    @external-link-icon-hover-color: red;
    @external-link-icon-size: 6pt;
    @external-link-icon-spacing: 1px;
    @fa-var-external-link: "\f08e";
    
    a[href^='http://'], a[href^='https://'], a[href^='//'] {
        &:after {
            display: inline-block;
            font: normal normal normal 0 FontAwesome;
            text-rendering: auto;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            transform: translate(0, 0);
    
            vertical-align: 50%;
            content: @fa-var-external-link;
            margin-left: @external-link-icon-spacing;
            font-size: @external-link-icon-size;
        }
        &:hover:after {
            color: @external-link-icon-hover-color;
        }
    }
    

  • Plugin & Theme Dev

    of cause you could use whatever selector you need instead of a[href^='http://'], a[href^='https://'], a[href^='//'], I don't know your specific domain-name to exclude full-referenced URLs to that same domain 😉



  • Nice, but doesn't resolve the user problem.



  • @nhl.pl I've added the hint in the middle, so a guy totally missunderstood the problem and closed the issue without fixing. 😕

    Should i reenter the issue with a other description? Or maybe screenshots?



  • I have tested it in "Chats" and when you go back the chat is closed and you have to reopen it. So yes, it can be an issue for new forum users.



  • @Hägar said:

    Should i reenter the issue with a other description? Or maybe screenshots?

    You can leave a comment with images. No need to add a new issue as #2959 is referenced in #2958 (can be seen as related).


  • Admin

    Initially, yes, I am against hijacking the user preference for this as the expected behaviour is to open in the same page.

    And as @a_5mith has mentioned, it is a quasi-standard to use shift/ctrl-click to open in a new tab.

    Of course, that said, not everybody is aware of this, and it's especially a problem when you have anchors opening in the same page while you are in a stateless area of NodeBB (e.g. chat or composer open).

    So I'm relaxing my stance against having system-wide defaults for link actions...



  • It's a bit off-topic but still related to default settings for external links. I haven't tested the acp of 0.7.0 yet and I was wondering if there was something like a whitelist for external links? Then if someone click on an external link we can activate the warning page "you are leaving the forum", but if it's a sub domain, a root domain or a trusted url (youtube) for example we don't show this page.


 

Suggested Topics

  • 3
  • 13
  • 6
  • 1
  • 7
| |