[support] Counting the number of node created by user, Views only

Pierre Rineau pierre.rineau at makina-corpus.com
Wed Dec 22 21:52:49 UTC 2010


On Wed, 2010-12-22 at 19:48 +0100, Lluís Forns wrote:
> Suppose you want to make a "ranking" of contributors, being able to
> sort them. search by name, etc...
> 
> I think the best way is using Views GroupBy  module, using PHP won't
> allow you to sort the results.
> 
> If performance is important, you could cache the results in a table
> using cron and just show them when needed.

Oh I see, this is more than just a count. If you don't find any views
plugin that allows you to do so, you can do a simple request using
views, configure your listing and exposed filters, then alter the query
or make your own views filter or such that could complete the query to
do exactly what you want to.

Views is a query builder, and it's not that good in building complex
queries with multiple tables, you can often get what you want but often
not in a "obvious" way, you sometimes have to trick views to get what
you want. In most case I end up by giving up with views and writing my
own queries in custom code. At least, I don't have to search hours to
find the exact and only way to do it with such module, write my own
query often take less than a minute to get exactly what I want.

Pierre.




More information about the support mailing list