Page 1 of 1

Possible to open URL links in a new tab?

Posted: Fri Mar 12, 2021 2:54 pm
by virtualsky
Is there a way of telling Flatpress to open external URL links in a new browser tab, rather than going to it in the active window (like using target="_new" in HTML)? When referencing other web sites, I'd like to keep my blog still active for my visitors, rather than sending off somewhere else.

Re: Possible to open URL links in a new tab?

Posted: Sun Mar 14, 2021 7:33 am
by Lubomír Ludvík
use html tag

Code: Select all

<html>
<a href="http://www.vets.estranky.cz/clanky/vpm-okres-znojmo/resice" target="_blank"> Pokus</a>
</html>
or edit BBCode (add target="_blank"), line 138 in plugin.bbcode.php

Code: Select all

$extern = !$local ? ' class="externlink" target="_blank" title="Go to ' . $the_url . '"' : '';

Re: Possible to open URL links in a new tab?

Posted: Sun Mar 14, 2021 2:44 pm
by virtualsky
Lubomír Ludvík wrote: Sun Mar 14, 2021 7:33 am or edit BBCode (add target="_blank"), line 138 in plugin.bbcode.php

Code: Select all

$extern = !$local ? ' class="externlink" target="_blank" title="Go to ' . $the_url . '"' : '';
Thank you so much! I added the snippet to the BBCode.php script and it works perfectly. :D

Much appreciated!
David.

Re: Possible to open URL links in a new tab?

Posted: Sun Jul 10, 2022 9:43 pm
by virtualsky
Can someone tell me how I can achieve the same results under the new Smarty Update? The BBCode.php file doesn't look quite the same as 1.2.x

Re: Possible to open URL links in a new tab?

Posted: Thu Jul 28, 2022 1:40 pm
by Arvid
The same, just line 142 :)