Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 22

6apxatCurtisOdenTinoHartungTorbjornevdlealf349141590qwenty +14 guests

Requesting an event

In the file helper_functions.php for vanilla in the function WriteDiscussion()
Can you include the event

$Sender->FireEvent('DiscussionMeta');
on line 94


<li class="Meta">
<?php
echo '<span>';
echo sprintf(Plural($Discussion->CountComments, '%s comment', '%s comments'), $Discussion->CountComments);
echo '</span>';
if ($CountUnreadComments > 0 && $Session->IsValid())
echo '<strong>',sprintf(Gdn::Translate('%s new'), $CountUnreadComments),'</strong>';

echo '<span>';
printf(Gdn::Translate('Most recent by %1$s %2$s'), UserAnchor($Discussion->LastName), Format::Date($Discussion->LastDate));
echo '</span>';

echo Anchor($Discussion->Category, '/categories/'.urlencode($Discussion->Category), 'Category');

$Sender->FireEvent('DiscussionMeta');
?>
</li>
Tagged:

Comments

  • Also i need the ability to add something above a thread. So below the General . Requesting and event header. I need to put something below it. It would seem an easy way to do this would be to allow a module to be placed here.

    Adding
    <?php $this->RenderAsset('DiscussionTop'); ?>
    on line 24 of Vanilla/views/discussion/index.php would be perfect. Call it what you like though.
  • Posts: 4,883
    Can you show me more of where you placed it? Before the ul or after?
  • Before the UL.


    <?php
    echo $this->Pager->ToString('less');
    ?>

    <?php $this->RenderAsset('DiscussionTop'); ?>

    <ul id="Discussion">
    <?php echo $this->FetchView('comments'); ?>
    </ul>
  • Posts: 4,883
    Just pushed these to master. I called the asset container "DiscussionBefore"
  • Thanks a lot just what i needed.
  • SS
    Posts: 459
    In vanilla/views/post/discussion.php need something like AfterFormButtons

    47: echo $this->Form->Button('Save Draft');
    48: }
    49:
    50: echo $this->Form->Button('Preview');
    51: $this->FireEvent('AfterFormButtons'); // <<< it's here
    52:
    53: echo Anchor('Cancel', $CancelUrl, 'Cancel');
    54: echo $this->Form->Close();
    55: ?>


    And in vanilla/views/post/comment.php in same place.
  • Posts: 4,883
    @S - added in development.
Sign In or Register to comment.