Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

User Icons on Discussions page?

edited June 2008 in Vanilla 1.0 Help
Has anyone come up with a solution to display a User's icon on the All Discussions page under the topic they created?

Comments

  • Options
    edited October 2007
    If you are using the DiscussionsExcerpt, add the following after:
    if (!@$UserManager) $UserManager = $Context->ObjectFactory->NewContextObject($Context, "UserManager"); $DiscussionUser = $UserManager->GetUserById($Discussion->AuthUserID); if ($DiscussionUser->Icon) { $DispIcon = '<img src="'.$DiscussionUser->Icon.'" style="border:none" alt="" />'; } else { $DispIcon = " "; } after
    $rows = $Context->Database->GetRow($result); Then you'll have to replace the $DiscussionList line with in the IF:
    $DiscussionList = str_replace($Discussion->Name.'</a>', $DispIcon.' '.$Discussion->Name .'</a> <li id="DiscussionExcerpt" style="overflow:hidden">'.$PageList.' ...</li>', $DiscussionList); and in the ELSE, replace with:
    $DiscussionList = str_replace($Discussion->Name.'</a>', $DispIcon.' '.$Discussion->Name .'</a> <li class="DiscussionExcerpt">'.$PageList.' ...</li><br/><br/><br/>', $DiscussionList);
    If this is too complicated, I'll just make a new version of the add-on with this as an option.
  • Options
    Currently using/loving Discussion Excerpt. Thanks a lot!
  • Options
    apologies for bumping this up, but i was wondering if this is still the best solution...?
  • Options
    actually, i tried it and it didn't do what i wanted.

    i want the user icon to be displayed immediately to the left of all the other info and in line with it, as though it was in a column on its own. how hard would this be?
This discussion has been closed.