Today I finally did it, for my own forum, a way to have nested phpbb-like quote tags! You wanna see it?! It's ugly as hell, but works very well. There are a few problems with the creation of «p» and «br /» tags, but it's fixable through plain CSS if they ever show up. So, here's how I did it. I had to edit both the quote.php plugin and the BBcode-lite.php one. On quote.php you edit the line 37 (or somewhere around there) and change it into this:
'if ($row) echo htmlentities('[quote='.$quoted->user_login.' url='.$quotelink.']'.$row->post_text."[/quote]\n", ENT_COMPAT, 'UTF-8');
(I hope the code tag's working...)
Anyway, this change is about what your "quote" button will echo. It will echo something like this:
[quote=UserName url=http://forum.com/topic.php?id=1#post-12]This is the quoted text[/quote]
Now the second change is on BBcode-lite.php. First, you erase the support for the quote tag. On line 29, delete where it says:
'quote' => 'blockquote',
And now add the support for the real, decent quote tag. On line 31, add the following:
$superquote = array('quote' => 'blockquote');
foreach($superquote as $bbcode=>$html){
$text = preg_replace('/\['.$bbcode.'\]/is','<'.$html.'>',$text);
}
$superquote2 = array('\/quote' => 'blockquote');
foreach($superquote2 as $bbcode=>$html){
$text = preg_replace('/\['.$bbcode."\]/is",'</'.$html.'>',$text);
}
$supercite = array('quote\=' => 'cite');
foreach($supercite as $bbcode=>$html){
$text = preg_replace('/\['.$bbcode.'(.+?)\ url=(.+?)\]/is','<blockquote><'.$html.'><a href="$2">$1</a> </'.$html.'>',$text);
$text = preg_replace('/\['.$bbcode.'(.+?)\]/is','<blockquote><'.$html.'><a href='.get_post_link().'>$1</a> </'.$html.'>',$text);
}
The superquote, superquote2 and supercite names can be altered as you please, I gave them that because that's what came to mind at the moment. They add support for [quote][/quote] tags, for ease of use, and they support advanced referencing supporting both [quote=UserName][/quote] and [quote= UserName url=Link][/quote] tags. You may tweak the result as you please, if you know how.
The secret for this is called superquote2. By only supporting the opening quote tags in the other vars, and by separating the closing tag, we are able to create nested quotes naturally. There may be another way to do this, but this works, and that's what counts for me.
You can visit my site ( http://nocontinues.net/ ) and my forum ( http://nocontinues.net/forum ) to see what a newbie is able to do with WordPress and bbPress. Code is poetry... my code certainly isn't :P
