function stats_display_main

7.x stats.module stats_display_main()
6.x stats.module stats_display_main()
4.x stats.module stats_display_main()
5.x stats.module stats_display_main()

Main menu screen for this module.

We will simply display the "menu block" for "stats/reports". That is, any path that begins with stats/reports will show up here.

You can create a report in your custom module, and as long as the url begins with stats/reports, and the menu item is of type "MENU_TYPE_NORMAL_ITEM" it will appear on this page. Set the weight to be > 1000 to appear below this list, set weight < 100 to appear above.

Return value



modules/stats/stats.module, line 1731
This module displays statistics and reports for FlightPath


function stats_display_main() {
  $rtn = "";

  $rtn .= "<div class='stats-main-menu'>";
  $rtn .= fp_render_menu_block("System Reports", "stats/reports");
  $rtn .= "</div>";

  // If we have other reports which have been exposed using the hook_stats_additional_menublocks function,
  // display them here.

  $reports = invoke_hook('stats_additional_menublocks');
  if ($reports) {
    foreach ($reports as $module_name => $temp) {
      $extraclass = "";

      $extraclass .= "stats-menublock-path-" . strtolower(fp_get_machine_readable(current($reports [$module_name])));

      $rtn .= "<div class='stats-main-menu stats-additional-menublocks $extraclass'>";
      foreach ($reports [$module_name] as $title => $menu_block_path) {
        $rtn .= fp_render_menu_block($title, $menu_block_path);
      $rtn .= "</div>";

  return $rtn;