BBCode for links

Support for PhpBB3 BBCodes. Post here to get help with any BBCode related issue here
There is no support here! Only Read Access!
Forum rules
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe exactly what it is you want.
3. Tell us what version of phpBB3 you are currently using.
Else your topic may be ignored or locked!
Locked
Marieke
BBCoder I
BBCoder I
Posts: 3
Joined: 23 Jul 2010, 09:48

BBCode for links

Post 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
KukY13
BBCoder III
BBCoder III
Posts: 96
Joined: 26 Jun 2010, 16:23
Contact:

Re: BBCode for links

Post 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>
Image
Marieke
BBCoder I
BBCoder I
Posts: 3
Joined: 23 Jul 2010, 09:48

Re: BBCode for links

Post 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.)
KukY13
BBCoder III
BBCoder III
Posts: 96
Joined: 26 Jun 2010, 16:23
Contact:

Re: BBCode for links

Post 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
Image
Marieke
BBCoder I
BBCoder I
Posts: 3
Joined: 23 Jul 2010, 09:48

Re: BBCode for links

Post by Marieke »

Ohw, that works lovely!
Thanks a lot for your time ^^.
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: BBCode for links

Post 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
Locked