# Module search

Include the "search.php" in a new page and put a search form on the website, done.
Whether a search engine for a small static content page is useful, I'll let time to be seen.
The search is easy to integrate. For the search result only a new page must be created, eg "searchresult", in which the search engine will be include:
<?PHP include "includes/search/search.php"; ?>
namely at the point where the result is to be displayed.
An additional search form can be placed anywhere on any page. In the layout, as a block or on a separate page. The search form must have the following form:
<form action="index.php?page=___SEARCHRESULTSPAGE___" method="post">
<input type="text" name="query" value="" />
<input type="submit" name="search" value="search" />
</form>
In the action attribute, the form is sent to the search engine, so the page ___SEARCHRESULTSPAGE___. In the file "/settings/globalvars.php" the default search form is activated and the number of hits per results page can be set.

## What is to be searched?

In the file "/settings/searching.php" can be set which is to be searched - more infos.

## Write search plugin for your own module

If you want to make a search plugin available for a module, the search plugin file must have the name "search.php". In search.php the function "__ searchinmodcontent_ __MODULS_DIRECTORY_NAME__" must be present. The function has to return to the side an array of title, content and URL.
Example:
$result[]['title']
$result[]['contents']
$result[]['url']