From 1941db3cc5f4b9dc62b8967116949fa692216e3e Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 1 Sep 2015 18:16:57 +0200 Subject: [PATCH] Started with index page for welcoming the user and ask him to start searching the node. Signed-off-by: Roland Haeder --- application/hub/config.php | 12 ++++++ application/hub/exceptions.php | 13 +++--- application/hub/templates/de/code/index.ctp | 44 ++++++++++++++++++++- 3 files changed, 63 insertions(+), 6 deletions(-) diff --git a/application/hub/config.php b/application/hub/config.php index 2ad23e7c6..027b48348 100644 --- a/application/hub/config.php +++ b/application/hub/config.php @@ -1543,6 +1543,18 @@ $cfg->setConfigEntry('news_index_limit', 10); // CFG: HUB-INDEX-MENU-CLASS $cfg->setConfigEntry('hub_index_menu_class', 'HubIndexMenu'); +// CFG: HTML-FORM-HELPER +$cfg->setConfigEntry('html_form_helper_class', 'HtmlFormHelper'); + +// CFG: FORM-ACTION +$cfg->setConfigEntry('form_action', 'index.php?app={?app_short_name?}&command=do_form'); + +// CFG: FORM-METHOD +$cfg->setConfigEntry('form_method', 'post'); + +// CFG: FORM-TARGET +$cfg->setConfigEntry('form_target', '_self'); + /////////////////////////////////////////////////////////////////////////////// // Virtual file system with FUSE // /////////////////////////////////////////////////////////////////////////////// diff --git a/application/hub/exceptions.php b/application/hub/exceptions.php index d5339b1a6..8eefa5ea5 100644 --- a/application/hub/exceptions.php +++ b/application/hub/exceptions.php @@ -33,11 +33,14 @@ function hub_exception_handler ($exceptionInstance) { // Init argument string $argsString = ''; - // Convert arguments type into human-readable - foreach ($traceArray['args'] as $arg) { - $argsString .= ', ' . gettype($arg); - } // END - foreach - $argsString = substr($argsString, 2); + // Any arguments? + if ((isset($traceArray['args'])) && (is_array($traceArray['args'])) && (count($traceArray['args']) > 0)) { + // Convert arguments type into human-readable + foreach ($traceArray['args'] as $arg) { + $argsString .= ', ' . gettype($arg); + } // END - foreach + $argsString = substr($argsString, 2); + } // END - if // Set missing file/line if (!isset($traceArray['file'])) $traceArray['file'] = 'unknown'; diff --git a/application/hub/templates/de/code/index.ctp b/application/hub/templates/de/code/index.ctp index 9bf9da7e4..33cf308af 100644 --- a/application/hub/templates/de/code/index.ctp +++ b/application/hub/templates/de/code/index.ctp @@ -1,3 +1,32 @@ +addFormGroup('search', "Durchsuchen Sie das Internet oder nur die lokale Node nach Informationen."); + +// Add form group for search type selection +$helperInstance->addFormSubGroup('search_type', "Wählen Sie hier zwischen lokaler Node oder den vom Crawler eingelesenen Webseiten aus:"); +$helperInstance->addInputRadioField('search_type', 'local', "Lokale Node durchsuchen", TRUE); +$helperInstance->addInputRadioField('search_type', 'crawler', "Vom Crawler eingelesene Seiten"); + +// Add form group for search query +$helperInstance->addFormSubGroup('search_query', "Wonach wollen Sie suchen?"); +$helperInstance->addInputTextField('search_query'); + +// Add form group for buttons +$helperInstance->addFormSubGroup('button', "Suche starten:"); +$helperInstance->addInputResetButton("Nochmal eingeben"); +$helperInstance->addInputSubmitButton("Suchen"); + +// Flush finished form +$helperInstance->flushContent(); + +// [EOC] +?> +
Willkommen zum {?app_full_name?}
@@ -7,5 +36,18 @@
- Hier kommt noch vieles dazu. + Willkommen zum Web-Interface von {?app_full_name?}, + kurz "{?app_short_name?}". Hier + können Sie die lokale Node durchsuchen, sowie die aktuelle Node-Liste + (DHT) einsehen und vieles mehr. +
+ + -- 2.39.5