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

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

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


Revision 1.1 - (show annotations) (download) (as text)
Tue Jun 2 02:14:39 2009 UTC (5 months, 3 weeks ago) by icecreamyou
Branch: MAIN
CVS Tags: DRUPAL-6--2-0-RC2, DRUPAL-6--2-0-RC1, DRUPAL-6--2-0-BETA4, HEAD
Branch point for: DRUPAL-6--2
File MIME type: text/x-php
Added Views support for posting on other users' profiles
Fixed a bug with Views relationships
*Major updates to default Views
Removed trailing spaces in facebook_status.author_pane.inc
Removed theme_facebook_status_flag_create()
Optimized code for better performance
Lots of other minor improvements and bug fixes

Note: most Views now require the PHP module to be enabled.
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Handling for the poster's name.
7 */
8
9 /**
10 * Allows linking to the poster of the status.
11 */
12 class facebook_status_views_handler_field_poster extends views_handler_field_user {
13 function render($values) {
14 if ($values->facebook_status_pid) {
15 return theme('username', user_load(array('uid' => $values->facebook_status_pid)));
16 }
17 else if ($values->facebook_status_sid) {
18 $status = facebook_status_load($values->facebook_status_sid);
19 return theme('username', user_load(array('uid' => $status->pid)));
20 }
21 }
22 }

  ViewVC Help
Powered by ViewVC 1.1.2