http://www.icyphoenix.com/viewtopic.php?f=28&t=6657&p=49787#p49787
-----------------------------------
El_Fenix
Sat 07 Aug, 2010 11:26

Re: [MOD IPv1.3.0.*] BBCode Hide Message With An Image Buttom
-----------------------------------
[b]i use this code in my forum  i think this can be another option for the mod
 with this change you need to select the text to hide
 do all the steps  in the start of this  topic  after you can try  this function
Im not a coder please check this be ok

sorry about my english[/b]

Before Try this change to the mod 
Backup this file
and  the next to do is

[size=12]in  [/size]
[color=#0033FF][size=12]templates/common/js/bbcb_mg.js[/size][/color] 


[b]FIND: [/b]

[code linenumbers=false]function BBChide() 
{ 
    var txtarea = document.post.message; 

    if ((clientVer >= 4) && is_ie && is_win) 
    { 
        theSelection = document.selection.createRange().text; 
        if (theSelection != '') 
        { 
            document.selection.createRange().text = "Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
"; 
            document.post.message.focus(); 
            return; 
        } 
    } 
    else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) 
    { 
        //mozWrap(txtarea, "Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
"); 
        mozInsert(txtarea, "Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
"); 
        return; 
    } 
    if (Hide == 0) 
    { 
        ToAdd = "[hide]"; 
        document.post.hide_img.src = bbcb_mg_img_path + "hide1" + bbcb_mg_img_ext; 
        Hide = 1; 
    } 
    else 
    { 
        ToAdd = "[/hide]"; 
        document.post.hide_img.src = bbcb_mg_img_path + "hide" + bbcb_mg_img_ext; 
        Hide = 0; 
    } 
    PostWrite(ToAdd); 
}[/code]




[b]REPLACE WITH: [/b]


[code linenumbers=false]function BBChide()
{
	var txtarea = document.forms[form_name].elements[text_name];

	if ((clientVer >= 4) && is_ie && is_win)
	{
		theSelection = document.selection.createRange().text;
		if (theSelection != '')
		{
			document.selection.createRange().text = "Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
";
			document.forms[form_name].elements[text_name].focus();
			return;
		}
	}
	else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
	{
		mozInsert(txtarea, "Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.
");
		return;
	}
	if (hide == 0)
	{
		ToAdd = "[hide]";
		document.forms[form_name].hide.src = bbcb_mg_img_path + "hide1" + bbcb_mg_img_ext;
		Hide = 1;
	}
	else
	{
		ToAdd = "[/hide]";
		document.forms[form_name].hide.src = bbcb_mg_img_path + "hide" + bbcb_mg_img_ext;
		Hide = 0;
	}
	PostWrite(ToAdd);
}[/code]

take care about the images [code linenumbers=false]hide_no.gif[/code] and
[code linenumbers=false]hide_yes.gif[/code] if be necesary switch the names via ftp


