vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   New Posting Features - bbSpoiler (https://vborg.vbsupport.ru/showthread.php?t=112376)

Kihon Kata 05-03-2006 05:01 PM

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.


hambil 05-03-2006 05:03 PM

Hmmm...

Can you show me your bbcode for the spoiler tag?

Kihon Kata 05-03-2006 05:05 PM

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?


hambil 05-03-2006 05:23 PM

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>


Kihon Kata 05-03-2006 05:28 PM

Yep that worked. Does that slow the showthread down? We have many users that will probably NOT use this feature

hambil 05-03-2006 05:29 PM

No. It's just javascript. It's only called when spoiler 'show/hide' button is clicked.

Kihon Kata 05-03-2006 05:31 PM

cool! We'll use this for our movie review forum

Kihon Kata 05-05-2006 02:05 AM

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?

zombie_rem 05-05-2006 05:01 AM

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:

hambil 05-05-2006 06:10 AM

Post your FORUMHOME template.


All times are GMT. The time now is 06:50 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.01208 seconds
  • Memory Usage 1,760KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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