Skip to content

Commit

Permalink
Fixed embedded videos not working after mybb#2968
Browse files Browse the repository at this point in the history
  • Loading branch information
Shade- committed Mar 17, 2018
1 parent 7daafd7 commit 3008325
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions inc/class_parser.php
Expand Up @@ -450,6 +450,16 @@ function parse_mycode($message, $options=array())
$message = preg_replace_callback("#\[img=([1-9][0-9]*)x([1-9][0-9]*) align=(left|right)\](\r\n?|\n?)(https?://([^<>\"']+?))\[/img\]#is", array($this, 'mycode_parse_img_disabled_callback4'), $message);
}

// Convert videos when allow.
if(!empty($this->options['allow_videocode']))
{
$message = preg_replace_callback("#\[video=(.*?)\](.*?)\[/video\]#i", array($this, 'mycode_parse_video_callback'), $message);
}
else
{
$message = preg_replace_callback("#\[video=(.*?)\](.*?)\[/video\]#i", array($this, 'mycode_parse_video_disabled_callback'), $message);
}

$message = $this->mycode_auto_url($message);

$message = str_replace('$', '&#36;', $message);
Expand Down Expand Up @@ -497,16 +507,6 @@ function parse_mycode($message, $options=array())
}
}

// Convert videos when allow.
if(!empty($this->options['allow_videocode']))
{
$message = preg_replace_callback("#\[video=(.*?)\](.*?)\[/video\]#i", array($this, 'mycode_parse_video_callback'), $message);
}
else
{
$message = preg_replace_callback("#\[video=(.*?)\](.*?)\[/video\]#i", array($this, 'mycode_parse_video_disabled_callback'), $message);
}

return $message;
}

Expand Down

0 comments on commit 3008325

Please sign in to comment.