PHP 从drupal anon作者评论中删除“未经验证”

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP 从drupal anon作者评论中删除“未经验证”相关的知识,希望对你有一定的参考价值。

function mytheme_username($object) {

  if ($object->uid && $object->name) {
    if (drupal_strlen($object->name) > 20) {
      $name = drupal_substr($object->name, 0, 15) .'...';
    }
    else {
      $name = $object->name;
    }

    if (user_access('access user profiles')) {
      $output = l($name, 'user/'. $object->uid, array('attributes' => array('title' => t('View user profile.'))));
    }
    else {
      $output = check_plain($name);
    }
  }
  else if ($object->name) {
    if (!empty($object->homepage)) {
      $output = l($object->name, $object->homepage, array('attributes' => array('rel' => 'nofollow')));
    }
    else {
      $output = check_plain($object->name);
    }

    /**
     * HERE I've commented out the next line, which is the line that was adding
     * the unwanted text to our author names!
     */ 
    // $output .= ' ('. t('not verified') .')';
  }
  else {
    $output = variable_get('anonymous', t('Anonymous'));
  }

  return $output;
}

以上是关于PHP 从drupal anon作者评论中删除“未经验证”的主要内容,如果未能解决你的问题,请参考以下文章

从drupal网站删除谷歌分析

PHP 从Drupal 6中删除不需要的样式表

PHP Drupal Views 1 - 从摘要列表中删除节点计数

PHP 从Drupal博客帖子中删除“用户名博客”链接

PHP Drupal改变评论表格

PHP Drupal:新评论块