Merge pull request #240 from H0K4/patch-1

Board search implementation
This commit is contained in:
Marcin Łabanowski 2017-07-23 17:53:24 +02:00 committed by GitHub
commit dc7e4d5b89
2 changed files with 14 additions and 0 deletions

View File

@ -1641,6 +1641,9 @@
// Enable the search form
$config['search']['enable'] = false;
// Enable search in the board index.
$config['board_search'] = false;
// Maximal number of queries per IP address per minutes
$config['search']['queries_per_minutes'] = Array(15, 2);

View File

@ -57,6 +57,17 @@
{% if config.global_message %}<hr /><div class="blotter">{{ config.global_message }}</div>{% endif %}
<hr />
<!-- Start Search Form -->
{% if config.board_search %}
<form style="display:inline" action="/search.php">
<p style="margin: 10px;">
<input type="text" name="search" placeholder="{{ board.uri }} search">
<input type="hidden" name="board" value="{{ board.uri }}">
<input type="submit" value="Search">
</p>
</form>
{% endif %}
<!-- End Search Form -->
<form name="postcontrols" action="{{ config.post_url }}" method="post">
<input type="hidden" name="board" value="{{ board.uri }}" />
{% if mod %}<input type="hidden" name="mod" value="1" />{% endif %}