Initial code using Drupal 6.38

This commit is contained in:
Manuel Cillero 2017-07-24 15:21:05 +02:00
commit 4824608a33
467 changed files with 90887 additions and 0 deletions

10
modules/help/help-rtl.css Normal file
View file

@ -0,0 +1,10 @@
.help-items {
float: right;
padding-right: 0;
padding-left: 3%;
}
.help-items-last {
padding-right: 0;
padding-left: 0;
}

View file

@ -0,0 +1,75 @@
<?php
/**
* @file
* Admin page callbacks for the help module.
*/
/**
* Menu callback; prints a page listing a glossary of Drupal terminology.
*/
function help_main() {
// Add CSS
drupal_add_css(drupal_get_path('module', 'help') .'/help.css', 'module', 'all', FALSE);
$output = '<h2>'. t('Help topics') .'</h2><p>'. t('Help is available on the following items:') .'</p>'. help_links_as_list();
return $output;
}
/**
* Menu callback; prints a page listing general help for a module.
*/
function help_page($name) {
$output = '';
if (module_hook($name, 'help')) {
$module = drupal_parse_info_file(drupal_get_path('module', $name) .'/'. $name .'.info');
drupal_set_title($module['name']);
$temp = module_invoke($name, 'help', "admin/help#$name", drupal_help_arg());
if (empty($temp)) {
$output .= t("No help is available for module %module.", array('%module' => $module['name']));
}
else {
$output .= $temp;
}
// Only print list of administration pages if the module in question has
// any such pages associated to it.
$admin_tasks = system_get_module_admin_tasks($name);
if (!empty($admin_tasks)) {
ksort($admin_tasks);
$output .= theme('item_list', $admin_tasks, t('@module administration pages', array('@module' => $module['name'])));
}
}
return $output;
}
function help_links_as_list() {
$empty_arg = drupal_help_arg();
$module_info = module_rebuild_cache();
$modules = array();
foreach (module_implements('help', TRUE) as $module) {
if (module_invoke($module, 'help', "admin/help#$module", $empty_arg)) {
$modules[$module] = $module_info[$module]->info['name'];
}
}
asort($modules);
// Output pretty four-column list
$count = count($modules);
$break = ceil($count / 4);
$output = '<div class="clear-block"><div class="help-items"><ul>';
$i = 0;
foreach ($modules as $module => $name) {
$output .= '<li>'. l($name, 'admin/help/'. $module) .'</li>';
if (($i + 1) % $break == 0 && ($i + 1) != $count) {
$output .= '</ul></div><div class="help-items'. ($i + 1 == $break * 3 ? ' help-items-last' : '') .'"><ul>';
}
$i++;
}
$output .= '</ul></div></div>';
return $output;
}

9
modules/help/help.css Normal file
View file

@ -0,0 +1,9 @@
.help-items {
float: left; /* LTR */
width: 22%;
padding-right: 3%; /* LTR */
}
.help-items-last {
padding-right: 0; /* LTR */
}

11
modules/help/help.info Normal file
View file

@ -0,0 +1,11 @@
name = Help
description = Manages the display of online help.
package = Core - optional
version = VERSION
core = 6.x
; Information added by Drupal.org packaging script on 2016-02-24
version = "6.38"
project = "drupal"
datestamp = "1456343372"

47
modules/help/help.module Normal file
View file

@ -0,0 +1,47 @@
<?php
/**
* @file
* Manages displaying online help.
*/
/**
* Implementation of hook_menu().
*/
function help_menu() {
$items['admin/help'] = array(
'title' => 'Help',
'page callback' => 'help_main',
'access arguments' => array('access administration pages'),
'weight' => 9,
'file' => 'help.admin.inc',
);
foreach (module_implements('help', TRUE) as $module) {
$items['admin/help/'. $module] = array(
'title' => $module,
'page callback' => 'help_page',
'page arguments' => array(2),
'access arguments' => array('access administration pages'),
'type' => MENU_CALLBACK,
'file' => 'help.admin.inc',
);
}
return $items;
}
/**
* Implementation of hook_help().
*/
function help_help($path, $arg) {
switch ($path) {
case 'admin/help':
$output = '<p>'. t('This guide provides context sensitive help on the use and configuration of <a href="@drupal">Drupal</a> and its modules, and is a supplement to the more extensive online <a href="@handbook">Drupal handbook</a>. The online handbook may contain more up-to-date information, is annotated with helpful user-contributed comments, and serves as the definitive reference point for all Drupal documentation.', array('@drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')) .'</p>';
return $output;
case 'admin/help#help':
$output = '<p>'. t('The help module provides context sensitive help on the use and configuration of <a href="@drupal">Drupal</a> and its modules, and is a supplement to the more extensive online <a href="@handbook">Drupal handbook</a>. The online handbook may contain more up-to-date information, is annotated with helpful user-contributed comments, and serves as the definitive reference point for all Drupal documentation.', array('@drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')) .'</p>';
$output .= '<p>'. t('For more information, see the online handbook entry for <a href="@help">Help module</a>.', array('@help' => 'http://drupal.org/handbook/modules/help/')) .'</p>';
return $output;
}
}