Feature #19465 » 0009574_v7.patch

Administrator Admin, 2009-11-06 14:52

View differences:

typo3/sysext/indexed_search/ext_tables.php (working copy)
1 1
<?php
2 2
if (!defined ('TYPO3_MODE')) 	die ('Access denied.');
3 3

  
4
t3lib_extMgm::addPlugin(Array('LLL:EXT:indexed_search/locallang.php:mod_indexed_search', $_EXTKEY));
4
t3lib_extMgm::addPlugin(Array('LLL:EXT:indexed_search/locallang.xml:mod_indexed_search', $_EXTKEY));
5
t3lib_extMgm::addPlugin(Array('LLL:EXT:indexed_search/locallang.xml:mod_indexed_search_box', $_EXTKEY . 'box'));
5 6

  
6 7
t3lib_div::loadTCA('tt_content');
7 8
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY] = 'layout,select_key,pages';
9
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_box'] = 'layout,select_key,recursive';
10
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY] = 'pi_flexform';
11
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_box'] = 'pi_flexform';
12
t3lib_extMgm::addPiFlexFormValue($_EXTKEY ,'FILE:EXT:' . $_EXTKEY . '/flexform.xml');
13
t3lib_extMgm::addPiFlexFormValue($_EXTKEY. '_box' ,'FILE:EXT:' . $_EXTKEY . '/flexform_box.xml');
8 14

  
9 15
if (TYPO3_MODE=='BE')    {
10 16
	t3lib_extMgm::addModule('tools','isearch','after:log',t3lib_extMgm::extPath($_EXTKEY).'mod/');
typo3/sysext/indexed_search/flexform.xml (revision 0)
1
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
2
<T3DataStructure>
3
	<meta>
4
		<langDisable>1</langDisable>
5
	</meta>
6
	<sheets>
7
		<sVIEW>
8
			<ROOT>
9
				<TCEforms>
10
					<sheetTitle>LLL:EXT:indexed_search/locallang.xml:flexform_indexed_search.sheetTitle</sheetTitle>
11
				</TCEforms>
12
				<type>array</type>
13
				<el>
14
					<showForm>
15
						<TCEforms>
16
							<label>LLL:EXT:indexed_search/locallang.xml:flexform_indexed_search.showForm</label>
17
							<config>
18
								<type>check</type>
19
								<default>1</default>
20
							</config>
21
						</TCEforms>
22
					</showForm>
23
					<extendedForm>
24
						<TCEforms>
25
							<label>LLL:EXT:indexed_search/locallang.xml:flexform_indexed_search.extendedForm</label>
26
							<config>
27
								<type>check</type>
28
								<default>0</default>
29
							</config>
30
						</TCEforms>
31
					</extendedForm>
32
					<showRules>
33
						<TCEforms>
34
							<label>LLL:EXT:indexed_search/locallang.xml:flexform_indexed_search.showRules</label>
35
							<config>
36
								<type>check</type>
37
								<default>1</default>
38
							</config>
39
						</TCEforms>
40
					</showRules>
41
					<showResult>
42
						<TCEforms>
43
							<label>LLL:EXT:indexed_search/locallang.xml:flexform_indexed_search.showResults</label>
44
							<config>
45
								<type>check</type>
46
								<default>1</default>
47
							</config>
48
						</TCEforms>
49
					</showResult>
50
				</el>
51
			</ROOT>
52
		</sVIEW>
53
	</sheets>
54
</T3DataStructure>
typo3/sysext/indexed_search/hooks/class.tx_indexedsearch_tslib_fe_hook.php (working copy)
53 53
		}
54 54
	}
55 55
}
56
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/indexed_search/hooks/class.tx_indexedsearch_tslib_fe_hook.php'])    {
57
	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/indexed_search/hooks/class.tx_indexedsearch_tslib_fe_hook.php']);
58
}	
56 59
?>
typo3/sysext/indexed_search/flexform_box.xml (revision 0)
1
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
2
<T3DataStructure>
3
	<meta>
4
		<langDisable>1</langDisable>
5
	</meta>
6
	<sheets>
7
		<sVIEW>
8
			<ROOT>
9
				<TCEforms>
10
					<sheetTitle>Indexed Search Box settings</sheetTitle>
11
				</TCEforms>
12
				<type>array</type>
13
				<el>
14
					<extendedForm>
15
						<TCEforms>
16
							<label>Extended searchform</label>
17
							<config>
18
								<type>check</type>
19
							</config>
20
						</TCEforms>
21
					</extendedForm>
22
				</el>
23
			</ROOT>
24
		</sVIEW>
25
	</sheets>
26
</T3DataStructure>
typo3/sysext/indexed_search/locallang.xml (working copy)
6 6
	</meta>
7 7
	<data type="array">
8 8
		<languageKey index="default" type="array">
9
			<label index="mod_indexed_search">Indexed search</label>
10
			<label index="mod2_indexed_search">Indexed search statistics</label>
9
			<label index="mod_indexed_search">Indexed Search</label>
10
			<label index="mod_indexed_search_box">Searchbox for Indexed Search</label>
11
			<label index="mod2_indexed_search">Indexed Search statistics</label>
12
			<label index="flexform_indexed_search.sheetTitle">Indexed Search settings</label>
13
			<label index="flexform_indexed_search.showForm">Show searchform</label>
14
			<label index="flexform_indexed_search.extendedForm">Extended searchform</label>
15
			<label index="flexform_indexed_search.showRules">Show rules</label>
16
			<label index="flexform_indexed_search.showResults">Show results</label>
17
			<label index="flexform_indexed_search_box.sheetTitle">Searchbox settings</label>
18
			<label index="flexform_indexed_search_box.extendedForm">Extended searchform</label>
11 19
			<label index="ignoreExtensions">Extension %s was set to be ignored.</label>
12 20
			<label index="pdfToolsNotFound">PDF tools was not found in paths '%1$spdftotext' and/or '%1$spdfinfo'"</label>
13 21
			<label index="pdfToolsDisabled">PDF tools disabled</label>
