root / drupal7 / sites / all / modules / advanced_forum / styles / naked / advanced-forum.naked.post.tpl.php @ 13c3c9b4
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* @file
|
5 |
* Theme implementation: Template for each forum post whether node or comment.
|
6 |
*
|
7 |
* All variables available in node.tpl.php and comment.tpl.php for your theme
|
8 |
* are available here. In addition, Advanced Forum makes available the following
|
9 |
* variables:
|
10 |
*
|
11 |
* - $top_post: TRUE if we are formatting the main post (ie, not a comment)
|
12 |
* - $reply_link: Text link / button to reply to topic.
|
13 |
* - $total_posts: Number of posts in topic (not counting first post).
|
14 |
* - $new_posts: Number of new posts in topic, and link to first new.
|
15 |
* - $links_array: Unformatted array of links.
|
16 |
* - $account: User object of the post author.
|
17 |
* - $name: User name of post author.
|
18 |
* - $author_pane: Entire contents of the Author Pane template.
|
19 |
*/
|
20 |
?>
|
21 |
|
22 |
<?php if ($top_post): ?> |
23 |
<?php print $topic_header ?> |
24 |
<?php endif; ?> |
25 |
|
26 |
<div id="<?php print $post_id; ?>" class="<?php print $classes; ?>" <?php print $attributes; ?>> |
27 |
<div class="forum-post-info clearfix"> |
28 |
<div class="forum-posted-on"> |
29 |
<?php print $date ?> |
30 |
|
31 |
<?php
|
32 |
// This whole section is for printing the "new" marker. With core comment
|
33 |
// we just need to check a variable. With Node Comment, we need to do
|
34 |
// extra work to keep the views caching used for Node Comment from
|
35 |
// caching the new markers.
|
36 |
?>
|
37 |
<?php if (!$top_post): ?> |
38 |
<?php if (!empty($new)): ?> |
39 |
<a id="new"><span class="new">(<?php print $new ?>)</span></a> |
40 |
<?php endif; ?> |
41 |
|
42 |
<?php if (!empty($first_new)): ?> |
43 |
<?php print $first_new; ?> |
44 |
<?php endif; ?> |
45 |
|
46 |
<?php if (!empty($new_output)): ?> |
47 |
<?php print $new_output; ?> |
48 |
<?php endif; ?> |
49 |
<?php endif; ?> |
50 |
</div>
|
51 |
<?php /* End of posted on div. */ ?> |
52 |
|
53 |
<?php if (!empty($in_reply_to)): ?> |
54 |
<span class="forum-in-reply-to"><?php print $in_reply_to; ?></span> |
55 |
<?php endif; ?> |
56 |
|
57 |
<?php /* Add a note when a post is unpublished so it doesn't rely on theming. */ ?> |
58 |
<?php if (!$node->status): ?> |
59 |
<span class="unpublished-post-note"><?php print t("Unpublished post") ?></span> |
60 |
<?php endif; ?> |
61 |
|
62 |
<span class="forum-post-number"><?php print $permalink; ?></span> |
63 |
</div> <?php /* End of post info div. */ ?> |
64 |
|
65 |
<div class="forum-post-wrapper"> |
66 |
<div class="forum-post-panel-sub"> |
67 |
<?php if (!empty($author_pane)): ?> |
68 |
<?php print $author_pane; ?> |
69 |
<?php endif; ?> |
70 |
</div>
|
71 |
|
72 |
<div class="forum-post-panel-main clearfix"> |
73 |
<?php if (!empty($title)): ?> |
74 |
<div class="forum-post-title"> |
75 |
<?php print $title ?> |
76 |
</div>
|
77 |
<?php endif; ?> |
78 |
|
79 |
<div class="forum-post-content"> |
80 |
<?php
|
81 |
// @codingStandardsIgnoreStart
|
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 |
// @codingStandardsIgnoreEnd
|
90 |
?>
|
91 |
</div>
|
92 |
|
93 |
<?php if (!empty($post_edited)): ?> |
94 |
<div class="post-edited"> |
95 |
<?php print $post_edited ?> |
96 |
</div>
|
97 |
<?php endif; ?> |
98 |
|
99 |
<?php if (!empty($signature)): ?> |
100 |
<div class="author-signature"> |
101 |
<?php print $signature ?> |
102 |
</div>
|
103 |
<?php endif; ?> |
104 |
</div>
|
105 |
</div>
|
106 |
<?php /* End of post wrapper div. */ ?> |
107 |
|
108 |
<div class="forum-post-footer clearfix"> |
109 |
<div class="forum-jump-links"> |
110 |
<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> |
111 |
</div>
|
112 |
|
113 |
<div class="forum-post-links"> |
114 |
<?php print render($content['links']); ?> |
115 |
</div>
|
116 |
</div>
|
117 |
<?php /* End of footer div. */ ?> |
118 |
</div>
|
119 |
<?php /* End of main wrapping div. */ ?> |
120 |
<?php print render($content['comments']); ?> |