Topic: Clickable Link - Open New Browser Window

I'm using frames -- menu on the left, main content on the right. PunBB opens in the main frame. My problem is that clickable links in the PunBB posts (message) open to "target=_self", that is... the linked site opens in the same main frame and that's not morally correct if the linked site is not my own.  I would like the clickable link to ALWAYS open a new browser window (target=_blank).  Can anybody give me hints as to how I can do this?

I've searched the forum for "clickable links" but I couldn't get anywhere near this topic.

What file do I look in, and what code do I look for (find) for starters? Has anybody had the same desire and succeeded to do it?  Any code or tips will be much appreciated.

Thank you in advance to members of the community who can help out.

PS... I think the developers of PunBB are doing a great job, and whenever I read complaints in the forum, I wonder if people have lost sight of wonderful service the developers are giving us (and for free, at that.) My sincere thanks to all concerned.


Re: Clickable Link - Open New Browser Window

Try this - http://punbb.informer.com/forums/viewtopic.php?id=17187

3 (edited by Roi 2008-06-05 01:42)

Re: Clickable Link - Open New Browser Window

Thanks Bert... looks like exactly what I am looking for.  Will try it tomorrow... it's midnight here now in Japan.

Edit: The MOD doesn't seem to support 1.2.17 as I couldn't find the code to be replaced in one of the steps in the instructions.  I'll try to contact the author and see if he can help out.  But I do thank you for leading me to the way to a possible solution.  Thanks again.


Re: Clickable Link - Open New Browser Window

Dear Lucas,

<This is text of my email to you.  I hope you find the time to visit this topic. Thank you.>

I was lead to your MOD by one of the PunBB forum members as your MOD seems to be exactly what I am looking for. The MOD clearly states it is tested only for 1.2.15, but being desperate, I tried to apply the MOD to 1.2.17 .

Unfortunately, I met a barrier in the first file:  include\parcer.php:

In the last Find/Replace instruction I couldn't find

return '<a href= ... bla bla

and the nearest code I could find had

return $img_tag;

The bottom line questions are:

1) Do you have a version that supports 1.2.17?
2) If not, can you provide me with some hints as to how I might get your MOD to work in 1.2.17?

My topic in the forum is:

http://punbb.informer.com/forums/viewto … 12#p115312

My knowledge of PHP is pretty much elementary, but I will try my very best to
understand any techie tip you might care to offer. The whole integrity of my
private web site that I am trying to develop very much depend on your MOD.

Thank you in advance for any help you can provide.



Re: Clickable Link - Open New Browser Window

Hello Roi. I've not updated the MOD because I'm waiting PunBB 3 (that'll be the day! ^____^)

Currently I don't have very much time, but I'll update it :-)

Re: Clickable Link - Open New Browser Window

I tried to modify PunBB 1.27 source code and all works.

The line you don't find is the line number 278 of include/parser.php. If it's different from the line I reported in my MOD, probably you have modified it with another MOD. If so, post here which MODs you applied before.

PS: remember that in that point you must substitute also the '}' below