]> git.mxchange.org Git - hub.git/commitdiff
Started with index page for welcoming the user and ask him to start searching the...
authorRoland Haeder <roland@mxchange.org>
Tue, 1 Sep 2015 16:16:57 +0000 (18:16 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 1 Sep 2015 16:16:57 +0000 (18:16 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/hub/config.php
application/hub/exceptions.php
application/hub/templates/de/code/index.ctp

index 2ad23e7c6ea51aa77163c56e00b7c122481f7672..027b4834887a17bffa2088f4fa4b8bdf27d3afcc 100644 (file)
@@ -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?}&amp;command=do_form');
+
+// CFG: FORM-METHOD
+$cfg->setConfigEntry('form_method', 'post');
+
+// CFG: FORM-TARGET
+$cfg->setConfigEntry('form_target', '_self');
+
 ///////////////////////////////////////////////////////////////////////////////
 //                           Virtual file system with FUSE                   //
 ///////////////////////////////////////////////////////////////////////////////
index d5339b1a686f87595a0a9a620d5c850a0a786a32..8eefa5ea554366f8fac8de19fb38fe3620982521 100644 (file)
@@ -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';
index 9bf9da7e408c140a68e4deeec4550f9749876bbb..33cf308af56d594bc3e99cc0a1bc17242a9f5407 100644 (file)
@@ -1,3 +1,32 @@
+<?php
+// Get helper instance for web forms. This will add the opening form-tag to
+// the helper's render cache which is simply a small variable in the class
+// BaseHelper.
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'hub_search'));
+
+// Add general form group
+$helperInstance->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&auml;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]
+?>
+
 <div id="content_header">
        Willkommen zum <span class="app_name">{?app_full_name?}</span>
 </div>
@@ -7,5 +36,18 @@
 </div>
 
 <div id="welcome">
-       Hier kommt noch vieles dazu.
+       Willkommen zum Web-Interface von <span class="app_name">{?app_full_name?}</span>,
+       kurz <span class="app_name">&quot;{?app_short_name?}&quot;</span>. Hier
+       k&ouml;nnen Sie die lokale Node durchsuchen, sowie die aktuelle Node-Liste
+       (DHT) einsehen und vieles mehr.
+</div>
+
+<div id="search_box">
+       <div id="search_header">
+               Diese Node durchsuchen:
+       </div>
+
+       <div id="search_content">
+               {?hub_search?}
+       </div>
 </div>