| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Allows showing users' most recent status in Views.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/**
|
| 10 |
* Field handler to provide the most recent status update.
|
| 11 |
*/
|
| 12 |
class facebook_status_views_handler_field_latest_update extends views_handler_field {
|
| 13 |
|
| 14 |
function construct() {
|
| 15 |
parent::construct();
|
| 16 |
$this->additional_fields['uid'] = array('table' => 'users', 'field' => 'uid');
|
| 17 |
}
|
| 18 |
|
| 19 |
function query() {
|
| 20 |
$this->add_additional_fields();
|
| 21 |
$this->field_alias = $this->aliases['uid'];
|
| 22 |
}
|
| 23 |
|
| 24 |
function render($values) {
|
| 25 |
$status = facebook_status_get_status($values->uid, 1, -1, TRUE);
|
| 26 |
return $status[0]->status;
|
| 27 |
}
|
| 28 |
}
|