Révision 13c3c9b4
Ajouté par Assos Assos il y a environ 9 ans
drupal7/sites/all/modules/advanced_forum/includes/views/advanced_forum.views.inc | ||
---|---|---|
5 | 5 |
* Views integration for advanced_forum. |
6 | 6 |
*/ |
7 | 7 |
|
8 |
|
|
9 | 8 |
/** |
10 |
* Loads the included views |
|
9 |
* Loads the included views.
|
|
11 | 10 |
* |
12 | 11 |
* This function is used instead of views ability to autodiscover a views |
13 | 12 |
* export .inc because this allows us to put each view in its own file. |
... | ... | |
25 | 24 |
$views[$view->name] = $view; |
26 | 25 |
} |
27 | 26 |
} |
28 |
|
|
27 |
|
|
29 | 28 |
return $views; |
30 | 29 |
} |
31 | 30 |
|
32 | 31 |
/** |
33 |
* Use views_data_alter to add items to the node table that are |
|
34 |
* relevant to topic icons. |
|
32 |
* Use views_data_alter to add items to the node table that are relevant to topic icons. |
|
35 | 33 |
*/ |
36 | 34 |
function advanced_forum_views_data_alter(&$data) { |
37 |
// Topic icon |
|
35 |
// Topic icon.
|
|
38 | 36 |
$data['node']['topic_icon'] = array( |
39 | 37 |
'title' => t('Topic Icon'), |
40 | 38 |
'help' => t('Icon that shows new posts, hot, sticky, locked, etc.'), |
... | ... | |
53 | 51 |
} |
54 | 52 |
|
55 | 53 |
/** |
56 |
* Implementation of hook_views_plugins
|
|
54 |
* Implements hook_views_plugins().
|
|
57 | 55 |
*/ |
58 | 56 |
function advanced_forum_views_plugins() { |
59 | 57 |
$path = drupal_get_path('module', 'advanced_forum') . '/includes/views'; |
... | ... | |
78 | 76 |
} |
79 | 77 |
|
80 | 78 |
/** |
81 |
* Implementation of hook_views_data()
|
|
79 |
* Implements hook_views_data().
|
|
82 | 80 |
*/ |
83 | 81 |
function advanced_forum_views_data() { |
84 | 82 |
$data = array(); |
85 |
// ---------------------------------------------------------------------- |
|
86 |
// forum table |
|
87 |
|
|
83 |
// Forum table. |
|
88 | 84 |
// Have not defined $data['forum']['table']['group'] since |
89 | 85 |
// no fields are defined here yet. |
90 | 86 |
$data['forum']['table']['join'] = array( |
... | ... | |
99 | 95 |
); |
100 | 96 |
|
101 | 97 |
return $data; |
102 |
} |
|
98 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules