uid])) { $new = db_result(db_query('SELECT ah.timestamp FROM {activity_history} ah WHERE aid = %d AND uid = %d', $activity['aid'], $user->uid)); if (empty($new)) { $history[$activity['aid']][$user->uid] = theme('mark', MARK_NEW, 'activityhistory'); // update to show that it has been seen @db_query('INSERT INTO {activity_history} (uid, aid, timestamp) VALUES (%d, %d, %d)', $user->uid, $activity['aid'], time()); } else { $history[$activity['aid']][$user->uid] = ''; } } $activity['activity_history_new'] = $history[$activity['aid']][$user->uid]; break; } } if (!function_exists('phptemplate_activity')) { function phptemplate_activity($message, $item) { return $item['activity_history_new'] .' '. $message .''; } }