PHP code example of open-csp / wiki-search

1. Go to this page and download the library: Download open-csp/wiki-search library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

open-csp / wiki-search example snippets


function onWikiSearchBeforeElasticQuery( array &$query, array &$hosts ) {}

function onWikiSearchApplyResultTranslations( array &$results ) {}

function onWikiSearchOnLoadFrontend( 
    string &$result, 
    \WikiSearch\SearchEngineConfig $config, 
    Parser $parser, 
    array $parameters 
) {}

{{#wikisearchconfig:
  |Version
  |Tag
  |Space
  |?Title
  |?Version
}}