da Rombo di Tuono » 04 gen 2011, 01:04
Instructions:
Whole MOD is in three steps
STEP 1
OPEN phpbb root/includes/function_posting.php
FIND
BEFORE-ADD
Codice: Seleziona tutto
// begin MOD Kill Extra Quote
function remove_quote($quoted_text, $max_quote_nest)
{
/*
$max_quote_nest is set in ACP, and passed to the funcion
*/
if ($max_quote_nest > 0) {
// constants for begin and end tag quote
$beginquote = "[quote=";
$endquote = "[/quote";
// better they have same lenght
$ctrl_len = 7;
$quote_to_kill = $max_quote_nest -1;
$output = "";
$purged_text = "";
$nest_count = 0;
$killing = false; // determines if that part of quoted text must be taken away
for ($i = 0; $i<=strlen($quoted_text); $i++)
{
$char = substr($quoted_text, $i, 1);
if ($char == "[")
{
$control = substr($quoted_text, $i, $ctrl_len);
if ($control == $beginquote ) {
$nest_count++;
}
if ($control == $endquote ) {
$nest_count--;
if ($killing) { // if you find an end quote while in 'killing mode' you CAN stripe it at this point
$i = $i + $ctrl_len +1;
$char = substr($quoted_text, $i, 1);
}
}
if ($nest_count > $quote_to_kill ) {
$killing = true;
} else {
$killing = false;
}
} // end of bracket check
if (!$killing) {
$output = $output . $char;
}
}
return $output;
} else {
return $quoted_text;
}
} // END MOD Kill Extra Quote
Eugy ROMBO di TUONO
Instructions:
Whole MOD is in three steps
[evid=yellow][b]STEP 1[/b][/evid]
OPEN phpbb root/includes/function_posting.php
FIND
[code]?>[/code]
BEFORE-ADD
[code]
// begin MOD Kill Extra Quote
function remove_quote($quoted_text, $max_quote_nest)
{
/*
$max_quote_nest is set in ACP, and passed to the funcion
*/
if ($max_quote_nest > 0) {
// constants for begin and end tag quote
$beginquote = "[quote=";
$endquote = "[/quote";
// better they have same lenght
$ctrl_len = 7;
$quote_to_kill = $max_quote_nest -1;
$output = "";
$purged_text = "";
$nest_count = 0;
$killing = false; // determines if that part of quoted text must be taken away
for ($i = 0; $i<=strlen($quoted_text); $i++)
{
$char = substr($quoted_text, $i, 1);
if ($char == "[")
{
$control = substr($quoted_text, $i, $ctrl_len);
if ($control == $beginquote ) {
$nest_count++;
}
if ($control == $endquote ) {
$nest_count--;
if ($killing) { // if you find an end quote while in 'killing mode' you CAN stripe it at this point
$i = $i + $ctrl_len +1;
$char = substr($quoted_text, $i, 1);
}
}
if ($nest_count > $quote_to_kill ) {
$killing = true;
} else {
$killing = false;
}
} // end of bracket check
if (!$killing) {
$output = $output . $char;
}
}
return $output;
} else {
return $quoted_text;
}
} // END MOD Kill Extra Quote
[/code]
[b]Eugy ROMBO di TUONO[/b]