vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Spoiler Tag : Show/Hide (https://vborg.vbsupport.ru/showthread.php?t=110598)

Wayne2k1.com 05-29-2006 09:22 AM

This is great :)

Installed & thanks

Annapurna 05-29-2006 03:57 PM

pre install question:

Is it possible to phrase the replacement-texts, 'Spoiler' and 'Show' and 'Hide' to use it bilingual?

Andreas

utw-Mephisto 06-02-2006 06:21 PM

Edit: never mind

/me installs

utw-Mephisto 06-02-2006 07:08 PM

This one is nice too :

Code:

<div style="margin:5px 20px 20px 20px">

<div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b>

<input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" 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.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">{param}</div></div></div>

Looks a bit like fieldset ...

Doctor Who 07-06-2006 12:27 PM

Quote:

Originally Posted by thisgeek
Just adding a "Color" statement to the bottom span tag should do it, as demonstrated below:

Code:

<span>
    <span style="margin-bottom: 5px;">
      <input type="button" value="Show Spoiler" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.value=='Show Spoiler') { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display = '';this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display = 'none'; this.value = 'Show Spoiler';}">
    </span>
    <span>
        <span style="color: Blue; border: 1px dashed #0B198C; padding: 0 3px 0 3px; display: none;">{param}</span>
    </span>
</span>


Is there any way to modify this so that the "Show/Hide" button appears in the top or bottom right hand corner of the post and highlights any instances of spoilers in that post? So:


The next thing I am going to say is a spoiler . . . . . . . blank space . . . . . . and so you know that . . . . . . . blank space . . . . . . is the one that is going to . . . . . . . blank space . . . . . . .

Instead of a button for each of those, can there be one to highlight them all at the same time?

Fianna 07-14-2006 04:13 PM

Step one of the installation is easy, but I keep getting this error:

"An appropriate representation of the requested resource /forums/admincp/css.php could not be found on this server."

I did paste the stuff of step 1 in the lower box. Does anyone know what's going on?

Muellmann 07-14-2006 05:45 PM

it's working fine for me and a useful option to hide sth. from greenies. :D

jilly 08-02-2006 02:03 PM

I am having a problem with it not cascading down from the main style to the child styles - it;s only showing up in the parent style - any ideas?

jilly 08-02-2006 02:18 PM

also, the css code shows up as being inherited, when I look at the child styles, yet instead of the buttons it shows the code, , like [spoiler] text in here [/spoiler].

Canis Firebrand 09-27-2006 01:18 PM

I must be missing something, or I've done something wrong.

I followed the steps, and I do have a Show Spoiler button. However, when I click on the button, nothing happens.

Okay.. I figured it out. Strange.