typo3/sysext/indexed_search/ext_typoscript_setup.txt (working copy)
5 5
plugin.tx_indexedsearch {
6 6
	templateFile = EXT:indexed_search/pi/indexed_search.tmpl
7 7

  
8
	# what section should be displayed
9
	code = form,rules,results
10
	
11
	# if results should be outputted on a different page, define the pid for the result page here
12
	resultPid = 
13
	
8 14
	show {
15
		form = 1
9 16
		rules = 1
17
		results = 1
18
		results {
19
			resultList = 1
20
			resultBrowserTop = 1
21
			resultBrowserBottom = 1
22
		}
10 23
		parsetimes = 0
11 24
		L2sections = 0
12 25
		L1sections = 1
......
14 27
		clearSearchBox = 0
15 28
		clearSearchBox.enableSubSearchCheckBox = 0
16 29
		forbiddenRecords = 0
17
		alwaysShowPageLinks = 0
30
		# deprecated / not in use anymore
31
		# alwaysShowPageLinks = 0
18 32
		advancedSearchLink = 1
19 33
		resultNumber = 0
20 34
		mediaList =
......
39 53
	}
40 54
	sectionlinks_stdWrap {
41 55
	}
56
	linkSectionTitles = 1
42 57
	path_stdWrap {
43 58
	}
59
	# Display the searchword in results, like: Search for "searchword"
60
	whatIs_stdWrap {
61
		wrap = <div class="tx-indexedsearch-whatis">|</div>	
62
	}
63
	searchWord_stdWrap {
64
		wrap = <span class="tx-indexedsearch-sw">"|"</span>
65
	}
66
	markup_stdWrap {
67
		wrap = <strong class="tx-indexedsearch-redMarkup">|</strong>
68
	}
69
	listcontent_stdWrap {
70
		wrap = |
71
	}
72

  
73
	# Paging
74
	resultsPerPage = 10
75
	
76
	pageBrowser {
77
		doNotLinkCurrent = 1
78
		general_stdWrap {
79
			wrap = <ul class="browsebox">|</ul>
80
		}
81
		previous_stdWrap {
82
			wrap = <li>|</li>
83
		}
84
		next_stdWrap {
85
			wrap = <li>|</li>
86
		}
87
		pages_stdWrap {
88
			wrap = <li>|</li>
89
		}
90
		current_stdWrap {
91
			wrap = <li class="tx-indexedsearch-browselist-currentPage"><strong>|</strong></li>
92
		}
93
		pageLinks_stdWrap {
94
			preCObject = TEXT
95
			preCObject.data = LLL:EXT:indexed_search/pi/locallang.xml:pi_list_browseresults_page
96
			preCObject.noTrimWrap = | ||
97
		}
98
		makePointerLinksWithHref = 0
99
		makePointerLinksWithHref {
100
			ATagParams = class="tx-indexedsearch-pointerLink"
101
		}
102
		makePointerLinksWithForm = 0
103
		makePointerLinksWithForm {
104
			submit_params = class="tx-indexedsearch-pointerButton"
105
		}
106
	}
44 107
	search {
45 108
		rootPidList =
46 109
		page_links = 10
......
51 114
	}
52 115

  
53 116
	result_link_target =
117

  
118
	# various crop settings for single result items
119
	results {
120
		summaryCropAfter = 50
121
		summaryCropSignifier =
122
		titleCropAfter = 180
123
		titleCropSignifier = ...
124
		markupSW_summaryMax = 300
125
		markupSW_postPreLgd = 60
126
		markupSW_postPreLgd_offset = 5
127
		markupSW_divider =
128
	}
54 129
/*
55 130
	flagRendering = CASE
56 131
	flagRendering {
......
72 147
	}
73 148
*/
74 149
	forwardSearchWordsInResultLink = 0
150
	forwardSearchWordsInResultLink_no_cache = 1
75 151

  
76 152
	# Setting default values for piVars (please see the source code for the form-field names which you can preset values for here)
77 153
	_DEFAULT_PI_VARS {
......
106 182
	_LOCAL_LANG {
107 183
	}
108 184
}
185

  
186
plugin.tx_indexedsearchbox < plugin.tx_indexedsearch
187
plugin.tx_indexedsearchbox.code = form
typo3/sysext/indexed_search/class.doublemetaphone.php (working copy)
1024 1024
    return preg_match('/W|K|CZ|WITZ/', $string);
1025 1025
  }
1026 1026
} // end of class MetaPhone
1027

  
1028
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/indexed_search/class.doublemetaphone.php'])    {
1029
	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/indexed_search/class.doublemetaphone.php']);
1030
}
1027 1031
?>
typo3/sysext/indexed_search/ext_localconf.php (working copy)
2 2
if (!defined ('TYPO3_MODE')) 	die ('Access denied.');
3 3

  
4 4
t3lib_extMgm::addPItoST43($_EXTKEY);
5
t3lib_extMgm::addPItoST43($_EXTKEY . 'box');
5 6

  
6 7
t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
7 8
	tt_content.CSS_editor.ch.tx_indexedsearch = < plugin.tx_indexedsearch.CSS_editor
typo3/sysext/indexed_search/pi/indexed_search.tmpl (working copy)
212 212
<p><em>Template for the search result list.</em></p>
213 213

  
214 214
<!-- ###RESULT_OUTPUT### begin -->
215
	<div class="tx-indexedsearch-res">
215
	<div class="tx-indexedsearch-res###CSSCLASS_EVEN_ODD###">
216 216
		<table cellpadding="0" cellspacing="0" border="0" summary="Result row">
217 217
			<!-- ###HEADER_ROW### begin -->
218 218
			<tr>
......
254 254
<!-- ###RESULT_OUTPUT### end -->
255 255
<br /><br />
256 256

  
257
<h2>TEMPLATE_SEARCH_FORM_INVISIBLE</h2>
258
<p><em>Template for hidden search form used by page browser</em></p>
257 259

  
260
<!-- ###SEARCH_FORM_HIDDEN### begin -->
261
<div style="display:none">
262
	<form action="###ACTION_URL###" method="post" name="tx_indexedsearch">
263
		<input type="hidden" name="tx_indexedsearch[_sections]" value="0" />
264
		<input type="hidden" name="tx_indexedsearch[_freeIndexUid]" value="_" />
265
		<input type="hidden" name="tx_indexedsearch[pointer]" value="0" />
266
		<!-- ###HIDDEN_FIELDS### begin -->
267
		<input type="hidden" name="###HIDDEN_FIELDNAME###" value="###HIDDEN_VALUE###" />
268
		<!-- ###HIDDEN_FIELDS### end -->
269
	<form>
270
</div>
271
 <!-- ###SEARCH_FORM_HIDDEN### end -->
272
 
273
<!-- ###BROWSE_BOX_TOP### begin-->
274
<div class="tx-indexedsearch-browsebox">
275
<p>###RESULTCOUNT### ###ADDSTRING###</p>
276
###ADDPART###
277
<!-- ###BROWSE_LINKS### -->###PREVIOUS### ###PAGES### ###NEXT###<!-- ###BROWSE_LINKS### -->
278
</div>
279
<!-- ###BROWSE_BOX_TOP### end-->
280

  
281
<!-- ###BROWSE_BOX_BOTTOM### begin-->
282
<div class="tx-indexedsearch-browsebox"> 
283
<!-- ###BROWSE_LINKS### -->###PREVIOUS### ###PAGES### ###NEXT###<!-- ###BROWSE_LINKS### -->
284
</div>
285
<!-- ###BROWSE_BOX_BOTTOM### end-->
286

  
287

  
288

  
289
<h2>Search Results</h2>
290
<!-- ###SEARCH_RESULTS### begin--> 
291
###WHATIS###   
292
###PAGEBROWSER_TOP###
293
###RESULTS###
294
###PAGEBROWSER_BOTTOM###
295
<!-- ###SEARCH_RESULTS### end-->
296

  
297
<!-- ###SEARCH_NO_RESULTS### begin-->
298
<p ###CLASS###>###NO_RESULT_MESSAGE###</p>
299
<!-- ###SEARCH_NO_RESULTS### end-->
300

  
258 301
</body>
259 302
</html>
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php (working copy)
140 140
		// Internals:
141 141
	var $sWArr = array();			// Search Words and operators
142 142
	var $optValues = array();		// Selector box values for search configuration form
143
	var $firstRow = Array();		// Will hold the first row in result - used to calculate relative hit-ratings.
143
	var $firstRow = array();		// Will hold the first row in result - used to calculate relative hit-ratings.
144 144

  
145
	var $code = '';				// Given code for render
146

  
145 147
	var $cache_path = array();		// Caching of page path
146 148
	var $cache_rl = array();		// Caching of root line data
147 149
	var $fe_groups_required = array();	// Required fe_groups memberships for display of a result.
......
150 152
	var $resultSections = array();		// Page tree sections for search result.
151 153
	var $external_parsers = array();	// External parser objects
152 154
	var $iconFileNameCache = array();	// Storage of icons....
155
	var $pointerVars = array();		// contains piVars required for page browser links
