Hide bbcode - available

i want to put HIDE,[hide][/hide] to see the music or thing when i reply or something,
Home of phpBB Integrated Modifications
https://www.integramod.com/forum/
     if( $attach_sig && $user_sig != '' && $userdata['user_sig_bbcode_uid'] )    {      $user_sig = bbencode_second_pass($user_sig, $userdata['user_sig_bbcode_uid']);    }     if( $bbcode_on )    {      $preview_message = bbencode_second_pass($preview_message, $bbcode_uid);    }Â
     $valid = FALSE;    if( $userdata['session_logged_in'] ) {    $sql = "SELECT p.poster_id, p.topic_id    FROM " . POSTS_TABLE . " p    WHERE p.topic_id = $topic_id    AND p.poster_id = " . $userdata['user_id'];    $resultat = $db->sql_query($sql);    $valid = $db->sql_numrows($resultat) ? TRUE ] )    {        $user_sig = bbencode_second_pass($user_sig, $userdata['user_sig_bbcode_uid']);        $user_sig = bbencode_third_pass($user_sig, $userdata['user_sig_bbcode_uid'], $valid);    }     if( $bbcode_on )    {        $preview_message = bbencode_second_pass($preview_message, $bbcode_uid);        $preview_message = bbencode_third_pass($preview_message, $bbcode_uid, $valid);    }Â
       if ( !preg_match('/^Re]
AFTER ADD
 [code]       if( !$userdata['session_logged_in'] ) {$message = hide_in_quote($message);}      else { $sql = "SELECT p.poster_id, p.topic_id      FROM " . POSTS_TABLE . " p      WHERE p.topic_id = $topic_id      AND p.poster_id = " . $userdata['user_id'];      $resultat = $db->sql_query($sql);      if(!$db->sql_numrows($resultat)) {$message = hide_in_quote($message);}      }  [/code]
OPEN root/viewtopic.php
Â
FIND
 [code] //// Generate a 'Show posts in previous x days' select box. If the postdays var is POSTed// then get it's value, find the number of topics with dates newer than it (to properly// handle pagination) and alter the main query// [/code]
AFTER, ADD
 [code] $valid = FALSE;  if( $userdata['session_logged_in'] ) {  $sql = "SELECT p.poster_id, p.topic_id    FROM " . POSTS_TABLE . " p    WHERE p.topic_id = $topic_id      AND p.poster_id = " . $userdata['user_id'];  $resultat = $db->sql_query($sql);$valid = $db->sql_numrows($resultat) ? TRUE ]
FIND
 [code]   if ( strpos($message, '.script') !== false)  {    $message = str_replace(".script", "script", $message);  }   if ($bbcode_uid != '')  {    $message = ($board_config['allow_bbcode']) ? bbencode_second_pass($message, $bbcode_uid) ]
AFTER, ADD
 [code]     $message = bbencode_third_pass($message, $bbcode_uid, $valid); [/code]
FIND
 [code]   if ( $user_sig != '' && $board_config['sig_allow_url'] != 0 )  {    $user_sig = make_clickable($user_sig); [/code]
AFTER, ADD
 [code]     $user_sig = bbencode_third_pass($user_sig, $user_sig_bbcode_uid, $valid); [/code]
OPEN root/search.php
Â
FIND
 [code]           // on then we process it, else leave it alone          //          if ( $return_chars != -1 ) [/code]
REPLACE WITH
[code]           // on then we process it, else leave it alone          //          if ( $return_chars == -1 ) [/code]
FIND
 [code]             if ( $bbcode_uid != '' )            {              $message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) ]+]/si', ']', $message);            } [/code]
REPLACE WITH
 [code]             if ( $bbcode_uid != '' )            {                $message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) ]+]/si', ']', $message);                $message = bbencode_third_pass($message, $bbcode_uid, FALSE);            } [/code]
OPEN root/includes/bbcode.php
Â
FIND
 [code]   $bbcode_tpl['email'] = str_replace('{EMAIL}', '\1', $bbcode_tpl['email']); [/code]
AFTER, ADD
 [code]   $bbcode_tpl['show'] = str_replace('{HTEXTE}', '\1', $bbcode_tpl['show']); [/code]
FIND
 [code]   define("BBCODE_TPL_READY", true);   return $bbcode_tpl;} [/code]
AFTER, ADD
 [code] function hide_in_quote($text){    $text = preg_replace("#[hide](.*?)[/hide]#si","--- phpBB ]" in the message, don't bother.    if (! (strpos($text, "[") && strpos($text, "]")) )    {        // Remove padding, return.        $text = substr($text, 1);        return $text;    }    // Patterns and replacements for URL and email tags..    $patterns = array();    $replacements = array();     if ( $deprotect ) {    $patterns[0] = "#[hide:$uid](.*?)[/hide:$uid]#si";    $replacements[0] = $bbcode_tpl['show'];    }    else    {    $patterns[0] = "#[hide:$uid](.*?)[/hide:$uid]#si";    $replacements[0] = $bbcode_tpl['hide'];    }     $text = preg_replace($patterns, $replacements, $text);     // Remove our padding from the string..    $text = substr($text, 1);     return $text;} [/code]
FIND
 [code]   // [flash=,]image_url_here[/flash:1z2vbop4] code..  $text = preg_replace("#[img]((http|ftp|https|ftps)://)([^rnt</img>= 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]");    return;  }  if (hide == 0) {    ToAdd = "[hide]";    document.hide.src = "mods/bbcode_box/images/hide1.gif";    hide = 1;  } else {    ToAdd = "[/hide]";    document.hide.src = "mods/bbcode_box/images/hide.gif";    hide = 0;  }  PostWrite(ToAdd);} [/code]Â
Â
OPEN root/mods/bbcode_box/bbcode_box_a.js
Â
FIND
 [code] table_help = "Creates a Table using BBCode"; [/code]
AFTER, ADD
 [code] hide_help = "Hide]message[/hide]";  [/code]
FIND
 [code] var spoiler = 0; [/code]
AFTER, ADD
 [code] var hide = 0; [/code]
FIND
 [code]     if (oSelectRange.text.length > 120) {     alert("This only works for less than 120 letters");     return;    }    showModalDialog("mods/bbcode_box/grad.htm",oSelectRange,"help]
AFTER, ADD
[code] Â 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]");Â Â Â Â return;Â Â }Â Â if (hide == 0) {Â Â Â Â ToAdd = "[hide]";Â Â Â Â document.hide.src = "mods/bbcode_box/images/hide1.gif";Â Â Â Â hide = 1;Â Â } else {Â Â Â Â ToAdd = "[/hide]";Â Â Â Â document.hide.src = "mods/bbcode_box/images/hide.gif";Â Â Â Â hide = 0;Â Â }Â Â PostWrite(ToAdd);}Â [/code]
Â
OPEN root/templates/Integra2/bbcode.tpl
Â
FIND
 [code] <BEGIN><ul><END> [/code]
BEFORE, ADD
 [code] <BEGIN></span><table><tr>     <td><span><b>Protected Message]
Â
OPEN root/templates/Integra2/posting_body.tpl
Â
FIND
 [code]                 <td><img></td> [/code]
AFTER, ADD
 [code]                 <td><img></td>Â