Posted By

wza on 11/27/10


Tagged

textmate remove drupal from comments author not verified anon


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

geldora


remove 'not verified' from drupal anon author comments


 / Published in: PHP
 

  1. function mytheme_username($object) {
  2.  
  3. if ($object->uid && $object->name) {
  4. if (drupal_strlen($object->name) > 20) {
  5. $name = drupal_substr($object->name, 0, 15) .'...';
  6. }
  7. else {
  8. $name = $object->name;
  9. }
  10.  
  11. if (user_access('access user profiles')) {
  12. $output = l($name, 'user/'. $object->uid, array('attributes' => array('title' => t('View user profile.'))));
  13. }
  14. else {
  15. $output = check_plain($name);
  16. }
  17. }
  18. else if ($object->name) {
  19. if (!empty($object->homepage)) {
  20. $output = l($object->name, $object->homepage, array('attributes' => array('rel' => 'nofollow')));
  21. }
  22. else {
  23. $output = check_plain($object->name);
  24. }
  25.  
  26. /**
  27.   * HERE I've commented out the next line, which is the line that was adding
  28.   * the unwanted text to our author names!
  29.   */
  30. // $output .= ' ('. t('not verified') .')';
  31. }
  32. else {
  33. $output = variable_get('anonymous', t('Anonymous'));
  34. }
  35.  
  36. return $output;
  37. }

Report this snippet  

You need to login to post a comment.