Projet

Général

Profil

Paste
Télécharger (3,72 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / advanced_forum / styles / naked / advanced-forum.naked.post.tpl.php @ c169e7c4

1
<?php
2

    
3
/**
4
 * @file
5
 *
6
 * Theme implementation: Template for each forum post whether node or comment.
7
 *
8
 * All variables available in node.tpl.php and comment.tpl.php for your theme
9
 * are available here. In addition, Advanced Forum makes available the following
10
 * variables:
11
 *
12
 * - $top_post: TRUE if we are formatting the main post (ie, not a comment)
13
 * - $reply_link: Text link / button to reply to topic.
14
 * - $total_posts: Number of posts in topic (not counting first post).
15
 * - $new_posts: Number of new posts in topic, and link to first new.
16
 * - $links_array: Unformatted array of links.
17
 * - $account: User object of the post author.
18
 * - $name: User name of post author.
19
 * - $author_pane: Entire contents of the Author Pane template.
20
 */
21

    
22
?>
23

    
24
<?php if ($top_post): ?>
25
  <?php print $topic_header ?>
26
<?php endif; ?>
27

    
28
<div id="<?php print $post_id; ?>" class="<?php print $classes; ?>" <?php print $attributes; ?>>
29
  <div class="forum-post-info clearfix">
30
    <div class="forum-posted-on">
31
      <?php print $date ?>
32

    
33
      <?php
34
      // This whole section is for printing the "new" marker. With core comment
35
      // we just need to check a variable. With Node Comment, we need to do
36
      // extra work to keep the views caching used for Node Comment from
37
      //caching the new markers.
38
      ?>
39
      <?php if (!$top_post): ?>
40
        <?php if (!empty($new)): ?>
41
          <a id="new"><span class="new">(<?php print $new ?>)</span></a>
42
        <?php endif; ?>
43

    
44
        <?php if (!empty($first_new)): ?>
45
          <?php print $first_new; ?>
46
        <?php endif; ?>
47

    
48
        <?php if (!empty($new_output)): ?>
49
          <?php print $new_output; ?>
50
        <?php endif; ?>
51
      <?php endif; ?>
52
    </div>  <?php // End of posted on div ?>
53

    
54
    <?php if (!empty($in_reply_to)): ?>
55
            <span class="forum-in-reply-to"><?php print $in_reply_to; ?></span>
56
    <?php endif; ?>
57

    
58
    <?php // Add a note when a post is unpublished so it doesn't rely on theming. ?>
59
    <?php if (!$node->status): ?>
60
      <span class="unpublished-post-note"><?php print t("Unpublished post") ?></span>
61
    <?php endif; ?>
62

    
63
    <span class="forum-post-number"><?php print $permalink; ?></span>
64
  </div> <?php // End of post info div ?>
65

    
66
  <div class="forum-post-wrapper">
67
    <div class="forum-post-panel-sub">
68
      <?php if (!empty($author_pane)): ?>
69
        <?php print $author_pane; ?>
70
      <?php endif; ?>
71
    </div>
72

    
73
    <div class="forum-post-panel-main clearfix">
74
      <?php if (!empty($title)): ?>
75
        <div class="forum-post-title">
76
          <?php print $title ?>
77
        </div>
78
      <?php endif; ?>
79

    
80
      <div class="forum-post-content">
81
        <?php
82
          // We hide the comments and links now so that we can render them later.
83
          hide($content['taxonomy_forums']);
84
          hide($content['comments']);
85
          hide($content['links']);
86
          if (!$top_post)
87
            hide($content['body']);
88
          print render($content);
89
        ?>
90
      </div>
91

    
92
      <?php if (!empty($post_edited)): ?>
93
        <div class="post-edited">
94
          <?php print $post_edited ?>
95
        </div>
96
      <?php endif; ?>
97

    
98
      <?php if (!empty($signature)): ?>
99
        <div class="author-signature">
100
          <?php print $signature ?>
101
        </div>
102
      <?php endif; ?>
103
    </div>
104
  </div> <?php // End of post wrapper div ?>
105

    
106
  <div class="forum-post-footer clearfix">
107
    <div class="forum-jump-links">
108
      <a href="#forum-topic-top" title="<?php print t('Jump to top of page'); ?>" class="af-button-small"><span><?php print t("Top"); ?></span></a>
109
    </div>
110

    
111
    <div class="forum-post-links">
112
      <?php print render($content['links']); ?>
113
    </div>
114
  </div> <?php // End of footer div ?>
115
</div> <?php // End of main wrapping div ?>
116

    
117
<?php print render($content['comments']); ?>