Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quicksearch vanishes #797

Open
onli opened this issue Nov 30, 2022 · 4 comments
Open

Quicksearch vanishes #797

onli opened this issue Nov 30, 2022 · 4 comments
Labels

Comments

@onli
Copy link
Member

onli commented Nov 30, 2022

The quicksearch sidebar plugin vanishes. Not in all themes, not in Skeleton. But it disappears in old blogs. My theory: 2k11 hides the plugin in favor of its own search, via the sidebar.tpl:

{if $is_raw_mode}
<div id="serendipity{$pluginside}SideBar">
{/if}
{foreach from=$plugindata item=item}
{if $item.class != "serendipity_plugin_quicksearch"}
    <section class="sidebar_plugin clearfix {cycle values="odd,even"} {$item.class}">
        {if $item.title != ""}
        <h3>{$item.title}</h3>
        {/if}
        <div class="sidebar_content clearfix">{$item.content}</div>
    </section>
{/if}
{/foreach}
{if $is_raw_mode}
</div>
{/if}

This now gets repeated. Solution: Add a sidebar.tpl without the quicksearch check to all themes?

@onli onli added the bugs label Nov 30, 2022
@garvinhicking
Copy link
Member

Maybe a better solution could be to patch 2k11s siderbar tpl and add a specific check if $serendipity['theme'] == '2k11', and only then hide the search? If a fallback theme is used, it should keep its distinct name, I think?

@garvinhicking
Copy link
Member

(Adding a sidebar.tpl to themes means we can only patch it for available themes, and any custom-made theme would still be broken in that regard. And people would have to update external themes first...)

@onli
Copy link
Member Author

onli commented Dec 1, 2022

That's a good idea, I hope we have all the data available in the tpl to do that check, and that it really knows its theme name. But that just needs a test :)

@onli
Copy link
Member Author

onli commented Dec 5, 2022

Alternative solution: Maybe we should remove this check? I imagine that this is really surprising behaviour for a lot of situations, and to limit it to 2k11 now would also be surprising.

Does hiding the quicksearch really still make sense for a theme whose templates are the foundation of almost all other themes? Is it necessary to hide the quicksearch sidebar plugin for some specific usecase (e.g. extending the built-in search with the livesearch plugin?) or is this just about not doubling the search - and if it is just for that, can't user just uninstall it if is unnecessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants