Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:

$bbcode_quote_types = array(
'email' => 'Email From',
'call' => 'Call From',
'notes' => 'Notes from Meeting with'
);
function _bbcode_quote($matches)
{
$type = strtolower($matches[6]);
$name = $matches[3];
$head = '';
$extra = '';
if(!empty($name))
{
$extra .= ' cite="'.htmlspecialchars($name).'"';
$head .= '<h2>';
if(isset($GLOBALS['bbcode_quote_types'][$type]))
{
$head .= $GLOBALS['bbcode_quote_types'][$type].': ';
$extra .= ' class="'.ucfirst($type).'"';
}
$head .= $name.'</h2>';
}
return ('<blockquote'.$extra.'>'.$head.$matches[7].'</blockquote>');
}
function bbcode_quote($text)
{
$out = $text;
do
{
$text = $out;
$out = preg_replace_callback(
'/\[quote(=(["\']?)([^\]]*?)\2)?(\s+type=(["\']?)([\w]+)\5)?]((.*?)|(?R))\[\/quote\]/is',
'_bbcode_quote',
$text
);
}
while($out != $text);
return $out;
}
$String = bbcode_quote($parser->qparse($String)); and then add in what I previously posted between the comment and class BetterBBCode... of default.php.
'quote' => array( 'htmlopen' => 'blockquote',
'htmlclose' => 'blockquote',
'allowed' => 'all',
'attributes'=> array()),? and added everything in the right spots in default.php? Everything's working fine on my installation.
<?php
/*
Extension Name: Better BB Code
Extension Url: http://lussumo.com/community/discussion/2161
Description: A BBCode-to-HTML conversion tool for discussion comments
Version: 1.0
Author: Joel Bernstein
Author Url: http://pong.uwstout.edu/
*/
require_once('BBCodeParser.php');
class BetterBBCodeFormatter extends StringFormatter
{
function Parse($String, $Object, $FormatPurpose)
{
$parser = new HTML_BBCodeParser();
if ($FormatPurpose == FORMAT_STRING_FOR_DISPLAY)
{
$String = $this->ProtectString($String);
return $parser->qparse($String);
}
else
return $String;
}
function ProtectString ($String) {
$String = str_replace("<", "<", $String);
$String = str_replace("\r\n", "<br />", $String);
return $String;
}
}
// Instantiate the bbcode object and add it to the string manipulation methods
$BetterBBCodeFormatter = $Context->ObjectFactory->NewObject($Context, "BetterBBCodeFormatter");
$Context->StringManipulator->AddManipulator("BBCode", $BetterBBCodeFormatter);
?> There are only 39 lines, and the line you said to change isn't in there. So I changed something that was similar and that caused it to not show anything. This is what I changed: {
$String = $this->ProtectString($String);
return $parser->qparse($String);
} to {
$String = $this->ProtectString($String);
return bbcode_quote($parser->qparse($String));
} That obviously doesn't work. Am I working on the wrong file? I think I am.
#Comments .CommentBody blockquote .Email { background-image: url(images/icon_email.jpg); background-repeat: no-repeat; padding-left: 25px } Its not working though. Should I be calling for blockquote's email class differently? It doesn't seem to be effecting the blockquote at all.
1 to 19 of 19