Projet

Général

Profil

Révision 13c3c9b4

Ajouté par Assos Assos il y a environ 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/advanced_forum/plugins/content_types/forum_node_create_list.inc
1 1
<?php
2
/**
3
 * @file
4
 * Forum node create list.
5
 */
2 6

  
3 7
/**
4 8
 * Callback function to supply a list of content types.
......
18 22
/**
19 23
 * Render the content.
20 24
 */
21
function advanced_forum_forum_node_create_list_content_type_render($subtype, $conf, $panel_args, $context) {
25
function advanced_forum_forum_node_create_list_content_type_render(
26
  $subtype,
27
  $conf,
28
  $panel_args,
29
  $context
30
) {
22 31
  if (!empty($context) && empty($context->data)) {
23 32
    return;
24 33
  }
25 34

  
26
  if (empty($context)) {
27
    $tid = 0;
28
  }
29
  else {
35
  $tid = 0;
36
  if (!empty($context)) {
30 37
    $tid = $context->data->tid;
31 38
  }
32 39

  
......
34 41
  $block->module = 'forum-node-create-list';
35 42
  $block->delta = $tid;
36 43

  
37
  $block->title = ''; // by default this has no title.
44
  // By default this has no title.
45
  $block->title = '';
38 46
  _advanced_forum_add_files();
39 47

  
40
  $block->content = '<div class="forum-node-create-links">' . theme('advanced_forum_node_type_create_list', $tid) . '</div>';
48
  $block->content = '<div class="forum-node-create-links">' . theme(
49
      'advanced_forum_node_type_create_list',
50
      array('forum_id' => $tid)
51
    ) . '</div>';
41 52

  
42 53
  return $block;
43 54
}
......
45 56
/**
46 57
 * Returns an edit form for the custom type.
47 58
 */
48
function advanced_forum_forum_node_create_list_content_type_edit_form($form, &$form_state) {
59
function advanced_forum_forum_node_create_list_content_type_edit_form(
60
  $form,
61
  &$form_state
62
) {
49 63
  return $form;
50 64
}
51 65

  
52
function advanced_forum_forum_node_create_list_content_type_edit_form_submit($form, &$form_state) {
66
/**
67
 * Submit callback.
68
 */
69
function advanced_forum_forum_node_create_list_content_type_edit_form_submit(
70
  $form,
71
  &$form_state
72
) {
53 73
  // Copy everything from our defaults.
54 74
  foreach (array_keys($form_state['plugin']['defaults']) as $key) {
55 75
    $form_state['conf'][$key] = $form_state['values'][$key];
56 76
  }
57 77
}
58 78

  
59
function advanced_forum_forum_node_create_list_content_type_admin_title($subtype, $conf, $context) {
79
/**
80
 * Callback for admin title.
81
 */
82
function advanced_forum_forum_node_create_list_content_type_admin_title(
83
  $subtype,
84
  $conf,
85
  $context
86
) {
60 87
  return t('"@s" forum node create list', array('@s' => $context->identifier));
61 88
}

Formats disponibles : Unified diff