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.

Thread starter below Discussion title

edited December 2009 in Vanilla 2.0 - 2.8
So how would you got about adding the thread starter below the Discussion title on say the main discussions page. I have a custom theme, I can see the discussion.php in views/modules is the one I want to edit, but is there a variable available to me to print out here? Any help on this? Thanks in advance.

Comments

  • oops, I can see views/discussions/helper_functions.php is the one I want... such a hack.
  • okay so these variables:

    $Discussion->FirstName; $Discussion->FirstUserID;

    Are available it would seem they're what I need but - I'm just wondering what the Garden way of doing something like this would be, other than to php hack together the name and profile url from these variables in the helper_functions.php? Thanks and any help is appreciated.
  • edited December 2009
    So this is my hackjob, if someone has any input on the Garden way to do this, I'd appreciate it... Thanks!

    /themes/mytheme/views/discussions/helper_functions.php:

    <?php $AuthorName = $Discussion->FirstName; $AuthorID = $Discussion->FirstUserID; echo '<span>by '; echo '<a href="/profile/'.$AuthorID.'/'.$AuthorName.'">'.$AuthorName.'</a>'; echo '</span>'; ?>
  • There is an event called
    $Sender->FireEvent('AfterDiscussionTitle');

    So you could write a plugin that uses that event to echo the name.
  • I have no idea what you just said, but I like the look of it.
  • edited December 2009
    I wrote you a plugin for it,
    http://www.trackgigs.com/AuthorName.zip

    Its just basic to give you the idea.
  • Whoa, holy hell. Thanks a bunch man.
Sign In or Register to comment.