153 156

  
154 157
	/**
155 158
	 * Lexer object
......
181 184
		$this->conf = $conf;
182 185
		$this->pi_loadLL();
183 186
		$this->pi_setPiVarDefaults();
187
		$this->pi_initPIflexForm();
184 188

  
185 189
			// Initialize the indexer-class - just to use a few function (for making hashes)
186 190
		$this->indexerObj = t3lib_div::makeInstance('tx_indexedsearch_indexer');
......
188 192
			// Initialize:
189 193
		$this->initialize();
190 194

  
191
			// Do search:
192
			// If there were any search words entered...
193
		if (is_array($this->sWArr))	{
194
			$content = $this->doSearch($this->sWArr);
195
			// Finally compile all the content, form, messages and results:
196
		$this->code = t3lib_div::trimExplode(',', $this->conf['code'], true);
197
		if (!is_array($this->code)) {
198
			return '';
195 199
		}
196 200

  
197
			// Finally compile all the content, form, messages and results:
198
		$content = $this->makeSearchForm($this->optValues).
199
			$this->printRules().
200
			$content;
201
		$content = '';
202
		foreach ($this->code as $code) {
203
			switch (t3lib_div::strtolower($code)) {
204
				case 'form':
205
						// if conf has only 'form' it's the plugin indexedsearch_box which needs the form all the time,
206
						// when code has more components, make it dependend from the setting 'showForm'
207
					if ($this->conf['code'] != 'form' && !$this->conf['show.']['form']) {
208
						break;
209
					}
210
					$content .= $this->makeSearchForm($this->optValues);
211
					break;
212
				case 'rules':
213
					if ($this->conf['show.']['rules']) {
214
						$content .= $this->printRules();
215
					}
216
					break;
217
				case 'results':
218
					if ($this->conf['show.']['results']) {
219
							// Do search, if there were any search words entered...
220
						if (is_array($this->sWArr)) {
221
							$content .= $this->doSearch($this->sWArr);
222
						}
223
					}
224
					break;
225
			}
226
		}
201 227

  
202
        return $this->pi_wrapInBaseClass($content);
203
    }
228
		return $this->pi_wrapInBaseClass($content);
229
	}
204 230

  
205 231
	/**
206 232
	 * Initialize internal variables, especially selector box values for the search form and search words
......
210 236
	function initialize()	{
211 237
		global $TYPO3_CONF_VARS;
212 238

  
239
			// use flexfom settings to overwrite conf
240
		if ($this->cObj->data['CType'] === 'list') {
241
				// it's a plugin using flexform (TS object won't have it)
242
			$this->piVars['ext'] = $this->piVars['ext'] ? $this->piVars['ext'] : $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'extendedForm', 'sVIEW') ? 1 : 0;
243
			$this->conf['show.']['form'] = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'showForm', 'sVIEW') ? 1 : 0;
244
			$this->conf['show.']['rules'] = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'showRules', 'sVIEW') ? 1 : 0;
245
			$this->conf['show.']['results'] = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'showResult', 'sVIEW') ? 1 : 0;
246
			if (intval($this->cObj->data['pages'])) {
247
				$this->conf['resultPid'] = intval($this->cObj->data['pages']);
248
			}
249
		}
250

  
251
		if (!isset($this->conf['resultPid'])) {
252
			$this->conf['resultPid'] = $GLOBALS['TSFE']->id;
253
		}
254

  
255
			// make sure that some cropping and markup constants used later are defined
256
		if (!is_array($this->conf['results.'])) {
257
			$this->conf['results.'] = array();
258
		}
259
		$this->conf['results.']['summaryCropAfter'] = t3lib_div::intInRange($this->conf['results.']['summaryCropAfter'], 10, 5000, 180);
260
		$this->conf['results.']['summaryCropSignifier'] = ($this->conf['results.']['summaryCropSignifier']) ? $this->conf['results.']['summaryCropSignifier'] : '';
261
		$this->conf['results.']['titleCropAfter'] = t3lib_div::intInRange($this->conf['results.']['titleCropAfter'], 10, 500, 50);
262
		$this->conf['results.']['titleCropSignifier'] = ($this->conf['results.']['titleCropSignifier']) ? $this->conf['results.']['titleCropSignifier'] : '...';
263
		$this->conf['results.']['markupSW_summaryMax'] = t3lib_div::intInRange($this->conf['results.']['markupSW_summaryMax'], 10, 5000, 300);
264
		$this->conf['results.']['markupSW_postPreLgd'] = t3lib_div::intInRange($this->conf['results.']['markupSW_postPreLgd'], 1, 500, 60);
265
		$this->conf['results.']['markupSW_postPreLgd_offset'] = t3lib_div::intInRange($this->conf['results.']['markupSW_postPreLgd_offset'], 1, 50, 5);
266
		$this->conf['results.']['markupSW_divider'] = ($this->conf['results.']['markupSW_divider']) ? $this->conf['results.']['markupSW_divider'] : ' ... ';
267

  
213 268
			// Initialize external document parsers for icon display and other soft operations
214 269
		if (is_array($TYPO3_CONF_VARS['EXTCONF']['indexed_search']['external_parsers']))	{
215 270
			foreach ($TYPO3_CONF_VARS['EXTCONF']['indexed_search']['external_parsers'] as $extension => $_objRef)	{
......
239 294
			$this->piVars['sword'] = trim($this->piVars['sword_prev']).' '.$this->piVars['sword'];
240 295
		}
241 296

  
242
		$this->piVars['results'] = t3lib_div::intInRange($this->piVars['results'],1,100000,$this->defaultResultNumber);
297
		$this->piVars['results'] = t3lib_div::intInRange($this->piVars['results'], 1, 100000, $this->conf['resultsPerPage']);
243 298

  
244 299
			// Selector-box values defined here:
245 300
		$this->optValues = Array(
......
663 718
	 * @return	string		HTML content to display result.
664 719
	 */
