cancel
Showing results for 
Search instead for 
Did you mean: 

External links

FIXED
dvorak
Moderator
Moderator
Posts: 29,716
Thanks: 6,593
Fixes: 1,485
Registered: ‎11-01-2008

External links

I could well have missed a setting or discussion somewhere.... but is it possible to get external links to open a new tab as a default when clicking rather than opening in the current tab? 

 

 

Customer / Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'
24 REPLIES 24
jaread83
Hero
Posts: 3,438
Thanks: 1,490
Fixes: 81
Registered: ‎22-02-2016

Re: External links

Let me just testing something....

using the link manager:

link to google

Just pasting a link:

https://www.google.co.uk/

So I remember that I included a little script in the header. What it will do is change the link target attribute (what defines how to open it in a new window, tab or in the current window) and will change it to open in a new window. The code is as follows:

$(".lia-message-body-content a").not('a[target*=_self]').attr('target','_blank');

Now the only downside to this is if you use the link manager and you leave the 'target' in its default state (open in current window) it will not override it and leave it as is. This is so users still have some control over their content though.

So basically... if you paste a URL directly into the editor it will open in a new window or tab as the target isn't set. The Link Manager popup requires a user to choose the target.

Frontend Web Developer | www.plus.net

If you have an idea to improve the community, create a new topic on our Community Feedback board to start a discussion about your idea.

Anotherone
Champion
Posts: 19,107
Thanks: 457
Fixes: 21
Registered: ‎31-08-2007

Re: External links

I thought we requested that the default setting in the drop-down in the Link Manager be changed to 'Open in new page'. I think that a good 90+% of the links that I need to post, need to open in a new page and I'm getting more and more irritated that it hasn't been changed.

jaread83
Hero
Posts: 3,438
Thanks: 1,490
Fixes: 81
Registered: ‎22-02-2016

Re: External links

@Anotherone, you are correct that it was requested but it was never implemented.

I will raise this with @LouisaMartin and add to my bug tracker.

Frontend Web Developer | www.plus.net

If you have an idea to improve the community, create a new topic on our Community Feedback board to start a discussion about your idea.

Anotherone
Champion
Posts: 19,107
Thanks: 457
Fixes: 21
Registered: ‎31-08-2007

Re: External links

It certainly need raising then Jack, but it's not been changed from where I'm looking Huh The default target is still 'Open in current page'

jaread83
Hero
Posts: 3,438
Thanks: 1,490
Fixes: 81
Registered: ‎22-02-2016

Re: External links

i updated my reply, sorry my bad there.

It's on my bug tracker now.

Frontend Web Developer | www.plus.net

If you have an idea to improve the community, create a new topic on our Community Feedback board to start a discussion about your idea.

LouisaMartin
Plusnet Alumni (retired)
Plusnet Alumni (retired)
Posts: 397
Fixes: 1
Registered: ‎01-02-2016

Re: External links

Lithium will complete a backend configuration for this and then push to staging for us to test. 

@jaread83 I'll let you know once this has been done.

Ta

Louisa
jaread83
Hero
Posts: 3,438
Thanks: 1,490
Fixes: 81
Registered: ‎22-02-2016

Re: External links

Thanks @LouisaMartin, i will check it out on staging when it has been done. I beleive its an 'admin' setting so no push to production is needed? I mention this because I have been experimenting with the search drop down menu and wouldn't want that pushed up to the live site. If it's an admin setting then its all seperate to the Studio portion of the system (where any work I have done on staging lives). Wouldn't want anything pushed up from that yet!

Frontend Web Developer | www.plus.net

If you have an idea to improve the community, create a new topic on our Community Feedback board to start a discussion about your idea.

Anotherone
Champion
Posts: 19,107
Thanks: 457
Fixes: 21
Registered: ‎31-08-2007

Re: External links

As mentioned in message 7 Lithium now seem to have done whatever was needed, and this has been implemented on Staging and here on Live, the last part of which I assume was done by @jaread83?

jaread83
Hero
Posts: 3,438
Thanks: 1,490
Fixes: 81
Registered: ‎22-02-2016

Re: External links

The fix was applied to staging but I needed to ask them to put this one fix up on its own seperately from the other changes on staging as we have some things on there that aren't finished yet and wouldn't want those changes to go up while work is still going on with it.

Frontend Web Developer | www.plus.net

If you have an idea to improve the community, create a new topic on our Community Feedback board to start a discussion about your idea.

bobpullen
Community Gaffer
Community Gaffer
Posts: 16,926
Thanks: 5,012
Fixes: 317
Registered: ‎04-04-2007

Re: External links

@dvorak, if you're happy, fancy marking message 9 as the fix?

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

jaread83
Hero
Posts: 3,438
Thanks: 1,490
Fixes: 81
Registered: ‎22-02-2016

Re: External links

Fix

I should have mentioned this in my previous reply but this fix is now LIVE.

When highlighting text in the text editor and clicking the link button, the target select box will have open in new window as the default instead of open in current window. I have tested it in several browsers to make sure the behaviour is consistent and it works as expected. With this fix alongside my script to open all links in a new tab (if no target is given) the only way that a content link will open in the current window is if the user explicitly sets it in the link manager (and you can blame them for doing that ;)).

Frontend Web Developer | www.plus.net

If you have an idea to improve the community, create a new topic on our Community Feedback board to start a discussion about your idea.

Anotherone
Champion
Posts: 19,107
Thanks: 457
Fixes: 21
Registered: ‎31-08-2007

Re: External links

I had already mentioned it in my message 9 Roll_eyesKnuppel

jaread83
Hero
Posts: 3,438
Thanks: 1,490
Fixes: 81
Registered: ‎22-02-2016

Re: External links

Message 9 didn't provide much context for anyone who wanted to read the OP and then see the solution straight after it. That is why I added some detail to the reply so anyone seeing this thread will get all the info they need without jumping around different posts to read whats going on.

Frontend Web Developer | www.plus.net

If you have an idea to improve the community, create a new topic on our Community Feedback board to start a discussion about your idea.

dvorak
Moderator
Moderator
Posts: 29,716
Thanks: 6,593
Fixes: 1,485
Registered: ‎11-01-2008

Re: External links


@Anotherone wrote:

I had already mentioned it in my message 9 Roll_eyesKnuppel


you're just trying to get your solution count up Tongue

Customer / Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'