Added button below searchfield which becomes visible when you run searches

This button links to the asktheoracle site, and usefull for cross searches in other sources
This commit is contained in:
Andre Lorbach 2008-10-02 17:00:41 +02:00
parent 910f16e468
commit c6877ba4bf
3 changed files with 41 additions and 17 deletions

View File

@ -89,6 +89,12 @@ else if ( $content['oracle_type'] == "domain" )
$content['oracle_kb_type'] = "name";
$content['showonlinesearches'] = true;
}
else if ( $content['oracle_type'] == "searchstr" )
{
$content['oracle_type_readable'] = "custom search";
$content['oracle_kb_type'] = "misc";
$content['showonlinesearches'] = false;
}
else
{
$content['oracle_type_readable'] = "unknown type";

View File

@ -119,16 +119,6 @@ $content['searchstr'] = "";
$content['highlightstr'] = "";
$content['EXPAND_HIGHLIGHT'] = "false";
// --- BEGIN CREATE TITLE
$content['TITLE'] = InitPageTitle();
// Append custom title part!
if ( isset($content['searchstr']) && strlen($content['searchstr']) > 0 )
$content['TITLE'] .= " :: Results for the search '" . $content['searchstr'] . "'"; // Append search
else
$content['TITLE'] .= " :: All Syslogmessages";
// --- END CREATE TITLE
// --- Read and process filters from search dialog!
if ( (isset($_POST['search']) || isset($_GET['search'])) || (isset($_POST['filter']) || isset($_GET['filter'])) )
{
@ -189,9 +179,27 @@ if ( (isset($_POST['search']) || isset($_GET['search'])) || (isset($_POST['filte
// Default expand Highlight Arrea!
$content['EXPAND_HIGHLIGHT'] = "true";
}
// Enable oracle link!
if ( isset($content['searchstr']) && strlen($content['searchstr']) > 0 )
{
$content['enabledoraclesearchstr'] = true;
$content['oraclesearchlink'] = $content['BASEPATH'] . "asktheoracle.php?type=searchstr&query=" . urlencode($content['searchstr']) . "&uid=" . $content['uid_current'];
}
}
// ---
// --- BEGIN CREATE TITLE
$content['TITLE'] = InitPageTitle();
// Append custom title part!
if ( isset($content['searchstr']) && strlen($content['searchstr']) > 0 )
$content['TITLE'] .= " :: Results for the search '" . $content['searchstr'] . "'"; // Append search
else
$content['TITLE'] .= " :: All Syslogmessages";
// --- END CREATE TITLE
// --- BEGIN Custom Code
if ( isset($content['Sources'][$currentSourceID]) )
{

View File

@ -1,19 +1,23 @@
<!-- INCLUDE include_header.html -->
<table border="0" cellspacing="0" cellpadding="2" align="center">
<table border="0" cellspacing="0" cellpadding="2" align="center" class="with_border">
<tr>
<td colspan="5" class="tableBackground">
</td>
</tr>
<form action="" method="get" id="searchform" name="searchform">
<!-- BEGIN HIDDENVARS_SOURCE -->
<input type="hidden" name="{varname}" value="{varvalue}">
<!-- END HIDDENVARS_SOURCE -->
<tr>
<td nowrap align="center" nowrap valign="middle">
<td nowrap align="center" nowrap valign="middle" class="tableBackground">
<B>&nbsp;{LN_SEARCH_FILTER}</B>
</td>
<!-- IF EnablePredefinedSearches="true" -->
<td nowrap align="left" nowrap valign="top">
<td nowrap valign="top" class="tableBackground">
<div id="menu">
<ul>
<li><img src="{MENU_NAV_CLOSE}" width="16" height="16" title="{LN_GEN_PREDEFINEDSEARCHES}" class="SelectSavedFilter" OnClick="ToggleDisplayTypeById('menu_presearches');">
<li><img src="{MENU_NAV_CLOSE}" align="left" width="16" height="16" title="{LN_GEN_PREDEFINEDSEARCHES}" class="SelectSavedFilter" OnClick="ToggleDisplayTypeById('menu_presearches');">
<ul class="with_border" id="menu_presearches">
<li class="cellmenu1">
<h2>{LN_GEN_PREDEFINEDSEARCHES}</h2>
@ -28,16 +32,22 @@
</div>
</td>
<!-- ENDIF EnablePredefinedSearches="true" -->
<td nowrap align="center" nowrap valign="top">
<td align="center" nowrap valign="top" class="tableBackground">
<td nowrap align="center" nowrap valign="top" class="tableBackground">
<input maxlength="2048" name="filter" size="80" title="Search" value="{searchstr}" class="SearchFormTextbox">
<br>
<!-- IF enabledoraclesearchstr="true" -->
<a href="{oraclesearchlink}" target="_top">
<img src="{MENU_HELP_BLUE}" align="left" width="16" height="16" title="{LN_GEN_MOREINFORMATION}" class="SelectSavedFilter" >
</a>
<!-- ENDIF enabledoraclesearchstr="true" -->
<input name="search" type="submit" value="{LN_SEARCH}" class="SearchFormControl">
<a href="?search={LN_SEARCH}&filter={SearchCustomButtonSearch}{additional_url_sourceonly}" target="_top"><input name="lucky" type="button" value="{SearchCustomButtonCaption}" class="SearchFormControl"></a>
<input type="button" value="{LN_SEARCH_RESET}" class="SearchFormControl" OnClick="ResetFormValues('searchform');">
<input type="button" value="{LN_HIGHLIGHT}" class="SearchFormControl" OnClick="togglevisibility('HightLightArea');">
<br>
</td>
<td nowrap align="left" nowrap valign="top">
<td nowrap align="left" nowrap valign="top" class="tableBackground">
<a href="search.php" target="_top">{LN_SEARCH_ADVANCED}</a>
<br>
@ -45,7 +55,7 @@
</td>
</tr>
<tr>
<td colspan="5">
<td colspan="5" class="tableBackground">
<span id="HightLightArea" name="HightLightArea" class="HiddenContent">
<table border="0" cellpadding="1" cellspacing="1" width="100%" align="center" class="with_border">