665 720
	function getDisplayResults($sWArr, $resData, $freeIndexUid=-1)	{
721

  
722
		$markerArray = array();
723
		$html_results = $this->cObj->getSubpart($this->templateCode, '###SEARCH_RESULTS###');
724
		$html_no_results = $this->cObj->getSubpart($this->templateCode, '###SEARCH_NO_RESULTS###');
725

  
726
			// Print a message telling which words we searched for, and in which sections etc.
727
		$what = $this->tellUsWhatIsSeachedFor($sWArr) .
728
				(substr($this->piVars['sections'], 0, 2) == 'rl' ? ' ' . $this->pi_getLL('inSection', '', 1) . ' "' .
729
				 substr($this->getPathFromPageId(substr($this->piVars['sections'], 4)), 1) . '"' : '');
730
		$markerArray['###WHATIS###'] = $this->cObj->stdWrap($what, $this->conf['whatis_stdWrap.']);
731
		$markerArray['###SEARCH_FOR###'] = $this->tellUsWhatIsSeachedFor($sWArr);
732

  
666 733
			// Perform display of result rows array:
667 734
		if ($resData)	{
668 735
			$GLOBALS['TT']->push('Display Final result');
736
			if ($resData['count'])	{
669 737

  
670
				// Set first selected row (for calculation of ranking later)
671
			$this->firstRow = $resData['firstRow'];
738
					// Set first selected row (for calculation of ranking later)
739
				$this->firstRow = $resData['firstRow'];
672 740

  
673
				// Result display here:
674
			$rowcontent = '';
675
			$rowcontent.= $this->compileResult($resData['resultRows'], $freeIndexUid);
741
					// Result display here:
742
				$markerArray['###RESULTS###'] = ($this->conf['show.']['results.']['resultList']) ? $this->compileResult($resData['resultRows'], $freeIndexUid) : '';
676 743

  
677
				// Browsing box:
678
			if ($resData['count'])	{
744
					// Browsing boxes top and bottom:
679 745
				$this->internal['res_count'] = $resData['count'];
680 746
				$this->internal['results_at_a_time'] = $this->piVars['results'];
681 747
				$this->internal['maxPages'] = t3lib_div::intInRange($this->conf['search.']['page_links'],1,100,10);
682
				$addString = ($resData['count']&&$this->piVars['group']=='sections'&&$freeIndexUid<=0 ? ' '.sprintf($this->pi_getLL(count($this->resultSections)>1?'inNsections':'inNsection'),count($this->resultSections)):'');
683
				$browseBox1 = $this->pi_list_browseresults(1,$addString,$this->printResultSectionLinks(),$freeIndexUid);
684
				$browseBox2 = $this->pi_list_browseresults(0,'','',$freeIndexUid);
685
			}
686

  
687
				// Browsing nav, bottom.
688
			if ($resData['count'])	{
689
				$content = $browseBox1.$rowcontent.$browseBox2;
748
				$addString = ($resData['count'] && $this->piVars['group'] == 'sections' && $freeIndexUid <= 0 ? ' ' .
749
					sprintf($this->pi_getLL(count($this->resultSections) > 1 ? 'inNsections' : 'inNsection'),
750
					count($this->resultSections)) : '');
751
				$markerArray['###PAGEBROWSER_TOP###'] = ($this->conf['show.']['results.']['resultBrowserTop']) ? $this->pi_list_browseresults(1, $addString, $this->printResultSectionLinks(), $freeIndexUid) : '';
752
				$markerArray['###PAGEBROWSER_BOTTOM###'] = ($this->conf['show.']['results.']['resultBrowserBottom']) ? $this->pi_list_browseresults(0, '', '', $freeIndexUid) : '';
753
				$content = $this->cObj->substituteMarkerArrayCached($html_results, $markerArray, array(), array());
690 754
			} else {
691
				$content = '<p'.$this->pi_classParam('noresults').'>'.$this->pi_getLL('noResults','',1).'</p>';
755
				$markerArray['###CLASS###'] = $this->pi_classParam('noresults');
756
				$markerArray['###NO_RESULT_MESSAGE###'] = $this->pi_getLL('noResults', '', 1);
757
				$content = $this->cObj->substituteMarkerArrayCached($html_no_results, $markerArray, array(), array());
692 758
			}
693

  
694 759
			$GLOBALS['TT']->pull();
695 760
		} else {
696
			$content.='<p'.$this->pi_classParam('noresults').'>'.$this->pi_getLL('noResults','',1).'</p>';
761
			$markerArray['###CLASS###'] = $this->pi_classParam('noresults');
762
			$markerArray['###NO_RESULT_MESSAGE###'] = $this->pi_getLL('noResults', '', 1);
763
			$content = $this->cObj->substituteMarkerArrayCached($html_no_results, $markerArray, array(), array());
697 764
		}
698 765

  
699
			// Print a message telling which words we searched for, and in which sections etc.
700
		$what = $this->tellUsWhatIsSeachedFor($sWArr).
701
				(substr($this->piVars['sections'],0,2)=='rl'?' '.$this->pi_getLL('inSection','',1).' "'.substr($this->getPathFromPageId(substr($this->piVars['sections'],4)),1).'"':'');
702
		$what = '<div'.$this->pi_classParam('whatis').'>'.$this->cObj->stdWrap($what, $this->conf['whatis_stdWrap.']).'</div>';
703
		$content = $what.$content;
704

  
705 766
			// Return content:
706 767
		return $content;
707 768
	}
......
739 800
		}
740 801
		$resultRows = $newResultRows;
741 802
		$this->resultSections = array();
742

  
803
		$GLOBALS['TSFE']->register['indexed_search_RESULTCOUNT'] = 0;
743 804
		if ($freeIndexUid<=0)	{
744 805
			switch($this->piVars['group'])	{
745 806
				case 'sections':
......
763 824

  
764 825
						if (!trim($sectionName))	{
765 826
							$sectionTitleLinked = $this->pi_getLL('unnamedSection','',1).':';
827
						} elseif ($this->conf['linkSectionTitles']) {
828
							$onclick = 'document.' . $this->prefixId . '[\'' . $this->prefixId . '[_sections]\'].value=\'' . $theRLid . '\';document.' . $this->prefixId . '.submit();return false;';
829
							$sectionTitleLinked = '<a href="#" onclick="' . htmlspecialchars($onclick) . '">' . htmlspecialchars($sectionName) . ':</a>';
766 830
						} else {
767
							$onclick = 'document.'.$this->prefixId.'[\''.$this->prefixId.'[_sections]\'].value=\''.$theRLid.'\';document.'.$this->prefixId.'.submit();return false;';
768
							$sectionTitleLinked = '<a href="#" onclick="'.htmlspecialchars($onclick).'">'.htmlspecialchars($sectionName).':</a>';
831
							$sectionTitleLinked = htmlspecialchars($sectionName);
769 832
						}
770 833
						$this->resultSections[$id] = array($sectionName,count($resultRows));
771 834

  
......
773 836
						$content.= $this->makeSectionHeader($id,$sectionTitleLinked,count($resultRows));
774 837

  
775 838
							// Render result rows:
776
						foreach ($resultRows as $row)	{
777
							$content.= $this->printResultRow($row);
839
						$listcontent = '';
840
						$GLOBALS['TSFE']->register['indexed_search_RESULTCOUNT'] = 0;
841
						foreach ($resultRows as $row) {
842
							$GLOBALS['TSFE']->register['indexed_search_RESULTCOUNT']++;
843
							$listcontent .= $this->printResultRow($row);
778 844
						}
845
						$content .= $this->cObj->stdWrap($listcontent, $this->conf['listcontent_stdWrap.']);
779 846
					}
780 847
				break;
781 848
				default:	// flat:
782
					foreach ($resultRows as $row)	{
783
						$content.= $this->printResultRow($row);
849
					$listcontent = '';
850
					foreach ($resultRows as $row) {
851
						$GLOBALS['TSFE']->register['indexed_search_RESULTCOUNT']++;
852
						$listcontent .= $this->printResultRow($row);
784 853
					}
854
					$content .= $this->cObj->stdWrap($listcontent, $this->conf['listcontent_stdWrap.']);
785 855
				break;
786 856
			}
787 857
		} else {
788
			foreach ($resultRows as $row)	{
789
				$content.= $this->printResultRow($row);
858
			$listcontent = '';
859
			foreach ($resultRows as $row) {
860
				$GLOBALS['TSFE']->register['indexed_search_RESULTCOUNT']++;
861
				$listcontent .= $this->printResultRow($row);
790 862
			}
863
			$content .= $this->cObj->stdWrap($listcontent, $this->conf['listcontent_stdWrap.']);
791 864
		}
792

  
793 865
		return '<div'.$this->pi_classParam('res').'>'.$content.'</div>';
794 866
	}
795 867

  
......
1341 1413
			$html = $this->cObj->substituteSubpart($html, '###ADDITONAL_KEYWORD###', '');
1342 1414
		}
1343 1415

  
1344
		$markerArray['###ACTION_URL###'] = htmlspecialchars($this->pi_getPageLink($GLOBALS['TSFE']->id, $GLOBALS['TSFE']->sPre));
1416
		$markerArray['###ACTION_URL###'] = htmlspecialchars($this->pi_getPageLink($this->conf['resultPid'], $GLOBALS['TSFE']->sPre));
1345 1417

  
1346 1418
		$hiddenFieldCode = $this->cObj->getSubpart($this->templateCode, '###HIDDEN_FIELDS###');
1347 1419
		$hiddenFieldCode = preg_replace('/^\n\t(.+)/ms', '$1', $hiddenFieldCode);		// Remove first newline and tab (cosmetical issue)
......
1460 1532
			// Write all hidden fields
