root/ip/trunk/includes/bbcode.php
| 155 | 157 | ||
|---|---|---|---|
261 | 'stream' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), | 261 | 'stream' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), |
262 | 'emff' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), | 262 | 'emff' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), |
263 | 'mp3' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), | 263 | 'mp3' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), |
264 | 'vimeo' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), | ||
264 | 'youtube' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), | 265 | 'youtube' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), |
265 | 'googlevideo' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), | 266 | 'googlevideo' => array('nested' => true, 'inurl' => true, 'allow_empty' => false), |
266 | 267 | ||
... | ... | ||
2072 | // Added by Tom XS2 Build 054 | 2073 | // Added by Tom XS2 Build 054 |
2073 | if ($config['switch_bbcb_active_content'] == 1) | 2074 | if ($config['switch_bbcb_active_content'] == 1) |
2074 | { | 2075 | { |
2075 | // FLASH, SWF, FLV, VIDEO, REAL, QUICK, STREAM, EMFF, YOUTUBE, GOOGLEVIDEO | 2076 | // FLASH, SWF, FLV, VIDEO, REAL, QUICK, STREAM, EMFF, VIMEO, YOUTUBE, GOOGLEVIDEO |
2076 | if(($tag === 'flash') || ($tag === 'swf') || ($tag === 'flv') || ($tag === 'video') || ($tag === 'ram') || ($tag === 'quick') || ($tag === 'stream') || ($tag === 'emff') || ($tag === 'mp3') || ($tag === 'youtube') || ($tag === 'googlevideo')) | 2077 | if(($tag === 'flash') || ($tag === 'swf') || ($tag === 'flv') || ($tag === 'video') || ($tag === 'ram') || ($tag === 'quick') || ($tag === 'stream') || ($tag === 'emff') || ($tag === 'mp3') || ($tag === 'vimeo') || ($tag === 'youtube') || ($tag === 'googlevideo')) |
2077 | { | 2078 | { |
2078 | if($this->is_sig && !$config['allow_all_bbcode']) | 2079 | if($this->is_sig && !$config['allow_all_bbcode']) |
2079 | { | 2080 | { |
... | ... | ||
2087 | $width_array = array('320', '425', '400', '480', '540', '640'); | 2088 | $width_array = array('320', '425', '400', '480', '540', '640'); |
2088 | $height_array = array('240', '350', '300', '360', '420', '480', '385'); | 2089 | $height_array = array('240', '350', '300', '360', '420', '480', '385'); |
2089 | 2090 | ||
2090 | $default_width = ((($tag === 'youtube') || ($tag === 'googlevideo')) ? '425' : '320'); | 2091 | // 4/3 YouTube width and height: 425x350 |
2092 | // 16/9 YouTube width and height: 640x385 | ||
2093 | $default_width = ((($tag === 'vimeo') || ($tag === 'youtube') || ($tag === 'googlevideo')) ? '640' : '320'); | ||
2091 | $width = (isset($item['params']['width']) ? intval($item['params']['width']) : $default_width); | 2094 | $width = (isset($item['params']['width']) ? intval($item['params']['width']) : $default_width); |
2092 | $width = ((($width > 10) && ($width < 641)) ? $width : $default_width); | 2095 | $width = ((($width > 10) && ($width < 641)) ? $width : $default_width); |
2093 | 2096 | ||
2094 | $default_width = ((($tag === 'youtube') || ($tag === 'googlevideo')) ? '350' : '240'); | 2097 | $default_width = ((($tag === 'vimeo') || ($tag === 'youtube') || ($tag === 'googlevideo')) ? '385' : '240'); |
2095 | $height = (isset($item['params']['height']) ? intval($item['params']['height']) : $default_height); | 2098 | $height = (isset($item['params']['height']) ? intval($item['params']['height']) : $default_height); |
2096 | $height = ((($height > 10) && ($height < 481)) ? $height : $default_height); | 2099 | $height = ((($height > 10) && ($height < 481)) ? $height : $default_height); |
2097 | 2100 | ||
... | ... | ||
2123 | { | 2126 | { |
2124 | $html = '<object data="emff_player.swf" type="application/x-shockwave-flash" width="200" height="55" align="top" ><param name="FlashVars" value="src=' . $content . '" /><param name="movie" value="emff_player.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#f8f8f8" /></object>'; | 2127 | $html = '<object data="emff_player.swf" type="application/x-shockwave-flash" width="200" height="55" align="top" ><param name="FlashVars" value="src=' . $content . '" /><param name="movie" value="emff_player.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#f8f8f8" /></object>'; |
2125 | } | 2128 | } |
2129 | elseif ($tag === 'vimeo') | ||
2130 | { | ||
2131 | $width = in_array($width, $width_array) ? $width : '640'; | ||
2132 | $height = in_array($height, $height_array) ? $height : '385'; | ||
2133 | $html = '<object type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" data="http://www.vimeo.com/moogaloop.swf?clip_id=' . $content . '"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=' . $content . '" /></object><br /><a href="http://www.vimeo.com/moogaloop.swf?clip_id=' . $content . '" target="_blank">Link</a><br />'; | ||
2134 | } | ||
2126 | elseif ($tag === 'youtube') | 2135 | elseif ($tag === 'youtube') |
2127 | { | 2136 | { |
2128 | $color_append = ''; | 2137 | $color_append = ''; |
... | ... | ||
2132 | $color_append .= ($color_2 ? ('&color2=0x' . str_replace('#', '', $color_2)) : ''); | 2141 | $color_append .= ($color_2 ? ('&color2=0x' . str_replace('#', '', $color_2)) : ''); |
2133 | } | 2142 | } |
2134 | 2143 | ||
2135 | $width = in_array($width, $width_array) ? $width : '425'; | 2144 | $width = in_array($width, $width_array) ? $width : '640'; |
2136 | $height = in_array($height, $height_array) ? $height : '350'; | 2145 | $height = in_array($height, $height_array) ? $height : '385'; |
2137 | $html = '<object width="' . $width . '" height="' . $height . '"><param name="movie" value="http://www.youtube.com/v/' . $content . $color_append . '" /><embed src="http://www.youtube.com/v/' . $content . $color_append . '" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '"></embed></object><br /><a href="http://youtube.com/watch?v=' . $content . $color_append . '" target="_blank">Link</a><br />'; | 2146 | $html = '<object width="' . $width . '" height="' . $height . '"><param name="movie" value="http://www.youtube.com/v/' . $content . $color_append . '" /><embed src="http://www.youtube.com/v/' . $content . $color_append . '" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '"></embed></object><br /><a href="http://youtube.com/watch?v=' . $content . $color_append . '" target="_blank">Link</a><br />'; |
2138 | } | 2147 | } |
2139 | elseif ($tag === 'googlevideo') | 2148 | elseif ($tag === 'googlevideo') |
2140 | { | 2149 | { |
2141 | $width = in_array($width, $width_array) ? $width : '425'; | 2150 | $width = in_array($width, $width_array) ? $width : '640'; |
2142 | $height = in_array($height, $height_array) ? $height : '350'; | 2151 | $height = in_array($height, $height_array) ? $height : '385'; |
2143 | $html = '<object width="' . $width . '" height="' . $height . '"><param name="movie" value="http://video.google.com/googleplayer.swf?docId=' . $content . '"></param><embed style="width:' . $width . 'px; height:' . $height . 'px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=' . $content . '" allowScriptAccess="sameDomain" quality="best" bgcolor="#f8f8f8" scale="noScale" salign="TL" FlashVars="playerMode=embedded"></embed></object><br /><a href="http://video.google.com/videoplay?docid=' . $content . '" target="_blank">Link</a><br />'; | 2152 | $html = '<object width="' . $width . '" height="' . $height . '"><param name="movie" value="http://video.google.com/googleplayer.swf?docId=' . $content . '"></param><embed style="width:' . $width . 'px; height:' . $height . 'px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=' . $content . '" allowScriptAccess="sameDomain" quality="best" bgcolor="#f8f8f8" scale="noScale" salign="TL" FlashVars="playerMode=embedded"></embed></object><br /><a href="http://video.google.com/videoplay?docid=' . $content . '" target="_blank">Link</a><br />'; |
2144 | } | 2153 | } |
2145 | return array( | 2154 | return array( |
Download diff