'general', 'page callback' => 'cdm_dataportal_file_get_content', 'page arguments' => array(HELP_SETTINGS_GENERAL), 'access callback' => 'user_is_logged_in', 'type' => MENU_LOCAL_TASK, ); $items['admin/help/cdm_dataportal_geo'] = array( 'title' => 'geo', 'page callback' => 'cdm_dataportal_file_get_content', 'page arguments' => array(HELP_SETTINGS_GEO), 'access callback' => 'user_is_logged_in', 'type' => MENU_LOCAL_TASK, ); $items['admin/help/cdm_dataportal_layout'] = array( 'title' => 'layout', 'page callback' => 'cdm_dataportal_file_get_content', 'page arguments' => array(HELP_SETTINGS_LAYOUT), 'access callback' => 'user_is_logged_in', 'type' => MENU_LOCAL_TASK, ); $items['admin/help/cdm_dataportal_cache'] = array( 'title' => 'cache', 'page callback' => 'cdm_dataportal_file_get_content', 'page arguments' => array(HELP_SETTINGS_CACHE), 'access callback' => 'user_is_logged_in', 'type' => MENU_LOCAL_TASK, ); } /** * Implements hook_help(). */ function cdm_dataportal_help($path, $arg) { // Result to return. $res = ''; switch ($path) { case 'admin/help#cdm_dataportal': // $popup = (module_exists('advanced_help')) ? theme('advanced_help_topic', 'cdm_help', 'website-overview') : ''; // var_dump($popup); $content = cdm_dataportal_file_get_content(HELP_OVERVIEW); $res = $content; break; default: $path_aux = str_replace('/', '_', $path); if (function_exists('theme_cdm_portal_' . $path_aux)) { $res = theme('cdm_dataportal_' . $path_aux, array()); } } return $res; } /** * @todo Please document this function. * @see http://drupal.org/node/1354 */ function cdm_dataportal_file_get_content($path) { // Modifing the html file to get the drupal paths. $content = file_get_contents($path); $content_result = str_replace("{MODULE_PATH}", file_build_uri($path), $content); /* XXXXX change made because of problems with SVN!!! XXXXX //converting from html to apt for maven documentation $apt_content = $content_result; //general modifications $apt_content = str_replace('
', '', $apt_content); $apt_content = str_replace('
', '', $apt_content); $apt_content = str_replace('', '<<', $apt_content); $apt_content = str_replace('', '>>', $apt_content); $apt_content = str_replace('', '<', $apt_content); $apt_content = str_replace('', '>', $apt_content); $apt_content = str_replace('Help text for this page
'); // @WA this could also link to admin/help/cdm_dataportal_cache ? // Instead of theme_more_help_link we use a custom one here, to mimic // a D5 style link. $res .= theme('cdm_dataportal_admin_config_more_help_link', array( 'url' =>'admin/help/cdm_dataportal') ); return $res; } /** * @todo Please document this function. * @see http://drupal.org/node/1354 */ function theme_cdm_dataportal_admin_config_cdm_dataportal_geo() { $res = t('Help text for this page
'); $res .= theme('cdm_dataportal_admin_config_more_help_link', array( 'url' =>'admin/help/cdm_dataportal') ); return $res; } /** * @todo Please document this function. * @see http://drupal.org/node/1354 */ function theme_cdm_dataportal_admin_config_cdm_dataportal_layout() { $res = t('Help text for this page
'); $res .= theme('cdm_dataportal_admin_config_more_help_link', array( 'url' =>'admin/help/cdm_dataportal') ); return $res; } /** * @todo Please document this function. * @see http://drupal.org/node/1354 */ function theme_cdm_dataportal_admin_config_cdm_dataportal_cachesite() { $res = t('Help text for the cache site settings page
'); $res .= theme('cdm_dataportal_admin_config_more_help_link', array( 'url' =>'admin/help/cdm_dataportal') ); return $res; } /** * Custom theme to use in admin config pages. * * Use instead of theme_more_help_link to have D5 style more-help links * instead of D7 style. * * @author w.addink