Possible to open URL links in a new tab?
- virtualsky
- Posts: 11
- Joined: Thu Mar 11, 2021 4:50 am
- Location: Saskatchewan, Canada
- Contact:
Possible to open URL links in a new tab?
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.
-
- Posts: 25
- Joined: Wed Feb 20, 2019 7:44 pm
- Location: Rouchovany
- Contact:
Re: Possible to open URL links in a new tab?
use html tag
or edit BBCode (add target="_blank"), line 138 in plugin.bbcode.php
Code: Select all
<html>
<a href="http://www.vets.estranky.cz/clanky/vpm-okres-znojmo/resice" target="_blank"> Pokus</a>
</html>
Code: Select all
$extern = !$local ? ' class="externlink" target="_blank" title="Go to ' . $the_url . '"' : '';
- virtualsky
- Posts: 11
- Joined: Thu Mar 11, 2021 4:50 am
- Location: Saskatchewan, Canada
- Contact:
Re: Possible to open URL links in a new tab?
Thank you so much! I added the snippet to the BBCode.php script and it works perfectly.Lubomír Ludvík wrote: ↑Sun Mar 14, 2021 7:33 am or edit BBCode (add target="_blank"), line 138 in plugin.bbcode.phpCode: Select all
$extern = !$local ? ' class="externlink" target="_blank" title="Go to ' . $the_url . '"' : '';

Much appreciated!
David.
Who is online
Users browsing this forum: No registered users and 1 guest