// 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 //
///////////////////////////////////////////////////////////////////////////////
// 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';
+<?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ä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>
</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">"{?app_short_name?}"</span>. Hier
+ kö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>