Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
925 views
in Themes by
Hi,

I want to keep the red color even if there is an answer as long as there are no experts answers. Where should I look? Should I develop a plugin to change the logic?

Thanks

1 Answer

+1 vote
by
selected by
 
Best answer

You will have to write a plugin. The logic should involve a layer to render the appropriate color as well as figuring out if the question has an answer that belongs to an expert user.

Regarding the rendering just overwrite the a_count() function to also include the qa-a-count-zero CSS class if the condition is met.

Regarding the condition I recommend to check the qa-include/pages/question.php file and see how the qa_db_full_child_posts_selectspec() function works. Then you'll have to call that function for every item in the question list and in the question itself to fetch all the answers of the question. Then it is just a matter of checking if the answer belongs to an expert user (QA_USER_LEVEL_EXPERT).

by
Also, I don't know why I can't see the accept button
by
You can enable this flag in qa-config.php:

define('QA_DEBUG_PERFORMANCE', true);

Although I usually end up tailing the logs of the MySQL instance. Probably, as this case is simple enough it might be enough for you to just see it in the web page.

BTW, the accept button is the gray tick, right below the vote counts.
by
For some reason I don't see it.
Screenshot
https://ibb.co/nywHvn
by
Interesting. Maybe there is a minimum amount of points you need to have before accepting an answer. Funny thing, I didn't remember that to happen when I joined here. Never mind!.
...