[drupal-support] site hit counter

Kobus Myburgh ITBJDM at puknet.puk.ac.za
Wed Jul 13 05:54:59 UTC 2005


Hi,

This functionality is easily done with statistics.module. They will not, however, adapt it that way, because, as far as I can tell, you'd require two additional queries per page (one to view and one to save) the counter information per page, as it is saved per node and not per page.

This means that a customization of statistics.module to do this will probably never reach mainstream as you would hope. The only answer is a separate module, but that won't be mainstream either, as it will not be included into the Drupal core, as far as I can tell.

Writing a module that can display this information in a block is pretty simple, if you borrow a bit of code from statistics.module and modify it somewhat, you can create what you're looking for. If there is sufficient interest in this, I'd take up this task - it would be good to increase my coding skills somewhat!

Regards,

Kobus


>>> vik.list at gmail.com 7/13/2005 6:48:05 AM >>>
Hi,

Building it into the theme would be good, but a better option might be
a small additional module which can display those site hits (unique
IPs ofcourse) into the present module.. I know a couple of others who
would be glad to have functionality like this become mainstream.

Cheers,
Viksit

On 7/12/05, Kobus Myburgh <ITBJDM at puknet.puk.ac.za> wrote:
> Rahul,
> 
> A site hit counter is not particularly useful, especially with Drupal, as it has so much more capabilities.
> 
> I suggest you take a look at statistics.module (included with default installation - just needs configuaration). Enable all the features you require for statistics, and you will see a "hit counter" on every piece of content on the site, instead of every page. Remember to give all users the appropriate permissions to view the counter information.
> 
> If this is still not doing what you want to do and you want a normal script that just increases once for each time a page on your site is opened, I can build it into your theme for you.
> 
> Regards,
> 
> Kobus
> 
> 
> >>> rahulbenegal at gmail.com 7/10/2005 6:58 AM >>>
> Would be grateful if you could point me to a means of capturing and
> displaying hit count on my drupal site (I am not a php programmer).
> 
> --
> Warm Regards,
> Rahul (New Delhi GMT +5:30)
> 98102 02621     http://kalki.benegal.org 
> --
> [ Drupal support list | http://lists.drupal.org/ ]
> 
> --
> [ Drupal support list | http://lists.drupal.org/ ]
> 


-- 
Viksit Gaur
viksit dot gaur at yale dot edu
me at viksit dot com
http://viksit.com 
--
[ Drupal support list | http://lists.drupal.org/ ]




More information about the drupal-support mailing list