Beispiel #1
0
 /**
  * 通用过滤器
  *
  * @access public
  * @param array $value 需要过滤的行数据
  * @return array
  */
 public function filter(array $value)
 {
     //生成静态链接
     $routeExists = NULL != Typecho_Router::get('author');
     $value['permalink'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->index) : '#';
     /** 生成聚合链接 */
     /** RSS 2.0 */
     $value['feedUrl'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->feedUrl) : '#';
     /** RSS 1.0 */
     $value['feedRssUrl'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->feedRssUrl) : '#';
     /** ATOM 1.0 */
     $value['feedAtomUrl'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->feedAtomUrl) : '#';
     // modified_by_jiangmuzi 2015.09.22
     $avatar = Forum_Common::parseUserAvatar($value['uid']);
     $value = array_merge($value, $avatar);
     $value['ucenter'] = $this->options->someUrl('ucenter', array('u' => $value['name']), false);
     // end modified
     $value = $this->pluginHandle(__CLASS__)->filter($value, $this);
     return $value;
 }