| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: stalker.module,v 1.1 2009/10/23 17:06:00 eaton Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 27 |
|
|
| 28 |
switch ($op) { |
switch ($op) { |
| 29 |
case 'view': |
case 'view': |
| 30 |
if (($user->uid != $account->uid) || variable_get('stalker_narcissism', FALSE)) { |
// Update the counter for how many times we've viewed this page |
| 31 |
// Update the counter for how many times we've viewed this page |
$view_count = stalker_get_count($user->uid, $account->uid); |
| 32 |
$view_count = stalker_get_count($user->uid, $account->uid); |
$view_count++; |
| 33 |
$view_count++; |
|
| 34 |
|
// Update the counter for how many times we've viewed this page |
| 35 |
// Update the counter for how many times we've viewed this page |
stalker_set_count($view_count, $user->uid, $account->uid); |
|
stalker_set_count($view_count, $user->uid, $account->uid); |
|
|
} |
|
| 36 |
|
|
| 37 |
if (user_access('view stalkers')) { |
if (user_access('view stalkers') && ($user->uid != $account->uid || variable_get('stalker_narcissism', TRUE))) { |
| 38 |
$content = theme('stalker_user', $account); |
$content = theme('stalker_user', $account); |
| 39 |
|
|
| 40 |
// Here is our first peek at a "renderable array". |
// Here is our first peek at a "renderable array". |