| 1 |
<?php
|
| 2 |
|
| 3 |
/*****************************************************************************
|
| 4 |
Replace feed icon with theme's feed icon.
|
| 5 |
*****************************************************************************/
|
| 6 |
function phptemplate_feed_icon($url, $title) {
|
| 7 |
if ($image = theme('image', path_to_theme() . '/images/rss.png', t('Syndicate content'), $title)) {
|
| 8 |
return '<a href="'. check_url($url) .'" class="feed-icon">'. $image .'</a>';
|
| 9 |
}
|
| 10 |
}
|
| 11 |
|
| 12 |
/*****************************************************************************
|
| 13 |
Override theme_username() function to remove "(not verified)" from comments.
|
| 14 |
*****************************************************************************/
|
| 15 |
function phptemplate_username($object) {
|
| 16 |
if ($object->uid && $object->name) {
|
| 17 |
if (drupal_strlen($object->name) > 20) {
|
| 18 |
$name = drupal_substr($object->name, 0, 15) .'...';
|
| 19 |
}
|
| 20 |
else {
|
| 21 |
$name = $object->name;
|
| 22 |
}
|
| 23 |
|
| 24 |
if (user_access('access user profiles')) {
|
| 25 |
$output = l($name, 'user/'. $object->uid, array('attributes' => array('title' => t('View user profile.'))));
|
| 26 |
}
|
| 27 |
else {
|
| 28 |
$output = check_plain($name);
|
| 29 |
}
|
| 30 |
}
|
| 31 |
else if ($object->name) {
|
| 32 |
if (!empty($object->homepage)) {
|
| 33 |
$output = l($object->name, $object->homepage, array('attributes' => array('rel' => 'nofollow')));
|
| 34 |
}
|
| 35 |
else {
|
| 36 |
$output = check_plain($object->name);
|
| 37 |
}
|
| 38 |
}
|
| 39 |
else {
|
| 40 |
$output = variable_get('anonymous', t('Anonymous'));
|
| 41 |
}
|
| 42 |
|
| 43 |
return $output;
|
| 44 |
}
|