Page 1 of 1

BBCode for links

Posted: 23 Jul 2010, 10:14
by Marieke
Hello,
some time ago I wanted all the links to open in a different browser.
I found the way to do this overhere: http://www.phpbb.com/kb/article/links-o ... w-windows/

However, I just realized that there a are a couple of links that I would like to open in the exact same browsers (for example links to other topics or posts). Is it possible to add another BBCode for these links and if so, how can I do this? (What should I add to what textarea?)

Thanks a lot for your time.

Marieke

p.s. I use 3.0.7-PL1

Re: BBCode for links

Posted: 23 Jul 2010, 10:23
by KukY13
You need to have anchor tags with diffrent targets.
So, your default is that links open in diffrent tabs:
URL = <a href="URL" target="_blank"></a>
Your new tag has to open tags in same window:
URL = <a href="URL" target="_self"></a>

Re: BBCode for links

Posted: 23 Jul 2010, 10:29
by Marieke
Yes exactly!
However, how do I add a new BBCode for that since I can't 'use' URL again.

Could you please tell me what to add that? (What I should add to the different textareas etc.)

Re: BBCode for links

Posted: 23 Jul 2010, 10:40
by KukY13
Make 2 BBCodes:
BB:

Code: Select all

[surl]{URL}[/surl]
HTML:

Code: Select all

<a href="{URL}" target="_self">{URL}</a>
Help:
Link opening on same page: [surl]URL[/surl] or [surl=URL]Display text[/surl]
Display on posting page: YES
BB:

Code: Select all

[surl={URL}]{TEXT}[/surl]
HTML:

Code: Select all

<a href="{URL}" target="_self">{TEXT}</a>
Help:
*NONE*
Display on posting page: NO

Re: BBCode for links

Posted: 23 Jul 2010, 11:16
by Marieke
Ohw, that works lovely!
Thanks a lot for your time ^^.

Re: BBCode for links

Posted: 23 Jul 2010, 17:20
by cisco007
there was no need to do that, this mod does exactly what you want without having to use bbcodes for the links! it automatically makes them open up in the same window or another window, and super easy to install!

http://www.phpbb.com/community/viewtopi ... 0&t=581660