Skip to content

Commit a78a33f

Browse files
authored
Limit integrated searchbox to 2k11 (#797) (#866)
* Limit integrated searchbox to 2k11 (#797) Fixes old themes, by making it possible to use the quicksearch plugin and not having to add styles for the integrated searchbox. All includes new themes won't be affected since they have their own index.tpl. * document 2k11 searchbox change
1 parent 3734df1 commit a78a33f

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

docs/NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Version 2.6-alpha1 ()
22
------------------------------------------------------------------------
33

4+
* Fix an often broken element of old themes by not adding the
5+
integrated search box when 2k11 is used as the default theme
6+
47
* Fix specific search terms (like a - at the end) causing an error
58
page when using MySQL/MariaDB (thanks to GuillaumeValadas)
69

templates/2k11/index.tpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
{if $blogDescription}<p>{$blogDescription}</p>{/if}
4747
</a>
4848
</div>
49-
49+
{if $template == "2k11"}
5050
<form id="searchform" action="{$serendipityHTTPPath}{$serendipityIndexFile}" method="get">
5151
<div>
5252
<input type="hidden" name="serendipity[action]" value="search">
@@ -56,6 +56,7 @@
5656
</div>
5757
</form>
5858
{serendipity_hookPlugin hook="quicksearch_plugin" hookAll="true"}
59+
{/if}
5960
{if $template_option.header_img}
6061
<img src="{$template_option.header_img|escape}" alt="">
6162
{/if}

templates/2k11/sidebar.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div id="serendipity{$pluginside}SideBar">
33
{/if}
44
{foreach from=$plugindata item=item}
5-
{if $item.class != "serendipity_plugin_quicksearch"}
5+
{if $item.class != "serendipity_plugin_quicksearch" || $template != "2k11"}
66
<section class="sidebar_plugin clearfix {cycle values="odd,even"} {$item.class}">
77
{if $item.title != ""}
88
<h3>{$item.title}</h3>

0 commit comments

Comments
 (0)