cancel
Showing results for 
Search instead for 
Did you mean: 

External links

FIXED
Moderator
Moderator
Posts: 17,254
Thanks: 905
Fixes: 105
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? 

 

 

Will Moderate For Thanks
24 REPLIES
Community Gaffer
Community Gaffer
Posts: 2,859
Thanks: 1,534
Fixes: 62
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.

Community Veteran
Posts: 19,099
Thanks: 434
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.

Community Gaffer
Community Gaffer
Posts: 2,859
Thanks: 1,534
Fixes: 62
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.

Community Veteran
Posts: 19,099
Thanks: 434
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'

Community Gaffer
Community Gaffer
Posts: 2,859
Thanks: 1,534
Fixes: 62
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.

Community Gaffer
Community Gaffer
Posts: 356
Thanks: 417
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
Community Gaffer
Community Gaffer
Posts: 2,859
Thanks: 1,534
Fixes: 62
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.

Community Veteran
Posts: 19,099
Thanks: 434
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?

Community Gaffer
Community Gaffer
Posts: 2,859
Thanks: 1,534
Fixes: 62
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.

Community Gaffer
Community Gaffer
Posts: 12,861
Thanks: 677
Fixes: 64
Registered: 04-04-2007

Re: External links

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

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

Community Gaffer
Community Gaffer
Posts: 2,859
Thanks: 1,534
Fixes: 62
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 Wink).

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.

Community Veteran
Posts: 19,099
Thanks: 434
Fixes: 21
Registered: 31-08-2007

Re: External links

I had already mentioned it in my message 9 Roll eyesKnuppel

Community Gaffer
Community Gaffer
Posts: 2,859
Thanks: 1,534
Fixes: 62
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.

Moderator
Moderator
Posts: 17,254
Thanks: 905
Fixes: 105
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

Will Moderate For Thanks