1461 1533
		$html = $this->cObj->substituteSubpart($html, '###HIDDEN_FIELDS###', implode('',$hiddenFieldArr));
1462 1534

  
1463
		$substitutedContent = $this->cObj->substituteMarkerArrayCached($html, $markerArray, array(), array());
1535
		return $this->cObj->substituteMarkerArrayCached($html, $markerArray, array(), array());
1536
	}
1464 1537

  
1465
		return $substitutedContent;
1538
	/**
1539
	 * Make hidden search form HTML. This form is needed when page browser is displayed.
1540
	 *
1541
	 * @param	array		Value/Labels pairs for search form selector boxes.
1542
	 * @return	string		Search form HTML
1543
	 */
1544
	function makeHiddenSearchForm($optValues) {
1545
		$html = $this->cObj->getSubpart($this->templateCode, '###SEARCH_FORM_HIDDEN###');
1546
		$markerArray['###ACTION_URL###'] = htmlspecialchars($this->pi_getPageLink($this->conf['resultPid'], $GLOBALS['TSFE']->sPre));
1547
		$hiddenFieldCode = $this->cObj->getSubpart($this->templateCode, '###HIDDEN_FIELDS###');
1548
		$hiddenFieldCode = preg_replace('/^\n\t(.+)/ms', '$1', $hiddenFieldCode);		// Remove first newline and tab (cosmetical issue)
1549
		$hiddenFieldArr = array();
1550

  
1551
			// put search params to hidden fields
1552
		$hiddenFieldList = $this->hiddenFieldList . ',sword';
1553
		foreach (t3lib_div::trimExplode(',', $hiddenFieldList) as $fieldName) {
1554
			$hiddenFieldMarkerArray = array();
1555
			$hiddenFieldMarkerArray['###HIDDEN_FIELDNAME###'] = $this->prefixId . '[' . $fieldName . ']';
1556
			$hiddenFieldMarkerArray['###HIDDEN_VALUE###'] = htmlspecialchars((string)$this->piVars[$fieldName]);
1557
			$hiddenFieldArr[$fieldName] = $this->cObj->substituteMarkerArrayCached($hiddenFieldCode, $hiddenFieldMarkerArray, array(), array());
1558
		}
1559

  
1560
			// Write all hidden fields
1561
		$html = $this->cObj->substituteSubpart($html, '###HIDDEN_FIELDS###', implode('', $hiddenFieldArr));
1562
		return $this->cObj->substituteMarkerArrayCached($html, $markerArray, array(), array());
1466 1563
	}
1467 1564

  
1468 1565
	/**
......
1602 1699
			$markerArray['###TEXT_ITEM_MTIME###'] = $this->pi_getLL('res_modified','',1);
1603 1700
			$markerArray['###TEXT_ITEM_PATH###'] = $this->pi_getLL('res_path','',1);
1604 1701

  
1702
				// even odd css class marker
1703
                        $markerArray['###CSSCLASS_EVEN_ODD###'] = ($GLOBALS['TSFE']->register['indexed_search_RESULTCOUNT'] % 2) ?
1704
				' tx-indexedsearch-oddrow' :
1705
				' tx-indexedsearch-evenrow';
1706

  
1605 1707
			$html = $this->cObj->substituteMarkerArrayCached($html, $markerArray, array(), array());
1606 1708

  
1607 1709
				// If there are subrows (eg. subpages in a PDF-file or if a duplicate page is selected due to user-login (phash_grouping))
......
1634 1736
	 * @param	string		List of integers pointing to free indexing configurations to search. -1 represents no filtering, 0 represents TYPO3 pages only, any number above zero is a uid of an indexing configuration!
1635 1737
	 * @return	string		HTML output
1636 1738
	 */
