blog_node_view

Versions
7
blog_node_view($node, $build_mode = 'full')

Implements hook_node_view().

Code

modules/blog/blog.module, line 79

<?php
function blog_node_view($node, $build_mode = 'full') {
  if ($build_mode != 'rss') {
    if ($node->type == 'blog' && arg(0) != 'blog' || arg(1) != $node->uid) {
      $links['blog_usernames_blog'] = array(
        'title' => t("!username's blog", array('!username' => format_username($node))),
        'href' => "blog/$node->uid",
        'attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => format_username($node)))),
      );
      $node->content['links']['blog'] = array(
        '#theme' => 'links',
        '#links' => $links,
        '#attributes' => array('class' => array('links', 'inline')),
      );
    }
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.