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 20

6apxatCurtisOdenHotBlackchuck911ericgilletteesttc74x00422 +11 guests

User Icons on Discussions page?

Has anyone come up with a solution to display a User's icon on the All Discussions page under the topic they created?

Comments

  • Posts: 1,406
    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.
  • Posts: 223
    Currently using/loving Discussion Excerpt. Thanks a lot!
  • Posts: 403
    apologies for bumping this up, but i was wondering if this is still the best solution...?
  • Posts: 403
    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.