vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - BBCode - Custom Spoiler (https://vborg.vbsupport.ru/showthread.php?t=255821)

orange gold 12-26-2010 01:21 AM

OH!!! Okay!

Here is the new replacement code (150px also...) All you need to do is edit the code where it says "***URL HERE***" and change it to the full URL of the image.

Replacement:
Code:

<div>
    <div class="pre-spoiler">
    <button style="background-image:url(***URL HERE***);width:150px;font-size:14px;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 = '{option}';}">{option}</button>
    </div>
    <div>
        <div class="spoiler" style="display: none;"><div style="border: 1px solid ;">{param}</div></div>
    </div>
</div>


Antidepresiv 12-26-2010 01:34 AM

Hmm, it displays an image, but when i click on expand colapse, it gives me this message

Vbulletin message
"Invalid Action Specified"

And the spoiler image goes over the spoiler text... :/

orange gold 12-26-2010 01:39 AM

Hmm.. Give me some time, I fear I will have to use the Z-Index to make the text be ontop.. :( I hate the Z-index haha..
Also.. I do not know what the error is... I will take a look at it later.. I have to go now.. Please hold :)

Antidepresiv 12-26-2010 01:44 AM

OKy dude, and i have to sleep now, its 5am here.. :/ i will respond tomorrow, and once again, thank you so much for you'r help, you are the best.. :)

Anti Out! xD

orange gold 12-26-2010 02:03 AM

Fixed it!

Same thing.. replace the ***URL HERE*** (You will have to scroll over in the code box below to find it)
This will work!

new Replacement code:

Code:

<div>
    <div class="pre-spoiler">
    <input type="button" value="{option}" style="width:150px;font-size:14px;margin:0px;padding:0px;background-image:url(***URL HERE***)" 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 = '{option}';}">
    </div>
    <div>
        <div class="spoiler" style="display: none;"><div style="border: 1px solid ;">{param}</div></div>
    </div>
</div>


Antidepresiv 12-26-2010 10:19 AM

Yeap, this works, but the image isn't aligned in the field, it's way off.. And the image is the same size 150px.. How can i center the image in the field.. i tried with some positioning, but it doesnt work.. :/ Once again THANK YOU!

OldSchoolDSL 12-26-2010 10:44 AM

Installed using original code (image not needed for me).

Would like to see the symbol ' glitch fixed though

4.1 PL2

Antidepresiv 12-26-2010 10:53 AM

I figured it out, anyway, dunno what it is, but if you have an image lets say 150x30, the spoiler width and height must me smaller than the image size, for example 145x26, and then everthing is centered.. But if you put it in the same size, it wont be..

Thanks again for you'r help dude.. ;)

Best Regards,
Antidepresiv

orange gold 12-27-2010 12:57 PM

I think that's because the image was probably a rectangle and the button is a curved rectangle so the curves extend past the px size... Anyways, glad you go it working!
Wish you the best!

The Rocketeer 01-07-2011 06:30 AM

do you also have strike through ? thanks


All times are GMT. The time now is 01:53 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.01068 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_code_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
  • (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