Exemplo n.º 1
0
         <span class="MItem DateCreated">
            <?php 
    echo Anchor(Gdn_Format::Date($Content['DateInserted'], 'html'), $ContentURL, 'Permalink', array('rel' => 'nofollow'));
    ?>
         </span>
         <?php 
    // Include source if one was set
    if ($Source = GetValue('Source', $Content)) {
        echo Wrap(sprintf(T('via %s'), T($Source . ' Source', $Source)), 'span', array('class' => 'MItem Source'));
    }
    ?>
      </div>
     </div>
     <div class="Item-BodyWrap">
       <div class="Item-Body">
         <div class="Message Expander">
          <?php 
    echo Gdn_Format::To($Content['Body'], $Content['Format']);
    ?>
         </div>
         <?php 
    if (C('Yaga.Reactions.Enabled') && Gdn::Session()->CheckPermission('Yaga.Reactions.View')) {
        RenderReactionRecord($ContentID, strtolower($ContentType));
    }
    ?>
       </div>
     </div>
   </li> <?php 
}
echo '</ul>';
echo $this->Pager->ToString();
Exemplo n.º 2
0
 /**
  * Display a record of reactions after comments
  * @param DiscussionController $Sender
  */
 public function DiscussionController_AfterCommentBody_Handler($Sender)
 {
     if (!Gdn::Session()->CheckPermission('Yaga.Reactions.View') || !C('Yaga.Reactions.Enabled')) {
         return;
     }
     $Type = 'comment';
     $ID = $Sender->EventArguments['Comment']->CommentID;
     RenderReactionRecord($ID, $Type);
 }