This image will be shown to explain that there is a hidden message: Example
Rename this image as hide_yes.gif and upload to: /images/bbcb_mg/images/
And this image will be shown when users are able to see the hidden message: Example
Rename this image as hide_no.gif and upload to: /images/bbcb_mg/images/
Example Images of this hack: When the message is hidden / When the message is not hidden
In /includes/bbcode.php
FIND:
// generate html
$html = '<blockquote class="quote"><div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div><div class="post-text">';
if(!$show)
{
return array(
'valid' => true,
'html' => $html . $lang['xs_bbc_hide_message_explain'] . '</div></blockquote>',
'allow_nested' => false,
);
}
else
{
return array(
'valid' => true,
'start' => $html,
'end' => '</div></blockquote>'
);
}
$html = '<blockquote class="quote"><div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div><div class="post-text">';
if(!$show)
{
return array(
'valid' => true,
'html' => $html . $lang['xs_bbc_hide_message_explain'] . '</div></blockquote>',
'allow_nested' => false,
);
}
else
{
return array(
'valid' => true,
'start' => $html,
'end' => '</div></blockquote>'
);
}
REPLACE WITH
// generate html
$html = '<blockquote class="quote"><div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div><div class="post-text">';
if(!$show)
{
return array(
'valid' => true,
'html' => $html . '<center><img src="images/bbcb_mg/images/hide_yes.gif" border="0"/></center><br />' . $lang['xs_bbc_hide_message_explain'] . '</div></blockquote>',
'allow_nested' => false,
);
}
else
{
return array(
'valid' => true,
'start' => $$html . '<center><img src="images/bbcb_mg/images/hide_no.gif" border="0"/></center><br />',
'end' => '</div></blockquote>'
);
}
$html = '<blockquote class="quote"><div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div><div class="post-text">';
if(!$show)
{
return array(
'valid' => true,
'html' => $html . '<center><img src="images/bbcb_mg/images/hide_yes.gif" border="0"/></center><br />' . $lang['xs_bbc_hide_message_explain'] . '</div></blockquote>',
'allow_nested' => false,
);
}
else
{
return array(
'valid' => true,
'start' => $$html . '<center><img src="images/bbcb_mg/images/hide_no.gif" border="0"/></center><br />',
'end' => '</div></blockquote>'
);
}
With this changes, we have an image with the text of BBcode Hide explain.
But, the BBcode Hide doesn't have a bbcode button on posting.php (on reply).
With this changes, you can add this button.
Example Image of the button: Image of the button pressed
Follow this instructions:
Upload to /images/bbcb_mg/images/gif this images:


In /languages/lang_xxx/lang_bbcb_mg.php
FIND:
AFTER, ADD
FIND:
AFTER, ADD
$lang['s_hide_help'] = 'Hide a text, registered users must reply or thanks topic to view the hidden message: [hide]Hidden Message[/hide]';
In /includes/bbcb_mg.php
FIND:
AFTER, ADD
FIND:
AFTER, ADD
In /languages/lang_xxx/bbcb_mg.js
FIND:
s_smiley_creator = 'Smiley Creator: [smiley=1]Text[/smiley] insert a smiley with text';
AFTER, ADD
s_hide_help = 'Hide a text, registered users must reply or thanks topic to view the hidden message: [hide]Hidden Message[/hide]';
FIND:
AFTER ADD:
FIND:
AFTER ADD
FIND:
BEFORE ADD:
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 = "[hide]" + theSelection + "[/hide]";
document.post.message.focus();
return;
}
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
//mozWrap(txtarea, "[hide]", "[/hide]");
mozInsert(txtarea, "[hide]", "[/hide]");
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);
}
{
var txtarea = document.post.message;
if ((clientVer >= 4) && is_ie && is_win)
{
theSelection = document.selection.createRange().text;
if (theSelection != '')
{
document.selection.createRange().text = "[hide]" + theSelection + "[/hide]";
document.post.message.focus();
return;
}
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
//mozWrap(txtarea, "[hide]", "[/hide]");
mozInsert(txtarea, "[hide]", "[/hide]");
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);
}
In /templates/mg_themes/bbcb_mg.tpl
FIND:
<a href="javascript:BBChl()" ><img src="{BBCB_MG_IMG_PATH}highlight{BBCB_MG_IMG_EXT}" name="highlight" onMouseOver="helpline('highlight')" alt="{L_BBCB_MG_HIGHLIGHT}" title="{L_BBCB_MG_HIGHLIGHT}" class="bbimages" /></a>
AFTER ADD:
<a href="javascript:BBChide()"><img src="{BBCB_MG_IMG_PATH}hide{BBCB_MG_IMG_EXT}" name="hide_img" onMouseOver="helpline('hide')" alt="{L_BBCB_MG_HIDE}" title="{L_BBCB_MG_HIDE}" class="bbimages" /></a>
Now, with this changes, we have a new button to use the bbcode hide in the posting page