Feature #19465

Epic #65814: Make Indexed search extbase plugin shine

Configuration enhancement for indexed_search

Added by Steffen Kamper almost 11 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2005-08-04
Due date:
% Done:

100%

PHP Version:
5.3
Tags:
Complexity:
Sprint Focus:

Description

For a client project i needed some more advanced Configuration of the output of indexed_search.
This was not possible with actual version of indexed_search because
  • templating was not consequent, there were still hardcoded HTML-output
  • pagebrowser was not configurable and not templated
  • complete search result was not configurable
    Also it was not possible to split the output and display in different parts of the page. I added a new plugin which uses indexed_search in a special way using only the form, so search is't done multiple times. The new plugin is a virtual one that calls indexed_search with a special configuration, which can be used with Typoscript or as Content Element on page.

I added flexforms to both plugins so it is possible to use indexed_search without additional Typoscript.

Here is an overview of the implemented changes. I configured them to the default output which is the same as actual,
the only change of defaults are
  • link for extended Searchform set to 0
  • standard template is the CSS-version
  • css-template has new sections: browsebox top, browsebox bottom, main tamplate for search results

CHANGE OF FUNCTIONALITY:
none

CHANGE OF CONFIGURATION:
A new plugin was added: Searchbox for indexed search.
This makes it possible to use it also as a global searchbox on the site. There is no more need to use an extra plugin like macina search or creating a form by yourself.

This is how it's done in Typoscript:
plugin.tx_indexedsearchbox < plugin.tx_indexedsearch
plugin.tx_indexedsearchbox.code = form

following Typoscript-vars are added

#the target page for the searchform where are the results displayed
resultPid =
#what to display
code = form,rules,results
  1. Display the searchword in results, like: Search for "searchword"
    whatIs_stdWrap {
    wrap = <div class="tx-indexedsearch-whatis">|</div>
    }
    searchWord_stdWrap {
    wrap = <span class="tx-indexedsearch-sw">"|"</span>
    }
  1. Paging
    defaultResultsProPage = 10
    pageBrowser {
    doNotLinkCurrent = 1
    general_stdWrap {
    wrap = <ul class="browsebox">|</ul>
    }
    previous_stdWrap {
    wrap = <li>|</li>
    }
    next_stdWrap {
    wrap = <li>|</li>
    }
    pages_stdWrap {
    wrap = <li>|</li>
    }
    current_stdWrap {
    wrap = <li class="tx-indexedsearch-browselist-currentPage"><strong>|</strong></li>
    }
    pageLinks_stdWrap {
    preCObject = TEXT
    preCObject.dataWrap = {LLL:EXT:indexed_search/pi/locallang.xml:pi_list_browseresults_page}
    preCObject.noTrimWrap = | ||
    }
    }
CHANGE IN TEMPLATE
3 sections are added
  • section for top browsebox
  • section for bottom browsebox
  • section for the complete results output

Remember when change settings in typoscript of plugin.tx_indexedsearch to repeat the copy for this plugin.

I tried to describe the patch in detail so please test it, i hope you enjoy the enhancement.
(issue imported from #M9574)

indexed_search_pluginconfiguration_v4.diff View (30 KB) Administrator Admin, 2009-03-03 14:01

indexed_search_pluginconfiguration_v4_flexforms.diff View (2.36 KB) Administrator Admin, 2009-03-03 14:01

manual.sxw (43.9 KB) Administrator Admin, 2009-03-03 14:02

is_searchbox_plugin.png View (41.2 KB) Administrator Admin, 2009-03-03 14:02

is_plugin.png View (46.4 KB) Administrator Admin, 2009-03-03 14:03

0009574_v7.patch View (47.7 KB) Administrator Admin, 2009-11-06 14:52


Subtasks

Bug #20875: The descriptionlength and other parameters are hardcoded for listviewClosed

Feature #20421: Unflexible Output of ResultbrowserClosed

Feature #14902: indexed_search: Results navigation relies on JavaScriptClosed

Feature #47613: indexed_search / no_cache should be configurable for forwardSearchWordsInResultLinkClosed

Feature #23156: Slash is hard–coded in the page pathClosed


Related issues

Related to TYPO3 Core - Bug #14569: Localization in Advanced search Closed 2005-02-22
Related to TYPO3 Core - Bug #16794: Disable section name link and eliminate wrong link format Closed 2006-12-17
Related to TYPO3 Core - Bug #16386: missing wrap for results list Closed 2006-07-20
Duplicated by TYPO3 Core - Feature #19171: better configurable Templates (like ch_is_templates) Closed 2008-07-30

History

#1 Updated by Steffen Kamper almost 11 years ago

for easy testing i uploaded the complete extension

#2 Updated by Daniel Sasjadvolk over 10 years ago

Nothing found after login...

Without being logged in, indexed_search works perfectly. After the login, no searchresults...

Installed Versions.
typo3 4.2.6
sr_feuser_register 2.5.19
fe_login 1.0
indexed_search 2.11.999 (got it from Steffen Kampers http://bugs.typo3.org/view.php?id=9574)
macina_searchbox 2.2.0

I also tried it with the crawler-Extension, added the necessary ID's - But it didn't work.

Anyone got an idea?

#3 Updated by Patrick Gaumond about 10 years ago

While having this big patch with new configurations, would it be possible to add http://bugs.typo3.org/view.php?id=11706 which brings TS prefs for those:

summaryMax=300
postPreLgd=60
postPreLgd_offset=6
divider= ... 

V5 is in Corelist but there was performance improvements by Ruppi after this one...

#4 Updated by Steffen Kamper about 10 years ago

unfortunally there was no review until feature freeze, so this patch has only chance for 4.4. Sad ...

#5 Updated by Ralf Hettinger almost 10 years ago

While I appreciate the much greater flexibility which would be introduced by this patch, I'd think that it might be a good idea to add some "backwards compatibility care pack" to avoid breaking indexed_search after updating within installations that use their "own" templateFile. This own templateFile wouldn't contain the new subparts and therefore indexed_search would output nothing at all after an update (subpart ###SEARCH_RESULTS### missing).

As far as I can see, the following subparts would require a fallback:
###SEARCH_FORM_HIDDEN###, ###BROWSE_BOX_TOP###, ###BROWSE_BOX_BOTTOM###, ###SEARCH_RESULTS###, ###SEARCH_NO_RESULTS###

How about putting these subparts into separate fallback template files shipped with indexed_search, then within the pi-class, check for existance of these subparts (in the TS .templateFile given template) and if not found there, load them from the fallback? 5 additional ifs should do no (more) harm to indexed_search regarding the performance.

#6 Updated by Ralf Hettinger almost 10 years ago

Added _v7 (based on latest patch _v6 from core list, for TYPO3 4.3 only).

There are some more configuration options, the default settings are set so that nothing is different from the current version of indexed_search (but of course more configurable)

new TS configuration:

  • TS options to configure what is shown within the resultlist (thus related to #20421) [plugin.tx_indexedsearch.show.results.]
    resultList = [boolean, default 1]
    resultBrowserTop = [boolean, default 1]
    resultBrowserBottom = [boolean, default 1]
  • TS option to disable link in section titles (related to #16794) [plugin.tx_indexedsearch.]
    linkSectionTitles = [boolean, default 1]
  • TS option to wrap result list (related to #16386) [plugin.tx_indexedsearch.]
    listcontent_stdWrap [->stdWrap, default: listcontent_stdWrap.wrap = |]
  • integrated #14902, since it is partially solved anyways here. Corresponding new TS options [plugin.tx_indexedsearch.pageBrowser.]
    makePointerLinksWithHref = [boolean, default 0] @Steffen: please test, if this is still compatible to your version, since #14902 supposes to add search settings as get params, which is now included
    makePointerLinksWithHref.ATagParams = class="tx-indexedsearch-pointerLink"
    makePointerLinksWithForm = 0
    makePointerLinksWithForm.submit_params = class="tx-indexedsearch-pointerButton"
  • solved #20875, new TS options [plugin.tx_indexedsearch.results.]
    summaryCropAfter = [int, default 50]
    summaryCropSignifier = [string, default emtpy]
    titleCropAfter = [int, default 180]
    titleCropSignifier = [string default '...']
    markupSW_summaryMax = [int, default 300]
    markupSW_postPreLgd = [int, default 60]
    markupSW_postPreLgd_offset = [int, default 5]
    markupSW_divider = [string, default empty]
  • TS option to enable no_cache when forwarding search words in result links [plugin.tx_indexedsearch.]
    forwardSearchWordsInResultLink_no_cache = [boolean, default 1]

Furthermore:

  • Additional HTML marker ###CSSCLASS_EVEN_ODD### for alternating result rows
  • Additional variable stored to register: $GLOBALS['TSFE']->register['indexed_search_RESULTCOUNT'] (may be used for TS wrappings using data = register:indexed_search_RESULTCOUNT)

Finally, there has been done some slight clean up compared to _v6 from core list.

Solves http://bugs.typo3.org/view.php?id=4444

#7 Updated by Dmitry Dulepov over 9 years ago

This huge patch has top be split into many smaller patches. Remember: a single issue per patch is allowed by commit rules!

#8 Updated by Ralf Hettinger over 9 years ago

Hm. Then this one might be treated as sort of a collective storyboard for improving the templating of indexed_search...

Dmitry, are you into solving/reviewing some of the issues collected here? Let me know, we could easily split up the collection that we have here into smaller chunks.

Only that Steffen's initial templating patch is sort of huge for itself... and I wouldn't want to split this one up - that's been the reason why I hooked in here - probably I shouldn't have.

#9 Updated by Armin Guenther about 9 years ago

Great enhancement - thanks! Would like to see it implemented soon.

#10 Updated by Xavier Perseguers about 8 years ago

  • Target version changed from 4.6.0 to 4.6.0-beta1

#11 Updated by Xavier Perseguers about 8 years ago

  • Target version deleted (4.6.0-beta1)

#12 Updated by Xavier Perseguers over 7 years ago

  • Assignee deleted (Steffen Kamper)

#13 Updated by Alexander Opitz over 5 years ago

  • Category set to Indexed Search

#14 Updated by Frederic Gaus over 4 years ago

  • Parent task set to #65814

#15 Updated by Tymoteusz Motylewski about 3 years ago

  • Status changed from Accepted to Closed

Also available in: Atom PDF