In the code, when I cut and pasted it, it looked normal. When I viewed my source code, and compared it to a board where it was working properly, I noticed a difference.
In the javascript part, where it would have the } and then the else {, it was replacing the { with **.

I edited the code to remove a space and retyped the { and }. Now it is working perfect.

joh 10-09-2006 02:40 AM

will this work with 3.6.2?

Snake 10-14-2006 12:11 AM

Yup, I'm running it on my forums already.

dutchbb 10-20-2006 08:12 AM

Great mod. How can I prevent users from parsing them in their signatures please?

Diva 10-21-2006 02:37 AM

Yes! Thank you for this.

big dan 10-30-2006 05:35 PM

installed on 3.6.2.. Instead of spoiler I called it hidden text and used hide as tags :)

Thanks!

Dream 11-06-2006 10:27 PM

great job

Quote:

Known bugs: You can read the spoiler in the "Thread Preview".
no you can't :)

drdeathuk69 11-07-2006 08:07 PM

can you add this into the posting toolbar?

drdeathuk69 11-08-2006 03:48 PM

i think it would a great idea to add it into the toolbox make life easier

drdeathuk69 11-12-2006 04:32 PM

bump

Diva 11-14-2006 12:06 PM

Quote:

Originally Posted by drdeathuk69 (Post 1112629)
can you add this into the posting toolbar?

First, make a button. Then go to your BB code for the spoiler, hit edit and scroll down to the part were it says "Button (optional)". That's where you put the path to the picture. ;)

drdeathuk69 11-16-2006 11:31 PM

This is my code........

Code:

<div style="margin:5px 20px 20px 20px">

<div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b>

<input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" 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.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">{param}</div></div></div>

my pic is attached so how do i add that to the posting part?

drdeathuk69 11-16-2006 11:38 PM

its ok i have sorted it

thanks

PoetJA-1975 01-21-2007 09:56 AM

Thanx!

Jacquii.

Tanabe 02-23-2007 01:19 PM

Quote:

Originally Posted by drdeathuk69 (Post 1119007)
This is my code........

Code:

<div style="margin:5px 20px 20px 20px">

<div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b>

<input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" 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.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">{param}</div></div></div>

my pic is attached so how do i add that to the posting part?


Thanks man I was wondering how to change it just like this.

Spiffware 02-26-2007 01:01 AM

i got a conflic with my hide hack they both use {param} it seems that the hide hack doesnt work but the spoiler does its strange

coolgus 05-07-2007 07:44 AM

is there any way to exlude this specific code from using with a signature ?

faisj 05-07-2007 06:08 PM

Quote:

Originally Posted by thisgeek (Post 957011)
I've spent quite a bit of time mucking around, and I've come up with the following changes.

I've embedded the CSS within the replacement, so you don't need to go muck around with your styles.

I've also modified the CSS to be a bit more generic - and I've fixed it so that the spoiler doesn't stretch across the entire post. It is as big as the text between the tags.

Code:

<table><tr><td>
<div>
    <div style="margin-bottom: 5px;">
      <input type="button" value="Show Spoiler" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.value=='Show Spoiler') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Show Spoiler';}">
    </div>
    <div>
        <div style="border: 1px dashed #0B198C; padding: 3px; display: none;">{param}</div>
    </div>
</div>
</td></tr></table>

I've modified this one so that you can use it inline in a paragraph:
Code:

<span>
    <span style="margin-bottom: 5px;">
      <input type="button" value="Show Spoiler" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.value=='Show Spoiler') { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display = '';this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display = 'none'; this.value = 'Show Spoiler';}">
    </span>
    <span>
        <span style="border: 1px dashed #0B198C; padding: 0 3px 0 3px; display: none;">{param}</span>
    </span>
</span>

See this post if you want to see a sample of how it looks.

EDIT: I've cleaned up the code a bit - the toggle should now work in Safari.

Thanks it works great example:

http://www.twentyfourforum.com/showthread.php?p=21994

also there was no need to change the colours etc.

Tralala 05-07-2007 07:53 PM

Quote:

Originally Posted by faisj (Post 1243163)
Thanks it works great example:

http://www.twentyfourforum.com/showthread.php?p=21994

also there was no need to change the colours etc.

Just FYI, your "show spoiler" button doesn't toggle back properly in Safari (Mac OS X.) Click it once and the text is revealed, but the button doesn't work, to toggle it back.

Mithrus 09-02-2007 12:27 AM

I was wondering if someone could help me get a background color added to this code:

Code:

<table><tr><td>
<div>
    <div style="margin-bottom: 5px;">
      <input type="button" value="Show Spoiler" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.value=='Show Spoiler') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Show Spoiler';}">
    </div>
    <div>
        <div style="border: 1px dashed #0B198C; padding: 3px; display: none;">{param}</div>
    </div>
</div>
</td></tr></table>

It was posted earlier in this thread and it works great. I would like it to look like a quote, with the background being a slightly different color and the borders the way a quote is too.

adc-arab 09-06-2007 02:33 AM

awesome installed :D i'd like to make the show button in the middle i tried alot but i couldn't when u use align="center" it works but the button is frozen and it didn't work any help ^^

