Thanks to vbmechanic for pointing me in the right direction. I had to make a few changes, but it is now working. If you want to allow only the administrator group (in this case group 6) to be able to post dynamic urls, just do the following:
Open includes/functions_bbcodeparse.php and find:
PHP Code:
// ###################### Start bbcodeparseimgcode #######################
function handle_bbcode_img($bbcode, $dobbimagecode)
{
global $vboptions, $bbuserinfo;
if($dobbimagecode AND ($bbuserinfo['userid'] == 0 OR $bbuserinfo['showimages']))
{
// do [img]https://vborg.vbsupport.ru/[/img]
$bbcode = preg_replace('#\[img\]\s*(https?://([^<>*"' . iif(!$vboptions['allowdynimg'], '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "handle_bbcode_img_match('\\1')", $bbcode);
}
$bbcode = preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "handle_bbcode_url('\\1', '', 'url')", $bbcode);
return $bbcode;
and replace with:
PHP Code:
// ###################### Start bbcodeparseimgcode #######################
function handle_bbcode_img($bbcode, $dobbimagecode)
{
global $vboptions, $bbuserinfo, $post;
if($dobbimagecode AND ($bbuserinfo['userid'] == 0 OR $bbuserinfo['showimages']))
{
// do [img]https://vborg.vbsupport.ru/[/img]
$bbcode = preg_replace('#\[img\]\s*(https?://([^<>*"' . iif($post['usergroupid'] !=6, '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "handle_bbcode_img_match('\\1')", $bbcode);
}
$bbcode = preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "handle_bbcode_url('\\1', '', 'url')", $bbcode);
return $bbcode;
}
This will allow whatever usergroup specified at $post['usergroupid'] !=6 to post dynamic URLs. With this change, it does not matter what the setting for Allow Dynamic URL for [IMG] Tag is set in the Administrators Control Panel as only the usergroup specified will be allowed. If you want a group other than the administrators to be able to post dynamic URLs, then just change the 6 to whatever group you want.