' . t('This page contains links to helpful farmOS resources. For more information, visit farmOS.org.') . '

'; } } /** * Implements hook_permission(). */ function farm_help_permission() { return array( 'access farm help' => array( 'title' => t('Access farm help pages'), 'description' => t('Access the farm help pages.'), ), ); } /** * Implements hook_farm_access_perms(). */ function farm_help_farm_access_perms($role) { // Access farm help. return array('access farm help'); } /** * Implements hook_menu(). */ function farm_help_menu() { $items['farm/help'] = array( 'title' => 'Help', 'page callback' => 'farm_help_page_callback', 'access arguments' => array('access farm help'), 'type' => MENU_NORMAL_ITEM, 'menu_name' => 'user-menu', 'weight' => 100, ); return $items; } /** * Farm help page callback. */ function farm_help_page_callback() { // Set the title so it is different than the menu item. drupal_set_title(t('farmOS Resources')); // Create output array. $output = array(); // Allow other modules to add output. $contrib_output = module_invoke_all('farm_help_page'); $output = array_merge($output, $contrib_output); // Return the output, imploded into a string. return implode('', $output); } /** * Implements hook_farm_help_page(). */ function farm_help_farm_help_page() { $output = array(); // Add general text. $output[] = '

' . l('farmOS', 'https://farmos.org') . ' is built and maintained by a community of volunteers. Some farmOS community resources are listed below.

'; // Add a link to the farmOS documentation. $output[] = '

Documentation

' . l('https://farmOS.org', 'https://farmOS.org') . ''; // Add a link to the farmOS chat rooms. $chat_rooms = array( l('#farmOS Riot.im channel on Matrix.org', 'https://riot.im/app/#/room/#farmOS:matrix.org'), l('#farmOS IRC channel on Freenode', 'http://webchat.freenode.net/?channels=#farmOS'), ); $output[] = '

Community Chat

' . theme('item_list', array('items' => $chat_rooms)) . '

'; // Add a link to the farmOS distribution issue queue. $output[] = '

Issue Queues

' . l('https://drupal.org/project/issues/farm', 'https://drupal.org/project/issues/farm') . '

'; return $output; }