How do i get links to open in new window.

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
kirkt02
Registered User
Posts: 32
Joined: Sun Sep 30, 2012 8:59 pm

How do i get links to open in new window.

Post by kirkt02 »

Hi i am having a problem getting links to open in a new window.
Every link that is click opens in the same window. so people have to do a back click to get back to the forum and mopst are just closing the window thuis closeing the forum out.

I was reading this over here.
https://www.phpbb.com/kb/article/links- ... w-windows/

for Modifying auto-detected links

and it tell syou to find this

Code: Select all

    $html    = "$whitespace<!-- $tag --><a$class href=\"$url\">$text</a><!-- $tag -->$append";
and replace with this.

Code: Select all

        if ($type == MAGIC_URL_EMAIL)
        {
            $html    = "$whitespace<!-- $tag --><a$class href=\"$url\">$text</a><!-- $tag -->$append";    
        }
        else 
        {
            $html    = "$whitespace<!-- $tag --><a$class href=\"$url\" onclick=\"window.open(this.href);return false;\">$text</a><!-- $tag -->$append";
        } 
but it is not telling me where to find it. it says around line 592? what template ??? hahah :lol:

I dont want the bbcode thing, i just want people to be able to post a link, and when clicked it opens in a new window links should open a new window by default, you go to any website or forum they all do. phpbb has to be complicated, it's silly
People are leaving because they closing the darn windows out and it closing the forum, so they are getting aggravated on closing the windows out all the time by habbit
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: How do i get links to open in new window.

Post by Oyabun1 »

It's not a template file it is one of the core PHP files.

The part of the article that mentions the line number also gives the name and path of the file. This part, "Therefor open the includes/functions_content.php and look for following line (which should be around line 592):" means to download and open the functions_content.php file from the includes folder of the board installation on the server and then look for the specified line.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22750
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably.

Re: How do i get links to open in new window.

Post by Mick »

kirkt02 wrote:you go to any website or forum they all do. phpbb has to be complicated
Are you sure 'they all' do'? This isn't a just a phpBB thing, it is becoming standard practice to not open new windows, have a read of beware opening links in new windows.
"The more connected we get the more alone we become" - Kyle Broflovski©
User avatar
HGN
Former Team Member
Posts: 4706
Joined: Wed Dec 03, 2008 1:53 pm
Location: The Netherlands
Name: Alfred
Contact:

Re: How do i get links to open in new window.

Post by HGN »

kirkt02 wrote:I was reading this over here.
https://www.phpbb.com/kb/article/links- ... w-windows/
You could also install the MOD https://www.phpbb.com/customise/db/mod/prime_links/
User avatar
Lumpy Burgertushie
Registered User
Posts: 68115
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How do i get links to open in new window.

Post by Lumpy Burgertushie »

as much as I hate the change, I had to learn to either right click and choose open in new window. now I have one of the buttons on my mouse to open links in a new window.

I really do not understand this change but hey, what can we do.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51552
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How do i get links to open in new window.

Post by stevemaury »

For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
Lumpy Burgertushie
Registered User
Posts: 68115
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How do i get links to open in new window.

Post by Lumpy Burgertushie »

I have read that before and I don't think it is a good discussion of the problem.

This is one person's opinion using name calling etc. to make his point.

The fact is that the open in new link behaviour was around from the beginning. To say that experienced users would find it annoying is rediculous. I am an experienced user, I have been online since the beginning of the web and I find it annoying that I have to learn a new process for opening windows after all these years.

To say that new user's would find it confusing is also rediculous. New users would not know any different and would learn how to deal with whatever the methods are just like we all did back when the www first came along.

Now, it really doesnt' do any good to have the conversation again since the "powers that be" have decided that this is the way it will be for the future and this is not really the place to have the discussion.

so, bottom line is , if you don't like this then make the changes needed to overcome it like I and many others have.

any web site I have will be setup so that internal links open in the same window and external links open in new windows.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22750
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably.

Re: How do i get links to open in new window.

Post by Mick »

Personally I think new users, on anything web based with links, should be encouraged to use right click and "Open Link in New Window" if that's what they want to do. The software works the way the author intended and the user has the option to take that route or open in a new window.
"The more connected we get the more alone we become" - Kyle Broflovski©
User avatar
Lumpy Burgertushie
Registered User
Posts: 68115
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How do i get links to open in new window.

Post by Lumpy Burgertushie »

Mick wrote:The software works the way the author intended and the user has the option to take that route or open in a new window.
well, previous to the w3c deciding that opening new windows was not ok, phpbb and most other web page authors designed their software/websites to open links in new windows.

now, since opening new windows is no longer considered proper, authors have had to change the way they design their websites and users have had to learn a new way to do what they want.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22750
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably.

Re: How do i get links to open in new window.

Post by Mick »

It's called progress Robert.

And I so loved DOS!!
"The more connected we get the more alone we become" - Kyle Broflovski©
User avatar
Lumpy Burgertushie
Registered User
Posts: 68115
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How do i get links to open in new window.

Post by Lumpy Burgertushie »

Mick wrote:It's called progress Robert.

And I so loved DOS!!
:lol:

Progress, like beauty, can certainly be in the eye of the beholder.

Just think, who would have ever thought that green frogs would be beautiful until Miss Piggy came along.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22750
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably.

Re: How do i get links to open in new window.

Post by Mick »

Leave Piggy out of this!!

Did we used to have the option to right click and "Open in the same window"? I really don't recall.
"The more connected we get the more alone we become" - Kyle Broflovski©
kirkt02
Registered User
Posts: 32
Joined: Sun Sep 30, 2012 8:59 pm

Re: How do i get links to open in new window.

Post by kirkt02 »

Oyabun1 wrote:It's not a template file it is one of the core PHP files.

The part of the article that mentions the line number also gives the name and path of the file. This part, "Therefor open the includes/functions_content.php and look for following line (which should be around line 592):" means to download and open the functions_content.php file from the includes folder of the board installation on the server and then look for the specified line.
well i guess i wont be getting any links opening in a new window then.
Like i know what that means.

Is there no step by step directions on how to do this.

This is really stupid that you have to go through all of this of installing something juts to get a link to open in new window.
Is is int there some kind of code that can be added in a temple or somthing, i honestly do not know what that means at all, and nothing is explained how to do it.

Where am i supposed to find step by step directions on how to download then install what i need.
There is nothing over there that tells me how to do this.
Then the bbcode part i dont even have a bbcode html file template thing?
Last edited by kirkt02 on Mon Dec 03, 2012 5:55 pm, edited 2 times in total.
kirkt02
Registered User
Posts: 32
Joined: Sun Sep 30, 2012 8:59 pm

Re: How do i get links to open in new window.

Post by kirkt02 »

edited, clicked quote by misteak
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22750
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably.

Re: How do i get links to open in new window.

Post by Mick »

kirkt02 wrote:Is is int there some kind of code that can be added in a temple or somthing, i honestly do not know what that means at all, and nothing is explained how to do it.
Whatever instructions you're following will have code to be added somewhere or other. What are you following that has no instructions? If it's the KB linked to previously there are plenty of explicit instructions.

Most instructions on phpBB.com for adding code, be it a full blown MOD or a KB article, tell you exactly what to do. Usually all you have to do is open a file (using a GOOD text editor), search for a certain piece code and then follow what it says to do once you've found the piece of code, it's just copying and pasting.
"The more connected we get the more alone we become" - Kyle Broflovski©
Locked

Return to “[3.0.x] Support Forum”