Révision 6c9579f7
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/author_pane/CHANGELOG.txt | ||
---|---|---|
1 | 1 |
|
2 | 2 |
------------------------ D7 2.x BRANCH -------------------------------------------------- |
3 | 3 |
|
4 |
February 21, 2014 |
|
5 |
----------------- |
|
6 |
Issue #1876748 by bharriger, SimonLitt: Contact link missing HTML attributes. |
|
7 |
|
|
8 |
November 12, 2013 |
|
9 |
----------------- |
|
10 |
Issue #2089923 by Scyther: 'Last seen' missing specific CSS class in tpl file. |
|
11 |
|
|
12 |
November 9, 2013 |
|
13 |
---------------- |
|
14 |
Issue #2044341 by bigbaldy: Realname panels error on theme function. |
|
15 |
Issue #2132075 by xandeadx: Move points colon to label. |
|
16 |
|
|
17 |
November 5, 2013 |
|
18 |
---------------- |
|
19 |
Issue #1958202 by bigferumdron, Scyther: Changes in user status display. |
|
20 |
|
|
21 |
March 8, 2013 |
|
22 |
------------- |
|
23 |
Issue #1650334 by tjhart87: Incorrect CSS for some icons. |
|
24 |
|
|
25 |
March 5, 2013 |
|
26 |
------------- |
|
27 |
Issue #1843492 by Shabana: AP showing more user badges then the maximum specified. |
|
28 |
|
|
4 | 29 |
May 12, 2012 |
5 | 30 |
------------ |
6 | 31 |
by Scyther: Changed from time() to REQUEST_TIME. |
drupal7/sites/all/modules/author_pane/author-pane-user-picture.tpl.php | ||
---|---|---|
11 | 11 |
* - $imagecache_used: TRUE if imagecache was used to size the picture. |
12 | 12 |
* - $picture_link_profile: $picture with link to the user profile page if |
13 | 13 |
* the viewer has permission to view the user's profile page, otherwise FALSE. |
14 |
*
|
|
14 |
* |
|
15 | 15 |
* Use $picture_link_profile instead of $picture if you want the picture to |
16 | 16 |
* link to the account profile page. |
17 | 17 |
*/ |
drupal7/sites/all/modules/author_pane/author-pane.tpl.php | ||
---|---|---|
9 | 9 |
* |
10 | 10 |
* Available variables (core modules): |
11 | 11 |
* - $account: The entire user object for the author. |
12 |
* - $picture: Themed user picture for the author.
|
|
12 |
* - $picture: Themed user picture for the author. |
|
13 | 13 |
* See author-pane-user-picture.tpl.php. |
14 | 14 |
* - $account_name: Themed user name for the author. |
15 | 15 |
* - $account_id: User ID number for the author. |
... | ... | |
24 | 24 |
* - $contact: Linked translated text "Contact user". |
25 | 25 |
* |
26 | 26 |
* Available variables (contributed modules): |
27 |
* - $facebook_status: Status, including username, from the Facebook-style
|
|
27 |
* - $facebook_status: Status, including username, from the Facebook-style |
|
28 | 28 |
* Statuses module. |
29 | 29 |
* - $facebook_status_status: Status from the Facebook-style Statuses module. |
30 | 30 |
* |
... | ... | |
34 | 34 |
* - $user_badges: Badges from User Badges module. |
35 | 35 |
* |
36 | 36 |
* - $userpoints_points: Author's total number of points from all categories. |
37 |
* - $userpoints_categories: Array holding each category and the points for
|
|
37 |
* - $userpoints_categories: Array holding each category and the points for |
|
38 | 38 |
* that category. Both provided by the User Points module. |
39 | 39 |
* |
40 | 40 |
* - $user_stats_posts: Number of posts from the User Stats module. |
... | ... | |
50 | 50 |
* - $fasttoggle_block_author: Link to toggle the author blocked/unblocked. |
51 | 51 |
* |
52 | 52 |
* Not working as of this writing but kept for future compatability: |
53 |
* - $user_relationships: Linked text "Add to <relationship>" or
|
|
53 |
* - $user_relationships: Linked text "Add to <relationship>" or |
|
54 | 54 |
* "Remove from <relationship>". |
55 | 55 |
* - $flag_friend: Linked text. Actual text depends on module settings. |
56 | 56 |
* |
... | ... | |
89 | 89 |
|
90 | 90 |
<?php /* Last active */ ?> |
91 | 91 |
<?php if (!empty($last_active)): ?> |
92 |
<div class="author-pane-line"> |
|
92 |
<div class="author-pane-line author-last-seen">
|
|
93 | 93 |
<span class="author-pane-label"><?php print t('Last seen'); ?>:</span> <?php print t('!time ago', array('!time' => $last_active)); ?> |
94 | 94 |
</div> |
95 | 95 |
<?php endif; ?> |
... | ... | |
125 | 125 |
<?php /* Points */ ?> |
126 | 126 |
<?php if (isset($userpoints_points)): ?> |
127 | 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; ?>
|
|
128 |
<span class="author-pane-label"><?php print t('!Points', userpoints_translation()); ?>:</span> <?php print $userpoints_points; ?>
|
|
129 | 129 |
</div> |
130 | 130 |
<?php endif; ?> |
131 | 131 |
</div> |
drupal7/sites/all/modules/author_pane/author_pane.css | ||
---|---|---|
39 | 39 |
display: block; |
40 | 40 |
} |
41 | 41 |
|
42 |
.author-privatemsg-icon {
|
|
42 |
.author-privatemsg { |
|
43 | 43 |
background: transparent url(images/private-message.png) no-repeat; |
44 | 44 |
padding-left: 26px; |
45 | 45 |
height: 20px; |
... | ... | |
47 | 47 |
display: block; |
48 | 48 |
} |
49 | 49 |
|
50 |
.author-relationship-add-icon {
|
|
50 |
.author-user-relationship a[href*="request/"] {
|
|
51 | 51 |
background: transparent url(images/buddy-add.png) no-repeat; |
52 | 52 |
padding-left: 26px; |
53 | 53 |
height: 20px; |
... | ... | |
55 | 55 |
display: block; |
56 | 56 |
} |
57 | 57 |
|
58 |
.author-relationship-remove-icon {
|
|
58 |
.author-user-relationship a[href*="/remove?"] {
|
|
59 | 59 |
background: transparent url(images/buddy-remove.png) no-repeat; |
60 | 60 |
padding-left: 26px; |
61 | 61 |
height: 20px; |
drupal7/sites/all/modules/author_pane/author_pane.info | ||
---|---|---|
17 | 17 |
files[] = modules/userpoints.author-pane.inc |
18 | 18 |
files[] = content_types/author_pane.inc |
19 | 19 |
|
20 |
; Information added by drupal.org packaging script on 2012-05-12
|
|
21 |
version = "7.x-2.0-beta1"
|
|
20 |
; Information added by Drupal.org packaging script on 2014-02-21
|
|
21 |
version = "7.x-2.0" |
|
22 | 22 |
core = "7.x" |
23 | 23 |
project = "author_pane" |
24 |
datestamp = "1336847751"
|
|
24 |
datestamp = "1392987849"
|
|
25 | 25 |
|
drupal7/sites/all/modules/author_pane/author_pane.module | ||
---|---|---|
41 | 41 |
* Implements hook_block_info(). |
42 | 42 |
*/ |
43 | 43 |
function author_pane_block_info() { |
44 |
// TODO Rename block deltas (e.g. delta-0) to readable strings. |
|
44 |
// TODO Rename block deltas (e.g., delta-0) to readable strings.
|
|
45 | 45 |
$blocks['delta-0']['info'] = t('Author Pane'); |
46 | 46 |
|
47 | 47 |
// We don't want the block to cache since what is displayed depends on |
... | ... | |
225 | 225 |
// Online status - uses the settings for the who's online block. |
226 | 226 |
$variables['last_active'] = ($account->access) ? format_interval(REQUEST_TIME - $account->access) : t("Never"); |
227 | 227 |
|
228 |
if ((REQUEST_TIME -$account->access) < variable_get('user_block_seconds_online', 900)) {
|
|
228 |
if (_author_pane_is_user_online($account_id)) {
|
|
229 | 229 |
$variables['online_status'] = t('Online'); |
230 | 230 |
$variables['online_status_class'] = 'author-online'; |
231 | 231 |
} |
... | ... | |
385 | 385 |
} |
386 | 386 |
|
387 | 387 |
return TRUE; |
388 |
} |
|
388 |
} |
|
389 |
|
|
390 |
/** |
|
391 |
* Help function for Author Pane to check if a user is online. |
|
392 |
* |
|
393 |
* @param int $uid |
|
394 |
* A user id of the user to check if is online. |
|
395 |
* @return |
|
396 |
* TRUE if the user is onlie, else FALSE. |
|
397 |
*/ |
|
398 |
function _author_pane_is_user_online($uid) { |
|
399 |
global $user; |
|
400 |
// Use a static to save database calls, |
|
401 |
// if this function is called for the same user more then once. |
|
402 |
$static = &drupal_static(__FUNCTION__); |
|
403 |
|
|
404 |
if (isset($static[$uid])) { |
|
405 |
return $static[$uid]; |
|
406 |
} |
|
407 |
|
|
408 |
// If current users is not anonymous and is watching its own author pane then the user is online. |
|
409 |
if ($user->uid != 0 && $user->uid == $uid) { |
|
410 |
return $static[$uid] = TRUE; |
|
411 |
} |
|
412 |
|
|
413 |
// How long back to check if the user has been active. |
|
414 |
$time = REQUEST_TIME - variable_get('user_block_seconds_online', 900); |
|
415 |
|
|
416 |
// Check if the user has a session active and that it has been used for the last $time ago. |
|
417 |
if (db_query("SELECT 1 FROM {sessions} WHERE uid = :uid and timestamp > :time", array(':uid' => $uid, ':time' => $time))->fetchField()) { |
|
418 |
return $static[$uid] = TRUE; |
|
419 |
} |
|
420 |
|
|
421 |
return $static[$uid] = FALSE; |
|
422 |
} |
drupal7/sites/all/modules/author_pane/modules/contact.author-pane.inc | ||
---|---|---|
16 | 16 |
} |
17 | 17 |
|
18 | 18 |
if (_contact_personal_tab_access($variables['account'])) { |
19 |
$variables['contact'] = l(t('Email'), 'user/' . $variables['account']->uid . '/contact', array('attributes' => array('class' => array('author-pane-link')))); |
|
19 |
$options = array( |
|
20 |
'attributes' => array( |
|
21 |
'class' => array('author-pane-link'), |
|
22 |
'title' => t('Send @accountname an email.', array('@accountname' => $variables['account']->name)), |
|
23 |
), |
|
24 |
'html' => TRUE, |
|
25 |
); |
|
26 |
$variables['contact'] = l('<span>' . t('Send Email') . '</span>', 'user/' . $variables['account']->uid . '/contact', $options); |
|
20 | 27 |
} |
21 | 28 |
} |
22 | 29 |
|
drupal7/sites/all/modules/author_pane/modules/user_badges.author-pane.inc | ||
---|---|---|
14 | 14 |
} |
15 | 15 |
|
16 | 16 |
// Anonymous users has no user badges. |
17 |
// TODO: When a stable release of user_badges exists. |
|
18 |
// - Check if this if-case is necessary to use? |
|
19 |
// user_badges_for_uid, right now, returns "NULL" if $uid is 0. |
|
20 |
// - Static cache is not necessary, user_badges_for_uid has it right now. |
|
21 | 17 |
if ($variables['account']->uid != 0) { |
22 |
$variables['user_badges'] = user_badges_for_uid($variables['account']->uid); |
|
18 |
|
|
19 |
// Only display the badges according badge limit |
|
20 |
if (isset($variables['account']->badges)) { |
|
21 |
$variables['user_badges'] = ''; |
|
22 |
|
|
23 |
// Loop through and add only the badges that are within the limit, |
|
24 |
// $variables['account']->badges, stores the badges within the limit |
|
25 |
foreach ($variables['account']->badges as $badge) { |
|
26 |
$variables['user_badges'] .= theme('user_badge', array('badge' => $badge)); |
|
27 |
} |
|
28 |
} |
|
23 | 29 |
} |
24 | 30 |
} |
25 | 31 |
|
drupal7/sites/all/modules/author_pane/plugins/content_types/author_pane.inc | ||
---|---|---|
32 | 32 |
// Use the Real Name module if installed. Otherwise just the plain, |
33 | 33 |
// unthemed user name for the title since we don't want it linked. |
34 | 34 |
if (module_exists('realname')) { |
35 |
$block->title = theme('username', $account, array('plain' => TRUE));
|
|
35 |
$block->title = theme('realname', $account, array('plain' => TRUE));
|
|
36 | 36 |
} |
37 | 37 |
else { |
38 | 38 |
$block->title = check_plain($account->name); |
Formats disponibles : Unified diff
Weekly update of contrib modules