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.
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?
0
This discussion has been closed.
Comments
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.
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?