to explain further and a little less vaguely im working on some forums and i am attempting to limit infiinite quoting. This is the current checking:
function quote_check($in)
{
$preg_begin = array();
preg_match_all('#\[quote=(.+?)]#i', $in, $out, PREG_PATTERN_ORDER);
if (!empty($out[0])) {
foreach ($out[0] as $match)
{
$preg_begin[] = strpos($in, $match);
}
}
$begin = $this->strpos_array($in, '[.quote.]');
$begin = array_merge($begin, $preg_begin);
sort($begin);
$end = $this->strpos_array($in, '[./quote.]');
if (count($begin) != count($end)) {
return false;
}
foreach ($begin as $count => $pos)
{
if ($pos > $end[$count]) {
return false;
}
}
return true;
}
Again i'm not sure how I should go about a loop in order to check for the occurences. I changed the quote lookup in the tag adding dots to break the bbcode from recognizing it. If someone wants to quote repeatedly it will show up as
Hope that helps, no this isn't some homework assignment. heh!
(we have an accurate example here of what I dont want :queasy: :quiet🙂