root/drupal-6/sites/default/modules/nabuur_project/nabuur_project.defaults.inc @ 866

Revision 866, 9.2 KB (checked in by kester, 6 months ago)

updating present features state with current database - todo add/remove to reflect actual usage

Line 
1<?php
2
3/**
4 * Helper to implementation of hook_content_default_fields().
5 */
6function _nabuur_project_content_default_fields() {
7  $fields = array();
8
9  // Exported field: field_attachment
10  $fields[] = array(
11    'field_name' => 'field_attachment',
12    'type_name' => 'project_outline',
13    'display_settings' => array(
14      'weight' => '1',
15      'parent' => '',
16      'label' => array(
17        'format' => 'above',
18      ),
19      'teaser' => array(
20        'format' => 'default',
21        'exclude' => 0,
22      ),
23      'full' => array(
24        'format' => 'default',
25        'exclude' => 0,
26      ),
27    ),
28    'widget_active' => '1',
29    'type' => 'filefield',
30    'required' => '0',
31    'multiple' => '1',
32    'module' => 'filefield',
33    'active' => '1',
34    'list_field' => '0',
35    'list_default' => 1,
36    'description_field' => '0',
37    'widget' => array(
38      'file_extensions' => 'txt pdf doc xls ppt rtf odt ods odp odg odf zip bz2 gz',
39      'file_path' => 'attach/[site-date-yyyy]/[site-date-mm]/project',
40      'progress_indicator' => 'bar',
41      'max_filesize_per_file' => '',
42      'max_filesize_per_node' => '',
43      'label' => 'Attachment',
44      'weight' => '1',
45      'description' => '',
46      'type' => 'filefield_widget',
47      'module' => 'filefield',
48    ),
49  );
50
51  // Exported field: field_related_tasks
52  $fields[] = array(
53    'field_name' => 'field_related_tasks',
54    'type_name' => 'project_outline',
55    'display_settings' => array(
56      'weight' => '-1',
57      'parent' => '',
58      'label' => array(
59        'format' => 'above',
60      ),
61      'teaser' => array(
62        'format' => 'project_tasks',
63        'exclude' => 0,
64      ),
65      'full' => array(
66        'format' => 'project_tasks',
67        'exclude' => 0,
68      ),
69      '4' => array(
70        'format' => 'default',
71        'exclude' => 0,
72      ),
73      '2' => array(
74        'format' => 'default',
75        'exclude' => 0,
76      ),
77      '3' => array(
78        'format' => 'default',
79        'exclude' => 0,
80      ),
81      'token' => array(
82        'format' => 'default',
83        'exclude' => 0,
84      ),
85    ),
86    'widget_active' => '1',
87    'type' => 'nodereference',
88    'required' => '0',
89    'multiple' => '1',
90    'module' => 'nodereference',
91    'active' => '1',
92    'referenceable_types' => array(
93      'task' => 'task',
94      'task_wiki' => 'task_wiki',
95      'blog' => 0,
96      'comment' => 0,
97      'contact_info' => 0,
98      'group' => 0,
99      'help_node' => 0,
100      'image' => 0,
101      'feedapi_node' => 0,
102      'news_item' => 0,
103      'news_feeditem' => 0,
104      'newsletter' => 0,
105      'page' => 0,
106      'poll' => 0,
107      'project_outline' => 0,
108      'news_sms' => 0,
109      'task_discussion' => 0,
110      'individual_profile' => 0,
111      'village' => 0,
112      'villagebackground' => 0,
113      'chat' => 0,
114    ),
115    'advanced_view' => '--',
116    'advanced_view_args' => '',
117    'widget' => array(
118      'autocomplete_match' => 'starts_with',
119      'size' => '60',
120      'default_value' => array(
121        '0' => array(
122          'nid' => NULL,
123          '_error_element' => 'default_value_widget][field_related_tasks][0][nid][nid',
124        ),
125      ),
126      'default_value_php' => NULL,
127      'label' => 'Tasks',
128      'weight' => '-1',
129      'description' => '',
130      'type' => 'nodereference_autocomplete',
131      'module' => 'nodereference',
132    ),
133  );
134
135  // Exported field: field_attachment
136  $fields[] = array(
137    'field_name' => 'field_attachment',
138    'type_name' => 'task',
139    'display_settings' => array(
140      'label' => array(
141        'format' => 'above',
142      ),
143      'full' => array(
144        'format' => 'default',
145        'exclude' => 0,
146      ),
147      'teaser' => array(
148        'format' => 'default',
149        'exclude' => 0,
150      ),
151    ),
152    'widget_active' => '1',
153    'type' => 'filefield',
154    'required' => '0',
155    'multiple' => '1',
156    'module' => 'filefield',
157    'active' => '1',
158    'list_field' => '0',
159    'list_default' => 1,
160    'description_field' => '0',
161    'widget' => array(
162      'file_extensions' => 'txt pdf doc xls ppt rtf odt ods odp odg odf zip bz2 gz',
163      'file_path' => 'attach/[site-date-yyyy]/[site-date-mm]/task',
164      'label' => 'Attached files',
165      'weight' => '1',
166      'description' => '',
167      'type' => 'filefield_widget',
168      'module' => 'filefield',
169    ),
170  );
171
172  // Exported field: field_step
173  $fields[] = array(
174    'field_name' => 'field_step',
175    'type_name' => 'task',
176    'display_settings' => array(
177      'label' => array(
178        'format' => 'above',
179      ),
180      'full' => array(
181        'format' => 'default',
182        'exclude' => 0,
183      ),
184      'teaser' => array(
185        'format' => 'default',
186        'exclude' => 0,
187      ),
188    ),
189    'widget_active' => '1',
190    'type' => 'number_integer',
191    'required' => '0',
192    'multiple' => '0',
193    'module' => 'number',
194    'active' => '1',
195    'prefix' => '',
196    'suffix' => '',
197    'append_position' => NULL,
198    'min' => '1',
199    'max' => '10',
200    'allowed_values' => '1
2012
2023
2034
2045
2056
2067
2078
2089
20910',
210    'allowed_values_php' => '',
211    'widget' => array(
212      'default_value' => array(
213        '0' => array(
214          'value' => '',
215        ),
216      ),
217      'default_value_php' => '',
218      'label' => 'Step',
219      'weight' => 0,
220      'description' => 'Used to break the project up into steps.',
221      'type' => 'optionwidgets_select',
222      'module' => 'optionwidgets',
223    ),
224  );
225
226  // Exported field: field_time_needed
227  $fields[] = array(
228    'field_name' => 'field_time_needed',
229    'type_name' => 'task',
230    'display_settings' => array(
231      'label' => array(
232        'format' => 'above',
233      ),
234      'full' => array(
235        'format' => 'default',
236        'exclude' => 0,
237      ),
238      'teaser' => array(
239        'format' => 'default',
240        'exclude' => 0,
241      ),
242    ),
243    'widget_active' => '1',
244    'type' => 'number_integer',
245    'required' => '0',
246    'multiple' => '0',
247    'module' => 'number',
248    'active' => '1',
249    'prefix' => '',
250    'suffix' => '',
251    'min' => '',
252    'max' => '',
253    'allowed_values' => '60|Less than an hour
254180|Two hours
255702|Half a day
2561440|A day
2572880|Two days
25810080|A week
25920160|Two weeks or more',
260    'allowed_values_php' => '',
261    'widget' => array(
262      'default_value' => array(
263        '0' => array(
264          '' => '',
265        ),
266      ),
267      'default_value_php' => NULL,
268      'label' => 'Time needed',
269      'weight' => 0,
270      'description' => '',
271      'type' => 'optionwidgets_select',
272      'module' => 'optionwidgets',
273    ),
274  );
275
276  // Exported field: field_attachment
277  $fields[] = array(
278    'field_name' => 'field_attachment',
279    'type_name' => 'task_discussion',
280    'display_settings' => array(
281      'label' => array(
282        'format' => 'hidden',
283      ),
284      'teaser' => array(
285        'format' => 'default',
286        'exclude' => 0,
287      ),
288      'full' => array(
289        'format' => 'default',
290        'exclude' => 0,
291      ),
292    ),
293    'widget_active' => '1',
294    'type' => 'filefield',
295    'required' => '0',
296    'multiple' => '1',
297    'module' => 'filefield',
298    'active' => '1',
299    'list_field' => '0',
300    'list_default' => 1,
301    'description_field' => '0',
302    'widget' => array(
303      'file_extensions' => 'txt pdf doc xls ppt rtf odt ods odp odg odf zip bz2 gz jpg',
304      'file_path' => 'attach/[site-date-yyyy]/[site-date-mm]/task',
305      'label' => 'Attached files',
306      'weight' => '1',
307      'description' => '',
308      'type' => 'filefield_widget',
309      'module' => 'filefield',
310    ),
311  );
312
313  // Exported field: field_step
314  $fields[] = array(
315    'field_name' => 'field_step',
316    'type_name' => 'task_wiki',
317    'display_settings' => array(
318      'label' => array(
319        'format' => 'above',
320      ),
321      'full' => array(
322        'format' => 'default',
323        'exclude' => 0,
324      ),
325      'teaser' => array(
326        'format' => 'default',
327        'exclude' => 0,
328      ),
329    ),
330    'widget_active' => '1',
331    'type' => 'number_integer',
332    'required' => '0',
333    'multiple' => '0',
334    'module' => 'number',
335    'active' => '1',
336    'prefix' => '',
337    'suffix' => '',
338    'append_position' => NULL,
339    'min' => '1',
340    'max' => '10',
341    'allowed_values' => '1
3422
3433
3444
3455
3466
3477
3488
3499
35010',
351    'allowed_values_php' => '',
352    'widget' => array(
353      'default_value' => array(
354        '0' => array(
355          'value' => '',
356        ),
357      ),
358      'default_value_php' => '',
359      'label' => 'Step',
360      'weight' => 0,
361      'description' => 'Used to break the project up into steps.',
362      'type' => 'optionwidgets_select',
363      'module' => 'optionwidgets',
364    ),
365  );
366
367  // Translatables
368  array(
369    t('Attached files'),
370    t('Attachment'),
371    t('Step'),
372    t('Tasks'),
373    t('Time needed'),
374  );
375
376  return $fields;
377}
378
379/**
380 * Helper to implementation of hook_imagecache_default_presets().
381 */
382function _nabuur_project_imagecache_default_presets() {
383  $items = array(
384    'Body' => array(
385      'presetname' => 'Body',
386      'actions' => array(
387        '0' => array(
388          'actionid' => '7',
389          'presetid' => '1',
390          'weight' => '0',
391          'action' => 'imagecache_scale',
392          'data' => array(
393            'width' => '480',
394            'height' => '',
395            'upscale' => 0,
396          ),
397          'module' => 'imagecache',
398        ),
399      ),
400    ),
401  );
402  return $items;
403}
Note: See TracBrowser for help on using the browser.