[development] using #downloads for quality of modules

Nedjo Rogers nedjo at islandnet.com
Wed Jan 25 16:13:57 UTC 2006


> Can I get a url to the discussion.

Here's the patch that went in:

http://drupal.org/node/39697

When a site chooses to enable the drupal.module and post data on its 
installed modules, cron will call XML-RPC to upload information on the 
site's name, url, etc. and all enabled modules.  Optionally, sites can also 
send (a) total number of users, and (b) total number of nodes.  These extra 
data are designed to provide some quantifable parameters of how large a site 
is, which we could use to add weight to that site's statistics.

Data posted from sites are stored in the core tables 'client' (the basic 
information about a client site) and 'client_system' (the data on enabled 
modules, themes, theme engines--the same as what are found in the 
system.module).  You can see the database definitions in database.mysql and 
database.pgsql.  Clients are identified by a client id (cid), created the 
first time they connect and reused when they reconnect.  In the table 
client_system:

'cid' -> this is the client id
'name' -> this the name of an enabled system component, e.g., 'page'
'type' -> this is the type of the enabled system component, e.g., 'module'

To convert this into usable statistics we can use for browsing projects on 
drupal.org, we'll need to do at least two things:

1. Relate the system component to the project.

Taking e-commerce as an example, there are many different modules, each of 
which will appear separately in the client_system table.  We can use the 
data in the cvs module's tables to find out what project each component maps 
to.

2. Use a hook implemented by the Project module to implement a new browsing 
option.

Project module uses a hook, _project_sort_methods(), to provide the 
information needed to implement project browsing options.  See function 
project_project_sort_methods() in project.module.  We'll need to implement a 
new sort method, e.g., 'popularity'.  This could either be added to function 
project_project_sort_methods() or put in a different module, e.g., cvs.

Thanks for stepping forward!  I'll be happy to work with you, Gordon, or any 
others on implementing this.

Nedjo 



More information about the development mailing list