/[drupal]/contributions/modules/facebook_status/facebook_status_views_handler_field_latest_update.inc
ViewVC logotype

Contents of /contributions/modules/facebook_status/facebook_status_views_handler_field_latest_update.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu Apr 9 06:10:38 2009 UTC (7 months, 3 weeks ago) by icecreamyou
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--2
File MIME type: text/x-php
Better Views integration... a little more is needed still
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 }

  ViewVC Help
Powered by ViewVC 1.1.2