From: Roland Haeder Date: Tue, 1 Sep 2015 16:16:57 +0000 (+0200) Subject: Started with index page for welcoming the user and ask him to start searching the... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1941db3cc5f4b9dc62b8967116949fa692216e3e;p=hub.git Started with index page for welcoming the user and ask him to start searching the node. Signed-off-by: Roland Haeder --- 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. +
+ +