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.

How to add line breaks in 'DiscussionExtender' Plugin

Whenever I add discussion options using the 'DiscussionExtender' plugin, it works just fine and as coded.

What I want to add is the ability to add a line break after each added discussion option.

How do I do that? I've tried using code in the discussion option to add a line break but it does not seem to work.


  • Options

    I figure it out. Change the contents of the following function to be following:

    public function DiscussionController_BeforeDiscussionBody_Handler($Sender) {`

     $GlobalTest = $Sender->RequestMethod;
    $Discussion = $Sender->EventArguments['Discussion'];
    $Fields = $this->GetDiscussionFields();
    $FieldAttributes = DiscussionModel::GetRecordAttribute($Discussion, 'ExtendedFields', array());
    $FieldString = '<br>';
    foreach ($Fields as $Name => $Field) {
      $ColumnValue = val($Name, $Discussion, FALSE);
      $Value = ($ColumnValue) ? $ColumnValue : val($Name, $FieldAttributes, FALSE);
      if ($Field['Display'] && $Value) {
        $FieldString .= Wrap($Field['Label'], 'dt') . ' ';
        $FieldString .= Wrap($Value, 'dd') . '<br>';
    echo WrapIf($FieldString, 'dl', array('class' => 'About'));


Sign In or Register to comment.