1637
	function pi_list_browseresults($showResultCount=1,$addString='',$addPart='',$freeIndexUid=-1)	{
1739
	function pi_list_browseresults($renderTopBrowseBox=1, $addString='', $addPart='', $freeIndexUid=-1)	{
1638 1740

  
1741
		$markerArray = $subpartArray = array();
1742
		$html = $this->cObj->getSubpart($this->templateCode, '###BROWSE_BOX_' . ($renderTopBrowseBox ? 'TOP' : 'BOTTOM') . '###');
1743
		$browseLinks = $this->cObj->getSubpart($html, '###BROWSE_LINKS###');
1744

  
1639 1745
			// Initializing variables:
1640 1746
		$pointer=$this->piVars['pointer'];
1641 1747
		$count=$this->internal['res_count'];
......
1643 1749
		$maxPages = t3lib_div::intInRange($this->internal['maxPages'],1,100);
1644 1750
		$pageCount = ceil($count/$results_at_a_time);
1645 1751
		$sTables = '';
1752
		$markerArray['###HIDDENFORM###'] = '';
1646 1753

  
1647 1754
		if ($pageCount > 1)	{	// only show the result browser if more than one page is needed
1755
				// look if form is present, if not display a hidden form
1756
			$markerArray['###HIDDENFORM###'] = (in_array('form', $this->code) && $this->conf['show.']['form']) ? '' : $this->makeHiddenSearchForm($this->optValues);
1648 1757
			$pointer=intval($pointer);
1649
			$links=array();
1650 1758

  
1651 1759
				// Make browse-table/links:
1652 1760
			if ($pointer>0)	{	// all pages after the 1st one
1653
				$links[]='<li>'.$this->makePointerSelector_link($this->pi_getLL('pi_list_browseresults_prev','< Previous',1),$pointer-1,$freeIndexUid).'</li>';
1761
				$markerArray['###PREVIOUS###'] = $this->cObj->stdWrap($this->makePointerSelector_link($this->pi_getLL('pi_list_browseresults_prev', '< Previous', 1), $pointer - 1, $freeIndexUid), $this->conf['pageBrowser.']['previous_stdWrap.']);
1762
			} else {
1763
				$markerArray['###PREVIOUS###'] = '';
1654 1764
			}
1655

  
1765
			$markerArray['###PAGES###'] = '';
1656 1766
			for($a=0;$a<$pageCount;$a++)	{
1657 1767
				$min = max(0, $pointer+1-ceil($maxPages/2));
1658 1768
				$max = $min+$maxPages;
......
1660 1770
					$min = $min - ($max-$pageCount);
1661 1771
				}
1662 1772

  
1773
				$linkText = $this->cObj->stdWrap($a+1, $this->conf['pageBrowser.']['pageLinks_stdWrap.']);
1663 1774
				if($a >= $min && $a < $max)	{
1664
					if($a==$pointer)	{
1665
						$links[]='<li'.$this->pi_classParam('browselist-currentPage').'><strong>'.$this->makePointerSelector_link(trim($this->pi_getLL('pi_list_browseresults_page','Page',1).' '.($a+1)),$a,$freeIndexUid).'</strong></li>';
1775
					if($a == $pointer) {
1776
							// current page
1777
						$markerArray['###PAGES###'] .= $this->cObj->stdWrap($this->conf['pageBrowser.']['doNotLinkCurrent'] ? $linkText : $this->makePointerSelector_link($linkText, $a, $freeIndexUid), $this->conf['pageBrowser.']['current_stdWrap.']);
1666 1778
					} else {
1667
						$links[]='<li>'.$this->makePointerSelector_link(trim($this->pi_getLL('pi_list_browseresults_page','Page',1).' '.($a+1)),$a,$freeIndexUid).'</li>';
1779
						$markerArray['###PAGES###'] .= $this->cObj->stdWrap($this->makePointerSelector_link($linkText, $a, $freeIndexUid), $this->conf['pageBrowser.']['pages_stdWrap.']);
1668 1780
					}
1669 1781
				}
1670 1782
			}
1671 1783
			if ($pointer+1 < $pageCount)	{
1672
				$links[]='<li>'.$this->makePointerSelector_link($this->pi_getLL('pi_list_browseresults_next','Next >',1),$pointer+1,$freeIndexUid).'</li>';
1784
				$markerArray['###NEXT###'] = $this->cObj->stdWrap($this->makePointerSelector_link($this->pi_getLL('pi_list_browseresults_next', 'Next >', 1), $pointer + 1, $freeIndexUid), $this->conf['pageBrowser.']['next_stdWrap.']);
1785
			} else {
1786
				$markerArray['###NEXT###'] = '';
1673 1787
			}
1788
			$subpartArray['###BROWSE_LINKS###'] = $this->cObj->stdWrap($this->cObj->substituteMarkerArrayCached($browseLinks, $markerArray, array(), array()), $this->conf['pageBrowser.']['general_stdWrap.']);
1789
		} else {
1790
			$subpartArray['###BROWSE_LINKS###'] = '';
1674 1791
		}
1675 1792

  
1676 1793
		$pR1 = $pointer*$results_at_a_time+1;
1677 1794
		$pR2 = $pointer*$results_at_a_time+$results_at_a_time;
1678
		if(is_array($links))	{
1679
			$addPart .= '
1680
		<ul class="browsebox">
1681
			'.implode('',$links).'
1682
		</ul>';
1683
		}
1684 1795

  
1685 1796
		$label = $this->pi_getLL('pi_list_browseresults_display','Displaying results ###TAG_BEGIN###%s to %s###TAG_END### out of ###TAG_BEGIN###%s###TAG_END###');
1686 1797
		$label = str_replace('###TAG_BEGIN###','<strong>',$label);
1687 1798
		$label = str_replace('###TAG_END###','</strong>',$label);
1688 1799

  
1689
		$sTables = '<div'.$this->pi_classParam('browsebox').'>'.
1690
			($showResultCount ? '<p>'.sprintf(
1691
				$label,
1692
				$pR1,
1693
				min(array($this->internal['res_count'],$pR2)),
1694
				$this->internal['res_count']
1695
				).$addString.'</p>':''
1696
			).$addPart.'</div>';
1800
		$markerArray['###RESULTCOUNT###'] = sprintf(
1801
			$label,
1802
			$pR1,
1803
			min(array($this->internal['res_count'], $pR2)),
1804
			$this->internal['res_count']
1805
		);
1806
		$markerArray['###ADDSTRING###'] = $addString;
1807
		$markerArray['###ADDPART###'] = $addPart;
1697 1808

  
1698
		return $sTables;
1809
		return $this->cObj->substituteMarkerArrayCached($html, $markerArray, $subpartArray, array());
1699 1810
	}
1700 1811

  
1701 1812

  
......
1741 1852

  
1742 1853
				// Prepare search words for markup in content:
1743 1854
			if ($this->conf['forwardSearchWordsInResultLink'])	{
1744
				$markUpSwParams = array('no_cache' => 1);
1855
				if ($this->conf['forwardSearchWordsInResultLink_no_cache']) {
1856
					$markUpSwParams = array('no_cache' => 1);
1857
				}
1745 1858
				foreach ($this->sWArr as $d)	{
1746 1859
					$markUpSwParams['sword_list'][] = $d['sword'];
1747 1860
				}
......
1756 1869
		$tmplContent['result_number'] = $this->conf['show.']['resultNumber'] ? $row['result_number'].': ' : '&nbsp;';
1757 1870
		$tmplContent['icon'] = $this->makeItemTypeIcon($row['item_type'],'',$specRowConf);
1758 1871
		$tmplContent['rating'] = $this->makeRating($row);
1759
		$tmplContent['description'] = $this->makeDescription($row,$this->piVars['extResume'] && !$headerOnly?0:1);
1872
		$tmplContent['description'] = $this->makeDescription(
1873
			$row,
1874
			($this->piVars['extResume'] && !$headerOnly) ? false : true,
1875
			$this->conf['results.']['summaryCropAfter']
1876
		);
1760 1877
		$tmplContent = $this->makeInfo($row,$tmplContent);
1761 1878
		$tmplContent['access'] = $this->makeAccessIndication($row['page_id']);
1762 1879
		$tmplContent['language'] = $this->makeLanguageIndication($row);
......
1787 1904
			if ($c)	{
1788 1905
				switch($v['oper'])	{
1789 1906
					case 'OR':
1790
						$searchingFor.= ' '.$this->pi_getLL('searchFor_or','',1).' '.$this->wrapSW($this->utf8_to_currentCharset($v['sword']));
1907
						$searchingFor .= ' ' . $this->pi_getLL('searchFor_or', '', 1) . ' ' . $this->cObj->stdWrap($this->utf8_to_currentCharset($v['sword']), $this->conf['searchWord_stdWrap.']);
1791 1908
					break;
1792 1909
					case 'AND NOT':
1793
						$searchingFor.= ' '.$this->pi_getLL('searchFor_butNot','',1).' '.$this->wrapSW($this->utf8_to_currentCharset($v['sword']));
1910
						$searchingFor .= ' ' . $this->pi_getLL('searchFor_butNot', '', 1) . ' ' . $this->cObj->stdWrap($this->utf8_to_currentCharset($v['sword']), $this->conf['searchWord_stdWrap.']);
1794 1911
					break;
1795 1912
					default:	// AND...
1796
						$searchingFor.= ' '.$this->pi_getLL('searchFor_and','',1).' '.$this->wrapSW($this->utf8_to_currentCharset($v['sword']));
1913
						$searchingFor .= ' ' . $this->pi_getLL('searchFor_and', '', 1) . ' ' . $this->cObj->stdWrap($this->utf8_to_currentCharset($v['sword']), $this->conf['searchWord_stdWrap.']);
1797 1914
					break;
1798 1915
				}
1799 1916
			} else {
1800
				$searchingFor = $this->pi_getLL('searchFor','',1).' '.$this->wrapSW($this->utf8_to_currentCharset($v['sword']));
1917
				$searchingFor = $this->pi_getLL('searchFor','',1).' '.$this->cObj->stdWrap($this->utf8_to_currentCharset($v['sword']), $this->conf['searchWord_stdWrap.']);
1801 1918
			}
1802 1919
			$c++;
1803 1920
		}
......
1805 1922
	}
1806 1923

  
1807 1924
	/**
1808
	 * Wraps the search words in the search-word list display (from ->tellUsWhatIsSeachedFor())
1809
	 *
1810
	 * @param	string		search word to wrap (in local charset!)
1811
	 * @return	string		Search word wrapped in <span> tag.
1812
	 */
1813
	function wrapSW($str)	{
1814
		return '"<span'.$this->pi_classParam('sw').'>'.htmlspecialchars($str).'</span>"';
1815
	}
1816

  
1817
	/**
1818 1925
	 * Makes a selector box
1819 1926
	 *
1820 1927
	 * @param	string		Name of selector box
......
1844 1951
	 * @param	string		String to wrap in <a> tag
1845 1952
	 * @param	integer		Pointer value
1846 1953
	 * @param	string		List of integers pointing to free indexing configurations to search. -1 represents no filtering, 0 represents TYPO3 pages only, any number above zero is a uid of an indexing configuration!
1847
	 * @return	string		Input string wrapped in <a> tag with onclick event attribute set.
1954
	 * @return	string		Input string wrapped in <a> tag with onclick event attribute set (default) or a normal hyperlink (browseLinks_setUrl) or a submit button with hidden form (browseLinks_useForms).
1848 1955
	 */
