I guess the better question would be how do I access the "answers" object and properties? because I would also like to have the actual answer below the title...I have tried to use "$answer->created-by" for the avatar in the open_questions.php file but it just gives back null..not sure if that makes sense....I am not an oop php pro so any help would be appreciated.
The administrator has disabled public write access.
Re: user top answerer avatar on question list...
1 year 1 week ago #10864
Maybe Im saying it wrong..I dont mean on the module, I mean the main component. I just mean the image next to each question...right now it is a default jomsocial avatar for the "Guest" which is the Asker. What I am asking is how I can replace the Guest/Asker avatar in the main CA component with the answerers...this would ideally be the last answerer to answer the question...see screen
That would need few code changes which cannot be explained here. What it would need is to get the last answerer's id and get the avatar. However that is not efficient way. Instead, we should create a column in jos_answers_questions namely last_answerer and insert the answerer id everytime a new answer is added. So it can be easily retrieved without querying additional DB queries. Adding last answerer part is being done currently so you need not worry about it, only change you need to do is change user avatar to answerer avatar.
Please send me a mail through contact us form, I will send you the chnages made.
If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory (direct links are given below).