/[drupal]/contributions/modules/facebook_status/facebook_status_tags.views.inc
ViewVC logotype

Contents of /contributions/modules/facebook_status/facebook_status_tags.views.inc

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


Revision 1.1 - (show annotations) (download) (as text)
Sun May 17 04:02:11 2009 UTC (6 months, 1 week ago) by icecreamyou
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--2
File MIME type: text/x-php
#437522 form wasn't cached with caching turned off on site (thanks katbailey)
Changed help text for some settings
Moved maximum status length setting from Advanced to General settings page
Added an open API for users with the 'view all statuses' permission in XML, JSON, and REST
Documented open API
Added submodule that allows referencing users with @username and taxonomy terms (including creation of new ones) with #termname.
Documented submodule
Added Views integration for submodule
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Provide views data and handlers for the Facebook-style Statuses Tags module.
7 */
8
9 /**
10 * Implementation of hook_views_data().
11 */
12 function facebook_status_tags_views_data() {
13 $data['facebook_status_tags']['table']['group'] = t('Facebook-style Statuses');
14
15 $data['facebook_status']['table']['join'] = array(
16 'facebook_status_tags' => array(
17 'left_field' => 'sid',
18 'field' => 'sid',
19 ),
20 );
21 $data['facebook_status_tags']['table']['join'] = array(
22 'facebook_status' => array(
23 'left_field' => 'sid',
24 'field' => 'sid',
25 ),
26 );
27
28 //Declares the Status ID column.
29 $data['facebook_status_tags']['sid'] = array(
30 'title' => t('Status ID'),
31 'help' => t('The ID of the status update.'),
32 );
33
34 //Declares the Tag ID column.
35 $data['facebook_status_tags']['rid'] = array(
36 'title' => t('Tag ID'),
37 'help' => t('The Tag ID of the status - either a UID or Term ID depending on the reference type.'),
38 'field' => array(
39 'handler' => 'views_handler_field',
40 'click sortable' => TRUE,
41 ),
42 'filter' => array(
43 'handler' => 'views_handler_filter_numeric',
44 ),
45 'sort' => array(
46 'handler' => 'views_handler_sort',
47 ),
48 'argument' => array(
49 'handler' => 'views_handler_argument_numeric',
50 ),
51 );
52
53 //Defines the Type column.
54 $data['facebook_status_tags']['type'] = array(
55 'title' => t('Tag type'),
56 'help' => t('The type of tag - User or Taxonomy Term.'),
57 'field' => array(
58 'handler' => 'views_handler_field',
59 'click sortable' => TRUE,
60 ),
61 'filter' => array(
62 'handler' => 'facebook_status_views_handler_filter_string_type',
63 ),
64 );
65
66 return $data;
67 }
68
69 /**
70 * Implementation of hook_views_handlers().
71 */
72 function facebook_status_tags_views_handlers() {
73 return array(
74 'info' => array(
75 'path' => drupal_get_path('module', 'facebook_status'),
76 ),
77 'handlers' => array(
78 'facebook_status_views_handler_filter_string_type' => array(
79 'parent' => 'views_handler_filter_string',
80 ),
81 ),
82 );
83 }

  ViewVC Help
Powered by ViewVC 1.1.2