How to open external urls + PHBbb forum links on new window?

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
muratbora
Registered User
Posts: 13
Joined: Thu Feb 15, 2018 8:15 am

How to open external urls + PHBbb forum links on new window?

Post by muratbora » Thu Nov 07, 2019 7:23 am

How to open external urls + PHBbb forum links on new window? I would like to set as tobe open all internal + external links & urls should be open in new window...

User avatar
warmweer
Registered User
Posts: 3055
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: How to open external urls + PHBbb forum links on new window?

Post by warmweer » Thu Nov 07, 2019 8:49 am

See https://www.phpbb.com/customise/db/extension/elonw/
This allows you to force external links to open in a new window, and it could be edited to force all links to open in a new window.
The year is 2192. The British Prime Minister visits Brussels to ask for an extension of the Brexit deadline. No one remembers where this tradition originated, but every year it attracts many tourists from all over the world.

muratbora
Registered User
Posts: 13
Joined: Thu Feb 15, 2018 8:15 am

Re: How to open external urls + PHBbb forum links on new window?

Post by muratbora » Thu Nov 07, 2019 9:01 am

Will it work for 3.2.8 version? is it compatible for 328?

User avatar
warmweer
Registered User
Posts: 3055
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: How to open external urls + PHBbb forum links on new window?

Post by warmweer » Thu Nov 07, 2019 9:13 am

warmweer wrote:
Thu Nov 07, 2019 8:49 am
See https://www.phpbb.com/customise/db/extension/elonw/
This allows you to force external links to open in a new window, and it could be edited to force all links to open in a new window.
I have no idea (last used on 3.2.1) but looking at the code it should work and I remember someone posting that it works on 3.2.7.
Try it on a test post.
The year is 2192. The British Prime Minister visits Brussels to ask for an extension of the Brexit deadline. No one remembers where this tradition originated, but every year it attracts many tourists from all over the world.

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 4066
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: How to open external urls + PHBbb forum links on new window?

Post by HiFiKabin » Thu Nov 07, 2019 9:23 am

muratbora wrote:
Thu Nov 07, 2019 9:01 am
Will it work for 3.2.8 version? is it compatible for 328?
Yes.

muratbora
Registered User
Posts: 13
Joined: Thu Feb 15, 2018 8:15 am

Re: How to open external urls + PHBbb forum links on new window?

Post by muratbora » Thu Nov 07, 2019 11:19 am

It is working, but only opening external urls on new window.
But I want also internal urls ( topics, categories etc ) should be open in new window. How can I do it?

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21681
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: How to open external urls + PHBbb forum links on new window?

Post by Mick » Thu Nov 07, 2019 11:29 am

To receive extension support please visit our Extensions Database and post in the specific extension's designated support area. The link to the support area for each released extension is also available in the first post of each released extension listed in the [3.2.x] Extension Database Releases forum. For extensions still in development (not recommended for a live board) support is in that extensions's topic in the Extensions in Development forum.

For all other coding questions that relate to phpBB, you can visit the phpBB Custom Coding forum.
"The more connected we get the more alone we become" - Kyle Broflovski

User avatar
warmweer
Registered User
Posts: 3055
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: How to open external urls + PHBbb forum links on new window?

Post by warmweer » Thu Nov 07, 2019 12:05 pm

muratbora wrote:
Thu Nov 07, 2019 11:19 am
It is working, but only opening external urls on new window.
But I want also internal urls ( topics, categories etc ) should be open in new window. How can I do it?
As I wrote before
warmweer wrote:
Thu Nov 07, 2019 8:49 am
and it could be edited to force all links to open in a new window.
Out of the box it evaluates whether links are internal or external: if external, then the links are opened in a new window.
So edit the extension (remove the check and let all urls open in a new window.)

However, you should realise that index, viewforum,viewtopic, viewpost, viewprofile, etc... etc... are all internal links :!:
In other words, before you know it, almost everything you click could open in a new window. So I guess you may still want to exclude certain posted links. Is you'll probably have to keep part of the check (and modify it).
Also you mention topics, categories, etc.. I hope you mean posted links to topics, categories, etc, because forums, subforums, topics, posts are all accessed by links.

As Mick said, help with (or with modifying) extensions is best requested in the extension topic itself or in the Custom Coding forum.
The year is 2192. The British Prime Minister visits Brussels to ask for an extension of the Brexit deadline. No one remembers where this tradition originated, but every year it attracts many tourists from all over the world.

Post Reply

Return to “[3.2.x] Support Forum”