[Mediawiki-l] RES: customizing search results

Adam Meyer meyer7 at mindspring.com
Wed Aug 8 00:25:44 UTC 2007

If I understand you correctly, you dont want any of the text of the  
article to show up in the search results, and only have it show the  
title of the article in which the result exists?

If this is the case, you can do this quite easily.

in specialSearch.php you can add after 		$contextlines = $wgUser- 
 >getOption( 'contextlines' );

if ( $contextlines != '0') { $contextlines = 0; }

It overwrites the users preferences of how many lines of the article  
to return with the results by setting it to 0 if it is not 0  
retuening only the title in the results.

you can see an example here:

If this is not what you wanted, im sorry.



> Just to remind I would like to configure my wiki to return ***only  
> titles*** in a search.
> Thaks all feedbacks.
> Best regards.
> Elton S.Fenne

More information about the MediaWiki-l mailing list