Page 1 of 1

Hide bbcode - available

PostPosted: Sat Feb 02, 2008 8:26 pm
Author: Jonny
i want to put HIDE,[hide][/hide] to see the music or thing when i reply or something,

Re: How i Put The Hide?

PostPosted: Sat Feb 02, 2008 9:19 pm
Author: CaNNon
Ok, I'm lost. If you explain a little better maybe someone could help you? <img>

Re: How i Put The Hide?

PostPosted: Sat Feb 02, 2008 9:58 pm
Author: Michalis
I think he means the hide .script that if u put in the bbcode box [b] [hide link or image [/hide]
this will hide the link or image till the person replies to the post, then the image or link is revieled.

this has been asked befor on this board & has not
been modified for integramod

creator link below

http://www.philiweb.com/accueil.php?pn= ... ckhide.php

Re: How i Put The Hide?

PostPosted: Sun Feb 03, 2008 9:02 am
Author: CaNNon
I see, looks like it could be of some use. He has limited where it can be used though.

Re: How i Put The Hide?

PostPosted: Sun Feb 03, 2008 1:28 pm
Author: Helter
ive looked at this before and the english translation was still 1/2 french.

Re: How i Put The Hide?

PostPosted: Mon Feb 04, 2008 1:59 am
Author: Michalis
he made it for normal php a long time
ago he made me a new version at the time for phpBB+

I have sent a email to him asking if he has the time
if he could maybe make a integramod version.

but I have received no info back hehehehe

maybe someone from this board with php knowledge
could help with this project

i used this mod before i came to integramod.

PostPosted: Mon Mar 17, 2008 1:24 pm
Author: Verdugo
iÂÂÂ ´m looking for this mod, too.

The editor of the origin has updated his site and now theres a full english translation of installation.

http://www.philiweb.com/accueil.php?pn= ... ckhide.php

Maybe now one is able to port it to integramod, so that we can use it ?

Thx in advance.

Re: How i Put The Hide?

PostPosted: Tue Nov 25, 2008 3:32 am
Author: Maddeen
Hi there,

does anyone get this ported to integramod ?
Or is there stil no [Hide] Option for Integra?

i ´m very pleased if some one could port it to IM.

Thanks in advance

Re: How i Put The Hide?

PostPosted: Tue Nov 25, 2008 11:33 am
Author: Helter
I have not tested this, but it should work


############################################################################
## MOD HIDE | Made By / Auteur: Philiweb <url>
## Modified for IntegraMOD by HelterSkelter
## Description : MOD "HIDE" (aka lockdown) - this mod allow users to hide
## a message via some "bbcodes", ex : [hide] message [/hide]. To see the
## hidden message, you must be a member and you must post a reply to
## the message...
##Files to edit
##
## root/posting.php
## root/viewtopic.php
## root/search.php
## root/includes/bbcode.php
## root/includes/topic_review.php
## root/mods/bbcode_box/bbcode_box.js
## root/mods/bbcode_box/bbcode_box_a.js
## root/templates/Integra2/bbcode.tpl   (all installed templates)
## root/templates/Integra2/posting_body.tpl   (all installed templates)
##
## Included files
##
## root/mods/bbcode_box/images/hide1.gif
## root/mods/bbcode_box/images/hide.gif
##
## This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
############################################################################
  
copy   images/hide1.gif to root/mods/bbcode_box/images/hide1.gif
copy   images/hide.gif to root/mods/bbcode_box/images/hide.gif
  
OPEN root/posting.php
  
FIND
  
Code: Select all
  Ã‚            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);            }  

REPLACE WITH
  
Code: Select all
  Ã‚            $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);            }  

FIND
  
Code: Select all
  Ã‚                  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>  

Re: Hide bbcode - available

PostPosted: Fri Nov 28, 2008 11:50 pm
Author: Teelk
There's also this one, it was adapted for 1.4.0, it may still be applicable to 1.4.1.

http://www.integramod.com/forum/viewtop ... hide#p9233

Re: Hide bbcode - available

PostPosted: Sun Nov 30, 2008 4:40 pm
Author: Michalis
HelterSkelter

ur a star, the mod works wonders & well worth the wait for someone like
u to take the time to get this request/script working for the latest
integramod...

Re: Hide bbcode - available

PostPosted: Sun Nov 30, 2008 10:19 pm
Author: Helter
sorry it took so long. Im glad it is working correctly. Ive added it to the dl section of the boards