Quote:
Originally Posted by nerbert
I got this to work in [code] tags and [html] tags but am having trouble with [php] tags.
In includes/class_bbcode.php go to about line 1970 and modify as follows:
PHP Code:
else { $blockheight = $this->fetch_block_height($code); $template = 'bbcode_code'; } //########### CLICKABLE LINK HACK ########### $code = convert_url_to_bbcode($code); $n = preg_match_all('#\[url\].*\[/url\]#U', $code, $matches); foreach($matches[0] AS $match) { $string = str_replace('[url]', '', $match); $string = str_replace('[/url]', '', $string); $html_url = '<a href="' . $string . '" target="_blank">' . $string . '</a>'; $code = str_replace($match, $html_url, $code); } //########## /CLICKABLE LINK HACK ########### $templater = vB_Template::create($template, true); $templater->register('blockheight', $blockheight); $templater->register('code', $code); return $templater->render(); }
There's probably a smarter way to do this but I'm not very smart.
|
i tried your this code. and i see this error when i post links in code -
Fatal error: Call to undefined function convert_url_to_bbcode() in /public_html/myforum.com/includes/class_bbcode.php on line 1995
i am using vbulletin 4.1.7
plz help... i need all links in code tag clickable.