Project

General

Profile

Feature #14902 » 20080115_indexed_search_no_javascript.patch

Administrator Admin, 2008-01-15 11:51

View differences:

typo3/sysext/indexed_search/ext_typoscript_setup.txt (working copy)
}
*/
forwardSearchWordsInResultLink = 0
browseLinks_setUrl = 0
# Setting default values for piVars (please see the source code for the form-field names which you can preset values for here)
_DEFAULT_PI_VARS {
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php (working copy)
var $resultSections = array(); // Page tree sections for search result.
var $external_parsers = array(); // External parser objects
var $iconFileNameCache = array(); // Storage of icons....
var $pointerVars = array(); // contains piVars required for page browser links
/**
* Lexer object
......
*
* @param string String to wrap in <a> tag
* @param integer Pointer value
* @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!
* @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 Input string wrapped in <a> tag with onclick event attribute set.
*/
function makePointerSelector_link($str,$p,$freeIndexUid) {
$onclick = 'document.'.$this->prefixId.'[\''.$this->prefixId.'[pointer]\'].value=\''.$p.'\';'.
function makePointerSelector_link($str, $p, $freeIndexUid) {
if ($this->conf['browseLinks_setUrl']) {
// create pointerVars only once
if (!$this->pointerVars) {
$this->pointerVars = $this->piVars;
unset($this->pointerVars['submit_button']);
// only use non-default values
foreach ($this->pointerVars as $var => $val) {
if ((is_array($this->optValues[$var]) && $this->piVars[$var] == (string) array_shift(array_keys($this->optValues[$var]))) ||
(isset($this->conf['_DEFAULT_PI_VARS.'][$var]) && $this->conf['_DEFAULT_PI_VARS'][$var] == $val)) {
unset($this->pointerVars[$var]);
}
}
}
$this->pointerVars['pointer'] = $p;
$url = $this->pi_linkTP_keepPIvars_url($this->pointerVars, 0, 1);
return '<a href="'.htmlspecialchars($url).'">'.$str.'</a>';
} else {
$onclick = 'document.'.$this->prefixId.'[\''.$this->prefixId.'[pointer]\'].value=\''.$p.'\';'.
'document.'.$this->prefixId.'[\''.$this->prefixId.'[_freeIndexUid]\'].value=\''.rawurlencode($freeIndexUid).'\';'.
'document.'.$this->prefixId.'.submit();return false;';
return '<a href="#" onclick="'.htmlspecialchars($onclick).'">'.$str.'</a>';
return '<a href="#" onclick="'.htmlspecialchars($onclick).'">'.$str.'</a>';
}
}
/**
* Return icon for file extension
*
(3-3/5)