Eventos AC:New Leaf
Durante todo el mes

Día 15

Día 27
Chiste del día
Santoral


Pokedex prueba de Spoilers

Ver el tema anterior Ver el tema siguiente Ir abajo

sol Pokedex prueba de Spoilers

Mensaje  Invitado el Mar Dic 06, 2011 12:29 am

1º-----------------------------------------
  • <div style="padding: 3px; background-color: #EBD5D8; border: 1px solid #870914; font-size: 1em;"><div style="text-transform: uppercase; border-bottom: 1px solid #FE6768C; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;"><span onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerHTML = '<b>Spoiler: </b><a href=\'#\' onClick=\'return false;\'>Ocultar</a>'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '<b>Spoiler: </b><a href=\'#\' onClick=\'return false;\'>Mostrar</a>'; }" /><b>Spoiler: </b><a href="#" onClick="return false;">Mostrar</a></span></div><div class="quotecontent"><div style="display: none;">
{TEXT}</div></div></div>

2º---------------------------------------------------------------
No veas!:
Viste?... te advertí que no vieras:
Este expoiler explotará en 5... 4... 3... 2.. 1... *bum* xD

3º---------------------------------------------------------------
Del 1 al 50:
Prueba

4º---------------------------------------------------------------------------
[img:
http://gallery.ie.st/icons_tag/google.gif[/img]]AQÍ UN TEXTO

5º------------------------------------------------------------------------
<script>
function mostrar(enla , etik) {
obj = document.getElementById(etik);
obj.style.display = (obj.style.display == 'block') ? 'none' : 'block';
enla.innerHTML = (enla.innerHTML == '<img src="http://gallery.ie.st/icons_tag/spurl.16px.gif" border="0">') ? '<img src="http://gallery.ie.st/icons_tag/spurl.16px.gif" border="0">' : '<img src="http://gallery.ie.st/icons_tag/spurl.16px.gif" border="0">';
}
</script>
<a href="#" onclick="mostrar(this,'spoiler'); return false"/><img src="http://gallery.ie.st/icons_tag/spurl.16px.gif" border="0"></a>
<ul id="spoiler" style="display:none">

AQUÍ lo que desees ocultar
</ul>

6º--------------------------------------------------------------
<script>
function mostrar(enla , etik) {
obj = document.getElementById(etik);
obj.style.display = (obj.style.display == 'block') ? 'none' : 'block';
enla.innerHTML = (enla.innerHTML == '<img src="http://gallery.ie.st/icons_tag/spurl.16px.gif" border="0">') ? '<img src="http://gallery.ie.st/icons_tag/furl.16px.gif" border="0">' : '<img src="http://gallery.ie.st/icons_tag/spurl.16px.gif" border="0">';
}
</script>
<a href="#" onclick="mostrar(this,'spoiler'); return false"><img src="http://gallery.ie.st/icons_tag/spurl.16px.gif" border="0"></a>
<div id="spoiler">
AQUÍ lo que desees ocultar
</div>

7º---------------------------------------------------------------
<a href="#" onclick="mostrar('spoiler1'); return false"/>Menú 1</a>
<div id="spoiler1">Link<br>Link<br>Link</div>
<a href="#" onclick="mostrar('spoiler2'); return false"/>Menú 2</a>
<div id="spoiler2">Link<br>Link<br>Link</div>
<a href="#" onclick="mostrar('spoiler3'); return false"/>Menú 3</a>
<div id="spoiler3">Link<br>Link<br>Link</div>

Invitado
Invitado


Volver arriba Ir abajo

sol Re: Pokedex prueba de Spoilers

Mensaje  Invitado el Mar Dic 06, 2011 2:58 am

[spoilers]Contenido[/spoilers]


[spoil="Título"]Texto o imagen[/spoil]


Del 1 al 50:
Texto



AdminCP -> BBCODES -> Agregar Nuevo BBCODE ->


Crear Nuevo Código BB:

Título: spoiler bbcode
Etiqueta: SPOILER
Reemplazo:

<div>
<div class="pre-spoiler">
<span style="float:left; padding-top: 2px;"></span> <input type="button" value="Ver" style="width:80px;font-size:10px;margin:0px;padding:0px;color:black;" onclick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Ocultar'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Ver';}">
</div>
<div>
<div class="spoiler" style="display: none;">{param}</div>
</div>
</div>
Ejemplo: [ spoiler]test[/spoiler ] (sin los espacios)
Descripción: Ocultar texto o link de descargas
Usar {option}: no
Imagen de Botón: images/editor/spoiler.gif


Última edición por selene el Mar Dic 06, 2011 11:47 am, editado 1 vez

Invitado
Invitado


Volver arriba Ir abajo

sol Re: Pokedex prueba de Spoilers

Mensaje  Invitado el Mar Dic 06, 2011 10:53 am

<p><span class="spoiler red">Spoiler</span><span class="spoiler_text">hello world!</span></p>


<font class=spoiler><smallfont><font color=white>Spoiler - Highlight to view:</color></smallfont>{param}</font>

<blockquote><smallfont>spoiler:</smallfont><div style="background-color:#000080"><font color="#202080">{param}</font></div></blockquote>

<span style="background-color:#000080"><font color="#202080">{param}</span></font>


<div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>Spoiler!</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;">{param}</div>
</div>
</div>




PLUGIN
=================================
(function() {
tinymce.create("tinymce.plugins.Spoiler", {
init : function(editor, url) {
editor.addCommand("mceSpoiler", function() {
var sel = editor.selection;
var node = sel.getNode();
if (node) {
var dom = editor.dom;
var content = sel.getContent().replace(/<p>/ig, "").replace(/<\/p>/ig, " ").replace(/[\s]+$/g, "");
if (content) {
sel.setContent('<span class="spoiler red">Spoiler</span><span class="spoiler_text">' + content + '</span>');
} else {
alert(editor.getLang('spoiler.error', 'Please first select text.'));
}
editor.nodeChanged();
}
});
editor.addButton("spoiler", {
title: "Spoiler",
image: url + "/spoiler.png",
cmd: "mceSpoiler"
});

}
});
tinymce.PluginManager.add("spoiler", tinymce.plugins.Spoiler);
})();
AVASCRIPT
=================================
$('span.spoiler').live('click', function()
{
if ($('span.spoiler_text').is(':visible'))
{
$(this).next('span.spoiler_text').hide();
$(this).removeClass('green').addClass('red');
} else {
$(this).next('span.spoiler_text').show();
$(this).removeClass('red').addClass('green');
}
});
SS
=================================
.spoiler {
cursor:pointer;
background-color:#CCC;
}
.spoiler_text {
background-color:#E0E0E0;
padding:0 3px;
display:none;
}
.red { color:red; }
.green { color:green; }
=================================
This working fine, BUT when I press the ENTER key it destroy the html-syntax.
correct:
=================================
<p><span class="spoiler spoiler_off">Spoiler</span><span class="spoiler_text">hello world!</span></p>
=================================
after enter-key between "hello" and "world!":
=================================
<p><span class="spoiler spoiler_off">Spoiler</span><span class="spoiler_text">hello</span></p>
<p><span class="spoiler_text">world</span></p>
=================================
the second problem is to leave the spoiler and write normal text. Sad




Replacement (included in param):
[html] <div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>Spoiler!</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElements ByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;">{param}</div> [/html]

Invitado
Invitado


Volver arriba Ir abajo

sol Re: Pokedex prueba de Spoilers

Mensaje  Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Ver el tema anterior Ver el tema siguiente Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.