https://www.icyphoenix.com/viewtopic.php?f=28&t=74 ----------------------------------- ThE KuKa Tue 15 Aug, 2006 12:39 [MOD] BBCode Spoiler ----------------------------------- Post by Xusqui [code] # #-----[ 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 = ''; } elseif ($tag === 'video') { $html = '
'; } elseif ($tag === 'ram') { $html = '
'; } elseif ($tag === 'quick') { $html = ''; } elseif ($tag === 'stream') { $html = ''; } 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 = '
'; $str .= '
Spoiler: [ Show ]
'; $str .= ''; $str .= '
' ); } # #-----[ FIND ]------------------------------------------------------- # "[spoil]", "[/spoil]", # #-----[ REPLACE WITH ]------------------------------------------------------- # "[spoiler]", "[/spoiler]", [/code] Only BBCode Spoiler (not button) Greets ----------------------------------- ThE KuKa Tue 15 Aug, 2006 12:40 Respuesta: [MOD] BBCode Spoiler (new button) ----------------------------------- Post by Mitch [list] [*] Copy this images in: [b]imagesbbcb_mgimages[/b] [img]http://img95.imageshack.us/img95/4231/spoilmi8.gif[/img] [u]spoiler.gif[/u] - [img]http://img95.imageshack.us/img95/9113/spoil1hc4.gif[/img] [u]spoiler1.gif[/u] [*] OPEN [b]templatesca_aphroditebbcb_mg.tpl[/b] FIND: [code]{L_BBCB_MG_CODE}[/code] BEFORE ADD: [code]Spoiler[/code] [*] OPEN [b]languagelang_spanishbbcb_mg.js[/b] FIND: [code]s_smiley_creator = 'Creador de Emoticono: [smiley=1]Texto[/smiley] insertar un Emoticono con texto';[/code] AFTER ADD: [code]s_spoiler_help = 'Ocultar un Mensaje largo dentro del post: [spoiler]Mensaje[/spoiler]';[/code] FIND: [code]var Code = 0;[/code] AFTER ADD: [code]var Spoilerbbes = 0;[/code] FIND: [code]'[code]','[/code]',[/code] BEFORE ADD: [code]'[spoiler]','[/spoiler]',[/code] FIND: [code]function BBCcode()[/code] BEFORE ADD: [code]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); }[/code] [/list] BBCode Spoiler (new button) Greets ----------------------------------- Mighty Gorgon Tue 15 Aug, 2006 12:40 Re: [MOD] BBCode Spoiler ----------------------------------- Great work my friend! :wink: ----------------------------------- okada1314 Wed 16 Aug, 2006 12:19 Re: [MOD] BBCode Spoiler ----------------------------------- Do u hae demo? ----------------------------------- magma Wed 16 Aug, 2006 13:31 Re: [MOD] BBCode Spoiler ----------------------------------- [quote user="Mighty Gorgon" post="467"]Great work my friend! :wink:[/quote] 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 [hide=what's in there?]message hidden[/hide] ? Thanks and goodbye to everybody! ;) ----------------------------------- ThE KuKa Wed 16 Aug, 2006 20:02 Respuesta: [MOD] BBCode Spoiler ----------------------------------- [quote user="okada1314" post="521"]Do u hae demo?[/quote] Yes, this link (in Spanish): http://www.phpbb-es.com/foro/respuesta-spoiler-mod-para-xs-vp28314.html#28314 Greets. 8) ----------------------------------- Mighty Gorgon Thu 17 Aug, 2006 12:37 Re: [MOD] BBCode Spoiler ----------------------------------- [quote user="magma" post="522"]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?[/quote] [b]magma[/b], I think it's quite a bit you are not entering phpBB XS site... :wink: 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... :wink: ----------------------------------- magma Wed 13 Sep, 2006 11:56 Re: [MOD] BBCode Spoiler ----------------------------------- [quote user="Mighty Gorgon" post="570"][quote user="magma" post="522"]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?[/quote] [b]magma[/b], I think it's quite a bit you are not entering phpBB XS site... :wink: 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... :wink:[/quote] Yes, but it doesn't display a link and a invisible DIV [b]in place of[/b] 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! :?: ----------------------------------- Mighty Gorgon Thu 14 Sep, 2006 10:31 Re: [MOD] BBCode Spoiler ----------------------------------- I think that SPOILER and HIDE should be kept separated and could be combined to obtain the desired result. :wink: Make some tests with both of them and let me know.