root / drupal7 / sites / all / modules / author_pane / author-pane.tpl.php @ a84ddea4
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* @file
|
5 |
* Theme implementation to display information about a given user.
|
6 |
*
|
7 |
* Since the user is the author of a post or of a profile page, the user is
|
8 |
* referred to as "author" below.
|
9 |
*
|
10 |
* Available variables (core modules):
|
11 |
* - $account: The entire user object for the author.
|
12 |
* - $picture: Themed user picture for the author.
|
13 |
* See author-pane-user-picture.tpl.php.
|
14 |
* - $account_name: Themed user name for the author.
|
15 |
* - $account_id: User ID number for the author.
|
16 |
*
|
17 |
* - $joined: Date the post author joined the site. (Uses shortdate format)
|
18 |
* - $joined_ago: Time since the author registered in the format "TIME ago"
|
19 |
*
|
20 |
* - $online_status_class: "author-offline" or "author-online".
|
21 |
* - $online_status: Translated text "Online" or "Offline"
|
22 |
* - $last_active: Time since author was last active. eg: "5 days 3 hours"
|
23 |
*
|
24 |
* - $contact: Linked translated text "Contact user".
|
25 |
*
|
26 |
* Available variables (contributed modules):
|
27 |
* - $facebook_status: Status, including username, from the Facebook-style
|
28 |
* Statuses module.
|
29 |
* - $facebook_status_status: Status from the Facebook-style Statuses module.
|
30 |
*
|
31 |
* - $privatemsg: Linked translated text "Send private message" provided by
|
32 |
* the Privatemsg module.
|
33 |
*
|
34 |
* - $user_badges: Badges from User Badges module.
|
35 |
*
|
36 |
* - $userpoints_points: Author's total number of points from all categories.
|
37 |
* - $userpoints_categories: Array holding each category and the points for
|
38 |
* that category. Both provided by the User Points module.
|
39 |
*
|
40 |
* - $user_stats_posts: Number of posts from the User Stats module.
|
41 |
* - $user_stats_ip: IP address from the User Stats module.
|
42 |
*
|
43 |
* - $user_title: Title from the User Titles module.
|
44 |
* - $user_title_image: Image version of title from User Titles module. This is
|
45 |
* not shown by default. If you want to show images instead of titles, change
|
46 |
* all instances of the variable in the code below.
|
47 |
*
|
48 |
* - $og_groups: Linked list of Organic Groups that the author is a member of.
|
49 |
*
|
50 |
* - $fasttoggle_block_author: Link to toggle the author blocked/unblocked.
|
51 |
*
|
52 |
* Not working as of this writing but kept for future compatability:
|
53 |
* - $user_relationships: Linked text "Add to <relationship>" or
|
54 |
* "Remove from <relationship>".
|
55 |
* - $flag_friend: Linked text. Actual text depends on module settings.
|
56 |
*
|
57 |
*/
|
58 |
?>
|
59 |
|
60 |
<?php
|
61 |
// This bit of debugging info will show the full path to and name of this
|
62 |
// template file to make it easier to figure out which template is
|
63 |
// controlling which author pane.
|
64 |
if (!empty($show_template_location)) { |
65 |
print __FILE__; |
66 |
} |
67 |
?>
|
68 |
|
69 |
<div class="author-pane"> |
70 |
<div class="author-pane-inner"> |
71 |
<?php /* General section */ ?> |
72 |
<div class="author-pane-section author-pane-general"> |
73 |
<?php /* Account name */ ?> |
74 |
<div class="author-pane-line author-name"> |
75 |
<?php print $account_name; ?> |
76 |
</div>
|
77 |
|
78 |
<?php /* User picture / avatar (has div in variable) */ ?> |
79 |
<?php if (!empty($picture)): ?> |
80 |
<?php print $picture; ?> |
81 |
<?php endif; ?> |
82 |
|
83 |
<?php /* Online status */ ?> |
84 |
<?php if (!empty($online_status)): ?> |
85 |
<div class="author-pane-line <?php print $online_status_class ?>"> |
86 |
<?php print $online_status; ?> |
87 |
</div>
|
88 |
<?php endif; ?> |
89 |
|
90 |
<?php /* Last active */ ?> |
91 |
<?php if (!empty($last_active)): ?> |
92 |
<div class="author-pane-line author-last-seen"> |
93 |
<span class="author-pane-label"><?php print t('Last seen'); ?>:</span> <?php print t('!time ago', array('!time' => $last_active)); ?> |
94 |
</div>
|
95 |
<?php endif; ?> |
96 |
|
97 |
<?php /* User title */ ?> |
98 |
<?php if (!empty($user_title)): ?> |
99 |
<div class="author-pane-line author-title"> |
100 |
<span class="author-pane-label"><?php print t('Title'); ?>:</span> <?php print $user_title; ?> |
101 |
</div>
|
102 |
<?php endif; ?> |
103 |
|
104 |
<?php /* User badges */ ?> |
105 |
<?php if (!empty($user_badges)): ?> |
106 |
<div class="author-pane-line author-badges"> |
107 |
<?php print $user_badges; ?> |
108 |
</div>
|
109 |
<?php endif; ?> |
110 |
|
111 |
<?php /* Joined */ ?> |
112 |
<?php if (!empty($joined)): ?> |
113 |
<div class="author-pane-line author-joined"> |
114 |
<span class="author-pane-label"><?php print t('Joined'); ?>:</span> <?php print $joined; ?> |
115 |
</div>
|
116 |
<?php endif; ?> |
117 |
|
118 |
<?php /* Posts */ ?> |
119 |
<?php if (isset($user_stats_posts)): ?> |
120 |
<div class="author-pane-line author-posts"> |
121 |
<span class="author-pane-label"><?php print t('Posts'); ?>:</span> <?php print $user_stats_posts; ?> |
122 |
</div>
|
123 |
<?php endif; ?> |
124 |
|
125 |
<?php /* Points */ ?> |
126 |
<?php if (isset($userpoints_points)): ?> |
127 |
<div class="author-pane-line author-points"> |
128 |
<span class="author-pane-label"><?php print t('!Points', userpoints_translation()); ?>:</span> <?php print $userpoints_points; ?> |
129 |
</div>
|
130 |
<?php endif; ?> |
131 |
</div>
|
132 |
|
133 |
<?php /* Contact section */ ?> |
134 |
<div class="author-pane-section author-pane-contact"> |
135 |
<?php /* Contact / Email */ ?> |
136 |
<?php if (!empty($contact)): ?> |
137 |
<div class="author-pane-line author-pane-link-line author-contact"> |
138 |
<?php print $contact; ?> |
139 |
</div>
|
140 |
<?php endif; ?> |
141 |
|
142 |
<?php /* Private message */ ?> |
143 |
<?php if (!empty($privatemsg)): ?> |
144 |
<div class="author-pane-line author-pane-link-line author-privatemsg"> |
145 |
<?php print $privatemsg; ?> |
146 |
</div>
|
147 |
<?php endif; ?> |
148 |
|
149 |
<?php /* User relationships */ ?> |
150 |
<?php if (!empty($user_relationships)): ?> |
151 |
<div class="author-pane-line author-pane-link-line author-user-relationship"> |
152 |
<?php print $user_relationships; ?> |
153 |
</div>
|
154 |
<?php endif; ?> |
155 |
|
156 |
<?php /* Flag friend */ ?> |
157 |
<?php if (!empty($flag_friend)): ?> |
158 |
<div class="author-pane-line author-pane-link-line author-flag-friend"> |
159 |
<?php print $flag_friend; ?> |
160 |
</div>
|
161 |
<?php endif; ?> |
162 |
</div>
|
163 |
|
164 |
<?php /* Admin section */ ?> |
165 |
<div class="author-pane-section author-pane-admin"> |
166 |
<?php /* IP */ ?> |
167 |
<?php if (!empty($user_stats_ip)): ?> |
168 |
<div class="author-pane-line author-ip"> |
169 |
<span class="author-pane-label"><?php print t('IP'); ?>:</span> <?php print $user_stats_ip; ?> |
170 |
</div>
|
171 |
<?php endif; ?> |
172 |
|
173 |
<?php /* Fasttoggle block */ ?> |
174 |
<?php if (!empty($fasttoggle_block_author)): ?> |
175 |
<div class="author-fasttoggle-block"><?php print $fasttoggle_block_author; ?></div> |
176 |
<?php endif; ?> |
177 |
</div>
|
178 |
</div>
|
179 |
</div>
|