Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Quoting?
Has anybody written a quoting extension yet? Like a button or link on a post that will quote it in the reply box at the bottom, in a format that will make it readable if text-only, or markdown, or html or whatever...
0
This discussion has been closed.
Comments
function BBEncode($String) { //[img] tags $String = preg_replace("/\[img\](.+?)\[\/img\]/","<img src=\"$1\" />",$String); //[url] tags $String = preg_replace("/\[url\=(.+?)\](.+?)\[\/url\]/","<a href=\"$1\" target=\"_blank\">$2</a>",$String); $String = preg_replace("/\[url\](.+?)\[\/url\]/","<a href=\"$1\" target=\"_blank\">$1</a>",$String); $String = preg_replace("/\[email\](.+?)\[\/email\]/","<a title=\"Send an Email to this address\" href=\"mailto:$1\">$1</a>",$String); // other stuff $String = preg_replace("/\[b\](.+?)\[\/b\]/","<strong>$1</strong>",$String); $String = preg_replace("/\[u\](.+?)\[\/u\]/","<span class=\"underline\">$1</span>",$String); $String = preg_replace("/\[i\](.+?)\[\/i\]/","<em>$1</em>",$String); $String = preg_replace("/\[code\](.+?)\[\/code\]/","<code>$1
",$String);$String = preg_replace("/\[quote\](.+?)\[\/quote\]/","$1",$String);
$String = preg_replace("/\[color\=(.+?)\](.+?)\[\/color\]/","$2",$String);
$String = preg_replace("/\[img\](.+?)\[\/img\]/","",$String);
return $String;
}
You can fake it, no?
Hm.
User clicks on Quote button on certain post, that entire post is copied into the message box with needed code; blockquote, cite etc.
Logically it should work with a little tweaking of certain things...
I agree with your feeling that the default stylesheet should cover it. You're right about the fact that if the HTML is sensible, it should display reasonably. Well, you can see what it does unstyled already. (Adding in <b> around the username from my previous sample code.) I Maybe we pull together some CSS for Mark to put in, if he's okay with that?