MyBB Community Forums

Full Version: [MOD] A Nice Hide Hack
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Wink

This is just one of many functions I've added to my editor:

I thought you may like to play with it, until I populate the MyBB CodeBox with a lot more functions. Toungue

The version I use is MyBB-language compliant, I didn't want to put all of that in this demo for you until the editor is released as a fully-integrated MyBB functional CodeBox.

To install this demo:

Goto:

ACP / Message Filters / Custom MyCode / Add MyCode

MyCode title: Spoiler

MyCode description: Hides text, pictures and videos.

Regular expression: \[spoil\](.*?)\[/spoil\]

Replacement:
<div style="margin:20px; margin-top:5px">
<div class="smalltext" style="margin-bottom:2px"><strong>Click to: </strong>&nbsp;<input type="button" class="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="trow2" border="1" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">$1</div>
</div>
</div>

Demo: Spoiler Demo

Guest's can post in the above thread... Please don't Abuse it. Wink
"Spoiler/Hide"-tag Number #5
LeX- Wrote:"Spoiler/Hide"-tag Number #5

I have no idea as to what you are suggesting. Sad

Care to elaborate ? Wink
He means it's a lot of spoiler/hide mods now - he probably counted them and found out this is the fifth one.
this one it's defrant, it's like expand mode.. thnx dear I like it.
CraKteR Wrote:He means it's a lot of spoiler/hide mods now - he probably counted them and found out this is the fifth one.

I know there are other ones and I looked at some of them. One uses the quote_header string. Not much good when the code_header/body has been modified to do something else. Sad

I didn't fancy much of what I saw.. That's why I decided to put this one together. Wink
This one looks VERY nice Smile Good job Smile
could you possibly make a code where a user needs to reply to a post to see a hidden message?
That requires database queries, who's posted / not, what thread / forum, logged in or out.

It's also a huge re-write or inclusion into the MyBB Core files. So it's also a lot of work.

Post your question in the MyBB wish-list. If someone runs with it, good; if they don't at least you will know why they didn't. Wink
iam like it..thanks
Pages: 1 2