-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwitter_search.views.inc
161 lines (158 loc) · 4.4 KB
/
twitter_search.views.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?php
/**
* @file
* Provide views data and handlers.
*/
/**
* Implements hook_views_data().
*/
function twitter_search_views_data() {
$data = array();
$data['twitter_search'] = array(
'twitter_search_id' => array(
'title' => t('twitter_search_id'),
'help' => t('Unique identifier for each {twitter_search} string.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
),
'search' => array(
'title' => t('search'),
'help' => t('Search string to query Twitter for.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_string',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
),
'last_twitter_id' => array(
'title' => t('last_twitter_id'),
'help' => t('Unique identifier for the latest {twitter} post for this search.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
),
'last_refresh' => array(
'title' => t('last_refresh'),
'help' => t('A UNIX timestamp marking the date Twitter statuses were last fetched on.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
),
'table' => array(
'group' => t('Twitter: Search'),
'base' => array(
'field' => 'twitter_search_id',
'title' => t('Twitter search'),
'help' => t('Twitter searches.'),
'weight' => 10,
'database' => 'default',
),
'join' => array(
'twitter_search_tweet' => array(
'left_field' => 'twitter_search_id',
'field' => 'twitter_search_id',
),
'twitter' => array(
'left_table' => 'twitter_search_tweet',
'left_field' => 'twitter_search_id',
'field' => 'twitter_search_id',
),
),
),
);
$data['twitter_search_tweet'] = array(
'twitter_search_id' => array(
'title' => t('twitter_search_id'),
'help' => t('Unique identifier for each {twitter_search} string.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
),
'twitter_id' => array(
'title' => t('twitter_id'),
'help' => t('Unique identifier for each {twitter} post.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
),
'table' => array(
'group' => t('Twitter: Search'),
'join' => array(
'twitter_search' => array(
'left_field' => 'twitter_search_id',
'field' => 'twitter_search_id',
),
'twitter' => array(
'left_field' => 'twitter_id',
'field' => 'twitter_id',
),
),
),
);
return $data;
}