Commit bd7ab045 authored by Kasper Skårhøj's avatar Kasper Skårhøj
Browse files

* Created a new DEFAULT backend module called "manual". It shows a TOC of CSH items from the system. See Changelog to details about the vision of it.


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@331 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 85b69dc7
2004-05-29 Kasper Skårhøj,,, <kasper@typo3.com>
* Created a new DEFAULT backend module called "manual". It shows a TOC of CSH items from the system. This will provide a "user sensitive" manual inside of TYPO3 with localized content to the extend that translators has translated CSH labels in the system. The vision is that the Documentation Team will develop CSH content so far that this will become a really good inline reference for users of TYPO3. Also, extension authors are encouraged to implement CSH for their tables and backend modules and let that be the user manual for their products!
2004-05-28 Kasper Skårhøj,,, <kasper@typo3.com>
* Added new CSH entries at various places using a new method in t3lib_BEfunc. The CSH entries are still empty and needs to be completed.
......
......@@ -2706,6 +2706,29 @@ class t3lib_BEfunc {
}
}
/**
* Prints TYPO3 Copyright notice for About Modules etc. modules.
*
* @return void
*/
function TYPO3_copyRightNotice() {
global $TYPO3_CONF_VARS;
// COPYRIGHT NOTICE:
$loginCopyrightWarrantyProvider = strip_tags(trim($TYPO3_CONF_VARS['SYS']['loginCopyrightWarrantyProvider']));
$loginCopyrightWarrantyURL = strip_tags(trim($TYPO3_CONF_VARS['SYS']['loginCopyrightWarrantyURL']));
if (strlen($loginCopyrightWarrantyProvider)>=2 && strlen($loginCopyrightWarrantyURL)>=10) {
$warrantyNote='Warranty is supplied by '.htmlspecialchars($loginCopyrightWarrantyProvider).'; <a href="'.htmlspecialchars($loginCopyrightWarrantyURL).'" target="_blank">click for details.</a>';
} else {
$warrantyNote='TYPO3 comes with ABSOLUTELY NO WARRANTY; <a href="http://typo3.com/1316.0.html" target="_blank">click for details.</a>';
}
$cNotice = '<a href="http://typo3.com/" target="_blank"><img src="gfx/loginlogo_transp.gif" width="75" vspace="2" height="19" alt="TYPO3 logo" align="left" />TYPO3 CMS ver. '.htmlspecialchars($GLOBALS['TYPO_VERSION']).'</a>. Copyright &copy; 1998-2004 Kasper Sk&aring;rh&oslash;j. Extensions are copyright of their respective owners. Go to <a href="http://typo3.com/" target="_blank">http://typo3.com/</a> for details.
'.strip_tags($warrantyNote,'<a>').' This is free software, and you are welcome to redistribute it under certain conditions; <a href="http://typo3.com/1316.0.html" target="_blank">click for details</a>. Obstructing the appearance of this notice is prohibited by law.';
return $cNotice;
}
/**
* Returns "web" if the $path (absolute) is within the DOCUMENT ROOT - and thereby qualifies as a "web" folder.
* Usage: 4
......
......@@ -345,7 +345,7 @@ $TBE_MODULES = Array (
'doc' => '', // This should always be empty!
'user' => '',
'tools' => 'em',
'help' => 'about'
'help' => 'about,cshmanual'
);
......
......@@ -100,25 +100,9 @@ class SC_alt_intro {
$alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
$TBE_TEMPLATE->docType='xhtml_trans';
$TBE_TEMPLATE->divClass=$TBE_TEMPLATE->bodyTagId;
$this->content.=$TBE_TEMPLATE->startPage('About modules');
// COPYRIGHT NOTICE:
$loginCopyrightWarrantyProvider = strip_tags(trim($TYPO3_CONF_VARS['SYS']['loginCopyrightWarrantyProvider']));
$loginCopyrightWarrantyURL = strip_tags(trim($TYPO3_CONF_VARS['SYS']['loginCopyrightWarrantyURL']));
if (strlen($loginCopyrightWarrantyProvider)>=2 && strlen($loginCopyrightWarrantyURL)>=10) {
$warrantyNote='Warranty is supplied by '.htmlspecialchars($loginCopyrightWarrantyProvider).'; <a href="'.htmlspecialchars($loginCopyrightWarrantyURL).'" target="_blank">click for details.</a>';
} else {
$warrantyNote='TYPO3 comes with ABSOLUTELY NO WARRANTY; <a href="http://typo3.com/1316.0.html" target="_blank">click for details.</a>';
}
$cNotice='<a href="http://typo3.com/" target="_blank"><img src="gfx/loginlogo_transp.gif" width="75" vspace="2" height="19" alt="TYPO3 logo" align="left" />TYPO3 CMS ver. '.htmlspecialchars($GLOBALS['TYPO_VERSION']).'</a>. Copyright &copy; 1998-2004 Kasper Sk&aring;rh&oslash;j. Extensions are copyright of their respective owners. Go to <a href="http://typo3.com/" target="_blank">http://typo3.com/</a> for details.
'.strip_tags($warrantyNote,'<a>').' This is free software, and you are welcome to redistribute it under certain conditions; <a href="http://typo3.com/1316.0.html" target="_blank">click for details</a>. Obstructing the appearance of this notice is prohibited by law.';
$TBE_TEMPLATE->docType = 'xhtml_trans';
$TBE_TEMPLATE->divClass = $TBE_TEMPLATE->bodyTagId;
$this->content.= $TBE_TEMPLATE->startPage('About modules');
$this->content.= sprintf('
<h1>%s<br />%s</h1>
......@@ -128,7 +112,7 @@ class SC_alt_intro {
<p>%s</p>',
'TYPO3 '.$TYPO_VERSION,
$LANG->getLL('introtext'),
$cNotice,
t3lib_BEfunc::TYPO3_copyRightNotice(),
$LANG->getLL('introtext2')
);
......
<?php
define('TYPO3_MOD_PATH', 'mod/help/cshmanual/');
$BACK_PATH = '../../../';
$MLANG['default']['tabs_images']['tab'] = 'ext_icon.gif';
$MLANG['default']['ll_ref'] = 'LLL:EXT:lang/locallang_mod_help_cshmanual.php';
$MCONF['script'] = $BACK_PATH.'view_help.php';
$MCONF['name'] = 'help_cshmanual';
?>
\ No newline at end of file
......@@ -253,8 +253,14 @@ TABLE#typo3-TCEforms-palette TR TD.c-close { padding-top: 3px; }
/* Context Sensitive Help window (view_help.php) */
DIV.typo3-view-help { margin-top: 6px; margin-left: 3px; width:95%; }
DIV.typo3-view-help H2 { font-size: 14px; text-align: left; margin: 20px 0px 10px 0px; }
DIV.typo3-view-help H3 { background-color: #ABBBB4; margin-top: 0px;}
DIV.typo3-view-help H4 { margin-top: 15px; border-bottom: 1px black solid; }
DIV.typo3-view-help DIV.c-toc { border: 1px solid black; background-color: #D9D5C9; }
DIV.typo3-view-help DIV.c-toc UL LI { font-size: 11px; font-weight: bold; margin-top: 10px;}
DIV.typo3-view-help DIV.c-toc UL LI UL LI { font-size: 12px; font-weight: normal; margin-top: 0px;}
DIV.typo3-view-help P.c-nav { padding: 6px 0px 0px 0px; }
DIV.typo3-view-help P.c-nav A { background-color: #E7DBA8; font-weight: bold;padding: 2px 2px 2px 2px; }
/* Shortcut frame (alt_shortcut.php) */
BODY#typo3-alt-shortcut-php { border-top: #9BA1A8 1px solid; margin: 0px 0px 0px 0px; padding: 2px 0px 0px 5px;}
......
<?php
# TYPO3 CVS ID: $Id$
$LOCAL_LANG = Array (
'default' => Array (
'mlang_labels_tablabel' => 'TYPO3 Inline Manual',
'mlang_labels_tabdescr' => 'Inline Manual based on the information sources for Context Sensitive Help in the system',
'mlang_tabs_tab' => 'Manual',
),
);
?>
\ No newline at end of file
......@@ -8,8 +8,21 @@ $LOCAL_LANG = Array (
'seeAlso' => 'See also',
'goBack' => 'Go back',
'fullDescription' => 'See full description of table',
'fullDescription_module' => 'See full description of module',
'goToToc' => 'Go to TOC',
'to_top' => 'To top',
'TOC' => 'Table Of Contents',
'TOC_core' => 'TYPO3 Core Features',
'TOC_modules' => 'Backend Modules',
'TOC_tables' => 'Database Tables',
'TOC_other' => 'Other',
'close' => 'Close',
'title' => 'TYPO3 Online Help',
'title' => 'TYPO3 Inline Help',
'manual_title' => 'TYPO3 Inline User Manual',
'introduction' => 'Introduction',
'description' => 'The TYPO3 Inline User Manual is dynamically composed from the available help sources in this TYPO3 Installation (Context Sensitive Help). Here you will find a general description of the TYPO3 Core modules, descriptions of installation specific Backend Modules and Database Tables that are available based on your login credentials.',
'full_manual' => 'Full Manual (in one page)',
'full_manual_chapters' => 'Manual Chapters',
),
'dk' => Array (
'details' => 'Detaljer',
......@@ -18,7 +31,7 @@ $LOCAL_LANG = Array (
'goBack' => 'G tilbage',
'fullDescription' => 'Se hele tabelbeskrivelsen',
'close' => 'Luk',
'title' => 'TYPO3 Online hjlp',
'title' => 'TYPO3 Inline hjlp',
),
'de' => Array (
'details' => 'Details',
......@@ -27,7 +40,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Zurck',
'fullDescription' => 'Komplette Beschreibung der Tabelle ansehen',
'close' => 'Schliessen',
'title' => 'TYPO3 Online Hilfe',
'title' => 'TYPO3 Inline Hilfe',
),
'no' => Array (
'details' => 'Detaljer',
......@@ -36,7 +49,7 @@ $LOCAL_LANG = Array (
'goBack' => 'G tilbake',
'fullDescription' => 'Se hele tabellbeskrivelsen',
'close' => 'Lukk',
'title' => 'TYPO3 Online Hjelp',
'title' => 'TYPO3 Inline Hjelp',
),
'it' => Array (
'details' => 'Dettagli',
......@@ -45,7 +58,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Indietro',
'fullDescription' => 'Vedi descrizione completa',
'close' => 'Chiudi',
'title' => 'Typo3 Help Online',
'title' => 'Typo3 Help Inline',
),
'fr' => Array (
'details' => 'Dtails',
......@@ -70,7 +83,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Ga terug',
'fullDescription' => 'Bekijk volledige omschrijving van deze tabel.',
'close' => 'Sluiten',
'title' => 'TYPO3 Online Help',
'title' => 'TYPO3 Inline Help',
),
'cz' => Array (
'details' => 'Detaily',
......@@ -79,7 +92,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Jt zpt',
'fullDescription' => 'Zobrazit pln popis tabulky',
'close' => 'Zavt',
'title' => 'Online npovda TYPO3',
'title' => 'Inline npovda TYPO3',
),
'pl' => Array (
'details' => 'Szczegy',
......@@ -88,7 +101,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Powrt',
'fullDescription' => 'Zobacz peny opis tablicy',
'close' => 'Zamknij',
'title' => 'Pomoc online TYPO3',
'title' => 'Pomoc Inline TYPO3',
),
'si' => Array (
'details' => 'Podrobnosti',
......@@ -105,7 +118,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Takaisin',
'fullDescription' => 'Katso koko taulun kuvausta',
'close' => 'Sulje',
'title' => 'Typo3 online ohjeet',
'title' => 'Typo3 Inline ohjeet',
),
'tr' => Array (
'details' => 'Ayrntlar',
......@@ -114,7 +127,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Geri git',
'fullDescription' => 'Tablonun tm tantmn gr',
'close' => 'Kapat',
'title' => 'TYPO3 online yardm',
'title' => 'TYPO3 Inline yardm',
),
'se' => Array (
'details' => 'Detaljer',
......@@ -123,7 +136,7 @@ $LOCAL_LANG = Array (
'goBack' => 'G tillbaka',
'fullDescription' => 'Se full frklaring ver tabellen',
'close' => 'Stng',
'title' => 'Typo3 Online-hjlp',
'title' => 'Typo3 Inline-hjlp',
),
'pt' => Array (
'details' => 'Detalhes',
......@@ -165,7 +178,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Cho nasp',
'fullDescription' => 'Pozri cel popis tabuky',
'close' => 'Zavrie',
'title' => 'TYPO3 Online Pomoc',
'title' => 'TYPO3 Inline Pomoc',
),
'lt' => Array (
'details' => 'Detals',
......@@ -190,7 +203,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Natrag',
'fullDescription' => 'Pogledaj pun opis tablice',
'close' => 'Zatvori',
'title' => 'TYPO3 online pomo',
'title' => 'TYPO3 Inline pomo',
),
'hu' => Array (
'details' => 'Rszletek',
......@@ -199,7 +212,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Menj vissza',
'fullDescription' => 'A tbla teljes lersnak megtekintse',
'close' => 'Bezr',
'title' => 'TYPO3 Online Sg',
'title' => 'TYPO3 Inline Sg',
),
'gl' => Array (
),
......@@ -240,7 +253,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Voltar',
'fullDescription' => 'Ver descrio completa da tabela',
'close' => 'Fechar',
'title' => 'Ajuda Online TYPO3',
'title' => 'Ajuda Inline TYPO3',
),
'et' => Array (
'details' => 'Detailid',
......@@ -249,7 +262,7 @@ $LOCAL_LANG = Array (
'goBack' => 'Tagasi',
'fullDescription' => 'Tabeli tiskirjeldus',
'close' => 'Sulge',
'title' => 'TYPO3 Online Abi',
'title' => 'TYPO3 Inline Abi',
),
'ar' => Array (
'details' => '',
......
......@@ -29,7 +29,7 @@
* See Inside TYPO3 for details.
*
* $Id$
* Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
* Revised for TYPO3 3.7 5/2004 by Kasper Skaarhoj
* XHTML-trans compliant
*
* @author Kasper Skaarhoj <kasper@typo3.com>
......@@ -39,26 +39,35 @@
*
*
*
* 78: class SC_view_help
* 97: function init()
* 119: function main()
* 173: function printContent()
* 184: function make_seeAlso($value,$anchorTable='')
* 222: function printImage($image,$descr)
* 244: function headerLine($str,$type=0)
* 265: function prepareContent($str)
* 280: function printItem($table,$field,$anchors=0)
* 316: function getTableFieldNames($table,$field)
* 87: class SC_view_help
* 110: function init()
* 130: function main()
* 158: function printContent()
*
* TOTAL FUNCTIONS: 9
* SECTION: Rendering main modes
* 181: function render_TOC()
* 280: function render_TOC_el($table, $tocCat, &$outputSections, &$tocArray, &$CSHkeys)
* 311: function render_TOC_makeTocList($tocArray)
* 346: function render_Table($table)
* 391: function render_Single($table,$field)
*
* SECTION: Rendering CSH items
* 433: function make_seeAlso($value,$anchorTable='')
* 471: function printImage($image,$descr)
* 493: function headerLine($str,$type=0)
* 514: function prepareContent($str)
* 529: function printItem($table,$field,$anchors=0)
* 565: function getTableFieldNames($table,$field)
*
* TOTAL FUNCTIONS: 14
* (This index is automatically created/updated by the extension "extdeveval")
*
*/
require ('init.php');
require ('template.php');
include ('sysext/lang/locallang_view_help.php');
require('init.php');
require('template.php');
include('sysext/lang/locallang_view_help.php');
require_once(PATH_t3lib.'class.t3lib_loadmodules.php');
......@@ -78,8 +87,6 @@ include ('sysext/lang/locallang_view_help.php');
class SC_view_help {
var $allowedHTML = '<strong><em><b><i>';
var $content; // Content accumulation.
// For these vars, see init()
var $limitAccess; // If set access to fields and tables is checked. Should be done for true database tables.
var $table; // The "table" key
......@@ -88,6 +95,12 @@ class SC_view_help {
// Internal, static: GPvar:
var $tfID; // Table/FIeld id.
var $back; // Back (previous tfID)
var $renderALL; // If set, then in TOC mode the FULL manual will be printed as well!
// Internal, dynamic:
var $content; // Content accumulation.
/**
* Initialize the class for various input etc.
......@@ -95,20 +108,18 @@ class SC_view_help {
* @return void
*/
function init() {
global $LANG;
global $LANG, $TCA;
// Setting GPvars:
$this->tfID = t3lib_div::_GP('tfID');
$this->back = t3lib_div::_GP('back');
$this->renderALL = t3lib_div::_GP('renderALL');
// Set internal table/field to the parts of "tfID" incoming var.
list($this->table,$this->field)=explode('.',$this->tfID);
// Load descriptions for table $this->table
$LANG->loadSingleTableDescription($this->table);
list($this->table,$this->field) = explode('.',$this->tfID);
// limitAccess is checked if the $this->table really IS a table.
$this->limitAccess = !isset($TCA[$this->table]) ? 0 : 1;
$this->limitAccess = isset($TCA[$this->table]) ? TRUE : FALSE;
}
/**
......@@ -120,51 +131,24 @@ class SC_view_help {
global $BE_USER,$LANG,$TCA_DESCR,$TCA,$TBE_TEMPLATE;
// Start HTML output accumulation:
$TBE_TEMPLATE->docType='xhtml_trans';
$TBE_TEMPLATE->divClass='typo3-view-help';
$this->content.=$TBE_TEMPLATE->startPage($LANG->getLL('title'));
// If ALL fields is supposed to be shown:
if ($this->field=='*') {
// Load table TCA
t3lib_div::loadTCA($this->table);
if (is_array($TCA_DESCR[$this->table]['columns']) && (!$this->limitAccess || $BE_USER->check('tables_select',$this->table))) {
// Traverse table columns as listed in TCA_DESCR
$parts=array();
$parts[0]=''; // Reserved for header of table
reset($TCA_DESCR[$this->table]['columns']);
while(list($this->field)=each($TCA_DESCR[$this->table]['columns'])) {
$fieldValue = isset($TCA[$this->table]) && strcmp($this->field,"") ? $TCA[$this->table]['columns'][$this->field] : array();
if (is_array($fieldValue) && (!$this->limitAccess || !$fieldValue['exclude'] || $BE_USER->check('non_exclude_fields',$this->table.':'.$this->field))) {
if (!$this->field) {
$parts[0]=$this->printItem($this->table,'',1);
} else {
$parts[]=$this->printItem($this->table,$this->field,1);
}
}
}
if (!strcmp($parts,"")) unset($parts[0]);
$this->content.= implode('<br />',$parts);
}
} else {
// ... otherwise show only single field:
$this->content.=$this->printItem($this->table,$this->field);
// Link to Full table description:
# $onClick = 'vHWin=window.open(\'view_help.php?tfID='.rawurlencode($this->table.'.*').'&ONLY='.$LANG->lang.'\',\'fullHelpWindow\',\'width=600,scrollbars=1,status=1,menubar=1,location=1,resizable=1,toolbar=1\');vHWin.focus();return false;';
$onClick = 'document.location = \'view_help.php?tfID='.rawurlencode($this->table.'.*').'&ONLY='.$LANG->lang.'\';return false;';
$this->content.='<br /><p><a href="#" onclick="'.htmlspecialchars($onClick).'">'.htmlspecialchars($LANG->getLL('fullDescription')).'</a></p>';
$TBE_TEMPLATE->docType = 'xhtml_trans';
$TBE_TEMPLATE->divClass = 'typo3-view-help';
$this->content.= $TBE_TEMPLATE->startPage($LANG->getLL('title'));
if ($this->field=='*') { // If ALL fields is supposed to be shown:
$this->content.= $this->render_Table($this->table);
} elseif ($this->tfID) { // ... otherwise show only single field:
$this->content.= $this->render_Single($this->table,$this->field);
} else { // Render Table Of Contents if nothing else:
$this->content.= $this->render_TOC();
}
// Print close-button:
$this->content.='<br /><form action=""><input type="submit" value="'.htmlspecialchars($LANG->getLL('close')).'" onclick="self.close(); return false;" /></form>
<br/>';
# $this->content.='<br /><form action=""><input type="submit" value="'.htmlspecialchars($LANG->getLL('close')).'" onclick="self.close(); return false;" /></form><br/>';
// End page:
$this->content.=$TBE_TEMPLATE->endPage();
$this->content.= '<br/>';
$this->content.= $TBE_TEMPLATE->endPage();
}
/**
......@@ -176,6 +160,290 @@ class SC_view_help {
echo $this->content;
}
/************************************
*
* Rendering main modes
*
************************************/
/**
* Creates Table Of Contents and possibly "Full Manual" mode if selected.
*
* @return string HTML content
*/
function render_TOC() {
global $TCA_DESCR,$TCA,$LANG,$BE_USER,$TBE_MODULES;
// Initialize:
$CSHkeys = array_flip(array_keys($TCA_DESCR));
$TCAkeys = array_keys($TCA);
$outputSections = array();
$tocArray = array();
// TYPO3 Core Features:
$LANG->loadSingleTableDescription('xMOD_csh_corebe');
$this->render_TOC_el('xMOD_csh_corebe', 'core', $outputSections, $tocArray, $CSHkeys);
// Backend Modules:
$loadModules = t3lib_div::makeInstance('t3lib_loadModules');
$loadModules->load($TBE_MODULES);
foreach($loadModules->modules as $mainMod => $info) {
$cshKey = '_MOD_'.$mainMod;
if ($CSHkeys[$cshKey]) {
$LANG->loadSingleTableDescription($cshKey);
$this->render_TOC_el($cshKey, 'modules', $outputSections, $tocArray, $CSHkeys);
}
if (is_array($info['sub'])) {
foreach($info['sub'] as $subMod => $subInfo) {
$cshKey = '_MOD_'.$mainMod.'_'.$subMod;
if ($CSHkeys[$cshKey]) {
$LANG->loadSingleTableDescription($cshKey);
$this->render_TOC_el($cshKey, 'modules', $outputSections, $tocArray, $CSHkeys);
}
}
}
}
// Database Tables:
foreach($TCAkeys as $table) {
// Load descriptions for table $table
$LANG->loadSingleTableDescription($table);
if (is_array($TCA_DESCR[$table]['columns']) && $BE_USER->check('tables_select',$table)) {
$this->render_TOC_el($table, 'tables', $outputSections, $tocArray, $CSHkeys);
}
}
// Other:
foreach($CSHkeys as $cshKey => $value) {
if (!t3lib_div::isFirstPartOfStr($cshKey, '_MOD_') && !isset($TCA[$cshKey])) {
$LANG->loadSingleTableDescription($cshKey);
$this->render_TOC_el($cshKey, 'other', $outputSections, $tocArray, $CSHkeys);
}
}
// COMPILE output:
$output = '';
$output.= '
<h1>'.$LANG->getLL('manual_title',1).'</h1>
<p>'.t3lib_BEfunc::TYPO3_copyRightNotice().'</p>';
$output.= '
<h1>'.$LANG->getLL('introduction',1).'</h1>
<p>'.$LANG->getLL('description',1).'</p>';
$output.= '
<h1>'.$LANG->getLL('TOC',1).'</h1>'.
$this->render_TOC_makeTocList($tocArray);
if (!$this->renderALL) {
$output.= '
<br/>
<p class="c-nav"><a href="view_help.php?renderALL=1">'.$LANG->getLL('full_manual',1).'</a></p>';
}
if ($this->renderALL) {
$output.= '
<h1>'.$LANG->getLL('full_manual_chapters',1).'</h1>'.
implode('
<!-- NEW SECTION: -->
',$outputSections);
}
return $output;
}
/**
* Creates a TOC list element and renders corresponding HELP content if "renderALL" mode is set.
*
* @param string CSH key / Table name
* @param string TOC category keyword: "core", "modules", "tables", "other"
* @param array Array for accumulation of rendered HELP Content (in "renderALL" mode). Passed by reference!
* @param array TOC array; Here TOC index elements are created. Passed by reference!
* @param array CSH keys array. Every item rendered will be unset in this array so finally we can see what CSH keys are not processed yet. Passed by reference!
* @return void
*/
function render_TOC_el($table, $tocCat, &$outputSections, &$tocArray, &$CSHkeys) {
global $LANG;
if ($this->renderALL) { // Render full manual right here!
$outputSections[$table] = $this->render_Table($table);
if ($outputSections[$table]) {
$outputSections[$table] = '
<!-- New CSHkey/Table: '.$table.' -->
<p class="c-nav"><a name="ANCHOR_'.$table.'" href="#">'.$LANG->getLL('to_top',1).'</a></p>
<h2>'.$this->getTableFieldLabel($table).'</h2>
'.$outputSections[$table];
$tocArray[$tocCat][$table] = '<a href="#ANCHOR_'.$table.'">'.$this->getTableFieldLabel($table).'</a>';
} else {
unset($outputSections[$table]);
}
} else { // Only TOC:
$tocArray[$tocCat][$table] = '<p><a href="view_help.php?tfID='.rawurlencode($table.'.*').'">'.$this->getTableFieldLabel($table).'</a></p>';
}
// Unset CSH key:
unset($CSHkeys[$table]);
}
/**
* Renders the TOC index as a HTML bullet list from TOC array
*
* @param array ToC Array.
* @return string HTML bullet list for index.
*/
function render_TOC_makeTocList($tocArray) {
global $LANG;
// The Various manual sections:
$keys = explode(',', 'core,modules,tables,other');
// Create TOC bullet list:
$output = '';
foreach($keys as $tocKey) {
if (is_array($tocArray[$tocKey])) {
$output.='
<li>'.$LANG->getLL('TOC_'.$tocKey,1).'
<ul>
<li>'.implode('</li>