Welcome, Guest
Username: Password: Remember me

TOPIC: user top answerer avatar on question list...

user top answerer avatar on question list... 1 year 1 week ago #10859

How can I change the avatar of the asker(only guests on my site) to the avatar of the top answerer in the new question list? Is this possible?

thanks
Brad
The administrator has disabled public write access.

Re: user top answerer avatar on question list... 1 year 1 week ago #10860

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

  • Maverick
  • Maverick's Avatar
  • OFFLINE
  • Developer
  • Posts: 6258
  • Thank you received: 500
  • Karma: 121
You can access with $answer->created_by but not created-by. Further it is impossible to determine which user is top user in case your site only has guests as answerer.
If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory (direct links are given below).
Community PollsCommunity AnswersCommunity QuizCommunity QuotesCommunity Surveys
Community CrosswordsGPS ToolsArticle SuggestionsCjBlog
The administrator has disabled public write access.

Re: user top answerer avatar on question list... 1 year 1 week ago #10872

no, guests ask questions...only registered users(lawyers) can answer...thats what I am asking how to replace the guest(asker) avatar with the answerers(lawyers) avatar

just like this site

www.freeadvice.com/law-questions/
The administrator has disabled public write access.

Re: user top answerer avatar on question list... 1 year 1 week ago #10874

  • Maverick
  • Maverick's Avatar
  • OFFLINE
  • Developer
  • Posts: 6258
  • Thank you received: 500
  • Karma: 121
If I am not mistaken, the above site only shows top answerers not the askers. You can use CA Top Users module to display the top answerers.

You can use any avatar component such as jomsocial, kunena or you can simply use gravatar if you have no such extension installed.
If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory (direct links are given below).
Community PollsCommunity AnswersCommunity QuizCommunity QuotesCommunity Surveys
Community CrosswordsGPS ToolsArticle SuggestionsCjBlog
The administrator has disabled public write access.

Re: user top answerer avatar on question list... 1 year 1 week ago #10882

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
Attachments:
The administrator has disabled public write access.

Re: user top answerer avatar on question list... 1 year 1 week ago #10885

  • Maverick
  • Maverick's Avatar
  • OFFLINE
  • Developer
  • Posts: 6258
  • Thank you received: 500
  • Karma: 121
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).
Community PollsCommunity AnswersCommunity QuizCommunity QuotesCommunity Surveys
Community CrosswordsGPS ToolsArticle SuggestionsCjBlog
The administrator has disabled public write access.
Time to create page: 0.220 seconds
Powered by Kunena Forum