-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjoindin.module
executable file
·59 lines (53 loc) · 1.57 KB
/
joindin.module
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
<?php
/**
* @file
* The module file for joind.in integration
*
* This module allows Drupal to consume Joind.in's API, and provides node types
* to represent joind.in's data
*/
// TODO: this isn't always required but is here to ease initial testing.
require_once './' . drupal_get_path('module', 'joindin') . '/includes/joindin.api.inc';
/**
* Implements hook_block_info().
*
* Defines blocks to hold the joind.in widgets
*/
function joindin_block_info() {
/*
* TODO: implement blocks for the widgets
* These may need to be views that take arguments? Look into multiple block
* modules - is boxes still used on D7? Are there better alternatives?
*
* Also need to consider how the code distribution will work for the widgets
* is it more appropriate to copy the code to this module? does the licence
* allow for that? Or should it be a separately downloaded library?
*/
$blocks = array();
return $blocks;
}
/**
* Implements hook_node_info().
*/
function joindin_node_info() {
return array(
'joindin_event' => array(
'name' => t('Joind.in event'),
'base' => 'joindin',
'description' => t('This node type represents an event in joind.in.'),
// 'title_label' => t('Event'),
),
'joindin_talk' => array(
'name' => t('Joind.in talk'),
'base' => 'joindin',
'description' => t('This node type represents a talk in joind.in.'),
// 'title_label' => t('Talk'),
),
);
}
/**
* Implements hook_form().
*/
function joindin_form($node, $form_state) {
return node_content_form($node, $form_state);
}