HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Displaying avatar of last poster

edited November 2011 in Feedback
Thanks for this!!

But, I wanted to display the avatar of the most recent poster. I wanted to share my code snippet in case anyone else wants to do something similar.

In class.indexphotos.plugin.php, starting at line 46, simply change:
protected function DisplayPhoto($Sender) { // Build user object & output photo $FirstUser = UserBuilder($Sender->EventArguments['Discussion'], 'First'); echo UserPhoto($FirstUser); }

to:
protected function DisplayPhoto($Sender) { // Build user object & output photo $FirstUser = UserBuilder($Sender->EventArguments['Discussion'], 'First'); $LastUser = UserBuilder($Sender->EventArguments['Discussion'], 'Last'); if (!$LastUser->UserID) { echo UserPhoto($FirstUser); } else { echo UserPhoto($LastUser); } }

Comments

Sign In or Register to comment.