¿Libertad de expresión o libertinaje expresivo?
[Mi plugin] Enhanced Simple Spoiler
He actualizado el genial plugin Simple Spoiler para hacerlo compatible con el uso del WYSIWYG de WordPress. He añadido la opción de encapsular el código dentro de [ ] en lugar de usar < >. Ahora se pueden usar los dos métodos, sin necesidad de modificar los posts antiguos.
Instalación
Simplemente coloca el archivo enhanced-ss.php en el directorio de plugins de tu instalación de WordPress [normalmente wp-content/plugins/]. ¡Actívalo y comienza a usarlo!
Modo de uso
Si usas el editor visual enriquecido de WordPress [TinyMCE], simplemente tienes que colocar el texto que quieras ocultar entre las etiquetas [spoiler] texto aquí [/spoiler].
Si no usas el editor visual sólo tienes que colocar el texto que quieras ocultar entre las etiquetas [spoiler] texto aquí [/spoiler] o bien <spoiler> texto aquí </spoiler>.
Formato
Puedes usar dos palabras o frases que quieras como texto para mostrar u ocultar el contenido. Por ejemplo:
En el editor visual [spoiler /dame la verdad/ /no me la enseñes/] texto aquí [/spoiler] dará como resultado algo así
Por otra parte, en el editor simple <spoiler 'dame la verdad' 'no me la enseñes'> texto aquí </spoiler> dará el mismo resultado. Date cuenta que las comillas ‘ ‘ no son compatibles con el editor visual, por lo que la sintaxis es distinta de uno a otro.
Lista de cambios
1.6.2 – Añadido “php” al comienzo del archivo. No sé por qué razón no estaba presente. Gracias Amanda
1.6.1 – Modificada la función yk_callback para hacerla compatible con XHTML 1.0 [espero]. Gracias Marcus
1.6 – Versión inicial, para continuar la numeración de Simple Spoiler.
Nota:
No sé ni PHP ni Javascript ni nada de nada, simplemente he añadido un par de líneas y he cambiado otras simplemente observando y luego usando el método de ensayo-error. No pidas más características para añadir al plugin, se llama Simple por algo ![]()
English
I have updated the beautiful Simple Spoiler plugin to make it compatible with WYSIWYG editor embedded in WordPress. I have added the option to use [ ] instead of < >. Now you can use both methods whithout digging into your older posts to modify the code.
Installation
Put enhanced-ss.php file inside plugins directory of your WordPress installation [usually wp-content/plugins/]. Activate it and start using it!
How to use
If you write with the WordPress visual rich editor [TinyMCE], simply put the text you want to hide between [spoiler] text here [/spoiler] tags.
If you don’t use the visual editor you only have to put the text between [spoiler] text here [/spoiler] or <spoiler> text here </spoiler> tags.
Formatting
You can use two words or phrases as text link to show or hide the content. For example:
In visual editor [spoiler /give me the truth/ /hide it from me/] will result as something like this
By the other hand, in simple editor <spoiler 'give me the truth' 'hide it from me'> text here </spoiler> will produce the same output. Take in mind that ‘ ‘ are not compatible with visual editor, that’s why the syntax is not the same in both examples.
Changelog
1.6.2 – Added “php” to the beggining of the file. I don’t know why it wasn’t present. Thanks Amanda
1.6.1 – Modified yk_callback function to make it XHTML 1.0 compatible [I hope]. Thanks Marcus
1.6 – Initial release, to continue Simple Spoiler version number.
PS:
I don’t know PHP nor Javascript, I have simply added a pair of lines of code and chaged others by observation and later testing for errors. Please don’t request more features for this plugin, its name is Simple for some reason ![]()
| Imprimir artículo | Este artículo fue publicado por ]V[orlock Zernebock el 18 de abril a las 22:34, y está archivado en Blogging. Sigue las respuestas a esta entrada a través de RSS 2.0. Puedes dejar un comentario o enviar un trackback desde tu propio sitio. |
- bilgiservisim » En iyi 100 wordpress eklentisi
- WordPress Plugins Database » Plugin Details » Simple Spoiler Enhanced
- CANARKADAŞ » 232 Wordpress eklentisi (Açıklamalı) (Wordpress plugin list)
- waikay.net » Plugin: Spoiler
- My favorite WordPress Resources | sebthom.de
- Kapasite » Site arşivi » more
- Plugins :: cimddwc
- WordPress 2.3 compatiblity Plugins | Dreamer’s Blog
- 230 Wordpress eklentisi — Wordpress Türkiye
- &&// L.I.G.H.T.
- P I N K B L I S S.org vr. 13
- Cbox
- Giavasan » Cursor*10
- Plugins – Bull3t’s Blog
- 230 Wordpress eklentisi | Aktifindir
- 300 Adet Wordpress Eklentisi : Yılmaz Eres
- Pownce Mobile
- Backlink Checker
- wordpress indir wordpress tema wordpress theme » Blog Arşivi » Kategorilere ayrılmış yüzlerce wordpress eklentileri eklenti indir wordpress eklentisi hemen ücretsiz yükle bedava
- ::~ Sugar-Princess ~::
- WP | En iyileri (Eklentiler) | Net ve Web Serüveni
- you.glamour-vanity.info » Resources
- * J e l l y – B e a n s . O r g * » Perguntas
- LOSTINLOVE.ORG » Plugins
- word press eklentileri on Grafik Hocam
- Kimiko. <3
- Türkçe 155 tane wordpress eklentisi « Google, SEO ve Webmaster Blog
- Wordpress Eklentileri – VolkanDesign.Com – Bilişim ve Teknoloji üzerine
- pinkahoLic.net | i just can’t get enough of PINK! » enhanced spoiLer
- Onewalrus Wordpress 2.6 Testing – Plugins Used
- La Tua Cantante » Plugins Used
- Simple Spoiler | wubzchu ♥ waiting.counting days.come back.
- Låt den rätte komma in / Let the right one in » Olrandir
- Türkçe açıklamalı, kategorilere ayrılmış 155 tane wordpress eklentisi (Wordpress plugin list) – HTD-34
- Açıklamalı 200 Wordpress Eklentisi (Part1) | WeBCoPaT
- Türkçe 155 tane wordpress eklentisi 2010 | MyGüncel.Com
- Lovelys2 » Arquivos » Meu Blog…
hace 4 años
Hello, can you help out with one thing? I posted something and it “broke” the Xhtml validation. It is on this line:
Error Line 186, column 56: an attribute specification must start with a name or name token .
…u testar este negócio aqui <a ‘javascript:void(null);’ onclick=”s_togg
An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).
What should i do to fix it?
hace 4 años
I have modified yk_callback function to make it XHTML 1.0 compatible [I hope]. Please tell me if it works or not.
PS. Remember I don’t know PHP nor Javascript at all!
hace 4 años
It works! \o/
Now the Xhtml freaks can sleep
Thanks for super-fast reply
hace 4 años
So it works on comments :p
BTW, if you want another challenge, here it is: When i looked at the post feed on Bloglines, it wasnt covered like in the site, but i could look at the hidden stuff. So if you know how to fix it, i suppose the plugin will be flawless (at least at what i can see, i dont know php either)
hace 4 años
I think that challenge is too high for me
That problem comes with the original plugin itself, and I don’t know how to avoid it in feeds. Problem is that plugin’s javascript code doesn’t run on Bloglines because it is embeded into your blog’s header. In feeds there is no way to add it, or I don’t know how to do it, sorry.
hace 4 años
Thats ok, the plugin is cool
hace 4 años
Hi, I checked your plugin with W3C Xhtml validator and it seems that some are missing, leading to a non validation ?? Any idea ?
hace 4 años
Ok. The plugin is just working fine ! I have some issues with my theme, and I guess I’m gonna use a new one !
Thanks !
hace 4 años
Hi, I downloaded your plugin but it doesn’t seem to work for me. Does it work with WordPress version 2.0.1? It hides the part of the post I want but it doesn’t show it when I click on the link to “show”. Is it because it’s not compatible with WordPress 2.0.1 or is it something that I’m doing wrong?
hace 4 años
It should work from WP 1.5 to 2.1-alpha. The only possible reason for your problem is that your browser has disabled javascript or something like this. Check it out.
hace 3 años
Gran plugin, uno de los mejores que he visto
hace 3 años
Buenismo !!! La modificación resulta muy buena, te felicito !
hace 3 años
Hey, I like your Plugin, it ruleeez
But, i want to make something like a double spoiler , something like this:
text
Is that possible?
or could you add such a function?
thx issen1
hace 3 años
Well i think i did something wrong or something
i asked if something like this would be possible:
[spoiler*][spoiler*]text[/spoiler*][/spoiler*]
hace 3 años
Hi there, is it possible to input pictures instead of the text?
As in buttons or whatsoever, and change the alignment?
Thanks.
hace 3 años
Hi
Thanks for that plugin. I want a button to expand all links in page. Is it possible?
hace 3 años
Hi, I don’t have enough knowledge to do what you are requesting. I’m sorry about that.
hace 3 años
this is a test
hace 3 años
Hi, the plugin works fine with my wordpress 2.1.3. But one things does not work: i build a “spoiler”-button in my admin panel, which adds the spoiler-tags. For me as an admin, this works fine. But my co-author can´t use it with his restricted rights as an “author”. The spoiler-tags do not work for him. When i set his rights to “publisher”, the spoiler-tags work for him, but i don´t want him to be a publisher…so what can i do?
hace 3 años
The “Spoiler button” doesn’t work or are the [ ] tags?
hace 3 años
Would be nice if this could be added to Wp-Plugins-Db.org
hace 3 años
Isn’t added yet? :whist:
hace 2 años
Thanks..
[…] Açıklamalı 232 WordPress eklentisi (Agu. 15, 2007 !!) (WordPress plugin list),[…]
hace 2 años
thank you for your work, all works deserves a thank you
hace 2 años
Hi guys. Nice to see that someone has enhanced my plugin when I was busy in the past years. To answer some of your questions, the original intention of my plugin is to have a simple spoiler. There are some other spoilers in the past but they are all very complicated.
If you want a button instead of a text link to the spoiler, simple modify the $spoiler_show_text and $spoiler_hide_text and the yk_callback function to return an rather than a <a> link.
On spoilers in feeds, that is simply a limitation on the feed reader which we can do nothing about.
hace 2 años
I’m also having trouble getting it to work. The spoiler text goes away and in it’s place it says “Show”, but when I click it nothing happens. The sample on your page works, so I have a feeling it’s related to my theme somehow. When I look at the page source after adding spoiler text, here’s what I see:
Show ▼
[The spoiler text]
I do use apostrophe’s within the spoiler text itself, as I use contractions. Are these incompatible with the spoiler tag?
hace 2 años
Hola! jejejejeje
sooo, i can’t use ur plugin
why i dunno, i want use it so much, its will be easy my pages!!!
whould u can help me?
Ann, when i CLICK on the plugin, no ocorre nada!!! PorQUe!!!
preciso de la ayuda tuya!!!
hace 2 años
Mira esta pagina como exemplo: http://ecolala.awardspace.com/blog/?page_id=6
gracias pela attencion ^^
hace 2 años
thanks a lot…
hace 2 años
thanks
hace 2 años
thanks..
hace 2 años
thanks alot…
hace 2 años
thank you my friend this plugin is so nice and usefull.
hace 2 años
thanks
hace 2 años
EXCELENTE. Muchisimas, muchisimas gracias, lo venia buscando hace tiempo. Muchas gracias.
hace 2 años
hi.
I wonder if there are any way to be able to get your own text instead of ‘give me the truth’.
Not by editing the .php file but each time you do the [spolier] you may do something like [spoiler:titel] where title is the text that will be the link to show the hidden content.
I use this not only for spoilers when writing about movies but to put content on my blog that is optional to view =)
hace 2 años
Read again the post, please. You can put whatever you want or leave it by default.
hace 2 años
ahh, stupid me! thanks!!!
I totaly missed that spoiler /text /text variable =)
thanks alot *feels stupid*
hace 2 años
Just tested this on 2.6 and it seems to be working fine
Haven’t tried adding the extra variables though… 
hace 2 años
Gracias, me ha venido de lujo!
hace 1 año
how can i get this to work on the index page?
hace 1 año
@kevin – It works on every post or page, even in idex or single.
hace 1 año
very simple and good spoiler. thx for the hard work pal
nice to know this blog
hace 1 año
nice plugin.
thank’s bro…
hace 1 año
Excellent plugin. I use it on my blog.
hace 10 meses
Just tested this on 2.6 and it seems to be working fine Haven’t tried adding the extra variables though…
hace 7 meses
This plugin doesn’t work with WP 2.9 anymore. Each spoiler is interpreted as a link by WP 2.9, which means that if you put on moderation all comments with a link or more, your regular visitors comments are hold for moderation as well!
Is there a way to fix this major ISSUE?
Thanks
hace 6 meses
Thanks! This is the only plugin that works the way I want it to.. cannot use the wysiwyg editor though .. the [ ... ] dont register, however the do, and they do perfectly!! You, my friend, are a king!
hace 1 mes
Great plugin! Just installed it on WordPress 3.0 and it worked perfect.