How to make a hide button for an existing plugin
#1
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


Reply
#2
http://forums.mybbcommunity.com/thread-502.html
Reply
#3
Thank you but that principle .. will it work with the substitution of the hide? Substitute the name spoiler with hide?


Reply
#4
Yes.
Reply
#5
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


Reply
#6
'what do I put here' should be 'hide'. Not 'Hide' though.
Reply
#7
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


Reply
#8
Use jQuery.
$(".class_name").hide();

You can also change css visibility:none
A perfection of means, and confusion of aims, seems to be our main problem.
Albert Einstein
motor de reservas mhotel
santa ponsa apartments
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)