Posted by toemaz on March 1, 2009 at 11:48am
The User Visits Advanced module is a contrib module for the User Visits module. It is extremely useful for social networking sites who wish to provide their users with statistics about the number of times a the users profile page is being viewed and by which other users. See the provided screen shot how the block of this module can look like.
This module comes with its own database table to store statistics per user profile (uid). At cron time, the data from the user_visits table is collected, aggregated and stored in the user_visits_adv table. It stores
- the total number of visits per uid
- the number of visits of the X past days per uid
- the most recent visitors uids of the past Y hours
Installation
- Enable the user_visits_adv module
- Go to admin/user/user_visits and the advanced fieldset
- You can choose to enable the two blocks: My recent visitors adv & My visitors history adv
- Configure each block for the amount of data which should be handed over to the theming functions
Theming
The My visitors history adv block can be themed by overriding the following function
<?php
/**
* Theme function for history block
* @param $history is array with the views data of the past X days.
* X is defined in the configuration of the block
* @param $total the total number of views
*/
function theme_user_visits_adv_history($history, $total) {
$output = '<div>' . t('!total views in total', array('!total' => $total)) . '</div>';
$output .= '<div>' . t('history') . ': ' . implode(' ', $history) . '</div>';
return $output;
}
?>Development
The Drupal 6 version has been ported by mariusooms.
Downloads
Recommended releases
Development releases
Project Information
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Community, Evaluation/Rating, Statistics
- Reported installs: 205 sites currently report using this module. View usage statistics.
- Downloads: 6,115
- Last modified: September 6, 2012