RC-8 Links dont open in new window... but can it?

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Get Involved
MaddDragger
Registered User
Posts: 24
Joined: Sun Nov 04, 2007 3:51 pm

RC-8 Links dont open in new window... but can it?

Post by MaddDragger » Thu Dec 06, 2007 11:17 pm

What do i need to change to make my forums open ALL links to a new window. I have found this topic for all the other phpbb released but as for phpbb3... i can only find something about it for RC-2 wich of course... is old. thanks for any help.

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: RC-8 Links dont open in new window... but can it?

Post by drathbun » Thu Dec 06, 2007 11:43 pm

There have been a number of discussions on this over time... but the simple summary is that phpBB3's standard is that links open in the same window. To alter that would require a MOD, therefore moved to MOD Requests. Thanks.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

MaddDragger
Registered User
Posts: 24
Joined: Sun Nov 04, 2007 3:51 pm

Re: RC-8 Links dont open in new window... but can it?

Post by MaddDragger » Thu Dec 06, 2007 11:45 pm

a more detailed version for the problem i'm having.... read below.

I intergrated phpbb3 RC-8 into my website template. Im using an Iframe to display the forums in my website. I had to shrink the ProSilver style template inorder for it to look correct to fit inside the iFrame.

Problem is, when you click on a link posted you have to scroll forever in BOTH directions if the link is to another website. instead of opening all new windows and links within my website, i wanted to just open in a new window... for ALL posts. I would really really appreciate the help as soon as possible. i understand RC-8 is still a newborn but i would assume the links problem would still be the same from other versions.. i am hoping anyways.. once again, thank you very much.

MaddDragger
Registered User
Posts: 24
Joined: Sun Nov 04, 2007 3:51 pm

Re: RC-8 Links dont open in new window... but can it?

Post by MaddDragger » Thu Dec 06, 2007 11:54 pm

ahh darn.. this stinks that it has to be a mod request and not a simple find and replace.. :(

someone please help me. thanks!

sevsev
Registered User
Posts: 26
Joined: Sun Oct 07, 2007 6:56 pm

Re: RC-8 Links dont open in new window... but can it?

Post by sevsev » Fri Dec 07, 2007 6:30 pm

I would like this also, all topic, signature & user website links to open in a new "_blank" window. This would be great
Andrew

User avatar
ascensions
Registered User
Posts: 121
Joined: Wed Oct 05, 2005 5:54 pm
Location: Cardiff, Wales
Contact:

Re: RC-8 Links dont open in new window... but can it?

Post by ascensions » Fri Dec 07, 2007 9:25 pm

Open Viewtopic.php

Find:

Code: Select all

$message = bbcode_nl2br($message);
	$message = smiley_text($message);
Underneath add:

Code: Select all

$message = preg_replace('/(class="postlink")/','class="postlink" rel="nofollow" target="_blank"',$message); 
Find Beer

Code: Select all

Drink

MaddDragger
Registered User
Posts: 24
Joined: Sun Nov 04, 2007 3:51 pm

Re: RC-8 Links dont open in new window... but can it?

Post by MaddDragger » Sat Dec 08, 2007 7:50 am

Thank you! you are wonderfull!

Beer gladly accepted. It's miller time. :D

Stu@PassionFord
Registered User
Posts: 68
Joined: Wed Jan 14, 2004 11:26 am
Location: Blackpool, Uk
Contact:

Re: RC-8 Links dont open in new window... but can it?

Post by Stu@PassionFord » Sun Dec 09, 2007 12:59 am

Fabulous info. :D

sevsev
Registered User
Posts: 26
Joined: Sun Oct 07, 2007 6:56 pm

Re: RC-8 Links dont open in new window... but can it?

Post by sevsev » Sun Dec 09, 2007 1:17 am

Thanks! And you added the nofollow too :)
Andrew

User avatar
ascensions
Registered User
Posts: 121
Joined: Wed Oct 05, 2005 5:54 pm
Location: Cardiff, Wales
Contact:

Re: RC-8 Links dont open in new window... but can it?

Post by ascensions » Wed Dec 12, 2007 5:58 pm

Welcome.

renet
Registered User
Posts: 126
Joined: Tue May 04, 2004 5:02 pm
Location: Germany

Re: RC-8 Links dont open in new window... but can it?

Post by renet » Thu Dec 13, 2007 5:13 pm

is there a possibility to add an option, for how links should be treated, in the admin cp?

and additionally a way to let the users decide, if the link opens in a new window, or not...?

that*d be great! =)

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: RC-8 Links dont open in new window... but can it?

Post by A_Jelly_Doughnut » Thu Dec 13, 2007 7:33 pm

Prime Links

More code, but more features as well. Not sure if what you ask for is one of them, but you could always ask in that topic :)
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

renet
Registered User
Posts: 126
Joined: Tue May 04, 2004 5:02 pm
Location: Germany

Re: RC-8 Links dont open in new window... but can it?

Post by renet » Fri Dec 14, 2007 7:03 am

perfect, this is a fine solution for me. :) thx!

naushadhassam
Registered User
Posts: 506
Joined: Wed Aug 15, 2007 9:57 pm
Contact:

Re: RC-8 Links dont open in new window... but can it?

Post by naushadhassam » Fri Dec 14, 2007 11:25 am

thanks for this :D
Free Hosting - Here
Sports Entertainment Online ( A PS3 Online Gaming Community ) - Here
FREE UNLIMITED HOSTING FOR PHPBB MOD MAKERS - PM ME FOR MORE INFO ( MY WAY ON DONATING TO PHPBB )

amk13
Registered User
Posts: 1
Joined: Thu Dec 27, 2007 2:37 pm

Re: RC-8 Links dont open in new window... but can it?

Post by amk13 » Thu Dec 27, 2007 2:39 pm

works perfect in gold release

Locked

Return to “[3.0.x] MOD Requests”