[TYPO3-4-3] SysExt Indexed Search List / New Marker

Chris Bernhard chris at dreamride.de
Wed Feb 3 14:26:00 CET 2010


Hi Steffen,

its really useful... How can i create an patch? I never did it before.
Here is the changed code in the function i swapped via XCLASS.
I marked the lines with // INSERTED BY CHRIS.

    function prepareResultRowTemplateData($row, $headerOnly)    {

             // Initialize:
         $specRowConf = $this->getSpecialConfigForRow($row);
         $CSSsuffix = 
$specRowConf['CSSsuffix']?'-'.$specRowConf['CSSsuffix']:'';

             // If external media, link to the media-file instead.
         if ($row['item_type'])    {        // External media
             if ($row['show_resume'])    {    // Can link directly.
                 $title = '<a 
href="'.htmlspecialchars($row['data_filename']).'">'.htmlspecialchars($this->makeTitle($row)).'</a>';
             // INSERTED BY CHRIS
         $more_link = '<a 
href="'.htmlspecialchars($row['data_filename']).'">'.$this->pi_getLL('more_link').'</a>';
         } else {    // Suspicious, so linking to page instead...
                 $copy_row = $row;
                 unset($copy_row['cHashParams']);
                 $title = 
$this->linkPage($row['page_id'],htmlspecialchars($this->makeTitle($row)),$copy_row);
                 // INSERTED BY CHRIS
                 $more_link = 
$this->linkPage($row['page_id'],htmlspecialchars($this->pi_getLL('more_link')),$copy_row);
             }
         } else {    // Else the page:

                 // Prepare search words for markup in content:
             if ($this->conf['forwardSearchWordsInResultLink'])    {
                 $markUpSwParams = array('no_cache' => 1);
                 foreach ($this->sWArr as $d)    {
                     $markUpSwParams['sword_list'][] = $d['sword'];
                 }
             } else {
                 $markUpSwParams = array();
             }
             $title = 
$this->linkPage($row['data_page_id'],htmlspecialchars($this->makeTitle($row)),$row,$markUpSwParams);
             // INSERTED BY CHRIS
             $more_link = 
$this->linkPage($row['data_page_id'],$this->pi_getLL('more_link'),$row,$markUpSwParams);
         }

         $tmplContent = array();
         $tmplContent['title'] = $title;
         // INSERTED BY CHRIS
         $tmplContent['morelink'] = $more_link;
         $tmplContent['result_number'] = 
$this->conf['show.']['resultNumber'] ? $row['result_number'].': ' : 
'&nbsp;';
         $tmplContent['icon'] = 
$this->makeItemTypeIcon($row['item_type'],'',$specRowConf);
         $tmplContent['rating'] = $this->makeRating($row);
         $tmplContent['description'] = 
$this->makeDescription($row,$this->piVars['extResume'] && !$headerOnly?0:1);
         $tmplContent = $this->makeInfo($row,$tmplContent);
         $tmplContent['access'] = 
$this->makeAccessIndication($row['page_id']);
         $tmplContent['language'] = $this->makeLanguageIndication($row);
         $tmplContent['CSSsuffix'] = $CSSsuffix;

             // Post processing with hook.
         if ($hookObj = 
$this->hookRequest('prepareResultRowTemplateData_postProc')) {
             $tmplContent = 
$hookObj->prepareResultRowTemplateData_postProc($tmplContent, $row, 
$headerOnly);
         }

         return $tmplContent;
     }	

Best regards,

Chris

Am 02.02.2010 14:22, schrieb Steffen Gebert:
> Am 02.02.2010, 12:59 Uhr, schrieb Chris Bernhard <chris at dreamride.de>:
>
>> Hi @ all,
>>
>> i simply wrote a small XCLASS Extension for this issue.
>> Would be great, if the small marker is included by default
>> in some of the next indexed search release.
>>
>> In my opinion its a major "feature" :-)
>
> Please provide your patch and send it to the core list, if you really
> think it's a useful feature!
>
> STeffen


More information about the TYPO3-project-4-3 mailing list