You are hereStatistics Module Change

Statistics Module Change


Posted on May 01, 2008 at 02:05

I noticed that items from my activity stream were popping up in the last viewed (and potentially most popular content).  As I'd rather not show these items I've changed statistics_title_list in drupal's statistics.module as follows:

function statistics_title_list($dbfield, $dbrows) {
return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE %s <> '0' AND n.status = 1 and (n.type = 'story' OR n.type = 'page') ORDER BY %s DESC"), 's.'. $dbfield, 's.'. $dbfield, 0, $dbrows);
}

It's a simple change so I'm not posting the full module.  When I get a round tu-it I'd make it selectable and then post the code.

Share and enjoy!

blog comments powered by Disqus


About Me

Welcome aboard!

I am a technologist, amateur photographer and social media enthusiast. I have a more detailed bio for the insanely curious. Share and Enjoy!

Web Footprint

Social Networks

Microblogging

Bookmarks and Links

Life Streams

Other