estas son algunas de las indicaciones para el mod hide.
algunas cosas no las entiendo,
alguien puede ayudarme?
(las marco)
[quote]
############################################################################
## MOD HIDE | Made By / Auteur: Philiweb < http://www.philiweb.fr.st/ >
There is 7 files to modify :
1 - posting.php
2 - viewtopic.php
3 - search.php
4 - topic_review.php // in the "/includes" directory
5 - bbcode.php // in the "/includes" directory
6 - bbcode.tpl // in the Templates/{Used template}/ directory
7 - posting_body.tpl // in the Templates/{Used template}/ directory
This mod is easy to install. (20 mn)
- In bbcode.php // in the "/includes" directory
-----------------
Find
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
Add Below
$bbcode_tpl['show'] = str_replace('{HTEXTE}', '\\1', $bbcode_tpl['show']);
*Before* this text
/**
* Does second-pass bbencoding. This should be used before displaying the message in
* a thread. Assumes the message is already first-pass encoded, and we are given the
* correct UID as used in first-pass encoding.
*/
Add this functions
function hide_in_quote($text)
{
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si","--- phpBB : The Protected Message is not copied in this quote ---", $text);
return $text;
}
function bbencode_third_pass($text, $uid, $deprotect)
{
global $bbcode_tpl;
// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$text = " " . $text;
// First: If there isn't a "[" and a "]" 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;
}
Find in function "bbencode_first_pass"
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\](([a-z]+?)://([^ \"\n\r]+?))\[/img\]#si", "[img:$uid]\\1[/img:$uid]", $text);
Add Below
//
-----------------
6 - In bbcode.tpl // in the Templates/{Used template}/ directory
-----------------
At the top, add
<!-- BEGIN show -->
</span>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td><span class="genmed"><b>Protected Message:</b></span></td>
</tr>
<tr>
<td class="quote">
{HTEXTE}
</td>
</tr>
</table>
<span class="postbody">
<!-- END show -->
<!-- BEGIN hide -->
</span>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td><span class="genmed"><b>Protected Message:</b></span></td>
</tr>
<tr>
<td class="quote">
<center>--- If you are a *registered user* : you need to post in this topic to see the message ---</center>
</td>
</tr>
</table>
<span class="postbody">
<!-- END hide -->
-----------------------
7 - In posting_body.tpl // in the Templates/{Used template}/ directory
-----------------------
This part add a button in the dialog box (newtopic,...).
In the list of "// Helpline messages", add :
h_help = "Hide:
Find this line :
bbtags = new Array('',''...
And add at the end :
'
You will obtain something like this :
bbtags = new Array('','','','','','','[quote]','[/quoteicy]','
Código: Seleccionar todo
','
- ','
- ','
Find
<td><span class="genmed">
<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
</span></td>
Add Below : (Don't forget to adapt the "addbbcode" numbers if neccesary ! (exemple: addbbcode18 -> addbbcode20, 20 -> 22, etc)
<td><span class="genmed">
<input type="button" class="button" accesskey="h" name="addbbcode18" value="Hide" style="width: 40px" onClick="bbstyle(18)" onMouseOver="helpline('h')" />
</span></td>
Next, you need to modify all the "addbbcodexx" in the rest of the file. (exemple : addbbcode20 -> addbbcode22)
That's all !

Philippe
[/quoteicy]
en el punto 5.:[quote]
*Before* this text
/**
* Does second-pass bbencoding. This should be used before displaying the message in
* a thread. Assumes the message is already first-pass encoded, and we are given the
* correct UID as used in first-pass encoding.
*/
Add this functions
function hide_in_quote($text)
{
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si","--- phpBB : The Protected Message is not copied in this quote ---", $text);
return $text;
}
function bbencode_third_pass($text, $uid, $deprotect)
{
global $bbcode_tpl;
// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$text = " " . $text;
// First: If there isn't a "[" and a "]" in the message, don't bother.
if (! (strpos($text, "[") && strpos($text, "]")) )[/quoteicy]
no entiendo esto de Add this functions
At the top, add ?
??
- las partes donde dice (exemple: addbbcode18 -> addbbcode20, 20 -> 22, etc) parece que hay que cambiar el numero,
que numero ponerle?
si alguien puede darme un mano, les agradezco,
saludos.