
09-28-2010, 01:16 PM
|
|
|
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by Mike09
Works perfectly with vB 4.0.x with a minor modification in the first code block,
Code:
/**
* Handles a [ high ] tag. Displays a preformatted string.
*
* @param string The code to display
*
* @return string HTML representation of the tag.
*/
function handle_bbcode_high($code , $option)
{
global $vbulletin, $vbphrase, $stylevar, $show;
// remove unnecessary line breaks and escaped quotes
$code = str_replace(array('<br>', '<br />'), array('', ''), $code);
$code = $this->strip_front_back_whitespace($code, 1);
if ($this->printable)
{
$code = $this->emulate_pre_tag($code);
$template = 'bbcode_high_printable';
}
else
{
$blockheight = $this->fetch_block_height($code);
$template = 'bbcode_high';
}
// eval('$html = "' . fetch_template($template) . '";');
// return $html;
$templater = vB_Template::create($template);
$templater->register('blockheight', $blockheight);
$templater->register('code', $code);
$templater->register('option', $option);
return $templater->render();
}
/**
* Handles a [ high ] tag. Displays a preformatted string.
*
* @param string The code to display
*
* @return string HTML representation of the tag.
*/
function handle_bbcode_high1($code)
{
global $vbulletin, $vbphrase, $stylevar, $show;
// remove unnecessary line breaks and escaped quotes
$code = str_replace(array('<br>', '<br />'), array('', ''), $code);
$code = $this->strip_front_back_whitespace($code, 1);
if ($this->printable)
{
$code = $this->emulate_pre_tag($code);
$template = 'bbcode_high1_printable';
}
else
{
$blockheight = $this->fetch_block_height($code);
$template = 'bbcode_high1';
}
// eval('$html = "' . fetch_template($template) . '";');
// return $html;
$templater = vB_Template::create($template);
$templater->register('blockheight', $blockheight);
$templater->register('code', $code);
return $templater->render();
}
Thanks.
|
no it doesn't work on 4.0.7 it outputs plain text or is it me here ?
[high]test[/high]
[high1=php]//php code[/high1]
|