blog_feed_user

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/blog/blog.module, строка 75

Версии
5
blog_feed_user($uid = 0)
6
blog_feed_user($account)

Displays an RSS feed containing recent blog entries of a given user.

▾ 1 функция вызывает blog_feed_user()

blog_page in modules/blog/blog.module
Menu callback; displays a Drupal page containing recent blog entries.

Код

<?php
function blog_feed_user($uid = 0) {
  global $user;

  if ($uid) {
    $account = user_load(array('uid' => $uid, 'status' => 1));
  }
  else {
    $account = $user;
  }

  $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n  WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC"), $uid, 0, variable_get('feed_default_items', 10));
  $channel['title'] = $account->name ."'s blog";
  $channel['link'] = url("blog/$uid", NULL, NULL, TRUE);
  $channel['description'] = $term->description;
  node_feed($result, $channel);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему