MyBB Community Forums

Full Version: [Tutorial] Hide Content Until Reply (1.7) + Editor Button
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all...

This my first post on Mybb. I have seen many tutorials on how to add a "Hide Button" in mybb editor but non of them have worked for me. Anyway after alot of searching the www I have finially added a "Hide Button" to my editor. I would like to share my tutorial to those who still have'nt managed.

Let me know if it works fo you Smile

Install: Hide Content Until Reply - Dark Neo

Remember to backup before any mods or download a copy of the files that need to edit from your ftp client before so if anything goes wrong just replace with the edited files.

Then find this code in jscript/editor.js
this.createToolbar('closetags', {
			container: 'top',
			alignment: 'right',
			items: [

On a new line under the above code place this code (no need to chage anything)
{type: 'button', name: 'close_tags', insert: 'zzzz', sprite: 'close_tags', width: 50, style: {visibility: 'hidden'}}, {type: 'button', name: 'hide', sprite: 'hide', insert: 'hide', title: 'Hide Download Link', image: 'hide.gif'},{type: 'button', name: 'close_tags', insert: 'zzzz', sprite: 'close_tags', width: 50, style: {visibility: 'hidden'}}

Save it

Then in jscript/editor_themes/office_2007/stylesheet.css
Find
.messageEditor .toolbar_button {
	margin: 2px 0;
	height: 22px;
	float: left;
	display: block;
	z-index: 1;
}

On a new line under the above code place this code (no need to change anything)
.messageEditor .toolbar_button .toolbar_sprite_hide {
background: url(images/hide.gif) no-repeat;

}

Save it

Upload your chosen hide.gif to jscript/editor_themes/office_2007/images

Screenshots
[Image: T1389788237648686_1.jpg]

[Image: S1389788358643215_1.jpg]

NOTE:
I cannot really offer any support as I only have a small VERY small knowledge of MYBB,SMF annd PHPBB3 forums.