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.
Options

Adding a text filter with a plugin

edited July 2005 in Vanilla 1.0 Help
When writing an extension that parses comments, is there any way I can make it so that my plugin always parses the text? I realise I can add a parsing option with

$Context->StringManipulator->AddManipulator("MyPlugin", $MyPluginFormatter);
but I'd like to be able to have my plugin always parse posts regardless of the formatting the user chooses.

Comments

  • Options

    I asked basically this same question on the SmartyPants thread. Sounds to me like Mark is really busy working on bug fixes which of course is a higher priority. Welcome to to beta testing!

  • Options
    :(
  • Options
    lechlech Chicagoland
    Is there some type of set insertion point of where and when that extension plays it's role (ie: before or after the markdown formatter?).
  • Options
    Me? It doesn't really matter where it's executed, so long as it is.
  • Options

    For SmartyPants as a plugin to work correctly, it should filter the post only after HTML or Markdown does its pass. It shouldn't be an editing "mode," it should just be a boolean filter. The software isn't even all that exciting, all it does is convert certain ascii punctuation to the typographic equivalent: curly quotes, em dashes, etc..

    The only reason I fiddled around with it was to learn a bit about writing a plugin. Which could make this software really, really shine. And just now, I noticed that Mark has expanded the documentation on writing extensions, so I'm going to go dig into that...

  • Options
    Any ideas?
  • Options
    MarkMark Vanilla Staff
    edited July 2005
    For SmartyPants as a plugin to work correctly, it should filter the post only after HTML or Markdown does its pass. It shouldn't be an editing "mode," it should just be a boolean filter.

    You should make a MarkyPants extension (*loves the name*) that creates a new SmartypantsFormatter that daisy chains to the MarkdownFormatter.
  • Options
    How do you daisy chain the two formatters?
This discussion has been closed.