
08-30-2005, 05:46 AM
|
|
|
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by KirbyDE
Hook bbcode_create
PHP Code:
$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!function_exists('handle_bbcode_url_relnofollow'))
{
function handle_bbcode_url_relnofollow(&$parser, $text, $link)
{
global $post;
// Excempt Mods+ and Users with mor then 50 Posts
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (is_member_of($post, 5, 6, 7) OR $post['posts'] > 50)
{
return $parsedurl;
}
else
{
return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
}
}
}
|
For some reason I have no idea whatsoever how to apply this code. Is this basically a replacement in class_bbcode.php for what Kall originally posted?
|