/** * Determines whether a string contains an [img] tag. * * @param string Text to search * * @return bool Whether the text contains an [img] tag */ protected function containsBbcodeImgTags($text) { // use a bitfield system to look for img, attach, and sigpic tags $hasimage = 0; if (vB5_String::stripos($text, '[/img]') !== false) { $hasimage += self::BBCODE_HAS_IMG; } if (vB5_String::stripos($text, '[/attach]') !== false) { $hasimage += self::BBCODE_HAS_ATTACH; } if (vB5_String::stripos($text, '[/sigpic]') !== false) { // permissions are checked on API method if (!empty($this->parseUserinfo['userid']) and !empty($this->parseUserinfo['sigpic'])) { $hasimage += self::BBCODE_HAS_SIGPIC; } } if (vB5_String::stripos($text, '[/relpath]') !== false) { $hasimage += self::BBCODE_HAS_RELPATH; } return $hasimage; }