omardealo
11-11-2014, 02:13 PM
Hello ,
i make a plugin [stop new thread if That it contains Banned words]
every thing is okay , but when i try print all Banned words Written by User , but Do not print all the words, only the last word .
i Used the code in a php file with ECHO to print and working good , but in plugin i have problem with standard_error Do not print, but only the last value . so Where the problem ?
$bwords = explode("|", $vbulletin->options['banwords_wordslist']);
$string = $vbulletin->GPC['message'];
$matches = array();
$matchFound = preg_match_all(
"/\b(" . implode($bwords,"|") . ")\b/i",
$string,
$matches
);
if ($matchFound)
{
$words = array_unique($matches[0]);
foreach($words as $word)
{
eval (standard_error( "Banned Words : <li>" . $word . "</li>"));
}
}
i make a plugin [stop new thread if That it contains Banned words]
every thing is okay , but when i try print all Banned words Written by User , but Do not print all the words, only the last word .
i Used the code in a php file with ECHO to print and working good , but in plugin i have problem with standard_error Do not print, but only the last value . so Where the problem ?
$bwords = explode("|", $vbulletin->options['banwords_wordslist']);
$string = $vbulletin->GPC['message'];
$matches = array();
$matchFound = preg_match_all(
"/\b(" . implode($bwords,"|") . ")\b/i",
$string,
$matches
);
if ($matchFound)
{
$words = array_unique($matches[0]);
foreach($words as $word)
{
eval (standard_error( "Banned Words : <li>" . $word . "</li>"));
}
}