You are here

function quotes_page in Quotes 6

Same name and namespace in other branches
  1. 7 quotes.module \quotes_page()

Menu callback that calls theme_quotes_page().

Parameters

$uid: The user object (from menu) of the user's quotes to be displayed.

$arg2: If 'feed', a feed is requested.

Return value

An HTML-formatted list of quotes.

1 string reference to 'quotes_page'
quotes_menu in ./quotes.module
Implementation of hook_menu().

File

./quotes.module, line 1436
The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.

Code

function quotes_page($user = NULL, $arg2 = NULL) {
  if ($arg2 == 'feed') {
    _quotes_feed_user($user->uid);
  }
  else {

    // Breadcrumb navigation. The default is wrong because of a core menu bug.
    $breadcrumb = array();
    $breadcrumb[] = l('Home', variable_get('site_frontpage', 'node'));
    $menu_info = menu_get_item('quotes');
    $menu_title = $menu_info['title'];
    $breadcrumb[] = l($menu_title, 'quotes');
    drupal_set_breadcrumb($breadcrumb);
    if ($user == 'author') {
      return quotes_author($arg2);
    }
    else {
      return theme('quotes_page', $user);
    }
  }
}