| 1 |
<?php |
<?php |
| 2 |
// $Id: username_highlighter.module,v 1.4 2009/07/24 13:31:34 soxofaan Exp $ |
// $Id: username_highlighter.module,v 1.5 2009/07/24 13:58:53 soxofaan Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file Implementation of the User name highlighter module. |
* @file Implementation of the User name highlighter module. |
| 150 |
$color = _username_highlighter_uid2color($user->uid); |
$color = _username_highlighter_uid2color($user->uid); |
| 151 |
$username_map['/\\b'. $user->name .'\\b/'] = |
$username_map['/\\b'. $user->name .'\\b/'] = |
| 152 |
l($user->name, 'user/' . $user->uid, |
l($user->name, 'user/' . $user->uid, |
| 153 |
array('attributes' => array('style' => 'background-color:'. $color .';')) |
array('attributes' => array( |
| 154 |
|
'class' => 'user-name-highlighter user-name-highlighter-uid-'. $user->uid, |
| 155 |
|
'style' => 'background-color:'. $color .';') |
| 156 |
|
) |
| 157 |
); |
); |
| 158 |
} |
} |
| 159 |
} |
} |