Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

BUG in Input Formatter - extra formatting cycles.

2»

Comments

  • Options
    true

    grep is your friend.

  • Options
    You don't even have to use the conditional. The Discussion or Comment will be in
    $Sender->EventArguments['Object'] regardless of what type it is.
    So the pre-processing should be
    $Sender->EventArguments['Object']->Body = ParseSyntax($Sender->EventArguments['Object']->Body);

    Cool.
  • Options
    x00x00 MVP
    edited November 2011
    or

    $Args['Object'] with the second parameter being $Args

    grep is your friend.

  • Options
    edited November 2011
    better decision than to handle all events :

    <?php

    if (!defined('APPLICATION'))
    exit();

    $PluginInfo['PlainFormatter'] = array(
    'Name' => 'Plain Formatter PLUGIN',
    'Description' => 'Very plain formatter',
    'Version' => '1.0',
    'Author' => "JohansonLocker",
    'AuthorEmail' => '',
    'AuthorUrl' => ''
    );

    Gdn::FactoryInstall('BBCodeFormatter', 'PlainFormatter', __FILE__, Gdn::FactorySingleton);

    class PlainFormatter extends Gdn_Plugin {

    public function Format($Text) {
    return "PlainFormatter
    ".$Text;
    }

    public function Setup() {// Nothing to do here!
    }
    }



    but there's a bug - Factory doesn't work on Discussiom subject post.
  • Options
    solved - setting two factories.

    the one is bbcode for replies, and the other is html for subject with same parser.
Sign In or Register to comment.