Hi !. I am using Community Builder in my site and the JLex CB plugin to do ratings. Recently CB has created a Profile Book with a sort of primitive rating system, nothing like JLexReview component, but CB adds to the com_profiler table a field "cb_pb_profile_rating" then I could use it to create a CB ordered List by this field, so I need to put in it the calculated JLex rate in order to do that.
I could not find in JLex sources how to calculate that. Could you help me?.
The query I found is "most reviwwed" as in
SELECT COUNT(r.id) countReview, u.id, u.name, u.username, SUM(h.countRate) as cRate, SUM(h.countHelp) cHelp
FROM scr_jlexreview r
INNER JOIN scr_users u ON u.id=r.created_by
LEFT JOIN ( SELECT type_id, COUNT(*) countRate, SUM(rate_match) countHelp
FROM scr_jlexreview_helpful WHERE type_ob=1
GROUP BY type_id
) h ON h.type_id=r.id
WHERE r.published=1 AND r.rate=0 AND r.created_by>0
GROUP BY r.created_by
ORDER BY countReview DESC
Thanks in advance. Octavio.