[COLOR="#FF0000"] if (isset(self::$cache['_objectIds']) AND count(self::$cache['_objectIds']))
{[/COLOR]
if (isset(self::$config['dbtech_dbseo_rewrite_texturls']) AND self::$config['dbtech_dbseo_rewrite_texturls'])
{
// Replace text urls in content
$content = preg_replace_callback(
'#(' . str_replace('tps\:','tps?\:', preg_quote(self::$config['_bburl'], '#')) . '/?)([^<\]\[\"\)\s]*)#is',
array('DBSEO', 'replaceTextUrls'),
$content
);
}
if (self::$config['_isXML'])
{
// Replace text urls in XML
$content = preg_replace_callback(
'#(<link>(?:\<\!\[CDATA\[)?)([^<\]]*)#is',
array('DBSEO', 'replaceTextUrls'),
$content
);
}
// Do main content replacements
$content2 = preg_replace_callback(
'#(value="(?:\[.*?\])?)(' . preg_quote(self::$config['_bburl'], '#') . '/?)([^<\]\[\"\)\s]*)#is',
array('DBSEO', 'replaceMainContent'),
$content
);
// Ensure we only overwrite content if it's valid
$content = $content2 ? $content2 : $content;
if (!isset(self::$config['dbtech_dbseo_rewrite_texturls']) OR !self::$config['dbtech_dbseo_rewrite_texturls'])
{
$content = preg_replace_callback(
'#(<(?:a|span|iframe|form|script|link|img|meta)([^>]*?)(?:href|src|action|url|\.open|\.location|content)\s*[=\(]\s*["\'])([^"\'>\)]*)(.*?[\>])([^<]*)(</a>)?#is',
array('DBSEO', 'replaceTags'),
$content
);
if (!self::$config['_inAjax'] AND isset(self::$cache['urlReplace']))
{
// Start fresh!
unset(self::$cache['urlReplace']);
}
if (strpos($_SERVER['REQUEST_URI'], 'printthread.php') !== false)
{
// Ensure we're doing this
self::$config['_rewritePrintThread'] = 1;
// Replace the text URLs again
$content = preg_replace_callback(
'#(\([^\)]*?(?:http://)?[^\)]*?)(' . preg_quote(self::$config['_bburl'], '#') . '/[^<\)]*)#is',
array('DBSEO', 'replaceTextUrls'),
$content
);
}
}
[COLOR="#FF0000"] }[/COLOR]