Possible to open URL links in a new tab?

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
User avatar
virtualsky
Posts: 14
Joined: Thu Mar 11, 2021 4:50 am
Location: Saskatchewan, Canada
Contact:

Possible to open URL links in a new tab?

Post by virtualsky » Fri Mar 12, 2021 2:54 pm

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.

Lubomír Ludvík
Posts: 27
Joined: Wed Feb 20, 2019 7:44 pm
Location: Rouchovany
Contact:

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

Post by Lubomír Ludvík » Sun Mar 14, 2021 7:33 am

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 . '"' : '';

User avatar
virtualsky
Posts: 14
Joined: Thu Mar 11, 2021 4:50 am
Location: Saskatchewan, Canada
Contact:

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

Post by virtualsky » Sun Mar 14, 2021 2:44 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest