Permalink
Browse files

Fixed youtube player

Fixes #54
  • Loading branch information...
Halamix2 committed Aug 25, 2017
1 parent 07a9f8e commit ec4e6e600a7e2f331fe297be3445556a3efd79b5
Showing with 1 addition and 3 deletions.
  1. +1 −3 classes/PostingFunctions.php
@@ -138,9 +138,7 @@ public static function UPBcoding($text) {
$msg = preg_replace("/\[img\](.*?)\[\/img\]/si", "<div class=\"image_block\"><img src=\"\\1\" border=\"0\"></div>", $msg);
$msg = preg_replace("/\[img=(.*?)x(.*?)](.*?)\[\/img\]/si","<img src=\"\\3\" border=\"0\" width=\"\\1\" height=\"\\2\">",$msg);
$msg = preg_replace("/\[offtopic\](.*?)\[\/offtopic\]/si", "<font color='blue'>Offtopic: \\1</font>", $msg);
$msg = preg_replace("/\[youtube\](.*?)\[\/youtube\]/si", '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/\\1&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/\\1&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object>', $msg);
$msg = preg_replace("/\[youtubecp1\](.*?)\[\/youtubecp1\]/si", '<object width="416" height="337"><param name="movie" value="http://www.youtube.com/cp/\\1"></param><embed src="http://www.youtube.com/cp/\\1" type="application/x-shockwave-flash" width="416" height="337"></embed></object>', $msg);
$msg = preg_replace("/\[youtubecp2\](.*?)\[\/youtubecp2\]/si", '<object width="746" height="413"><param name="movie" value="http://www.youtube.com/cp/\\1"></param><embed src="http://www.youtube.com/cp/\\1" type="application/x-shockwave-flash" width="746" height="413"></embed></object>', $msg);
$msg = preg_replace("/\[youtube\](.*?)\[\/youtube\]/si", '<iframe width="425" height="344" src="https://www.youtube.com/embed/\\1" frameborder="0" allowfullscreen></iframe>', $msg);
$msg = preg_replace("/\[google\](.*?)\[\/google\]/si", '<embed style="width:425px; height:350px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=\\1" flashvars=""></embed>',$msg);
while (preg_match("/\[quote(.*?)\](.*?)\[\/quote\]/si", $msg))

0 comments on commit ec4e6e6

Please sign in to comment.