Project

General

Profile

Feature #19465 » indexed_search_pluginconfiguration_v4.diff

Administrator Admin, 2009-03-03 14:01

View differences:

typo3/sysext/indexed_search/ext_emconf.php (working copy)
'author_company' => 'Curby Soft Multimedia',
'CGLcompliance' => '',
'CGLcompliance_note' => '',
'version' => '2.12.0',
'version' => '2.13.0',
'_md5_values_when_last_written' => 'a:54:{s:9:"ChangeLog";s:4:"b02b";s:17:"class.crawler.php";s:4:"df89";s:25:"class.doublemetaphone.php";s:4:"8d81";s:25:"class.external_parser.php";s:4:"7ed5";s:17:"class.indexer.php";s:4:"044d";s:15:"class.lexer.php";s:4:"ac05";s:21:"ext_conf_template.txt";s:4:"0c64";s:12:"ext_icon.gif";s:4:"4cbf";s:17:"ext_localconf.php";s:4:"732c";s:14:"ext_tables.php";s:4:"9bda";s:14:"ext_tables.sql";s:4:"f9e0";s:28:"ext_typoscript_editorcfg.txt";s:4:"0a34";s:24:"ext_typoscript_setup.txt";s:4:"c2e7";s:13:"locallang.xml";s:4:"0a76";s:26:"locallang_csh_indexcfg.xml";s:4:"f4f3";s:16:"locallang_db.xml";s:4:"2c55";s:7:"tca.php";s:4:"8991";s:29:"example/class.crawlerhook.php";s:4:"0ce8";s:24:"example/class.pihook.php";s:4:"e221";s:12:"cli/conf.php";s:4:"bbcd";s:21:"cli/indexer_cli.phpsh";s:4:"d236";s:44:"modfunc2/class.tx_indexedsearch_modfunc2.php";s:4:"b531";s:22:"modfunc2/locallang.xml";s:4:"a889";s:44:"modfunc1/class.tx_indexedsearch_modfunc1.php";s:4:"9fb3";s:22:"modfunc1/locallang.xml";s:4:"4806";s:29:"pi/class.tx_indexedsearch.php";s:4:"56ef";s:21:"pi/considerations.txt";s:4:"e3df";s:22:"pi/indexed_search.tmpl";s:4:"7ada";s:16:"pi/locallang.xml";s:4:"f62f";s:20:"pi/template_css.tmpl";s:4:"a2e2";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";s:13:"mod/clear.gif";s:4:"cc11";s:12:"mod/conf.php";s:4:"9062";s:13:"mod/index.php";s:4:"4dbd";s:15:"mod/isearch.gif";s:4:"4cbf";s:21:"mod/locallang_mod.xml";s:4:"1624";s:14:"doc/README.txt";s:4:"a737";s:12:"doc/TODO.txt";s:4:"c804";}',
'constraints' => array(
'depends' => array(
typo3/sysext/indexed_search/ext_localconf.php (working copy)
if (!defined ('TYPO3_MODE')) die ('Access denied.');
t3lib_extMgm::addPItoST43($_EXTKEY);
t3lib_extMgm::addPItoST43($_EXTKEY . 'box');
t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
tt_content.CSS_editor.ch.tx_indexedsearch = < plugin.tx_indexedsearch.CSS_editor
......
/*
$TYPO3_CONF_VARS['EXTCONF']['indexed_search']['crawler']['tx_myext_example1'] = 'EXT:indexed_search/example/class.crawlerhook.php:&tx_indexedsearch_crawlerhook';
*/
?>
?>
typo3/sysext/indexed_search/ext_tables.php (working copy)
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
t3lib_extMgm::addPlugin(Array('LLL:EXT:indexed_search/locallang.php:mod_indexed_search', $_EXTKEY));
t3lib_extMgm::addPlugin(Array('LLL:EXT:indexed_search/locallang.xml:mod_indexed_search', $_EXTKEY));
t3lib_extMgm::addPlugin(Array('LLL:EXT:indexed_search/locallang.xml:mod_indexed_search_box', $_EXTKEY . 'box'));
t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY] = 'layout,select_key,pages';
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_box'] = 'layout,select_key,recursive';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY] = 'pi_flexform';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY. '_box'] = 'pi_flexform';
t3lib_extMgm::addPiFlexFormValue($_EXTKEY ,'FILE:EXT:'.$_EXTKEY.'/flexform.xml');
t3lib_extMgm::addPiFlexFormValue($_EXTKEY. '_box' ,'FILE:EXT:'.$_EXTKEY.'/flexform_box.xml');
if (TYPO3_MODE=='BE') {
t3lib_extMgm::addModule('tools','isearch','after:log',t3lib_extMgm::extPath($_EXTKEY).'mod/');
......
$TCA['index_config']['types']['tx_myext_example1'] = $TCA['index_config']['types']['0'];
*/
?>
?>
typo3/sysext/indexed_search/ext_typoscript_setup.txt (working copy)
plugin.tx_indexedsearch {
templateFile = EXT:indexed_search/pi/indexed_search.tmpl
# what section should be displayed
code = form,rules,results
# if results should be outputted on a different page, define the pid for the result page here
resultPid =
show {
form = 1
rules = 1
results = 1
parsetimes = 0
L2sections = 0
L1sections = 1
......
}
path_stdWrap {
}
# 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>
}
markup_stdWrap {
wrap = <strong class="tx-indexedsearch-redMarkup">|</strong>
}
# Paging
resultsPerPage = 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.data = LLL:EXT:indexed_search/pi/locallang.xml:pi_list_browseresults_page
preCObject.noTrimWrap = | ||
}
}
search {
rootPidList =
page_links = 10
......
_LOCAL_LANG {
}
}
plugin.tx_indexedsearchbox < plugin.tx_indexedsearch
plugin.tx_indexedsearchbox.code = form
typo3/sysext/indexed_search/locallang.xml (working copy)
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="mod_indexed_search">Indexed search</label>
<label index="mod2_indexed_search">Indexed search statistics</label>
<label index="mod_indexed_search">Indexed Search</label>
<label index="mod_indexed_search_box">Searchbox for Indexed Search</label>
<label index="mod2_indexed_search">Indexed Search statistics</label>
<label index="flexform_indexed_search.sheetTitle">Indexed Search settings</label>
<label index="flexform_indexed_search.showForm">Show searchform</label>
<label index="flexform_indexed_search.extendedForm">Extended searchform</label>
<label index="flexform_indexed_search.showRules">Show rules</label>
<label index="flexform_indexed_search.showResults">Show results</label>
<label index="flexform_indexed_search_box.sheetTitle">Searchbox settings</label>
<label index="flexform_indexed_search_box.extendedForm">Extended searchform</label>
<label index="ignoreExtensions">Extension %s was set to be ignored.</label>
<label index="pdfToolsNotFound">PDF tools was not found in paths '%1$spdftotext' and/or '%1$spdfinfo'"</label>
<label index="pdfToolsDisabled">PDF tools disabled</label>
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php (working copy)
// Internals:
var $sWArr = array(); // Search Words and operators
var $optValues = array(); // Selector box values for search configuration form
var $firstRow = Array(); // Will hold the first row in result - used to calculate relative hit-ratings.
var $firstRow = array(); // Will hold the first row in result - used to calculate relative hit-ratings.
var $code = ''; // Given code for render
var $cache_path = array(); // Caching of page path
var $cache_rl = array(); // Caching of root line data
var $fe_groups_required = array(); // Required fe_groups memberships for display of a result.
......
$this->conf = $conf;
$this->pi_loadLL();
$this->pi_setPiVarDefaults();
$this->pi_initPIflexForm();
// Initialize the indexer-class - just to use a few function (for making hashes)
$this->indexerObj = t3lib_div::makeInstance('tx_indexedsearch_indexer');
......
// Initialize:
$this->initialize();
// Do search:
// If there were any search words entered...
if (is_array($this->sWArr)) {
$content = $this->doSearch($this->sWArr);
// Finally compile all the content, form, messages and results:
$this->code = t3lib_div::trimExplode(',', $this->conf['code'],true);
if (!is_array($this->code)) {
return '';
}
$content = '';
foreach ($this->code as $c) {
switch (t3lib_div::strtolower($c)) {
case 'form':
// if conf has only 'form' it's the plugin indexedsearch_box which needs the form all the time,
// when code has more components, make it dependend from the setting 'showForm'
if ($this->conf['code'] != 'form' && !$this->conf['show.']['form']) {
break;
}
$content .= $this->makeSearchForm($this->optValues);
break;
case 'rules':
if ($this->conf['show.']['rules']) {
$content .= $this->printRules();
}
break;
case 'results':
if ($this->conf['show.']['results']) {
// Do search, if there were any search words entered...
if (is_array($this->sWArr)) {
$content .= $this->doSearch($this->sWArr);
}
}
break;
}
}
// Finally compile all the content, form, messages and results:
$content = $this->makeSearchForm($this->optValues).
$this->printRules().
$content;
return $this->pi_wrapInBaseClass($content);
}
return $this->pi_wrapInBaseClass($content);
}
/**
* Initialize internal variables, especially selector box values for the search form and search words
*
......
function initialize() {
global $TYPO3_CONF_VARS;
// use flexfom settings to overwrite conf
if ($this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'extendedForm', 'sVIEW')) {
$this->piVars['ext'] = 1;
}
if ($this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'showForm', 'sVIEW')){
$this->conf['show.']['form'] = 1;
}
if ($this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'showRules', 'sVIEW')) {
$this->conf['show.']['rules'] = 1;
}
if ($this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'showResult', 'sVIEW')) {
$this->conf['show.']['results'] = 1;
}
if (intval($this->cObj->data['pages'])) {
$this->conf['resultPid'] = intval($this->cObj->data['pages']);
}
if (!isset($this->conf['resultPid'])) {
$this->conf['resultPid'] = $GLOBALS['TSFE']->id;
}
// Initialize external document parsers for icon display and other soft operations
if (is_array($TYPO3_CONF_VARS['EXTCONF']['indexed_search']['external_parsers'])) {
foreach ($TYPO3_CONF_VARS['EXTCONF']['indexed_search']['external_parsers'] as $extension => $_objRef) {
......
$this->piVars['sword'] = trim($this->piVars['sword_prev']).' '.$this->piVars['sword'];
}
$this->piVars['results'] = t3lib_div::intInRange($this->piVars['results'],1,100000,$this->defaultResultNumber);
$this->piVars['results'] = t3lib_div::intInRange($this->piVars['results'], 1, 100000, $this->conf['resultsPerPage']);
// Selector-box values defined here:
$this->optValues = Array(
......
* @return string HTML content to display result.
*/
function getDisplayResults($sWArr, $resData, $freeIndexUid=-1) {
$markerArray = array();
$html_results = $this->cObj->getSubpart($this->templateCode, '###SEARCH_RESULTS###');
$html_no_results = $this->cObj->getSubpart($this->templateCode, '###SEARCH_NO_RESULTS###');
// Print a message telling which words we searched for, and in which sections etc.
$what = $this->tellUsWhatIsSeachedFor($sWArr) .
(substr($this->piVars['sections'], 0, 2) == 'rl' ? ' ' . $this->pi_getLL('inSection', '', 1) . ' "' .
substr($this->getPathFromPageId(substr($this->piVars['sections'], 4)), 1) . '"' : '');
$markerArray['###WHATIS###'] = $this->cObj->stdWrap($what, $this->conf['whatis_stdWrap.']);
$markerArray['###SEARCH_FOR###'] = $this->tellUsWhatIsSeachedFor($sWArr);
// Perform display of result rows array:
if ($resData) {
$GLOBALS['TT']->push('Display Final result');
......
$this->firstRow = $resData['firstRow'];
// Result display here:
$rowcontent = '';
$rowcontent.= $this->compileResult($resData['resultRows'], $freeIndexUid);
$markerArray['###RESULTS###'] = $this->compileResult($resData['resultRows'], $freeIndexUid);
// Browsing box:
if ($resData['count']) {
......
$this->internal['results_at_a_time'] = $this->piVars['results'];
$this->internal['maxPages'] = t3lib_div::intInRange($this->conf['search.']['page_links'],1,100,10);
$addString = ($resData['count']&&$this->piVars['group']=='sections'&&$freeIndexUid<=0 ? ' '.sprintf($this->pi_getLL(count($this->resultSections)>1?'inNsections':'inNsection'),count($this->resultSections)):'');
$browseBox1 = $this->pi_list_browseresults(1,$addString,$this->printResultSectionLinks(),$freeIndexUid);
$browseBox2 = $this->pi_list_browseresults(0,'','',$freeIndexUid);
$markerArray['###BROWSE_BOX_TOP###'] = $this->pi_list_browseresults(1, $addString, $this->printResultSectionLinks(), $freeIndexUid);
$markerArray['###BROWSE_BOX_BOTTOM###'] = $this->pi_list_browseresults(0, '', '', $freeIndexUid);
}
// Browsing nav, bottom.
// Browsing nav, bottom.
if ($resData['count']) {
$content = $browseBox1.$rowcontent.$browseBox2;
$content = $this->cObj->substituteMarkerArrayCached($html_results, $markerArray, array(), array());
} else {
$content = '<p'.$this->pi_classParam('noresults').'>'.$this->pi_getLL('noResults','',1).'</p>';
$markerArray['###CLASS###'] = $this->pi_classParam('noresults');
$markerArray['###NO_RESULT_MESSAGE###'] = $this->pi_getLL('noResults','',1);
$content = $this->cObj->substituteMarkerArrayCached($html_no_results, $markerArray, array(), array());
}
$GLOBALS['TT']->pull();
} else {
$content.='<p'.$this->pi_classParam('noresults').'>'.$this->pi_getLL('noResults','',1).'</p>';
$markerArray['###CLASS###'] = $this->pi_classParam('noresults');
$markerArray['###NO_RESULT_MESSAGE###'] = $this->pi_getLL('noResults','',1);
$content = $this->cObj->substituteMarkerArrayCached($html_no_results, $markerArray, array(), array());
}
// Print a message telling which words we searched for, and in which sections etc.
$what = $this->tellUsWhatIsSeachedFor($sWArr).
(substr($this->piVars['sections'],0,2)=='rl'?' '.$this->pi_getLL('inSection','',1).' "'.substr($this->getPathFromPageId(substr($this->piVars['sections'],4)),1).'"':'');
$what = '<div'.$this->pi_classParam('whatis').'>'.$this->cObj->stdWrap($what, $this->conf['whatis_stdWrap.']).'</div>';
$content = $what.$content;
// Return content:
return $content;
......
across different queries on the same index. Score for each document is
computed using the standard Salton formula:
3f(1+log(N/n))
3f(1+log(N/n))
Where f is the frequency of the search term in the document, N is the total
number of rows in the table, and n is the number of rows which contain the
......
$html = $this->cObj->substituteSubpart($html, '###ADDITONAL_KEYWORD###', '');
}
$markerArray['###ACTION_URL###'] = htmlspecialchars($this->pi_getPageLink($GLOBALS['TSFE']->id, $GLOBALS['TSFE']->sPre));
$markerArray['###ACTION_URL###'] = htmlspecialchars($this->pi_getPageLink($this->conf['resultPid'], $GLOBALS['TSFE']->sPre));
$hiddenFieldCode = $this->cObj->getSubpart($this->templateCode, '###HIDDEN_FIELDS###');
$hiddenFieldCode = preg_replace('/^\n\t(.+)/ms', '$1', $hiddenFieldCode); // Remove first newline and tab (cosmetical issue)
......
// Write all hidden fields
$html = $this->cObj->substituteSubpart($html, '###HIDDEN_FIELDS###', implode('',$hiddenFieldArr));
$substitutedContent = $this->cObj->substituteMarkerArrayCached($html, $markerArray, array(), array());
return $this->cObj->substituteMarkerArrayCached($html, $markerArray, array(), array());
}
/**
* Make hidden search form HTML. This form is needed when page browser is displayed.
*
* @param array Value/Labels pairs for search form selector boxes.
* @return string Search form HTML
*/
function makeHiddenSearchForm($optValues) {
$html = $this->cObj->getSubpart($this->templateCode, '###SEARCH_FORM_HIDDEN###');
$markerArray['###ACTION_URL###'] = htmlspecialchars($this->pi_getPageLink($this->conf['resultPid'], $GLOBALS['TSFE']->sPre));
return $substitutedContent;
$hiddenFieldCode = $this->cObj->getSubpart($this->templateCode, '###HIDDEN_FIELDS###');
$hiddenFieldCode = preg_replace('/^\n\t(.+)/ms', '$1', $hiddenFieldCode); // Remove first newline and tab (cosmetical issue)
$hiddenFieldArr = array();
// put search params to hidden fields
$hiddenFieldList = $this->hiddenFieldList . ',sword';
foreach (t3lib_div::trimExplode(',', $hiddenFieldList) as $fieldName) {
$hiddenFieldMarkerArray = array();
$hiddenFieldMarkerArray['###HIDDEN_FIELDNAME###'] = $this->prefixId.'['.$fieldName.']';
$hiddenFieldMarkerArray['###HIDDEN_VALUE###'] = htmlspecialchars((string)$this->piVars[$fieldName]);
$hiddenFieldArr[$fieldName] = $this->cObj->substituteMarkerArrayCached($hiddenFieldCode, $hiddenFieldMarkerArray, array(), array());
}
// Write all hidden fields
$html = $this->cObj->substituteSubpart($html, '###HIDDEN_FIELDS###', implode('', $hiddenFieldArr));
return $this->cObj->substituteMarkerArrayCached($html, $markerArray, array(), array());
}
/**
......
* @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!
* @return string HTML output
*/
function pi_list_browseresults($showResultCount=1,$addString='',$addPart='',$freeIndexUid=-1) {
function pi_list_browseresults($renderTopBrowseBox=1, $addString='', $addPart='', $freeIndexUid=-1) {
$markerArray = $subpartArray = array();
$html = $this->cObj->getSubpart($this->templateCode, '###BROWSE_BOX_' . ($renderTopBrowseBox ? 'TOP' : 'BOTTOM') . '###');
$browseLinks = $this->cObj->getSubpart($html, '###BROWSE_LINKS###');
// Initializing variables:
$pointer=$this->piVars['pointer'];
$count=$this->internal['res_count'];
......
$sTables = '';
if ($pageCount > 1) { // only show the result browser if more than one page is needed
$pointer=intval($pointer);
$links=array();
// look if form is present, if not display a hidden form
$markerArray['###HIDDENFORM###'] = (in_array('form', $this->code) && $this->conf['show.']['form']) ? '' : $this->makeHiddenSearchForm($this->optValues);
$pointer = intval($pointer);
// Make browse-table/links:
if ($pointer>0) { // all pages after the 1st one
$links[]='<li>'.$this->makePointerSelector_link($this->pi_getLL('pi_list_browseresults_prev','< Previous',1),$pointer-1,$freeIndexUid).'</li>';
$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.']);
} else {
$markerArray['###PREVIOUS###'] = '';
}
for($a=0;$a<$pageCount;$a++) {
$min = max(0, $pointer+1-ceil($maxPages/2));
$max = $min+$maxPages;
if($max>$pageCount) {
$min = $min - ($max-$pageCount);
$markerArray['###PAGES###'] = '';
for($a=0; $a<$pageCount; $a++) {
$min = max(0, $pointer +1 - ceil($maxPages / 2));
$max = $min + $maxPages;
if($max > $pageCount) {
$min = $min - ($max - $pageCount);
}
$linkText = $this->cObj->stdWrap($a+1, $this->conf['pageBrowser.']['pageLinks_stdWrap.']);
if($a >= $min && $a < $max) {
if($a==$pointer) {
$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>';
if($a == $pointer) { //current
$markerArray['###PAGES###'] .= $this->cObj->stdWrap($this->conf['pageBrowser.']['doNotLinkCurrent'] ? $linkText : $this->makePointerSelector_link($linkText, $a, $freeIndexUid), $this->conf['pageBrowser.']['current_stdWrap.']);
} else {
$links[]='<li>'.$this->makePointerSelector_link(trim($this->pi_getLL('pi_list_browseresults_page','Page',1).' '.($a+1)),$a,$freeIndexUid).'</li>';
$markerArray['###PAGES###'] .= $this->cObj->stdWrap($this->makePointerSelector_link($linkText, $a, $freeIndexUid), $this->conf['pageBrowser.']['pages_stdWrap.']);
}
}
}
if ($pointer+1 < $pageCount) {
$links[]='<li>'.$this->makePointerSelector_link($this->pi_getLL('pi_list_browseresults_next','Next >',1),$pointer+1,$freeIndexUid).'</li>';
if ($pointer + 1 < $pageCount) {
$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.']);
} else {
$markerArray['###NEXT###'] = '';
}
$subpartArray['###BROWSE_LINKS###'] = $this->cObj->stdWrap($this->cObj->substituteMarkerArrayCached($browseLinks, $markerArray, array(), array()), $this->conf['pageBrowser.']['general_stdWrap.']);
} else {
$subpartArray['###BROWSE_LINKS###'] = '';
}
$pR1 = $pointer * $results_at_a_time + 1;
$pR2 = $pointer * $results_at_a_time + $results_at_a_time;
$pR1 = $pointer*$results_at_a_time+1;
$pR2 = $pointer*$results_at_a_time+$results_at_a_time;
if(is_array($links)) {
$addPart .= '
<ul class="browsebox">
'.implode('',$links).'
</ul>';
}
$label = $this->pi_getLL('pi_list_browseresults_display','Displaying results ###TAG_BEGIN###%s to %s###TAG_END### out of ###TAG_BEGIN###%s###TAG_END###');
$label = str_replace('###TAG_BEGIN###','<strong>',$label);
$label = str_replace('###TAG_END###','</strong>',$label);
$sTables = '<div'.$this->pi_classParam('browsebox').'>'.
($showResultCount ? '<p>'.sprintf(
$markerArray['###RESULTCOUNT###'] = sprintf(
$label,
$pR1,
min(array($this->internal['res_count'],$pR2)),
$this->internal['res_count']
).$addString.'</p>':''
).$addPart.'</div>';
return $sTables;
$this->internal['res_count']);
$markerArray['###ADDSTRING###'] = $addString;
$markerArray['###ADDPART###'] = $addPart;
return $this->cObj->substituteMarkerArrayCached($html, $markerArray, $subpartArray, array());
}
......
if ($c) {
switch($v['oper']) {
case 'OR':
$searchingFor.= ' '.$this->pi_getLL('searchFor_or','',1).' '.$this->wrapSW($this->utf8_to_currentCharset($v['sword']));
$searchingFor .= ' ' . $this->pi_getLL('searchFor_or', '', 1) . ' ' . $this->cObj->stdWrap($this->utf8_to_currentCharset($v['sword']), $this->conf['searchWord_stdWrap.']);
break;
case 'AND NOT':
$searchingFor.= ' '.$this->pi_getLL('searchFor_butNot','',1).' '.$this->wrapSW($this->utf8_to_currentCharset($v['sword']));
$searchingFor .= ' ' . $this->pi_getLL('searchFor_butNot', '', 1) . ' ' . $this->cObj->stdWrap($this->utf8_to_currentCharset($v['sword']), $this->conf['searchWord_stdWrap.']);
break;
default: // AND...
$searchingFor.= ' '.$this->pi_getLL('searchFor_and','',1).' '.$this->wrapSW($this->utf8_to_currentCharset($v['sword']));
$searchingFor .= ' ' . $this->pi_getLL('searchFor_and', '', 1) . ' ' . $this->cObj->stdWrap($this->utf8_to_currentCharset($v['sword']), $this->conf['searchWord_stdWrap.']);
break;
}
} else {
$searchingFor = $this->pi_getLL('searchFor','',1).' '.$this->wrapSW($this->utf8_to_currentCharset($v['sword']));
$searchingFor = $this->pi_getLL('searchFor','',1).' '.$this->cObj->stdWrap($this->utf8_to_currentCharset($v['sword']), $this->conf['searchWord_stdWrap.']);
}
$c++;
}
......
}
/**
* Wraps the search words in the search-word list display (from ->tellUsWhatIsSeachedFor())
*
* @param string search word to wrap (in local charset!)
* @return string Search word wrapped in <span> tag.
*/
function wrapSW($str) {
return '"<span'.$this->pi_classParam('sw').'>'.htmlspecialchars($str).'</span>"';
}
/**
* Makes a selector box
*
* @param string Name of selector box
......
}
} else {
$summaryLgd+= $GLOBALS['TSFE']->csConvObj->strlen('utf-8',$strP);
$output[$k] = '<strong class="tx-indexedsearch-redMarkup">'.htmlspecialchars($parts[$k]).'</strong>';
$output[$k] = $this->cObj->stdWrap(htmlspecialchars($parts[$k]), $this->conf['markup_stdWrap.']);
}
}
typo3/sysext/indexed_search/pi/indexed_search.tmpl (working copy)
<!-- ###RESULT_OUTPUT### end -->
<br /><br />
<h2>TEMPLATE_SEARCH_FORM_INVISIBLE</h2>
<p><em>Template for hidden search form used by page browser</em></p>
<!-- ###SEARCH_FORM_HIDDEN### begin -->
<div style="display:none">
<form action="###ACTION_URL###" method="post" name="tx_indexedsearch">
<input type="hidden" name="tx_indexedsearch[_sections]" value="0" />
<input type="hidden" name="tx_indexedsearch[_freeIndexUid]" value="_" />
<input type="hidden" name="tx_indexedsearch[pointer]" value="0" />
<!-- ###HIDDEN_FIELDS### begin -->
<input type="hidden" name="###HIDDEN_FIELDNAME###" value="###HIDDEN_VALUE###" />
<!-- ###HIDDEN_FIELDS### end -->
<form>
</div>
<!-- ###SEARCH_FORM_HIDDEN### end -->
<!-- ###BROWSE_BOX_TOP### begin-->
<div class="tx-indexedsearch-browsebox">
<p>###RESULTCOUNT### ###ADDSTRING###</p>
###ADDPART###
<!-- ###BROWSE_LINKS### -->###PREVIOUS### ###PAGES### ###NEXT###<!-- ###BROWSE_LINKS### -->
</div>
<!-- ###BROWSE_BOX_TOP### end-->
<!-- ###BROWSE_BOX_BOTTOM### begin-->
<div class="tx-indexedsearch-browsebox">
<!-- ###BROWSE_LINKS### -->###PREVIOUS### ###PAGES### ###NEXT###<!-- ###BROWSE_LINKS### -->
</div>
<!-- ###BROWSE_BOX_BOTTOM### end-->
<h2>Search Results</h2>
<! -- ###SEARCH_RESULTS### begin-->
###WHATIS###
###BROWSE_BOX_TOP###
###RESULTS###
###BROWSE_BOX_BOTTOM###
<! -- ###SEARCH_RESULTS### end-->
<! -- ###SEARCH_NO_RESULTS### begin-->
<p ###CLASS###>###NO_RESULT_MESSAGE###</p>
<! -- ###SEARCH_NO_RESULTS### end-->
</body>
</html>
typo3/sysext/indexed_search/pi/template_css.tmpl (working copy)
<br /><br />
<h2>TEMPLATE_SEARCH_FORM_INVISIBLE</h2>
<p><em>Template for hidden search form used by page browser</em></p>
<!-- ###SEARCH_FORM_HIDDEN### begin -->
<div style="display:none">
<form action="###ACTION_URL###" method="post" name="tx_indexedsearch">
<input type="hidden" name="tx_indexedsearch[_sections]" value="0" />
<input type="hidden" name="tx_indexedsearch[_freeIndexUid]" value="_" />
<input type="hidden" name="tx_indexedsearch[pointer]" value="0" />
<!-- ###HIDDEN_FIELDS### begin -->
<input type="hidden" name="###HIDDEN_FIELDNAME###" value="###HIDDEN_VALUE###" />
<!-- ###HIDDEN_FIELDS### end -->
<form>
</div>
<!-- ###SEARCH_FORM_HIDDEN### end -->
<br /><br />
<h2>TEMPLATE_RULES</h2>
<p><em>Template for displaying the search rules.</em></p>
......
<br /><br />
<h2>Browsebox for the top</h2>
<!-- ###BROWSE_BOX_TOP### begin-->
###HIDDENFORM###
<div class="tx-indexedsearch-browsebox">
<p>###RESULTCOUNT### ###ADDSTRING###</p>
###ADDPART###
<!-- ###BROWSE_LINKS### -->###PREVIOUS### ###PAGES### ###NEXT###<!-- ###BROWSE_LINKS### -->
</div>
<!-- ###BROWSE_BOX_TOP### end-->
<h2>Browsebox for the bottom</h2>
<!-- ###BROWSE_BOX_BOTTOM### begin-->
<div class="tx-indexedsearch-browsebox">
<!-- ###BROWSE_LINKS### -->###PREVIOUS### ###PAGES### ###NEXT###<!-- ###BROWSE_LINKS### -->
</div>
<!-- ###BROWSE_BOX_BOTTOM### end-->
<h2>TEMPLATE_RESULT_OUTPUT</h2>
<p><em>Template for the search result list.</em></p>
<!-- ###RESULT_OUTPUT### begin -->
......
<br /><br />
<h2>Search Results with Browseboxes - this is the main utput for the search results</h2>
<!-- ###SEARCH_RESULTS### begin-->
###BROWSE_BOX_TOP###
###RESULTS###
###BROWSE_BOX_BOTTOM###
<!-- ###SEARCH_RESULTS### end-->
<!-- ###SEARCH_NO_RESULTS### begin-->
<p ###CLASS###>###NO_RESULT_MESSAGE###</p>
<!-- ###SEARCH_NO_RESULTS### end-->
</body>
</html>
(1-1/6)