定制 id/indexed-search-autocomplete 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

id/indexed-search-autocomplete

Composer 安装命令:

composer require id/indexed-search-autocomplete

包简介

Indexed Search Autocomplete - Extends the TYPO3 Core Extension Indexed_Search searchform with an autocomplete feature.

README 文档

README

TYPO3 Extension indexed_search_autocomplete

TYPO3 13 TYPO3 14 Donate Latest Stable Version Monthly Downloads License

Extends the TYPO3 Core Extension Indexed_Search searchform with an autocomplete feature.

Minimal Dependencies

  • TYPO3 CMS 13.4 & 14.x
  • PHP 8.2+
  • Plain JavaScript

Quick Install Guide

Install the TYPO3 Core indexed_search extensions

Step 1: The extension works with the TYPO3 Core indexed_search extension. So please install and configure this one first. Check final, the "Word Index" works fine!

Step 2: Install this plugin.

Installation using Composer

The recommended way to install the extension is using Composer.

Run the following command within your Composer based TYPO3 project:

composer require id/indexed-search-autocomplete

Installation as extension from TYPO3 Extension Repository (TER)

Download and install the extension with the extension manager module.

Step 3: No manual TypoScript activation is required — constants and setup (including the AJAX PAGE endpoint, typeNum 7423794) are loaded globally by the extension's ext_localconf.php. Activating the Site Set in Site Management > Sites > Edit your site > Sets > Add: "IndexedSearch Autocomplete" is optional (site-scoped overrides of the view paths).

Step 4: Outsource from the EXT:indexed_search the Partials/Form.html Template. Like this:

plugin {
  tx_indexedsearch {
    view {
      templateRootPath = fileadmin/Resources/Plugin/IndexedSearch/Private/Templates/
      partialRootPath = fileadmin/Resources/Plugin/IndexedSearch/Private/Partials/
      layoutRootPath = fileadmin/Resources/Plugin/IndexedSearch/Private/Layouts/
    }
  }
}

Step 5: Find the fluid file / code line that contains the text-input for the search-word.

Step 6: Add the class '.indexed-search-autocomplete-sword' to this text-input. Example:

<f:form.textfield name="search[sword]" value="{sword}" id="tx-indexedsearch-searchbox-sword" class="tx-indexedsearch-searchbox-sword indexed-search-autocomplete-sword" />

Step 7: Now add the following line where you want the results to be displayed (so in most of the cases below the text-input):

TYPO3 13.x & 14.x:

<div class="search-autocomplete-results no-results" data-mode="word" data-searchonclick="false" data-maxresults="10" data-minlength="2" data-searchurl="{f:uri.action(action: 'search', controller: 'Search', extensionName: 'IndexedSearchAutocomplete', pluginName: 'Search', pageType: '7423794', noCache: 1)}"></div>

Form.html Example TYPO3 v13.x & v14.x:

<div class="tx-indexedsearch-form">
  <label for="tx-indexedsearch-searchbox-sword"><f:translate key="form.searchFor" />:</label>
  <f:form.textfield name="search[sword]" value="{sword}" id="tx-indexedsearch-searchbox-sword" class="tx-indexedsearch-searchbox-sword indexed-search-autocomplete-sword" />
  <div class="search-autocomplete-results no-results" data-mode="word" data-searchonclick="false" data-maxresults="10" data-minlength="2" data-searchurl="{f:uri.action(action: 'search', controller: 'Search', extensionName: 'IndexedSearchAutocomplete', pluginName: 'Search', pageType: '7423794', noCache: 1)}"></div>
</div>

Step 8: Now you can configure the plugins options with the parameters of that <div> (see options)

Step 9: TYPO3 Site-Config add the new PAGE typeNum 7423794, here a Example:

routeEnhancers:
  PageTypeSuffix:
   type: PageType
   default: /
   index: ''
   map:
     /: 0
     sitemap.xml: 500001
     autocomplete: 7423794

Additional: Make sure to disable Indexed-Search option "Use MySQL specific fulltext search", otherwise the word-suggestion won't work!

Options

  • data-mode="word" => the following values are possible: word or link. Depending on which option you choose, the plugin will suggest either words or links as you type. You can edit both template files at indexed_search_autocomplete/Resources/Private/Partials/ (Fluid)
  • data-maxresults="10" => The maximum number of entries per suggestion (Fluid)
  • data-minlength="2" => How many characters must be in the input field for the plugin to make it's first suggestion (Fluid)
  • data-searchonclick="false" => If a suggestion is selected, should this submit the form (so basically the search starts after selecting a word). Possible values are "false" or "true".

Contact & Communication

Working / Testing Developer Example:

TYPO3 11: https://t11.baukasten-typo3.de/
TYPO3 12: https://t12.baukasten-typo3.de/
TYPO3 13: https://t13.baukasten-typo3.de/
TYPO3 14: https://t14.baukasten-typo3.de/

GIT

We are on github:
https://github.com/ingeniumdesign/indexed_search_autocomplete/

Agency

INGENIUMDESIGN
TYPO3 - Agentur
65510 Idstein

https://www.ingeniumdesign.de/
info@ingeniumdesign.de

Donate

Amazon: https://www.amazon.de/hz/wishlist/ls/13RT2BFNRP05
PayPay: www.paypal.me/INGENIUMDESIGN/

Sponsoring

https://www.ingeniumdesign.de/ - INGENIUMDESIGN
https://www.agenturamwasser.ch/ - Agentur am Wasser GmbH
https://www.baukasten-typo3.de/ - INGENIUMDESIGN
https://www.smallprime.ch/ - Agentur am Wasser GmbH
https://www.takeoffmedia.de/ - Takeoff-Media GmbH
https://ead.darmstadt.de/ - Eigenbetrieb für kommunale Aufgaben und Dienstleistungen (EAD)
https://www.easy-sprachreisen.de/ - Sebastian Ernst & Petra Wagner GbR

Downloads

TYPO3 TER: https://extensions.typo3.org/extension/indexed_search_autocomplete
Composer: https://packagist.org/packages/id/indexed-search-autocomplete

Used by

We are searching for Live-Examples and for Sponsoring for the TYPO3 indexed_search Autocomplete Extension.
Please be so kind to send us an E-Mail if you're using it. Thanks!

Links/References:

https://www.ingeniumdesign.de/ - by INGENIUMDESIGN
https://www.baukasten-typo3.de/ - by INGENIUMDESIGN
https://www.takeoffmedia.de/ - by INGENIUMDESIGN
https://ead.darmstadt.de/ - by INGENIUMDESIGN
https://www.easy-sprachreisen.de/ - by INGENIUMDESIGN

id/indexed-search-autocomplete 适用场景与选型建议

id/indexed-search-autocomplete 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12.6k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2021 年 02 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「search」 「cms」 「autocomplete」 「typo3」 「ingeniumdesign」 「indexed-search」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 id/indexed-search-autocomplete 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 id/indexed-search-autocomplete 我们能提供哪些服务?
定制开发 / 二次开发

基于 id/indexed-search-autocomplete 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 12.6k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 7
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2021-02-06