MyBB Community Forums

Full Version: How to make a hide button for an existing plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using this plugin:
http://mods.mybb.com/view/hide-to-guests

which uses [hide][/hide] and would like to make the posting easier for me since I do most if not all of it on the forum.
How would I do this? I was hoping to build the button function like the other buttons on the postbit,Image, insert hyperlink. where I would highlight the text and then press the button for the code to appear.Confused
Thank you but that principle .. will it work with the substitution of the hide? Substitute the name spoiler with hide?
Yes.
I am confused I guess I have not written it correctly.. so therefore I do not understand. Yes I am a noob at this.

Goal: to have one of my existing plug-ins work with an editor button which installed correctly next to the color choice. In fact when you click on the hide icon when posting it actually does this:
[Hide]info[/Hide] which are the correct tags but no function at all.
I have the editor js done correctly but I am not sure mycode is done right.

[\hide\](.*?)\[/hide\]

and if that is correct what would I put in the this section of the js code.

{type: 'button', name: 'hide', insert: 'what do I put here', image: 'hide.png', title: 'Hide'}
I have the plugin but it would be easier to use the hide with the button when posting my links ..

Any help would be greatly appreciated...thank youBig Grin
'what do I put here' should be 'hide'. Not 'Hide' though.
Okay thank you I will try that,...

Well when I do that it truly hides eveything..heheheh... and I mean everything .. prehaps I should not be so lazy and just use the hide tag manually lol
Use jQuery.
$(".class_name").hide();

You can also change css visibility:none