|
Page 1 of 1
|
ThE KuKa 
Joined: August 2006
Posts: 488
Location:  Sabadell
|
 [MOD] BBCode Spoiler
Post by Xusqui
- #
- #-----[ 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
____________ ThE KuKa - www.IcyPhoenix.Es - www.phpBB-Es.COM - www.phpBBMODs.Es
ThE KuKa - Admin Icy Phoenix and Translation Group Leader.
Last edited by ThE KuKa on Tue 15 Aug, 2006 12:44; edited 1 time in total
|
#1 Tue 15 Aug, 2006 12:39 |
|
 |
Thanks for the useful Topic ThE KuKa: Mighty Gorgon (15 August), zankyw (15 August) |
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
| |
ThE KuKa 
Joined: August 2006
Posts: 488
Location:  Sabadell
|
 Respuesta: [MOD] BBCode Spoiler (new button)
Post by Mitch
- Copy this images in: imagesbbcb_mgimages
spoiler.gif - spoiler1.gif
- OPEN templatesca_aphroditebbcb_mg.tpl
FIND:
- <a href="javascript:BBCcode()" accesskey="c"><img border="0" src="{BBCB_MG_IMG_PATH}code.gif" name="code" type="image" onMouseOver="helpline('code')" alt="{L_BBCB_MG_CODE}" title="{L_BBCB_MG_CODE}" /></a>
BEFORE ADD:
- <a href="javascript:BBCspoilerbbes()" ><img border="0" src="{BBCB_MG_IMG_PATH}spoiler.gif" name="spoiler" type="image" onMouseOver="helpline('spoiler')" alt="Spoiler" title="Spoiler" /></a>
- OPEN languagelang_spanishbbcb_mg.js
FIND:
- s_smiley_creator = 'Creador de Emoticono: [smiley=1]Texto[/smiley] insertar un Emoticono con texto';
AFTER ADD:
- s_spoiler_help = 'Ocultar un Mensaje largo dentro del post: [spoiler]Mensaje[/spoiler]';
FIND:
AFTER ADD:
FIND:
BEFORE ADD:
- '[spoiler]','[/spoiler]',
FIND:
BEFORE ADD:
- function BBCspoilerbbes()
- {
- var txtarea = document.post.message;
-
- if ((clientVer >= 4) && is_ie && is_win)
- {
- theSelection = document.selection.createRange().text;
- if (theSelection != '')
- {
- document.selection.createRange().text = "[spoiler]" + theSelection + "[/spoiler]";
- document.post.message.focus();
- return;
- }
- }
- else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
- {
- //mozWrap(txtarea, "[spoiler]", "[/spoiler]");
- mozInsert(txtarea, "[spoiler]", "[/spoiler]");
- return;
- }
- if (Spoilerbbes == 0)
- {
- ToAdd = "[spoiler]";
- document.post.spoiler.src = bbcb_mg_img_path + "spoiler1.gif";
- Spoilerbbes = 1;
- }
- else
- {
- ToAdd = "[/spoiler]";
- document.post.spoiler.src = bbcb_mg_img_path + "spoiler.gif";
- Spoilerbbes = 0;
- }
- PostWrite(ToAdd);
- }
BBCode Spoiler (new button)
Greets
____________ ThE KuKa - www.IcyPhoenix.Es - www.phpBB-Es.COM - www.phpBBMODs.Es
ThE KuKa - Admin Icy Phoenix and Translation Group Leader.
Last edited by ThE KuKa on Tue 15 Aug, 2006 12:43; edited 2 times in total
|
#2 Tue 15 Aug, 2006 12:40 |
|
okada1314
Joined: August 2006
Posts: 26
Location:
|
 Re: [MOD] BBCode Spoiler
Do u hae demo?
|
#4 Wed 16 Aug, 2006 12:19 |
|
magma 
Joined: August 2006
Posts: 37
Location:
|
 Re: [MOD] BBCode Spoiler
Great work my friend! 
Hello there.
I was starting to write a new post to suggest, as I did some months ago with Bicet, the implementation of "Hide MOD" but I see you were faster than me.
Does it work for all the styles?
Is it going to be part of next XS2 release?
Does it allow, as in my forum, to personalize the 'hide' message, as with the sintax
Hidden Message: Sorry, but you must be registered and also post a reply to view this message.
?
Thanks and goodbye to everybody!
|
#5 Wed 16 Aug, 2006 13:31 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 6814
Location:  Borgo San Michele
|
 Re: [MOD] BBCode Spoiler
Hello there.
I was starting to write a new post to suggest, as I did some months ago with Bicet, the implementation of "Hide MOD" but I see you were faster than me.
Does it work for all the styles?
Is it going to be part of next XS2 release?
magma, I think it's quite a bit you are not entering phpBB XS site...
This mod has been added in 048 or even previous release... so it's already present in XS.
And by the way... the spoiler have been added too in the dev release... but without button...
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#7 Thu 17 Aug, 2006 12:37 |
|
magma 
Joined: August 2006
Posts: 37
Location:
|
 Re: [MOD] BBCode Spoiler
Hello there.
I was starting to write a new post to suggest, as I did some months ago with Bicet, the implementation of "Hide MOD" but I see you were faster than me.
Does it work for all the styles?
Is it going to be part of next XS2 release?
magma, I think it's quite a bit you are not entering phpBB XS site...
This mod has been added in 048 or even previous release... so it's already present in XS.
And by the way... the spoiler have been added too in the dev release... but without button... 
Yes, but it doesn't display a link and a invisible DIV in place of the text to be hidden...
Example:
Hidden Message: Sorry, but you must be registered and also post a reply to view this message.
but I see the secret... in this way the mod is unuseful! :?:
|
#8 Wed 13 Sep, 2006 11:56 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 6814
Location:  Borgo San Michele
|
 Re: [MOD] BBCode Spoiler
I think that SPOILER and HIDE should be kept separated and could be combined to obtain the desired result.
Make some tests with both of them and let me know.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#9 Thu 14 Sep, 2006 10:31 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
| Link this topic |
| URL |
|
| BBCode |
|
| HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|