Spoiler MyCode
#1
Can anyone give me a custom spoiler MyCode that would suit the theme of my website? +1 to anyone who can.

http://theauthoringbay.com/index.php
Reply
#2
http://mods.mybb.com/view/spoiler-bbcode
Edit CSS as you wish.
Reply
#3
Why use a plugin when it can be handled in the MyCode section of the admin cp?

Regular Expression
\[spoiler\](.*?)\[/spoiler\]

Replacement
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><input type="button" value="Show Spoiler" style="width:100px;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 Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show Spoiler'; }" />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">$1</div>
</div>
</div>
Reply
#4
(2012-11-09, 12:47 AM)dragonexpert Wrote: Why use a plugin when it can be handled in the MyCode section of the admin cp?

A MyCode spoiler can't nest.
[retired]
Reply
#5
(2012-11-09, 01:24 AM)Wildcard Wrote:
(2012-11-09, 12:47 AM)dragonexpert Wrote: Why use a plugin when it can be handled in the MyCode section of the admin cp?

A MyCode spoiler can't nest.

This. This is why I use a plugin spoiler.
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


Reply
#6
The only thing my replacement doesn't support is a spoiler within a spoiler. It supports all other code I've tried, including my own custom codes. I can't see why you'd need to do a spoiler within a spoiler.
Reply
#7
(2012-11-09, 11:58 AM)dragonexpert Wrote: The only thing my replacement doesn't support is a spoiler within a spoiler. It supports all other code I've tried, including my own custom codes. I can't see why you'd need to do a spoiler within a spoiler.

A spoiler within a spoiler is called 'nested' spoilers.

They can be used for many different things. On RC we use them for tutorials and to clean up our FAQ.

I even have members that have created interactive text adventure games using spoilers.
[retired]
Reply
#8
Got this fixed. Thanks.
Reply
#9
(2012-11-09, 11:40 AM)Leefish Wrote:
(2012-11-09, 01:24 AM)Wildcard Wrote:
(2012-11-09, 12:47 AM)dragonexpert Wrote: Why use a plugin when it can be handled in the MyCode section of the admin cp?

A MyCode spoiler can't nest.

This. This is why I use a plugin spoiler.

I wonder when you would need to use a nest of spoilers.

I've seen people use nest to piss others off.

But yea, plugin spoiler is preferred more.
Reply
#10
(2012-11-10, 10:29 PM)iHydra Wrote:
(2012-11-09, 11:40 AM)Leefish Wrote:
(2012-11-09, 01:24 AM)Wildcard Wrote:
(2012-11-09, 12:47 AM)dragonexpert Wrote: Why use a plugin when it can be handled in the MyCode section of the admin cp?

A MyCode spoiler can't nest.

This. This is why I use a plugin spoiler.

I wonder when you would need to use a nest of spoilers.

I've seen people use nest to piss others off.

But yea, plugin spoiler is preferred more.

Spoiler Nesting is used for informational posts.
Like thread: Existing groups on forums (over 5k characters, multiple infoblocks) or any other FAQ post, or instruction set. Very hard to read such long posts.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)