GrendelKhan{TSU 10-15-2007 02:39 PM

installed thanks!!


Quote:

Originally Posted by thisgeek (Post 967238)
Just adding a "Color" statement to the bottom span tag should do it, as demonstrated below:

Code:

<span>
    <span style="margin-bottom: 5px;">
      <input type="button" value="Show Spoiler" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.value=='Show Spoiler') { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display = '';this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display = 'none'; this.value = 'Show Spoiler';}">
    </span>
    <span>
        <span style="color: Blue; border: 1px dashed #0B198C; padding: 0 3px 0 3px; display: none;">{param}</span>
    </span>
</span>


even better! :D thank you as well. :)

koxito 10-17-2007 06:38 PM

Mannn.. this is awasome!! XD

Mr.Danko Jones 10-26-2007 01:06 AM

Is there a spoiler mod for v3.6.x?

I have the latest v3.6.8. Thanks!:)

John3971 11-03-2007 02:14 PM

how can i changes the show / hide to a text link instead of a button??

GreysAnatomy 12-04-2007 10:56 AM

Quote:

Originally Posted by thisgeek (Post 957011)
I've spent quite a bit of time mucking around, and I've come up with the following changes.

I've embedded the CSS within the replacement, so you don't need to go muck around with your styles.

I've also modified the CSS to be a bit more generic - and I've fixed it so that the spoiler doesn't stretch across the entire post. It is as big as the text between the tags.

Code:

<table><tr><td>
<div>
    <div style="margin-bottom: 5px;">
      <input type="button" value="Show Spoiler" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.value=='Show Spoiler') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Show Spoiler';}">
    </div>
    <div>
        <div style="border: 1px dashed #0B198C; padding: 3px; display: none;">{param}</div>
    </div>
</div>
</td></tr></table>

I've modified this one so that you can use it inline in a paragraph:
Code:

<span>
    <span style="margin-bottom: 5px;">
      <input type="button" value="Show Spoiler" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.value=='Show Spoiler') { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display = '';this.innerText = ''; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display = 'none'; this.value = 'Show Spoiler';}">
    </span>
    <span>
        <span style="border: 1px dashed #0B198C; padding: 0 3px 0 3px; display: none;">{param}</span>
    </span>
</span>

See this post if you want to see a sample of how it looks.

EDIT: I've cleaned up the code a bit - the toggle should now work in Safari.

You are a genius! I've just installed it on my 3.6.8 Patch Level 2 and it seems to work perfectly fine! Thank you!

chudz 12-13-2007 02:24 PM

I am using this code:

Code:

<div>
    <div class="pre-spoiler">
    <span style="float:left; padding-top: 2px;">{option}</span> <input type="button" value="Show" style="width:80px;font-size:10px;margin:0px;padding:0px;" 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.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Show';}">
    </div>
    <div>
        <div class="spoiler" style="display: none;">{param}</div>
    </div>
</div>

and I am using the {option} for entering a title to the spoiler I have enter the CSS given on first post into the addittional CSS in my template. BUT when I post something with two spoiler in it example

[sp="Video 1"]link[/sp]

[sp="Video 2"]link[/sp]

I get this troublesome bug:

https://vborg.vbsupport.ru/

https://vborg.vbsupport.ru/

DieselMinded 01-28-2008 02:23 AM

Links dont hyper link

dutchbb 02-11-2008 08:01 AM

How can I prevent the content of the spoiler from showing in thread preview when hovering over thread titles in forumdisplay?

Arrogant-One 02-20-2008 03:58 AM

Quote:

Step 1.

Copy the following into the additional CSS definitions (Admin CP > Styles & Templates > Style Manager > All Style Options>Additional CSS definitions) and paste it into the lower box.
With my customized skins there is already text in both 'Additional CSS definitions' windows. The windows are not blank and I am hesitant to replace that text with this new text. What should I do?

AO

azn_romeo_4u 03-05-2008 10:44 PM

just press enter. and add a new line and paste it in. don't worry it's css, won't ruin your board.

I tested this out on 3.68 pl2 works amazing.


All times are GMT. The time now is 01:37 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
  • Page Generation 0.03449 seconds
  • Memory Usage 1,842KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (11)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete