Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
0743b2cd
Commit
0743b2cd
authored
Jun 24, 2001
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- XHTML-ified search-related code.
parent
9443139a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
includes/search.inc
includes/search.inc
+8
-8
search.php
search.php
+6
-6
No files found.
includes/search.inc
View file @
0743b2cd
...
...
@@ -2,20 +2,20 @@
function
search_form
(
$keys
)
{
global
$REQUEST_URI
;
$output
.
=
"<
FORM ACTION
=
\"
$REQUEST_URI
\"
METHOD
=
\"
POST
\"
>
\n
"
;
$output
.
=
" <
INPUT SIZE
=
\"
50
\"
VALUE
=
\"
"
.
check_form
(
$keys
)
.
"
\"
NAME
=
\"
keys
\"
>"
;
$output
.
=
" <
INPUT TYPE
=
\"
submit
\"
VALUE
=
\"
"
.
t
(
"Search"
)
.
"
\"
>
\n
"
;
$output
.
=
"</
FORM
>
\n
"
;
$output
.
=
"<
form action
=
\"
$REQUEST_URI
\"
method
=
\"
POST
\"
>
\n
"
;
$output
.
=
" <
input size
=
\"
50
\"
value
=
\"
"
.
check_form
(
$keys
)
.
"
\"
name
=
\"
keys
\"
>"
;
$output
.
=
" <
input type
=
\"
submit
\"
value
=
\"
"
.
t
(
"Search"
)
.
"
\"
>
\n
"
;
$output
.
=
"</
form
>
\n
"
;
return
$output
;
}
function
search_data
(
$keys
,
$type
)
{
if
(
$keys
&&
$type
&&
$result
=
module_invoke
(
$type
,
"search"
,
check_query
(
$keys
)))
{
foreach
(
$result
as
$entry
)
{
$output
.
=
"<
P
>
\n
"
;
$output
.
=
" <
B
><
U
><
A HREF
=
\"
$entry[link]\">$entry[title]
</
A
></
U
></
B
><
BR
>"
;
$output
.
=
" <
SMALL
>
$entry[link]
"
.
(
$entry
[
user
]
?
" - "
.
format_username
(
$entry
[
user
])
:
""
)
.
""
.
(
$entry
[
date
]
?
" - "
.
format_date
(
$entry
[
date
],
"small"
)
:
""
)
.
"</
SMALL
>"
;
$output
.
=
"</
P
>
\n
"
;
$output
.
=
"<
p
>
\n
"
;
$output
.
=
" <
b
><
u
><
a href
=
\"
$entry[link]
\"
/
>
$entry[title]
</
a
></
u
></
b
><
br /
>"
;
$output
.
=
" <
small
>
$entry[link]
"
.
(
$entry
[
user
]
?
" - "
.
format_username
(
$entry
[
user
])
:
""
)
.
""
.
(
$entry
[
date
]
?
" - "
.
format_date
(
$entry
[
date
],
"small"
)
:
""
)
.
"</
small
>"
;
$output
.
=
"</
p
>
\n
"
;
}
}
else
{
...
...
search.php
View file @
0743b2cd
...
...
@@ -12,16 +12,16 @@
// build options list:
foreach
(
module_list
()
as
$name
)
{
if
(
module_hook
(
$name
,
"search"
))
{
$options
.
=
"<
OPTION VALUE
=
\"
$name
\"
"
.
(
$name
==
$type
?
"
SELECTED
"
:
""
)
.
">
$name
</
OPTION
>
\n
"
;
$options
.
=
"<
option value
=
\"
$name
\"
"
.
(
$name
==
$type
?
"
selected
"
:
""
)
.
">
$name
</
option
>
\n
"
;
}
}
// build form:
$form
.
=
"<
FORM ACTION
=
\"
search.php
\"
METHOD
=
\"
POST
\"
>
\n
"
;
$form
.
=
" <
INPUT SIZE
=
\"
50
\"
VALUE
=
\"
"
.
check_form
(
$keys
)
.
"
\"
NAME
=
\"
keys
\"
TYPE=
\"
text
\"
>
\n
"
;
$form
.
=
" <
SELECT NAME
=
\"
type
\"
>
$options
</
SELECT
>
\n
"
;
$form
.
=
" <
INPUT TYPE
=
\"
submit
\"
VALUE
=
\"
"
.
t
(
"Search"
)
.
"
\"
>
\n
"
;
$form
.
=
"</
FORM
>
\n
"
;
$form
.
=
"<
form action
=
\"
search.php
\"
method
=
\"
POST
\"
>
\n
"
;
$form
.
=
" <
input size
=
\"
50
\"
value
=
\"
"
.
check_form
(
$keys
)
.
"
\"
name
=
\"
keys
\"
TYPE=
\"
text
\"
>
\n
"
;
$form
.
=
" <
select name
=
\"
type
\"
>
$options
</
select
>
\n
"
;
$form
.
=
" <
input type
=
\"
submit
\"
value
=
\"
"
.
t
(
"Search"
)
.
"
\"
>
\n
"
;
$form
.
=
"</
form
>
\n
"
;
// visualize form:
$theme
->
header
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment