Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
bbSpoiler Details »»
bbSpoiler
Version: 1.00, by hambil hambil is offline
Developer Last Online: Apr 2013 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.5.4 Rating:
Released: 04-06-2006 Last Update: 04-06-2006 Installs: 85
Uses Plugins
 
No support by the author.

Keywords: bbcode, hidden, spoiler

Description:
A simple but effective [spoiler] bbcode. All the ones I've seen so far fall short for some minor reason or another - so I've created my own

Features:
  • Hides/Unhides with cross browser javascript (tested with latest IE and Firefox)
  • No template edits or file edits required.
  • Uses the colors of the current style.
  • Spoiler text does not show in thread preview.
Install
  • Download the bbSpoiler_1.0.zip file.
  • Follow instructions in install.txt

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-03-2006, 05:01 PM
Kihon Kata Kihon Kata is offline
 
Join Date: Nov 2003
Posts: 763
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

check it out

Quote:
Originally Posted by hambil
The only reason I can think of that it wouldn't work is if you don't have "headinclude" in your SHOWTHREAD template - do to another hack, or some custom style.
Reply With Quote
  #13  
Old 05-03-2006, 05:03 PM
hambil's Avatar
hambil hambil is offline
 
Join Date: Jun 2004
Location: Seattle
Posts: 1,719
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm...

Can you show me your bbcode for the spoiler tag?
Reply With Quote
  #14  
Old 05-03-2006, 05:05 PM
Kihon Kata Kihon Kata is offline
 
Join Date: Nov 2003
Posts: 763
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sure...

Code:
<div width="100%" class="alt1" onclick="spoiler(this);" style="border-collapse: collapse; border: solid thin black;"><div id="idTitle" class="alt2" style="border-collapse: collapse; border: solid thin black; width: 100%;">&nbsp;<b>click to show</b></div><div id="idSpoiler" style="display: none;">{param}</div></div>
and

Code:
[spoiler]The butler did it![/spoiler]
is that what you mean?



Quote:
Originally Posted by hambil
Hmmm...

Can you show me your bbcode for the spoiler tag?
Reply With Quote
  #15  
Old 05-03-2006, 05:23 PM
hambil's Avatar
hambil hambil is offline
 
Join Date: Jun 2004
Location: Seattle
Posts: 1,719
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like the replace isn't working for some reason. Try taking the javascript and editing into the SHOWTHREAD template.

add after "headinclude"
Code:
		<script language='JavaScript' type='text/javascript'>
		<!--
			function spoiler(obj)
			{
			  	for (var i = 0; i < obj.childNodes.length; i++)
			  	{
			  	  	if (obj.childNodes[i].id == 'idTitle')
			  	  		titleRow = obj.childNodes[i];
				    if (obj.childNodes[i].id == 'idSpoiler')
				    {
				    	if (obj.childNodes[i].style.display != 'none')
				    	{
				    		obj.childNodes[i].style.display = 'none';
				    		titleRow.innerHTML = '&nbsp;<b>click to show</b>';
				    	}
				    	else
				    	{
					    	obj.childNodes[i].style.display = 'block';
				    		titleRow.innerHTML = '&nbsp;<b>click to hide</b>';
					    }
				    }
				}
			}
		//-->
		</script>
Reply With Quote
  #16  
Old 05-03-2006, 05:28 PM
Kihon Kata Kihon Kata is offline
 
Join Date: Nov 2003
Posts: 763
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep that worked. Does that slow the showthread down? We have many users that will probably NOT use this feature
Reply With Quote
  #17  
Old 05-03-2006, 05:29 PM
hambil's Avatar
hambil hambil is offline
 
Join Date: Jun 2004
Location: Seattle
Posts: 1,719
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No. It's just javascript. It's only called when spoiler 'show/hide' button is clicked.
Reply With Quote
  #18  
Old 05-03-2006, 05:31 PM
Kihon Kata Kihon Kata is offline
 
Join Date: Nov 2003
Posts: 763
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool! We'll use this for our movie review forum
Reply With Quote
  #19  
Old 05-05-2006, 02:05 AM
Kihon Kata Kihon Kata is offline
 
Join Date: Nov 2003
Posts: 763
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hambil! Reporting a problem that I found! or I mean

When you hover over threads' titles in forumdisplay, showthread, today's posts, new posts, the little popup for the thread preview text is now dead and is NOT working. I disable the product and they work. Looks like the spoiler tags are breaking the tooltips.

Remember, I'm the one that had to manually put the javascript into showthread. (I think that is where I had to put it)

Any ideas?
Reply With Quote
  #20  
Old 05-05-2006, 05:01 AM
zombie_rem zombie_rem is offline
 
Join Date: Apr 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hambil
It looks like the replace isn't working for some reason. Try taking the javascript and editing into the SHOWTHREAD template.

add after "headinclude"
Code:
		<script language='JavaScript' type='text/javascript'>
		<!--
			function spoiler(obj)
			{
			  	for (var i = 0; i < obj.childNodes.length; i++)
			  	{
			  	  	if (obj.childNodes[i].id == 'idTitle')
			  	  		titleRow = obj.childNodes[i];
				    if (obj.childNodes[i].id == 'idSpoiler')
				    {
				    	if (obj.childNodes[i].style.display != 'none')
				    	{
				    		obj.childNodes[i].style.display = 'none';
				    		titleRow.innerHTML = '&nbsp;<b>click to show</b>';
				    	}
				    	else
				    	{
					    	obj.childNodes[i].style.display = 'block';
				    		titleRow.innerHTML = '&nbsp;<b>click to hide</b>';
					    }
				    }
				}
			}
		//-->
		</script>

I was having the same problem with the "Click to Show" not working.... but i cant find where to add the script.. i cant find "headinclude" anywhere..:cry:
Reply With Quote
  #21  
Old 05-05-2006, 06:10 AM
hambil's Avatar
hambil hambil is offline
 
Join Date: Jun 2004
Location: Seattle
Posts: 1,719
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Post your FORUMHOME template.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:34 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08415 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete