Mailinglist
 All Data Structures Files Functions Variables Pages
Functions
mailinglist_archive_theme.inc File Reference

Go to the source code of this file.

Functions

 theme_mailinglist_archive_form (&$vars)
 
 theme_mailinglist_archive_form_header (&$vars)
 
 theme_mailinglist_summary (&$vars)
 
 theme_mailinglist_thread (&$vars)
 
 theme_mailinglist_message (&$vars)
 
 theme_mailinglist_body (&$vars)
 

Function Documentation

theme_mailinglist_archive_form ( $vars)

Definition at line 9 of file mailinglist_archive_theme.inc.

9  {
10  $res = '';
11  $res .= '<div class="mailinglist_archive_form">';
12  $res .= drupal_render_children($vars['element']);
13  $res .= '</div>';
14  return $res;
15 }
theme_mailinglist_archive_form_header ( $vars)

Definition at line 20 of file mailinglist_archive_theme.inc.

20  {
21  $res = '';
22  $res .= '<div class="mailinglist_archive_form_header">';
23  $res .= drupal_render_children($vars['element']);
24  $res .= '</div>';
25  return $res;
26 }
theme_mailinglist_body ( $vars)
Todo:
parse body and format, things like quotes, remove footer?

Definition at line 111 of file mailinglist_archive_theme.inc.

111  {
112  $res = '';
113 // $res .= '<br>mailinglist_body ' . print_r($vars, true);
115  $res .= nl2br(check_plain($vars['element']['#item']));
116  $res .= drupal_render_children($vars['element']);
117  return $res;
118 }
theme_mailinglist_message ( $vars)

Definition at line 81 of file mailinglist_archive_theme.inc.

81  {
82  $element = &$vars['element'];
83  $res = '';
84  $res .= '<div class="mailinglist_message">';
85  if(isset($element['reply_to'])){
86  $res .= t('Reply To:');
87  $res .= drupal_render($element['reply_to']);
88  }
89  $res .= '<div class="mailinglist_message_header">';
90  $res .= 'Date: ' . date('M d, Y h:i:s a', $element['#date']);
91  $res .= '<br>Subject: ' . drupal_render($element['subject']);
92  $res .= '<br>From: ' . drupal_render($element['name']);
93  $res .= ' &lt;';
94  $res .= drupal_render($element['email']);
95  $res .= '&gt;';
96  $res .= '</div>';
97  $res .= '<br><br>' . drupal_render($element['body']);
98  if(isset($element['replies'])){
99  $res .= t('Replies:');
100  $res .= drupal_render($element['replies']);
101  }
102 // $res .= '<br>mailinglist_message <pre>' . print_r($vars, true) . '</pre><br>';
103  $res .= drupal_render_children($element);
104  $res .= '</div>';
105  return $res;
106 }
theme_mailinglist_summary ( $vars)

Definition at line 31 of file mailinglist_archive_theme.inc.

31  {
32  hide($vars['element']['url']);
33  $url = $vars['element']['url']['#item'];
34  $res = '';
35  $res .= date('Y-m-d H:i:s', (int)$vars['element']['#date']);
36  $res .= ' ';
37  $res .= l(drupal_render($vars['element']['subject']), $url);
38  $res .= ' (';
39  $res .= drupal_render($vars['element']['name']);
40  $res .= ') &lt;';
41  $res .= drupal_render($vars['element']['email']);
42  $res .= '&gt;';
43 // $res .= '<br>mailinglist_summary <pre>' . print_r($vars, true) . '</pre>';
44  $res .= drupal_render_children($vars['element']);
45  return $res;
46 }
theme_mailinglist_thread ( $vars)

Definition at line 51 of file mailinglist_archive_theme.inc.

51  {
52  $types = array('disc', 'circle', 'square');
53  $element = &$vars['element'];
54  if(isset($element['#level'])) {
55  $level = $element['#level'];
56  }
57  else {
58  $level = 0;
59  }
60 
61  $ulstyle = $types[$level%3];
62  $res = '';
63  if(count($element['items']) > 0) {
64  $res .= "\n" . '<ul class="ul-level-' . $level . '">';
65  foreach($element['items'] as $key => &$item) {
66  if($key[0] != '#') {
67  $res .= "\n" . ' <li>';
68  $res .= drupal_render($item);
69  $res .= '</li>';
70  }
71  }
72  $res .= "\n" . '</ul>';
73  }
74  $res .= drupal_render_children($vars['element']);
75  return $res;
76 }