1849
	function makePointerSelector_link($str,$p,$freeIndexUid)	{
1850
		$onclick = 'document.'.$this->prefixId.'[\''.$this->prefixId.'[pointer]\'].value=\''.$p.'\';'.
1851
					'document.'.$this->prefixId.'[\''.$this->prefixId.'[_freeIndexUid]\'].value=\''.rawurlencode($freeIndexUid).'\';'.
1852
					'document.'.$this->prefixId.'.submit();return false;';
1853
		return '<a href="#" onclick="'.htmlspecialchars($onclick).'">'.$str.'</a>';
1956
	function makePointerSelector_link($pointerText, $pointer, $freeIndexUid) {
1957
		$pointerSelector_link = '';
1958

  
1959
		if ($this->conf['pageBrowser.']['makePointerLinksWithHref']) {
1960
				// pointerSelector_link is a normal hyperlink (no JavaScript required)
1961
			if (!$this->pointerVars) {
1962
					// create pointerVars only once, which need to be transferred as GET parameters of the URL
1963
				$this->pointerVars = $this->piVars;
1964
				unset($this->pointerVars['submit_button']);
1965
				unset($this->pointerVars['pointer']);
1966
				unset($this->pointerVars['_freeIndexUid']);
1967

  
1968
					// only use non-default values for generating URLs as short as possible without losing user input
1969
				foreach ($this->pointerVars as $paramKey => $value) {
1970
					if (
1971
						(is_array($this->optValues[$paramKey]) && $this->piVars[$paramKey] == (string) array_shift(array_keys($this->optValues[$paramKey]))) ||
1972
						(isset($this->conf['_DEFAULT_PI_VARS.'][$paramKey]) && $this->conf['_DEFAULT_PI_VARS'][$paramKey] == $value)
1973
					) {
1974
						unset($this->pointerVars[$paramKey]);
1975
					}
1976
				}
1977
			}
1978
			$this->pointerVars['pointer'] = $pointer;
1979
			$this->pointerVars['_freeIndexUid'] = $freeIndexUid;
1980
			$linkArray = array (
1981
				'parameter' => $GLOBALS['TSFE']->id,
1982
				'additionalParams' => t3lib_div::implodeArrayForUrl($this->prefixId, $this->pointerVars)
1983
			);
1984
			$linkArray = array_merge((array) $this->conf['pageBrowser.']['makePointerLinksWithHref.'], $linkArray);
1985
			$pointerSelector_link = $this->cObj->typolink($pointerText, $linkArray);
1986

  
1987
		} elseif ($this->conf['pageBrowser.']['makePointerLinksWithForm']) {
1988
				// pointerSelector_link is a submit button of a pointer form (no JavaScript required; URL will stay "clean" after submission)
1989
			$blindPointerForm = '';
1990
			foreach ($this->piVars as $paramKey => $value) {
1991
				if ($paramKey != 'pointer' && $paramKey != '_freeIndexUid') {
1992
					$blindPointerForm  .= '<input type="hidden" name="' . $this->prefixId . '[' . $paramKey . ']" value="' . $value . '" />';
1993
				}
1994
			}
1995
			$blindPointerForm .= '<input type="hidden" name="' . $this->prefixId . '[pointer]" value=' . $pointer . '" />';
1996
			$blindPointerForm .= '<input type="hidden" name="' . $this->prefixId . '[_freeIndexUid]" value=' . $freeIndexUid . '" />';
1997
			$pointerSelector_link = '<form method="post" class="tx-indexedsearch-browseresults-form" ' .
1998
				' action="' . $this->cObj->getTypoLink_URL($GLOBALS['TSFE']->id, array(), '_self') . '">' .
1999
				'<div style="display:none;">' . $blindPointerForm . '</div>' .
2000
				'<input type="submit" value="' . $pointerText . '" title="' . $pointerText . '"' .
2001
					($this->conf['pageBrowser.']['makePointerLinksWithForm.']['submit_params'] ? ' ' . $this->conf['pageBrowser.']['makePointerLinksWithForm.']['submit_params'] : '') .
2002
				' />' .
2003
			'</form>';
2004
		} else {
2005
				// pointerSelector_link is a JavaScript onclick event (the default way)
2006
			$onclick = 'document.' . $this->prefixId . '[\'' . $this->prefixId . '[pointer]\'].value=\'' . $pointer . '\';' .
2007
				'document.' . $this->prefixId . '[\'' . $this->prefixId . '[_freeIndexUid]\'].value=\'' . rawurlencode($freeIndexUid) . '\';' .
2008
				'document.' . $this->prefixId . '.submit();return false;';
2009
			$pointerSelector_link = '<a href="#" onclick="' . htmlspecialchars($onclick) . '">' . $pointerText . '</a>';
2010
		}
2011
		return $pointerSelector_link;
1854 2012
	}
1855 2013

  
1856 2014
	/**
......
1961 2119
			}
1962 2120

  
1963 2121
			if (!trim($markedSW))	{
1964
				$outputStr = $GLOBALS['TSFE']->csConvObj->crop('utf-8',$row['item_description'],$lgd);
2122
				$outputStr = $GLOBALS['TSFE']->csConvObj->crop('utf-8', $row['item_description'], $lgd, $this->conf['results.']['summaryCropSignifier']);
1965 2123
				$outputStr = htmlspecialchars($outputStr);
1966 2124
			}
1967 2125
			$output = $this->utf8_to_currentCharset($outputStr ? $outputStr : $markedSW);
......
1995 2153
		$parts = preg_split('/'.$regExString.'/i', ' '.$str.' ', 20000, PREG_SPLIT_DELIM_CAPTURE);
1996 2154
// debug($parts,$regExString);
1997 2155
			// Constants:
1998
		$summaryMax = 300;
1999
		$postPreLgd = 60;
2000
		$postPreLgd_offset = 5;
2001
		$divider = ' ... ';
2156
		$summaryMax = $this->conf['results.']['markupSW_summaryMax'];
2157
		$postPreLgd = $this->conf['results.']['markupSW_postPreLgd'];
2158
		$postPreLgd_offset = $this->conf['results.']['markupSW_postPreLgd_offset'];
2159
		$divider = $this->conf['results.']['markupSW_divider'];
2002 2160

  
2003 2161
		$occurencies = (count($parts)-1)/2;
2004 2162
		if ($occurencies)	{
......
2044 2202
				}
2045 2203
			} else {
2046 2204
				$summaryLgd+= $GLOBALS['TSFE']->csConvObj->strlen('utf-8',$strP);
2047
				$output[$k] = '<strong class="tx-indexedsearch-redMarkup">'.htmlspecialchars($parts[$k]).'</strong>';
2205
				$output[$k] = $this->cObj->stdWrap(htmlspecialchars($parts[$k]), $this->conf['markup_stdWrap.']);
2048 2206
			}
2049 2207
		}
2050 2208

  
......
2070 2228
			} else $add=', '.$this->pi_getLL('word_page').' '.$pp[0];
2071 2229
		}
2072 2230

  
2073
		$outputString = $GLOBALS['TSFE']->csConvObj->crop('utf-8',$row['item_title'],50,'...');
2231
		$outputString = $GLOBALS['TSFE']->csConvObj->crop('utf-8', $row['item_title'], $this->conf['results.']['titleCropAfter'], $this->conf['results.']['titleCropSignifier']);
2074 2232

  
2075 2233
		return $this->utf8_to_currentCharset($outputString).$add;
2076 2234
	}
......
2382 2540
	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/indexed_search/pi/class.tx_indexedsearch.php']);
2383 2541
}
2384 2542

  
2385
?>
2543
?>
typo3/sysext/indexed_search/pi/template_css.tmpl (working copy)
122 122
<br /><br />
123 123

  
124 124

  
125
<h2>TEMPLATE_SEARCH_FORM_INVISIBLE</h2>
126
<p><em>Template for hidden search form used by page browser</em></p>
125 127

  
128
<!-- ###SEARCH_FORM_HIDDEN### begin -->
129
<div style="display:none">
130
	<form action="###ACTION_URL###" method="post" name="tx_indexedsearch">
131
		<input type="hidden" name="tx_indexedsearch[_sections]" value="0" />
132
		<input type="hidden" name="tx_indexedsearch[_freeIndexUid]" value="_" />
133
		<input type="hidden" name="tx_indexedsearch[pointer]" value="0" />
134
		<!-- ###HIDDEN_FIELDS### begin -->
135
		<input type="hidden" name="###HIDDEN_FIELDNAME###" value="###HIDDEN_VALUE###" />
136
		<!-- ###HIDDEN_FIELDS### end -->
137
	<form>
138
</div>
139
 <!-- ###SEARCH_FORM_HIDDEN### end -->
140
<br /><br />
126 141

  
127 142
<h2>TEMPLATE_RULES</h2>
128 143
<p><em>Template for displaying the search rules.</em></p>
......
168 183
<br /><br />
169 184

  
170 185

  
186
<h2>Browsebox for the top</h2>
187
<!-- ###BROWSE_BOX_TOP### begin-->
188
###HIDDENFORM###
189
<div class="tx-indexedsearch-browsebox">
190
<p>###RESULTCOUNT### ###ADDSTRING###</p>
191
###ADDPART###
192
<!-- ###BROWSE_LINKS### -->###PREVIOUS### ###PAGES### ###NEXT###<!-- ###BROWSE_LINKS### -->
193
</div>
194
<!-- ###BROWSE_BOX_TOP### end-->
171 195

  
196
<h2>Browsebox for the bottom</h2>
197
<!-- ###BROWSE_BOX_BOTTOM### begin-->
198
<div class="tx-indexedsearch-browsebox"> 
199
<!-- ###BROWSE_LINKS### -->###PREVIOUS### ###PAGES### ###NEXT###<!-- ###BROWSE_LINKS### -->
200
</div>
201
<!-- ###BROWSE_BOX_BOTTOM### end-->
172 202

  
203

  
204

  
173 205
<h2>TEMPLATE_RESULT_OUTPUT</h2>
174 206
<p><em>Template for the search result list.</em></p>
175 207
<!-- ###RESULT_OUTPUT### begin -->
176
	<div class="tx-indexedsearch-res res res-tmpl-css">
208
	<div class="tx-indexedsearch-res res res-tmpl-css###CSSCLASS_EVEN_ODD###">
177 209
		<!-- ###HEADER_ROW### begin -->
178 210
		<h3><span class="tx-indexedsearch-icon icon">###ICON###</span> <span class="tx-indexedsearch-result-number result-number">###RESULT_NUMBER###</span> <span class="tx-indexedsearch-title title">###TITLE###</span> <span class="tx-indexedsearch-percent percent percent-tmpl-css">###RATING###</span></h3>
179 211
		<!-- ###HEADER_ROW### end -->
......
207 239
<br /><br />
208 240

  
209 241

  
242

  
243
<h2>Search Results with Browseboxes - this is the main utput for the search results</h2>
244
<!-- ###SEARCH_RESULTS### begin-->  
245
###PAGEBROWSER_TOP###
246
###RESULTS###
247
###PAGEBROWSER_BOTTOM###
248
<!-- ###SEARCH_RESULTS### end-->
249

  
250
<!-- ###SEARCH_NO_RESULTS### begin-->
251
<p ###CLASS###>###NO_RESULT_MESSAGE###</p>
252
<!-- ###SEARCH_NO_RESULTS### end-->
253

  
254

  
210 255
</body>
211 256
</html>
typo3/sysext/indexed_search/ext_emconf.php (working copy)
32 32
	'author_company' => 'Curby Soft Multimedia',
33 33
	'CGLcompliance' => '',
34 34
	'CGLcompliance_note' => '',
35
	'version' => '2.12.0',
35
	'version' => '2.13.0',
36 36
	'_md5_values_when_last_written' => 'a:56:{s:9:"ChangeLog";s:4:"fd4b";s:17:"class.crawler.php";s:4:"68ea";s:25:"class.doublemetaphone.php";s:4:"28e4";s:25:"class.external_parser.php";s:4:"7774";s:17:"class.indexer.php";s:4:"ac85";s:15:"class.lexer.php";s:4:"7377";s:21:"ext_conf_template.txt";s:4:"0c64";s:12:"ext_icon.gif";s:4:"4cbf";s:17:"ext_localconf.php";s:4:"4c42";s:14:"ext_tables.php";s:4:"3a84";s:14:"ext_tables.sql";s:4:"2e41";s:28:"ext_typoscript_editorcfg.txt";s:4:"0a34";s:24:"ext_typoscript_setup.txt";s:4:"c2e7";s:13:"locallang.xml";s:4:"cd0c";s:26:"locallang_csh_indexcfg.xml";s:4:"f4f3";s:16:"locallang_db.xml";s:4:"f142";s:7:"tca.php";s:4:"f24a";s:12:"cli/conf.php";s:4:"19fe";s:21:"cli/indexer_cli.phpsh";s:4:"d236";s:14:"doc/README.txt";s:4:"a737";s:12:"doc/TODO.txt";s:4:"c804";s:29:"example/class.crawlerhook.php";s:4:"cf58";s:24:"example/class.pihook.php";s:4:"2897";s:46:"hooks/class.tx_indexedsearch_tslib_fe_hook.php";s:4:"2e20";s:13:"mod/clear.gif";s:4:"cc11";s:12:"mod/conf.php";s:4:"9062";s:13:"mod/index.php";s:4:"76bd";s:15:"mod/isearch.gif";s:4:"4cbf";s:21:"mod/locallang_mod.xml";s:4:"1624";s:21:"mod/mod_template.html";s:4:"a7f2";s:44:"modfunc1/class.tx_indexedsearch_modfunc1.php";s:4:"e1e8";s:22:"modfunc1/locallang.xml";s:4:"4806";s:44:"modfunc2/class.tx_indexedsearch_modfunc2.php";s:4:"c0e9";s:22:"modfunc2/locallang.xml";s:4:"a889";s:29:"pi/class.tx_indexedsearch.php";s:4:"2d2f";s:21:"pi/considerations.txt";s:4:"e3df";s:22:"pi/indexed_search.tmpl";s:4:"7ada";s:16:"pi/locallang.xml";s:4:"4f34";s:20:"pi/template_css.tmpl";s:4:"14aa";s:14:"pi/res/csv.gif";s:4:"e413";s:14:"pi/res/doc.gif";s:4:"0975";s:15:"pi/res/html.gif";s:4:"5647";s:14:"pi/res/jpg.gif";s:4:"23ac";s:17:"pi/res/locked.gif";s:4:"c212";s:16:"pi/res/pages.gif";s:4:"1923";s:14:"pi/res/pdf.gif";s:4:"9451";s:14:"pi/res/pps.gif";s:4:"926b";s:14:"pi/res/ppt.gif";s:4:"ada5";s:14:"pi/res/rtf.gif";s:4:"f660";s:14:"pi/res/sxc.gif";s:4:"00a6";s:14:"pi/res/sxi.gif";s:4:"ef83";s:14:"pi/res/sxw.gif";s:4:"4a8f";s:14:"pi/res/tif.gif";s:4:"533b";s:14:"pi/res/txt.gif";s:4:"c576";s:14:"pi/res/xls.gif";s:4:"4a22";s:14:"pi/res/xml.gif";s:4:"2e7b";}',
37 37
	'constraints' => array(
38 38
		'depends' => array(
(6-6/6)