Ejemplo n.º 1
0
         $AuthenticationUrl = Gdn::Authenticator()->SignInUrl(Gdn::Request()->PathAndQuery());
         echo Anchor(T('Comment As ...'), $AuthenticationUrl, 'SignInPopup Button Stash');
      }
      echo "</div>\n";
      echo $this->Form->Close();
      ?>
   </div>
<?php } ?>
<ul class="MessageList Discussion">
   <?php
   $this->FireEvent('BeforeCommentsRender');
   $CurrentOffset = $this->Offset;
   $CommentData = $this->CommentData->Result();
   foreach ($CommentData as $Comment) {
      ++$CurrentOffset;
      $this->CurrentComment = $Comment;
      WriteComment($Comment, $this, $Session, $CurrentOffset);
   }
   ?>
</ul>
<?php
if ($this->Pager->LastPage()) {
   $LastCommentID = $this->AddDefinition('LastCommentID');
   if(!$LastCommentID || $this->Data['Discussion']->LastCommentID > $LastCommentID)
      $this->AddDefinition('LastCommentID', (int)$this->Data['Discussion']->LastCommentID);
   $this->AddDefinition('Vanilla_Comments_AutoRefresh', Gdn::Config('Vanilla.Comments.AutoRefresh', 0));
}
echo $this->Pager->ToString('more');
?>
<div class="Credit"><a href="http://vanillaforums.com">Comments by <span class="Logo">Vanilla</span></a></div>
</div>
Ejemplo n.º 2
0
<?php

if (!defined('APPLICATION')) {
    exit;
}
?>
<div class="DataBox DataBox-AcceptedAnswers"><span id="latest"></span>
   <h2 class="CommentHeading"><?php 
echo Plural(count($Sender->Data('Answers')), 'Best Answer', 'Best Answers');
?>
</h2>
   <ul class="MessageList DataList AcceptedAnswers">
      <?php 
foreach ($Sender->Data('Answers') as $Row) {
    $Sender->EventArguments['Comment'] = $Row;
    WriteComment($Row, $Sender, Gdn::Session(), 0);
}
?>
   </ul>
</div>
Ejemplo n.º 3
0
<?php

if (!defined('APPLICATION')) {
    exit;
}
$Session = Gdn::Session();
$this->FireEvent('BeforeCommentsRender');
if (!function_exists('WriteComment')) {
    include $this->FetchViewLocation('helper_functions', 'discussion');
}
$CurrentOffset = $this->Offset;
if ($CurrentOffset == 0 && !$this->Data('NewComments', FALSE)) {
    echo WriteComment($this->Discussion, $this, $Session, $CurrentOffset);
}
// Only prints individual comment list items
$CommentData = $this->CommentData->Result();
$i = 0;
foreach ($CommentData as $Comment) {
    ++$CurrentOffset;
    $this->CurrentComment = $Comment;
    if ($i % 2) {
        $counter = 'Odd';
    } else {
        $counter = 'Even';
    }
    WriteComment($Comment, $this, $Session, $CurrentOffset, $counter);
    $i++;
}