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: 67
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.
It ain't retro to me.... it's just how I live!
https://www.thegrove.in.nf/retroblog

Lubomír Ludvík
Posts: 44
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: 67
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.
It ain't retro to me.... it's just how I live!
https://www.thegrove.in.nf/retroblog

User avatar
virtualsky
Posts: 67
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 Jul 10, 2022 9:43 pm

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
It ain't retro to me.... it's just how I live!
https://www.thegrove.in.nf/retroblog


Post Reply

Who is online

Users browsing this forum: No registered users and 39 guests