Skip to content
Permalink
Browse files

Merge pull request #58 from Halamix2/youtube

Updated Youtube bbcode
  • Loading branch information...
blackcrack committed Aug 17, 2018
2 parents 10292ae + 77bf841 commit 4f45fdd7ba5ab755c592df46b25c915d40513c4e
Showing with 3 additions and 4 deletions.
  1. +2 −1 changelog.txt
  2. +1 −3 classes/PostingFunctions.php
@@ -17,7 +17,8 @@ v2.2.8 Changelog - unreleased (still in development)
# Fixed Private Messages system & unblocking
# Fixed built-in avatar chooser
# Fixed removing topics with no files in them
# fixed checkbox in manage users
# Fixed checkbox in manage users
# New youtube embedding code (#54)


== NEW FEATURES ==
@@ -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 4f45fdd

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.