![]() |
Spoiler Tag
I have been on this forum for a while and have used different spoiler tags, but the tags didn't sattisfied me. So i made my own spoiler tag.
This is a BB Code tag. It has to be installed in your BB code manager. Enter the vbulletin administrator panel. Navigate to Own BB codes. Go to add BB code and fill in the following items. Title: Spoiler Tag: spoiler Replacement: HTML Code:
<div class="tcat" colspan="3"> Description: This items show only the text when you move the mouse over it. The code and style of it might be made better, but it does what it is made for. I use this on the latest version of vBulletin (3.7.0) but it works on all versions. I hope this is usefull for you guys. If you used it please click install so i can see if it comes in handy. For those of you who want an example, here is it: Live Demo (dutch forum) The first spoiler tag is my own tag, the second is this one: Invision Board Styled Spoiler Tag And excuse me for my English, didn't used it much the last time. |
Reserved
|
A text file would be nice to be able to refer back to in case it is needed to be re-installed again. ;)
|
I added a text file with the text for the BB code in it.
|
Thank you, sir. ;)
Is there a way to make the whole box mouse over instead of just the part with the test in it? If you have this one a wide skin the box goes all the way across the screen. Can the box either be short ended or the whole box reacts to the mouse over? Does that make any sense at all? ;) |
Did you try setting the onmouseover in the div tag?
|
No, but you know me, I'd screw it up somehow. Can you show me, sir?
|
I could if I had installed the mod. :D
Anyway, replace the code with: Code:
<div class="tcat" colspan="3"> I added the cursor hand when hovering over the div. :) |
That worked perfect, sir, thank you. ;)
Now, is there any way to make the box only as long (or a little longer) as the text is instead of across the whole page? LOL |
There are two versions.
1st version: The code below will show the Spoiler title at the top of the spoiler text. Code:
<div style="margin:10px 0"> *Please note this is only an edit of YdieresiS' mod. All credit goes to him. |
In the second version there's a difference. First, there's no Spoiler title. Secondly, text outiside of the Spoiler tag will not be above or below but at the side of the text. Basically, it will appear exactly how you posted it. Of course if you post any text with spaces it will create a line break.
2nd version (of 1st version in post #10}: Code: Code:
<span style="background-color:#fff;color:#fff;border:1px solid #cccfdd;cursor:pointer" class="spoiler" onmouseover="this.style.color='#000000';" onmouseout="this.style.color=this.style.backgroundcolor='#ffffff'"> *Please note this is only an edit of YdieresiS' mod. All credit goes to him. |
I like the way we had it except for going across the whole page. So, should I use the first one then? I don't want someone accidentally messing it up with and breaks in the line.
|
Yup. The first version (post #10) would be comparable with the original mod + your request. :)
|
Will that handle multiple lines ok?
|
No, it won't. :(
Any way to fix that or make it so they can't go after so many characters? |
You can by using overflow. Before you do that, try the updated code in post #10 again. I think the padding caused multiple lines to mess up.
|
great thanks.
|
Quote:
|
Depends. In all of my threadbit templates I have overflow set but it only cuts off continuous characters (text or image URL's) but will allow the text to go to the next line fine.
|
Text is all I want to do with this anyway. Would it still be a separate line for each break?
|
Nice going... anyone has a clue on how to make this sopiler look like the one i show in the attachments? :D
|
Quote:
|
thanks :))
|
Quote:
|
Quote:
Quote:
|
Quote:
|
Quote:
|
is it possible to allow users to choose any title instead of Spoiler on the table ?
|
Quote:
If you use the things as posted before and change this: Use {option} -> yes. Replacement: HTML Code:
<div class="tcat" colspan="3"> But in this case you always have to fill the option [Spoiler=Title] It is possible but i wouldnt reccomend it. |
Just change the word spoiler to whatever you want in the code when you enter it in the Admin CP.
|
It was asked if it was possible for a user to do this, when you change spoiler while entering this in the admin CP, it is not changable for the user.
|
Sorry, I was thinking by user they meant user of the hack, Admins. I digress. ;)
|
Now we have both options posted here :) Maybe just better so.
|
Installed. Thx !
|
installed thank you works nicely
|
hi! nice!
how put a icon for Spoiler Tag in editor ? |
Quote:
|
Installed. Works perfectly. Good job man.
|
dlete.
|
Thanks a lot for this one, it's superior to the one I was using before. But I was wondering if you intend to release the code you are using on the demo page? Cause that is what I really want, cause right now images aren't being hidden.
|
All times are GMT. The time now is 06:02 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:
|