![]() |
Spoiler Tag
Title: Spoiler
Tag: spoiler Replacement: HTML Code:
<div class="fieldset"> Use Option: Yes Image: Leave Blank Q. Why do I have to "use option"? A. This will solve a bug when not using it. In the first coding it wasn't used, but it would only collapse the first usage of "[spoiler][/spoiler]" in the thread. Using option in the code allowed to to specify which usage of the tags to collapse. Bugs: It's open by default! I'm working on getting it closed by default. |
This shows up the hidden text on mouseover of the topic title in showthreads and on forumhome.
|
Nice option code :)
style="display:none;" will do the hide job :) |
Where do i insert that html ?
|
When you add the bbcode, there is a section for "Replacement" place it there.
|
Quote:
jj: style="display:none;" that'll do what? |
Quote:
Code:
<div class="fieldset"> |
any updates to this one?
|
I noticed if you have more than 1 spoiler on a page the buttons only open the first one.
|
King Kovifor is away for the week, I will try to fix that problem.
|
Quote:
[spoiler=SOMEUNIQUE_ID]and it'll collapse for all of them[/spoiler] |
I changed this ever so slight for my own uses - still all the original code.
I've called the code JOKE Code:
<div class="fieldset"> Nice Hack - Thanks!! |
Quote:
|
Thank you for that code (the joke one too). I find it useful to set the title of the hidden field, but would be even nicer when it would use a default name when nothing was specified. :)
When you add class="button", the button comes in the css style. Looks better. Code:
<input type="button" class="button" Code:
<div class="fieldset"> |
Quote:
|
Quote:
|
Hi
I wanted to use the option param, so the user could use this for his own text on the button. so when he uses [spoil=hideMe]xyz[/spoil] then, the Button says "hideMe". i'm looking for a better way for the unique id. creating a random id would be perfect, but i don't think this is possible in html. any solution? |
If you install the multi option hack somewhere here on the forum, you could change this up to be [spoil=hideMe|uniqueID]xyz[/spoil]. I'm not sure how you'd do the HTML, since I've never used the hack, but I know it exists.
|
The unique identifier should be generated by PHP (hash, microtime, etc).
Then you could do [spoiler]HE DIES IN THE END![/spoiler] or if you want ... [spoiler=WARNING]HE DIES IN THE END[/spoiler] which would replace the default caption. Just an idea to simplify the use. :) |
Yeah, im kind of a noob in php, i can only html ^^
so, this is my modified code: Code:
<div class="fieldset"> is it possible to use php code in the code field? when yes, could you give me the php code for creating a random number? would be great :D |
Quote:
|
i can't seem to get the spoiler tags working at all
|
Quote:
|
Quote:
Create a plugin, for the hook location choose postbit_display_complete and paste the following php code in the box: PHP Code:
In the spoiler bbcode you created, find both: Code:
spoiler_{option} Code:
spoiler_{rand_string} Thanks for the bbcode btw, it was a great idea! |
Thank you! Great spoiler! :D
|
Quote:
Quote:
|
The tag begins as "Spoiler about...", and then if the user clicks and cicks again the "Spoiler about" text is gone. This was a bit confusing.
|
All times are GMT. The time now is 04:57 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|