Open external links in new tab/window

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
TexasTip
Registered User
Posts: 98
Joined: Sun Jan 16, 2011 6:21 pm

Open external links in new tab/window

Post by TexasTip »

I have researched this extensively here and am really confused.

Without using an extension, or javascript, is there any code that can be modified to allow any posted link to open externally?

Like this example doesn't open a new window:
Meteor Showers

Is there any way to:

1) Add code to force all external links to open externally?

2) Maybe add code that allows you to type a name like Meteor Showers and then highlight and add the external link? Like XenForo and other BB software does?

This would be a real PLUS for me, and I'd bet others as well!
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Open external links in new tab/window

Post by Brf »

TexasTip wrote: Tue Jan 03, 2017 6:33 pm 2) Maybe add code that allows you to type a name like Meteor Showers and then highlight and add the external link? Like XenForo and other BB software does?
Highlight the words. Click the URL bbcode. Type in the URL after the URL= in the text.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Open external links in new tab/window

Post by david63 »

Another option which does not require any other action and works all the time is click the middle mouse button on the link
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2353
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: Open external links in new tab/window

Post by P_I »

Why do you want to break a HTML standard? Let the user decide using their right click button in their browser.

Some background, H83: Using the target attribute to open a new window on user request and indicating this in link text | Techniques for WCAG 2.0
The objective of this technique is to avoid confusion that may be caused by the appearance of new windows that were not requested by the user. Suddenly opening new windows can disorient users or be missed completely by some.
More reasons in Should external links open in a new tab or not? | Be Like Water

Added: Knowledge Base - Links Opening New Windows which states (my bold)
Compared to phpBB3, links in phpBB2 had a slightly different behaviour: When you clicked them, they opened a new window with the requested page. This was changed in phpBB3 for a couple of reasons, but one of the most important ones was the goal to achieve XHTML 1.0 Strict-validation for the whole board.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
TexasTip
Registered User
Posts: 98
Joined: Sun Jan 16, 2011 6:21 pm

Re: Open external links in new tab/window

Post by TexasTip »

Thanks for all of the replies...and I knew or have read about the comments you have made.

I must live in a different world; I want external links to open in a new tab because I like to keep a firm grasp or where I am in a forum. But c'est la vie.

It would still be a neat phpBB option to allow external links to open external tabs as a forum option.

P.S. Nobody said how cool that meteor tracking page was! :)
TexasTip
Registered User
Posts: 98
Joined: Sun Jan 16, 2011 6:21 pm

Re: Open external links in new tab/window

Post by TexasTip »

Brf wrote: Tue Jan 03, 2017 6:38 pm
TexasTip wrote: Tue Jan 03, 2017 6:33 pm 2) Maybe add code that allows you to type a name like Meteor Showers and then highlight and add the external link? Like XenForo and other BB software does?
Highlight the words. Click the URL bbcode. Type in the URL after the URL= in the text.
Cool...thanks!

EDIT: Wait, that didn't work!
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2353
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: Open external links in new tab/window

Post by P_I »

TexasTip wrote: Tue Jan 03, 2017 7:53 pmI must live in a different world; I want external links to open in a new tab because I like to keep a firm grasp or where I am in a forum. But c'est la vie.
That's the whole point. phpBB should operate according to web standards and then let users, typically through their browser, make their own choices.

For many forums that I visit, I've become accustomed to right clicking to open some links in a new tab when I know it will break my flow of reading the forum. I just wouldn't want the forum admins to make the choice for me because they don't know my browsing/reading habits.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Open external links in new tab/window

Post by stevemaury »

TexasTip wrote: Tue Jan 03, 2017 7:53 pm
It would still be a neat phpBB option to allow external links to open external tabs as a forum option.
But you didn't ask for an option. You asked how to open all links in a new tab/window ("force all external links to open externally"). By allowing the user to choose with his right or middle mouse button, phpBB does offer an option.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
Volksdevil
Registered User
Posts: 2415
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: Open external links in new tab/window

Post by Volksdevil »

Why not just use this extension?

EDIT: I don't know what's wrong with some people on here, the pedanticness and lack of ability to comprehend what people are asking is getting ridiculous.
My phpBB Extensions
Finally found great Website Hosting from :arrow: KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Twitch | My Volkswagen Corrado G60
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Open external links in new tab/window

Post by Lumpy Burgertushie »

so, would you rather ask for clarification so that you can give people good advice for their problem or would you rather guess at what they really want and take the chance of creating much bigger problems because you did not understand what they needed?


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
Volksdevil
Registered User
Posts: 2415
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: Open external links in new tab/window

Post by Volksdevil »

It's pretty obvious what he wants. It's right there in the first post. External links to open in a new window, ideally without using an extension.

Simple.
My phpBB Extensions
Finally found great Website Hosting from :arrow: KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Twitch | My Volkswagen Corrado G60
TexasTip
Registered User
Posts: 98
Joined: Sun Jan 16, 2011 6:21 pm

Re: Open external links in new tab/window

Post by TexasTip »

Volksdevil wrote: Wed Jan 04, 2017 12:40 am Why not just use this extension?
I tried that and it did not work properly...I'll give it another try tomorrow. Thanks.
johnnytype2
Registered User
Posts: 55
Joined: Sun Jan 08, 2017 8:16 pm

Re: Open external links in new tab/window

Post by johnnytype2 »

Volksdevil wrote: Wed Jan 04, 2017 1:39 am It's pretty obvious what he wants. It's right there in the first post. External links to open in a new window, ideally without using an extension.

Simple.
THIS ^^

I know this breaks XHTML convention but as a forum admin i dont want users taken away from my forum when they click an external link. And on talking to a broad section of users [out of 10K users] who uses the forum all agree.

Like Volksdevil I dont understand the thinking of some people in this topic. Should we, the forum admins not have this as a global choice? im really not a fascist...

plainly; can we (forum admins) have a global option that external links open in a new window without installing an extension? please
:::EARLYBAY::: for fans of low light vans, 1967-1972
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26508
Joined: Fri Aug 29, 2008 9:49 am

Re: Open external links in new tab/window

Post by Mick »

johnnytype2 wrote: Fri Jan 13, 2017 8:38 amcan we (forum admins) have a global option that external links open in a new window without installing an extension? please
You can make a feature request at Area51 but I don't think that will get added any time soon.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
johnnytype2
Registered User
Posts: 55
Joined: Sun Jan 08, 2017 8:16 pm

Re: Open external links in new tab/window

Post by johnnytype2 »

Mick wrote: Fri Jan 13, 2017 8:58 am
johnnytype2 wrote: Fri Jan 13, 2017 8:38 amcan we (forum admins) have a global option that external links open in a new window without installing an extension? please
You can make a feature request at Area51 but I don't think that will get added any time soon.
thanks Mick, ill do that.

i was surprised that this wasn't one of the important issues addressed, i mean to at least give us a choice. Ill have to wait for a ext or hack for this.
TexasTip wrote: Tue Jan 03, 2017 7:53 pm P.S. Nobody said how cool that meteor tracking page was! :)
it was well cool 8-)
Last edited by johnnytype2 on Fri Jan 13, 2017 9:16 am, edited 1 time in total.
:::EARLYBAY::: for fans of low light vans, 1967-1972
Locked

Return to “[3.1.x] Support Forum”