Skip to content

Commit

Permalink
Limit integrated searchbox to 2k11 (#797) (#866)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
onli authored Jan 24, 2025
1 parent 3734df1 commit a78a33f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Version 2.6-alpha1 ()
------------------------------------------------------------------------

* Fix an often broken element of old themes by not adding the
integrated search box when 2k11 is used as the default theme

* Fix specific search terms (like a - at the end) causing an error
page when using MySQL/MariaDB (thanks to GuillaumeValadas)

Expand Down
3 changes: 2 additions & 1 deletion templates/2k11/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{if $blogDescription}<p>{$blogDescription}</p>{/if}
</a>
</div>

{if $template == "2k11"}
<form id="searchform" action="{$serendipityHTTPPath}{$serendipityIndexFile}" method="get">
<div>
<input type="hidden" name="serendipity[action]" value="search">
Expand All @@ -56,6 +56,7 @@
</div>
</form>
{serendipity_hookPlugin hook="quicksearch_plugin" hookAll="true"}
{/if}
{if $template_option.header_img}
<img src="{$template_option.header_img|escape}" alt="">
{/if}
Expand Down
2 changes: 1 addition & 1 deletion templates/2k11/sidebar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div id="serendipity{$pluginside}SideBar">
{/if}
{foreach from=$plugindata item=item}
{if $item.class != "serendipity_plugin_quicksearch"}
{if $item.class != "serendipity_plugin_quicksearch" || $template != "2k11"}
<section class="sidebar_plugin clearfix {cycle values="odd,even"} {$item.class}">
{if $item.title != ""}
<h3>{$item.title}</h3>
Expand Down

0 comments on commit a78a33f

Please sign in to comment.