2015-08-02, 03:16 PM
I noticed you cannot use [iurl] tags in myBB, and there is no option to specify the target of a link.
The only post I could find on this issue was here, from 8 years ago.
Obviously the coding is now much different, as I found.
Is there a method that allows internal linking, or a plugin? If not, would someone be able to post the updated code for the current version of myBB?
I could try it myself, but I would only be guessing, and have to do it by trial and error.
Found a newer post on the same topic here.
Decided to give it a go and the steps worked, with only a minor change to the last part. The new code is:
It works perfectly.
The only post I could find on this issue was here, from 8 years ago.
Obviously the coding is now much different, as I found.
Is there a method that allows internal linking, or a plugin? If not, would someone be able to post the updated code for the current version of myBB?
I could try it myself, but I would only be guessing, and have to do it by trial and error.
Found a newer post on the same topic here.
Decided to give it a go and the steps worked, with only a minor change to the last part. The new code is:
global $mybb;
if(!preg_match("#^[a-z0-9]+://#i", $url)
if(strpos($url, $mybb->settings['bburl']) !== false)
{
$link = "<a href=\"$url\"{$nofollow}>$name</a>";
}
else
{
$link = "<a href=\"$url\" target=\"_blank\"{$nofollow}>$name</a>";
}
It works perfectly.