HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Multiple TextFormatters, Vanilla One wins
@Mark
There is problem: Impossible format text with more than one method.
In Vanilla 1 we can do that by adding Formatter to StringManipulator class.
Vanilla 2 (what we can do):
Gdn_Format::Format() is static, not pluggable (PHP < 5.3).
1. Edit views solution
There is problem: Impossible format text with more than one method.
In Vanilla 1 we can do that by adding Formatter to StringManipulator class.
Vanilla 2 (what we can do):
Gdn_Format::Format() is static, not pluggable (PHP < 5.3).
1. Edit views solution
$Text = Gdn_Format::Html($Text);Unacceptable.
$Text = Gdn_Format::To($Text, 'MyMethod');
...
Tagged:
0
Comments
1. Make a class with a method called Format($Text).
2. Install the class with the following line of code: Check out the HtmLawed plugin to see how this is done. And if you want to have all new comments/discussions formatted with your formatter you can add the following to your config:
The fact is that I still use RC1 with HtmlPurifier.
And I'm not sure that I correct explain what I need.
For example, default format method for comments is "Html".
I created plugin which can do the same what doing Format::Html() with minor changes.
And someone created another plugin Format::Html() + minor changes.
Will these 2 (3, 5, 10, ...) plugins correct works together for "Html" format method?
Vanilla Forums COO [GitHub, Twitter, About.me]