| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: gallery_help.inc,v 1.6.2.6 2008/06/10 15:46:19 profix898 Exp $ 3 4 /** 5 * gallery.module : gallery_help.inc 6 * Help and documentation 7 */ 8 9 /** 10 * Implementation of hook_help(). 11 */ 12 function _gallery_help($section) { 13 switch ($section) { 14 case 'filter#short-tip' : 15 return gallery_help_filter_short_tip(); 16 case 'filter#long-tip' : 17 return gallery_help_filter_long_tip(); 18 default: 19 return ''; 20 } 21 } 22 23 /** 24 * Function gallery_help_filter_short_tip(). 25 */ 26 function gallery_help_filter_short_tip() { 27 return t('You may link to Gallery2 items on this site <a href="@url">using a special syntax</a>.', 28 array('@url' => url('filter/tips', array('fragment' => 'filter-gallery-0')))); 29 } 30 31 /** 32 * Function gallery_help_filter_long_tip(). 33 */ 34 function gallery_help_filter_long_tip() { 35 $prefix = trim(variable_get('gallery_filter_prefix', 'G2')) .':'; 36 $path = drupal_get_path('module', 'gallery') .'/help/filter-gallery.html'; 37 38 $output = '<p><strong>Gallery2 Filter:</strong> </p>'; 39 $output .= str_replace('PREFIX:', $prefix, file_get_contents($path)); 40 41 return $output; 42 } 43 44 /** 45 * Function _gallery_report_help(). 46 */ 47 function _gallery_report_help() { 48 return t('<p><strong>A serious error has occured. This can happen due to an incorrect configuration or a bug in the 49 gallery module. If you plan to submit a bug report to the issue queue at <a href="@gallery-issues">drupal.org</a> 50 consider to include the <a href="@report">pre-generated report file</a>.</strong></p>', 51 array( 52 '@gallery-issues' => 'http://drupal.org/project/issues/gallery', 53 '@report' => url('admin/settings/gallery/report/download')) 54 ); 55 } 56 57 /** 58 * Function _gallery_advanced_help_get_form_help(). 59 */ 60 function _gallery_advanced_help_get_form_help($form_id, $module = 'gallery') { 61 static $form_help = NULL; 62 63 if (!isset($form_help)) { 64 $module_path = drupal_get_path('module', $module); 65 if (file_exists("$module_path/help/$module.forms_help.ini")) { 66 $info = parse_ini_file("./$module_path/help/$module.forms_help.ini", TRUE); 67 foreach ($info["$module-forms"] as $form => $topic) { 68 $form = explode('@', $form); 69 $form_help[$form[1]][$form[0]] = $topic; 70 } 71 } 72 } 73 74 return isset($form_help[$form_id]) ? $form_help[$form_id] : array(); 75 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |