- #
- #-----[ OPEN ]-------------------------------------------------------
- #
- includes/bbcode.php
- #
- #-----[ FIND ]-------------------------------------------------------
- #
- 'quick' => array(
- 'nested' => true,
- 'inurl' => true,
- 'allow_empty' => false,
- ),
- #
- #-----[ AFTER ADD ]-------------------------------------------------------
- #
- 'spoiler' => array(
- 'nested' => false,
- 'inurl' => false,
- 'allow_empty' => false,
- ),
- #
- #-----[ FIND ]-------------------------------------------------------
- #
- // FLASH, VIDEO, REAL, QUICK, STREAM
- if($tag === 'flash' || $tag === 'video' || $tag === 'ram' || $tag === 'quick' || $tag === 'stream')
- {
- if($this->is_sig)
- {
- return $error;
- }
- if(isset($item['params']['param']))
- {
- $content = $item['params']['param'];
- }
- if(isset($item['params']['width']))
- {
- $width = $item['params']['width'];
- if ((intval($width) > 10) && (intval($width) < 641))
- {
- $width = $width;
- }
- else
- {
- $width = '320';
- }
- }
- else
- {
- $width = '320';
- }
- if(isset($item['params']['height']))
- {
- $height = $item['params']['height'];
- if ((intval($height) > 10) && (intval($height) < 481))
- {
- $height = $height;
- }
- else
- {
- $height = '240';
- }
- }
- else
- {
- $height = '240';
- }
- if ($tag === 'flash')
- {
- $html = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="' . $width . '" height="' . $height . '"><param name=movie value="' . $content . '"><param name=quality value=high><param name=scale value=noborder><param name=wmode value=transparent><param name=bgcolor value=#000000><embed src="' . $content . '" quality=high scale=noborder wmode=transparent bgcolor=#000000 width="' . $width . '" height="' . $height . '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>';
- }
- elseif ($tag === 'video')
- {
- $html = '<div align="center"><embed src="' . $content . '" width="' . $width . '" height="' . $height . '"></embed></div>';
- }
- elseif ($tag === 'ram')
- {
- $html = '<div align="center"><embed src="' . $content . '" align="center" width="275" height="40" type="audio/x-pn-realaudio-plugin" console="cons" controls="ControlPanel" autostart="false"></embed></div>';
- }
- elseif ($tag === 'quick')
- {
- $html = '<object classid=clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="480" height="224" align="middle"><param name="controller" value="TRUE"><param name="type" value="video/quicktime"><param name="autoplay" value="true"><param name="target" value="myself"><param name="src" value="' . $content . '"><param name="pluginspage" value="http://www.apple.com/quicktime/download/indext.html"><param name="kioskmode" value="true"><embed src="' . $content . '" width="480" height="224" align="middle" kioskmode="true" controller="TRUE" target="myself" type="video/quicktime" border="0" pluginspage="http://www.apple.com/quicktime/download/indext.html"></embed></object>';
- }
- elseif ($tag === 'stream')
- {
- $html = '<object id="wmp" width="' . $width . '" height="' . $height . '" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"><param name="FileName" value="' . $content . '"><param name="ShowControls" value="1"><param name="ShowDisplay" value="0"><param name="ShowStatusBar" value="1"><param name="AutoSize" value="1"><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" src="' . $content . '" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 visible=1 animationatstart=0 transparentatstart=1 loop=0 height="70" width="300"></embed></object>';
- }
- return array(
- 'valid' => true,
- 'html' => $html
- );
- }
- #
- #-----[ AFTER ADD ]-------------------------------------------------------
- #
- // Spoiler
- if($tag === 'spoiler')
- {
- if($this->is_sig)
- {
- return $error;
- }
- if($item['iteration'] > 1)
- {
- return $error;
- }
- $spoiler_id = substr(md5($content . mt_rand()), 0, 8);
- $str = '<div class="spoiler">';
- $str .= '<div class="spoiler-header" id="spoilerhdr_' . $spoiler_id . '" style="position: relative;">Spoiler: [ <a href="javascript:void(0)" onclick="ShowHide('spoiler_' . $spoiler_id . '', 'spoiler2_' . $spoiler_id . '', ''); ShowHide('spoilerhdr_' . $spoiler_id . '', 'spoilerhdr2_' . $spoiler_id . '', '')">Show</a> ]</div>';
- $str .= '<div class="spoiler-header" id="spoilerhdr2_' . $spoiler_id . '" style="position: relative; display: none;">Spoiler: [ <a href="javascript:void(0)" onclick="ShowHide('spoiler_' . $spoiler_id . '', 'spoiler2_' . $spoiler_id . '', ''); ShowHide('spoilerhdr_' . $spoiler_id . '', 'spoilerhdr2_' . $spoiler_id . '', '')">Hide</a> ]</div>';
- $str .= '<div class="spoiler-content" id="spoiler2_' . $spoiler_id . '" style="position: relative; display: none;">' . $html;
- return array(
- 'valid' => true,
- 'start' => $str,
- 'end' => '</div></div>'
- );
- }
- #
- #-----[ FIND ]-------------------------------------------------------
- #
- "[spoil]", "[/spoil]",
- #
- #-----[ REPLACE WITH ]-------------------------------------------------------
- #
- "[spoiler]", "[/spoiler]",
Only BBCode Spoiler (not button)
Greets